From cb9a448fc986e7a0b6adf18f9ed4272d56123fa2 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Thu, 7 Sep 2017 11:55:33 +0200 Subject: [PATCH] Sculpt system scenario Issue #2676 --- .../recipes/pkg/sculpt-installation/README | 1 + .../recipes/pkg/sculpt-installation/archives | 8 + .../gems/recipes/pkg/sculpt-installation/hash | 1 + repos/gems/recipes/pkg/sculpt/README | 3 + repos/gems/recipes/pkg/sculpt/archives | 41 ++ repos/gems/recipes/pkg/sculpt/hash | 1 + repos/gems/run/sculpt.run | 666 ++++++++++++++++++ repos/gems/run/sculpt/block_runtime.config | 67 ++ .../gems/run/sculpt/default_fs_subinit.config | 47 ++ .../run/sculpt/default_nic_subinit.config | 54 ++ .../run/sculpt/default_noux_subinit.config | 58 ++ repos/gems/run/sculpt/deploy_runtime.config | 117 +++ repos/gems/run/sculpt/download_runtime.config | 134 ++++ repos/gems/run/sculpt/empty_runtime.config | 19 + repos/gems/run/sculpt/fb_drv.config | 5 + repos/gems/run/sculpt/fs_runtime.config | 61 ++ repos/gems/run/sculpt/leitzentrale.config | 171 +++++ repos/gems/run/sculpt/load_runtime.config | 81 +++ repos/gems/run/sculpt/machine.vbox | 60 ++ repos/gems/run/sculpt/machine.vdi.gz | Bin 0 -> 2236 bytes repos/gems/run/sculpt/nitpicker.config | 25 + repos/gems/run/sculpt/update_runtime.config | 119 ++++ repos/gems/run/sculpt/vimrc | 10 + repos/gems/run/sculpt/wlan.config | 1 + 24 files changed, 1750 insertions(+) create mode 100644 repos/gems/recipes/pkg/sculpt-installation/README create mode 100644 repos/gems/recipes/pkg/sculpt-installation/archives create mode 100644 repos/gems/recipes/pkg/sculpt-installation/hash create mode 100644 repos/gems/recipes/pkg/sculpt/README create mode 100644 repos/gems/recipes/pkg/sculpt/archives create mode 100644 repos/gems/recipes/pkg/sculpt/hash create mode 100644 repos/gems/run/sculpt.run create mode 100644 repos/gems/run/sculpt/block_runtime.config create mode 100644 repos/gems/run/sculpt/default_fs_subinit.config create mode 100644 repos/gems/run/sculpt/default_nic_subinit.config create mode 100644 repos/gems/run/sculpt/default_noux_subinit.config create mode 100644 repos/gems/run/sculpt/deploy_runtime.config create mode 100644 repos/gems/run/sculpt/download_runtime.config create mode 100644 repos/gems/run/sculpt/empty_runtime.config create mode 100644 repos/gems/run/sculpt/fb_drv.config create mode 100644 repos/gems/run/sculpt/fs_runtime.config create mode 100644 repos/gems/run/sculpt/leitzentrale.config create mode 100644 repos/gems/run/sculpt/load_runtime.config create mode 100644 repos/gems/run/sculpt/machine.vbox create mode 100644 repos/gems/run/sculpt/machine.vdi.gz create mode 100644 repos/gems/run/sculpt/nitpicker.config create mode 100644 repos/gems/run/sculpt/update_runtime.config create mode 100644 repos/gems/run/sculpt/vimrc create mode 100644 repos/gems/run/sculpt/wlan.config diff --git a/repos/gems/recipes/pkg/sculpt-installation/README b/repos/gems/recipes/pkg/sculpt-installation/README new file mode 100644 index 000000000..2a93f8632 --- /dev/null +++ b/repos/gems/recipes/pkg/sculpt-installation/README @@ -0,0 +1 @@ +Default installation for a sculpt-based desktop diff --git a/repos/gems/recipes/pkg/sculpt-installation/archives b/repos/gems/recipes/pkg/sculpt-installation/archives new file mode 100644 index 000000000..459c7e520 --- /dev/null +++ b/repos/gems/recipes/pkg/sculpt-installation/archives @@ -0,0 +1,8 @@ +_/pkg/noux-system +_/pkg/wifi +_/pkg/ipxe_nic_drv +_/pkg/chroot +_/pkg/nit_focus +_/pkg/rom_filter +_/pkg/nic_router-nat +_/pkg/vbox5-nova-sculpt diff --git a/repos/gems/recipes/pkg/sculpt-installation/hash b/repos/gems/recipes/pkg/sculpt-installation/hash new file mode 100644 index 000000000..fbb25b76e --- /dev/null +++ b/repos/gems/recipes/pkg/sculpt-installation/hash @@ -0,0 +1 @@ +2018-02-08-c 2fed5daa84ce8a6c498f5b81be010bb4d4ef67d1 diff --git a/repos/gems/recipes/pkg/sculpt/README b/repos/gems/recipes/pkg/sculpt/README new file mode 100644 index 000000000..7315d2bd2 --- /dev/null +++ b/repos/gems/recipes/pkg/sculpt/README @@ -0,0 +1,3 @@ + + Collection of depot archives needed for the sculpt scenario + diff --git a/repos/gems/recipes/pkg/sculpt/archives b/repos/gems/recipes/pkg/sculpt/archives new file mode 100644 index 000000000..6f03cc668 --- /dev/null +++ b/repos/gems/recipes/pkg/sculpt/archives @@ -0,0 +1,41 @@ +_/pkg/drivers_managed-pc +_/pkg/wifi +_/pkg/depot_download +_/src/report_rom +_/src/init +_/src/ram_fs +_/src/fs_rom +_/src/fs_report +_/src/nitpicker +_/src/global_keys_handler +_/src/nit_fb +_/src/nit_focus +_/src/nit_fader +_/src/rtc_drv +_/src/top +_/src/trace_subject_reporter +_/src/cpu_load_display +_/src/rom_filter +_/src/terminal +_/src/terminal_log +_/src/file_terminal +_/src/libc +_/src/posix +_/src/ncurses +_/src/noux +_/src/bash-minimal +_/src/vim-minimal +_/src/coreutils-minimal +_/src/vfs +_/src/rump +_/src/ipxe_nic_drv +_/src/chroot +_/src/fetchurl +_/src/curl +_/src/libssh +_/src/zlib +_/src/log_core +_/src/depot_deploy +_/src/part_blk +_/src/nic_router +_/src/e2fsprogs-minimal diff --git a/repos/gems/recipes/pkg/sculpt/hash b/repos/gems/recipes/pkg/sculpt/hash new file mode 100644 index 000000000..ba673e366 --- /dev/null +++ b/repos/gems/recipes/pkg/sculpt/hash @@ -0,0 +1 @@ +2018-02-09-a f8795f395a07268fabade07cd84123392a259fac diff --git a/repos/gems/run/sculpt.run b/repos/gems/run/sculpt.run new file mode 100644 index 000000000..05f9a9fa5 --- /dev/null +++ b/repos/gems/run/sculpt.run @@ -0,0 +1,666 @@ +if {![have_spec x86] || [have_spec linux]} { + puts "Platform is unsupported." + exit 0 +} + +proc depot_user {} { return [get_cmd_arg --depot-user genodelabs] } + +create_boot_directory + +import_from_depot genodelabs/src/[base_src] \ + genodelabs/pkg/sculpt + +proc config_system_content {} { return {\ + +} } + + +proc config_trace_subject_reporter_content {} { return {\ + + +} } + + +install_config { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } [config_trace_subject_reporter_content] { + + } [config_system_content] { + + + + + + + + + + + + + + + + + + + + + + + + ### start ### + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +} + +foreach file [glob "[genode_dir]/repos/gems/run/sculpt/*.config"] { + file copy -force $file [run_dir]/genode/ } + + +# +# Override files normally obtained from depot archive with the most current +# version found in the Genode source tree. This way, we don't need to +# rebuild the corresponding depot archives each time we tweak one of the +# files. This is just a hack to accelerate the work flow. +# + +file copy -force [genode_dir]/repos/gems/run/sculpt/vimrc [run_dir]/genode/ + +file copy -force [genode_dir]/repos/gems/run/sculpt/machine.vbox [run_dir]/genode/ + +file copy -force [genode_dir]/repos/gems/recipes/raw/drivers_managed-pc/drivers.config \ + [run_dir]/genode/drivers.config + +file copy -force [genode_dir]/repos/os/src/server/input_filter/en_us.chargen \ + [run_dir]/genode/en_us.chargen + +file copy -force [genode_dir]/repos/os/src/server/input_filter/de.chargen \ + [run_dir]/genode/de.chargen + +file copy -force [genode_dir]/repos/gems/recipes/raw/drivers_managed-pc/input_filter.config \ + [run_dir]/genode/input_filter.config + +file copy -force [genode_dir]/repos/gems/recipes/raw/depot_download/depot_download.config \ + [run_dir]/genode/depot_download.config + +file copy -force [genode_dir]/depot/[depot_user]/pubkey [run_dir]/genode/[depot_user]_pubkey +file copy -force [genode_dir]/depot/[depot_user]/download [run_dir]/genode/[depot_user]_download + +exec gzip -dc [genode_dir]/repos/gems/run/sculpt/machine.vdi.gz > [run_dir]/genode/machine.vdi + + +# +# Package-management support +# +# The package management has two aspects, installation and deployment. +# Packages are installed via the 'install' runtime, which takes the +# information about the packages to install from 'config/installation'. +# Once installed, packages can be deployed via the 'deploy' runtime. +# This runtime can be tailored by modifying 'config/deploy/config'. +# + +proc current_pkg { pkg } { return $pkg/[_current_depot_archive_version pkg $pkg] } + +# +# Depot packages to be included in the default installation +# +set pkgs_to_install { sculpt-installation } + +set fd [open [run_dir]/genode/installation w] +puts $fd "" +foreach pkg $pkgs_to_install { + puts $fd " " } +puts $fd "" +close $fd + +# +# Configuration of deploy runtime +# +# This configuration is not provided as a file at run/sculpt/ because some +# parts need to be filled in at run-script execution time, in particular the +# current versions of the packages to deploy. +# +append depot_deploy_config { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +} + +set fd [open [run_dir]/genode/deploy.config w] +puts $fd $depot_deploy_config +close $fd + + +# +# Create and run boot image +# + +append boot_modules { } + +build_boot_image $boot_modules + +# enable Qemu networking, usable via the nic_drv +append qemu_args " -m 768 -net nic,model=e1000 -net user " + +# attach small SATA disk to Qemu to experiment with file-system access +set disk_image "bin/sculpt-ahci.raw" +if {![file exists bin/sculpt-ahci.raw]} { + puts stderr "creating toy disk image $disk_image for use in Qemu" + catch { exec dd if=/dev/zero of=$disk_image bs=1M count=512 } +} +append qemu_args " -device ahci,id=ahci " +append qemu_args " -drive id=hdd,file=$disk_image,format=raw,if=none -device ide-hd,drive=hdd,bus=ahci.0 " + +run_genode_until forever + diff --git a/repos/gems/run/sculpt/block_runtime.config b/repos/gems/run/sculpt/block_runtime.config new file mode 100644 index 000000000..81c5d282c --- /dev/null +++ b/repos/gems/run/sculpt/block_runtime.config @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/repos/gems/run/sculpt/default_fs_subinit.config b/repos/gems/run/sculpt/default_fs_subinit.config new file mode 100644 index 000000000..0f8f5ca20 --- /dev/null +++ b/repos/gems/run/sculpt/default_fs_subinit.config @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/repos/gems/run/sculpt/default_nic_subinit.config b/repos/gems/run/sculpt/default_nic_subinit.config new file mode 100644 index 000000000..e7f432d3e --- /dev/null +++ b/repos/gems/run/sculpt/default_nic_subinit.config @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/repos/gems/run/sculpt/default_noux_subinit.config b/repos/gems/run/sculpt/default_noux_subinit.config new file mode 100644 index 000000000..9e3ef65e3 --- /dev/null +++ b/repos/gems/run/sculpt/default_noux_subinit.config @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/repos/gems/run/sculpt/deploy_runtime.config b/repos/gems/run/sculpt/deploy_runtime.config new file mode 100644 index 000000000..ec278d127 --- /dev/null +++ b/repos/gems/run/sculpt/deploy_runtime.config @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/repos/gems/run/sculpt/download_runtime.config b/repos/gems/run/sculpt/download_runtime.config new file mode 100644 index 000000000..fb35d76c5 --- /dev/null +++ b/repos/gems/run/sculpt/download_runtime.config @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/repos/gems/run/sculpt/empty_runtime.config b/repos/gems/run/sculpt/empty_runtime.config new file mode 100644 index 000000000..b33cc2811 --- /dev/null +++ b/repos/gems/run/sculpt/empty_runtime.config @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/repos/gems/run/sculpt/fb_drv.config b/repos/gems/run/sculpt/fb_drv.config new file mode 100644 index 000000000..02376cfac --- /dev/null +++ b/repos/gems/run/sculpt/fb_drv.config @@ -0,0 +1,5 @@ + + + + + diff --git a/repos/gems/run/sculpt/fs_runtime.config b/repos/gems/run/sculpt/fs_runtime.config new file mode 100644 index 000000000..5c1de02e3 --- /dev/null +++ b/repos/gems/run/sculpt/fs_runtime.config @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/repos/gems/run/sculpt/leitzentrale.config b/repos/gems/run/sculpt/leitzentrale.config new file mode 100644 index 000000000..d2ef8920d --- /dev/null +++ b/repos/gems/run/sculpt/leitzentrale.config @@ -0,0 +1,171 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/repos/gems/run/sculpt/load_runtime.config b/repos/gems/run/sculpt/load_runtime.config new file mode 100644 index 000000000..48d171d06 --- /dev/null +++ b/repos/gems/run/sculpt/load_runtime.config @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + cp /rw/config/* /config/ + cp /rw/config/subinit/*.config /config/subinit/ + cp /rw/config/deploy/* /config/deploy/ + cp /rw/config/leitzentrale/config /config/leitzentrale/ + cp /rw/config/runtime/*.config /config/runtime/ + cp /rw/config/runtime/config /config/runtime/ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/repos/gems/run/sculpt/machine.vbox b/repos/gems/run/sculpt/machine.vbox new file mode 100644 index 000000000..00013120b --- /dev/null +++ b/repos/gems/run/sculpt/machine.vbox @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/repos/gems/run/sculpt/machine.vdi.gz b/repos/gems/run/sculpt/machine.vdi.gz new file mode 100644 index 0000000000000000000000000000000000000000..ee3af925fbbdd9def6c17ac1a1861098eb9a427b GIT binary patch literal 2236 zcmb2|=HL*EZ;4`H&P`0t$jnRCD@(~_czf2`i#bq)?Sb`1@5d%l5wQnTd6?~Hi5yg0 zBCq0cqQ${vf}WnEKvUT^vrJa*yREIg3P}&ySfph+Sae)mcGt+yVQ-iBo0eKwA0abk z?v1=-W#tt%TBqh7w0KwAU$ya~KA*MW`Oj59j;Yk{@O2XMn;cO3?9!@7*MoC6#;(&d zn)?0cj_CFAxqEZp#o25-_kRBR<^KBFPfwmb^)2$3)oqC$sr^;)zb%;V!Z literal 0 HcmV?d00001 diff --git a/repos/gems/run/sculpt/nitpicker.config b/repos/gems/run/sculpt/nitpicker.config new file mode 100644 index 000000000..a7b366c19 --- /dev/null +++ b/repos/gems/run/sculpt/nitpicker.config @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/repos/gems/run/sculpt/update_runtime.config b/repos/gems/run/sculpt/update_runtime.config new file mode 100644 index 000000000..a59ab3656 --- /dev/null +++ b/repos/gems/run/sculpt/update_runtime.config @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/repos/gems/run/sculpt/vimrc b/repos/gems/run/sculpt/vimrc new file mode 100644 index 000000000..7c10ee691 --- /dev/null +++ b/repos/gems/run/sculpt/vimrc @@ -0,0 +1,10 @@ +set noloadplugins +set hls +set nocompatible +set laststatus=2 +set noswapfile +set viminfo= +set backspace=indent,eol,start +set nowrap +set ruler +set ts=2 diff --git a/repos/gems/run/sculpt/wlan.config b/repos/gems/run/sculpt/wlan.config new file mode 100644 index 000000000..b10cde0e4 --- /dev/null +++ b/repos/gems/run/sculpt/wlan.config @@ -0,0 +1 @@ +