sculpt: read config from /rw/config/<VERSION>/
By incorporating the sculpt version into the path where customizations are stored, we can update and roll back sculpt versions without risking configuration incompatibilities. By default, the sculpt version corresponds to <genode-dir>/VERSION.
This commit is contained in:
committed by
Christian Helmuth
parent
a75413a21b
commit
f0ac01395f
@@ -484,9 +484,23 @@ file copy -force [genode_dir]/repos/gems/recipes/raw/depot_download/depot_downlo
|
|||||||
file copy -force [genode_dir]/depot/[depot_user]/pubkey [run_dir]/genode/[depot_user]_pubkey
|
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
|
file copy -force [genode_dir]/depot/[depot_user]/download [run_dir]/genode/[depot_user]_download
|
||||||
|
|
||||||
|
file copy -force [genode_dir]/VERSION [run_dir]/genode/
|
||||||
|
|
||||||
exec gzip -dc [genode_dir]/repos/gems/run/sculpt/machine.vdi.gz > [run_dir]/genode/machine.vdi
|
exec gzip -dc [genode_dir]/repos/gems/run/sculpt/machine.vdi.gz > [run_dir]/genode/machine.vdi
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Define 'VERSION' ROM module
|
||||||
|
#
|
||||||
|
proc sculpt_version { } {
|
||||||
|
return "[string trim [exec cat [genode_dir]/VERSION]]" }
|
||||||
|
|
||||||
|
# write file with newline (for producing nice output when using 'cat /VERSION')
|
||||||
|
set fd [open [run_dir]/genode/VERSION w]
|
||||||
|
puts $fd "[sculpt_version]"
|
||||||
|
close $fd
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Package-management support
|
# Package-management support
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -157,6 +157,7 @@
|
|||||||
<dir name="tmp"> <ram /> </dir>
|
<dir name="tmp"> <ram /> </dir>
|
||||||
<dir name="share"> <dir name="vim"> <rom name="vimrc"/> </dir> </dir>
|
<dir name="share"> <dir name="vim"> <rom name="vimrc"/> </dir> </dir>
|
||||||
<rom name="README"/>
|
<rom name="README"/>
|
||||||
|
<rom name="VERSION"/>
|
||||||
</fstab>
|
</fstab>
|
||||||
<start name="/bin/bash">
|
<start name="/bin/bash">
|
||||||
<env name="TERM" value="screen" />
|
<env name="TERM" value="screen" />
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<config verbose="yes">
|
<config>
|
||||||
|
|
||||||
<report init_ram="yes" requested="yes" child_ram="yes" delay_ms="2000" buffer="128K"/>
|
<report init_ram="yes" requested="yes" child_ram="yes" delay_ms="2000" buffer="128K"/>
|
||||||
|
|
||||||
@@ -30,42 +30,26 @@
|
|||||||
<provides> <service name="File_system"/> </provides>
|
<provides> <service name="File_system"/> </provides>
|
||||||
</start>
|
</start>
|
||||||
|
|
||||||
<start name="nit_fb" version="initial">
|
|
||||||
<resource name="RAM" quantum="4M"/>
|
|
||||||
<provides> <service name="Framebuffer"/> <service name="Input"/> </provides>
|
|
||||||
<config xpos="200" ypos="5000" width="800" height="600"/>
|
|
||||||
</start>
|
|
||||||
|
|
||||||
<start name="terminal" version="initial">
|
|
||||||
<binary name="terminal"/>
|
|
||||||
<resource name="RAM" quantum="4M"/>
|
|
||||||
<provides> <service name="Terminal"/> </provides>
|
|
||||||
<route>
|
|
||||||
<service name="ROM" label="config"> <parent label="config -> fonts.config"/> </service>
|
|
||||||
<service name="Framebuffer"> <child name="nit_fb"/> </service>
|
|
||||||
<service name="Input"> <child name="nit_fb"/> </service>
|
|
||||||
<any-service> <parent/> </any-service>
|
|
||||||
</route>
|
|
||||||
</start>
|
|
||||||
|
|
||||||
<start name="noux" caps="500" version="initial">
|
<start name="noux" caps="500" version="initial">
|
||||||
<binary name="noux"/>
|
<binary name="noux"/>
|
||||||
<resource name="RAM" quantum="100M" />
|
<resource name="RAM" quantum="100M" />
|
||||||
<config>
|
<config stdout="/dev/null" stderr="/dev/null" stdin="/dev/null">
|
||||||
<fstab>
|
<fstab>
|
||||||
<inline name=".bash_profile">
|
<inline name=".bash_profile">
|
||||||
cp /rw/config/* /config/
|
export VERSION=`cat /VERSION`
|
||||||
cp /rw/config/subinit/*.config /config/subinit/
|
cp /rw/config/$VERSION/* /config/
|
||||||
cp /rw/config/deploy/* /config/deploy/
|
cp /rw/config/$VERSION/subinit/*.config /config/subinit/
|
||||||
cp /rw/config/leitzentrale/config /config/leitzentrale/
|
cp /rw/config/$VERSION/deploy/* /config/deploy/
|
||||||
cp /rw/config/runtime/*.config /config/runtime/
|
cp /rw/config/$VERSION/leitzentrale/config /config/leitzentrale/
|
||||||
cp /rw/config/runtime/config /config/runtime/
|
cp /rw/config/$VERSION/runtime/*.config /config/runtime/
|
||||||
|
cp /rw/config/$VERSION/runtime/config /config/runtime/
|
||||||
</inline>
|
</inline>
|
||||||
<tar name="bash-minimal.tar" />
|
<tar name="bash-minimal.tar" />
|
||||||
<tar name="coreutils-minimal.tar" />
|
<tar name="coreutils-minimal.tar" />
|
||||||
<dir name="dev"> <zero/> <null/> </dir>
|
<dir name="dev"> <zero/> <null/> <log/> </dir>
|
||||||
<dir name="rw"> <fs label="target"/> </dir>
|
<dir name="rw"> <fs label="target"/> </dir>
|
||||||
<dir name="config"> <fs label="config"/> </dir>
|
<dir name="config"> <fs label="config"/> </dir>
|
||||||
|
<rom name="VERSION"/>
|
||||||
</fstab>
|
</fstab>
|
||||||
<start name="/bin/bash">
|
<start name="/bin/bash">
|
||||||
<env name="TERM" value="screen" />
|
<env name="TERM" value="screen" />
|
||||||
@@ -77,7 +61,6 @@
|
|||||||
<route>
|
<route>
|
||||||
<service name="File_system" label="target"> <child name="fs"/> </service>
|
<service name="File_system" label="target"> <child name="fs"/> </service>
|
||||||
<service name="File_system" label="config"> <parent label="config"/> </service>
|
<service name="File_system" label="config"> <parent label="config"/> </service>
|
||||||
<service name="Terminal"> <child name="terminal"/> </service>
|
|
||||||
<any-service> <parent/> </any-service>
|
<any-service> <parent/> </any-service>
|
||||||
</route>
|
</route>
|
||||||
</start>
|
</start>
|
||||||
|
|||||||
Reference in New Issue
Block a user