mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-18 21:27:56 +00:00
run: add support to preserve 'genode' directory
Add '--preserve-genode-dir' to RUN_OPT in order to preserve the 'genode' directory in '<build_dir>/var/run/<run-script>'
This commit is contained in:
parent
d00baf8db4
commit
b6bc44fd10
@ -42,7 +42,7 @@ proc run_boot_dir {binaries} {
|
||||
file copy -force [run_dir]/genode/fiasco [run_dir]/boot/kernel
|
||||
file copy -force [run_dir]/genode/sigma0-fiasco [run_dir]/boot/sigma0
|
||||
file copy -force [run_dir]/genode/bootstrap-fiasco [run_dir]/boot/bootstrap
|
||||
exec rm -r [run_dir]/genode
|
||||
remove_genode_dir
|
||||
|
||||
exec mv [run_dir]/image.elf [run_dir]/boot/image.elf
|
||||
|
||||
|
@ -85,7 +85,7 @@ proc run_boot_dir_x86 {binaries} {
|
||||
file copy -force [run_dir]/genode/foc [run_dir]/boot/kernel
|
||||
file copy -force [run_dir]/genode/sigma0-foc [run_dir]/boot/sigma0
|
||||
file copy -force [run_dir]/genode/bootstrap-foc [run_dir]/boot/bootstrap
|
||||
exec rm -r [run_dir]/genode
|
||||
remove_genode_dir
|
||||
|
||||
exec mv [run_dir]/image.elf [run_dir]/boot/image.elf
|
||||
|
||||
|
@ -94,7 +94,7 @@ proc run_boot_dir {binaries} {
|
||||
build_core [run_dir]/genode/$core_obj $modules [run_dir]/genode/core.elf [core_link_address]
|
||||
exec [cross_dev_prefix]strip [run_dir]/genode/core.elf
|
||||
build_core [run_dir]/genode/$bootstrap_obj { core.elf } [run_dir]/image.elf [bootstrap_link_address]
|
||||
exec rm -fr [run_dir]/genode
|
||||
remove_genode_dir
|
||||
exec [cross_dev_prefix]strip [run_dir]/image.elf
|
||||
|
||||
exec mkdir -p [run_dir]/boot
|
||||
|
@ -54,7 +54,7 @@ proc run_boot_dir {binaries} {
|
||||
exec [cross_dev_prefix]objcopy -O elf32-i386 [run_dir]/genode/hypervisor [run_dir]/boot/hypervisor
|
||||
exec [cross_dev_prefix]strip [run_dir]/boot/hypervisor
|
||||
|
||||
exec rm -rf [run_dir]/genode
|
||||
remove_genode_dir
|
||||
|
||||
exec mv [run_dir]/image.elf [run_dir]/boot/image.elf
|
||||
|
||||
|
@ -145,7 +145,7 @@ proc run_boot_dir {binaries} {
|
||||
#
|
||||
# Keep only the ELF boot image, but remove stripped binaries
|
||||
#
|
||||
exec rm -rf [run_dir]/genode
|
||||
remove_genode_dir
|
||||
|
||||
exec mkdir -p [run_dir]/boot
|
||||
exec mv [run_dir]/image.elf [run_dir]/boot/image.elf
|
||||
|
@ -41,7 +41,7 @@ proc run_boot_dir {binaries} {
|
||||
file copy -force [run_dir]/genode/pistachio [run_dir]/boot/kernel
|
||||
file copy -force [run_dir]/genode/sigma0-pistachio [run_dir]/boot/sigma0
|
||||
file copy -force [run_dir]/genode/kickstart-pistachio [run_dir]/boot/kickstart
|
||||
exec rm -r [run_dir]/genode
|
||||
remove_genode_dir
|
||||
|
||||
exec mv [run_dir]/image.elf [run_dir]/boot/image.elf
|
||||
|
||||
|
@ -44,7 +44,7 @@ proc run_boot_dir {binaries} {
|
||||
#
|
||||
exec mkdir -p [run_dir]/boot
|
||||
file copy -force [run_dir]/genode/sel4 [run_dir]/boot/sel4
|
||||
exec rm -r [run_dir]/genode
|
||||
remove_genode_dir
|
||||
|
||||
exec mv [run_dir]/image.elf [run_dir]/boot/image.elf
|
||||
|
||||
|
13
tool/run/run
13
tool/run/run
@ -663,6 +663,19 @@ proc wait_for_output { wait_for_re timeout_value running_spawn_id } {
|
||||
}
|
||||
|
||||
|
||||
##
|
||||
# Remove 'genode' directory in 'run_dir' unless --preserve-genode-dir is present
|
||||
# in RUN_OPT
|
||||
#
|
||||
proc remove_genode_dir { } {
|
||||
global env
|
||||
|
||||
if {![get_cmd_switch --preserve-genode-dir]} {
|
||||
exec rm -rf [run_dir]/genode
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
##
|
||||
## Fall-back implementations of all run module procedures
|
||||
##
|
||||
|
Loading…
Reference in New Issue
Block a user