From 2aa22a25eec889589c45b59cbc14d3a66201800d Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 7 May 2013 11:13:02 +0200 Subject: [PATCH] Adapt chroot.run to changed timer --- os/run/chroot.run | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/os/run/chroot.run b/os/run/chroot.run index 890b0974b..576bc8a88 100644 --- a/os/run/chroot.run +++ b/os/run/chroot.run @@ -10,13 +10,26 @@ if {![have_spec linux]} { puts "Run script requires Linux"; exit 0 } # Build # -build { core init drivers/timer/linux test/timer } +build { core init drivers/timer test/timer } if {[catch { exec which setcap }]} { puts stderr "Error: setcap not available, please install the libcap2-bin package" return 0 } +# +# Clean up remains of a potentially failed previous run +# + +proc chroot_path { } { return "/tmp/chroot-test" } +proc chroot_cwd_path { } { return "[chroot_path][pwd]/[run_dir]" } +proc chroot_genode_tmp_path { } { return "[chroot_path]/tmp/genode-[exec id -u]" } + +proc cleanup_chroot { } { + umount_and_rmdir [chroot_cwd_path] + umount_and_rmdir [chroot_path]/lib + umount_and_rmdir [chroot_path]/lib64 +} create_boot_directory @@ -34,6 +47,7 @@ set config { + @@ -48,16 +62,6 @@ set config { } -proc chroot_path { } { return "/tmp/chroot-test" } -proc chroot_cwd_path { } { return "[chroot_path][pwd]/[run_dir]" } -proc chroot_genode_tmp_path { } { return "[chroot_path]/tmp/genode-[exec id -u]" } - -proc cleanup_chroot { } { - umount_and_rmdir [chroot_cwd_path] - umount_and_rmdir [chroot_path]/lib - umount_and_rmdir [chroot_path]/lib64 -} - # replace 'chroot_path' marker in config with actual path regsub "chroot_path" $config [chroot_path] config