From 1e41c2dbe99a372345d20d2ce8b4242346234c8c Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Thu, 8 Dec 2016 12:25:00 +0100 Subject: [PATCH] Remove redundant boot modules from boot image Fixes #2185 --- tool/run/boot_dir/okl4 | 2 +- tool/run/run | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tool/run/boot_dir/okl4 b/tool/run/boot_dir/okl4 index efc20cb1d0..70274ce63a 100644 --- a/tool/run/boot_dir/okl4 +++ b/tool/run/boot_dir/okl4 @@ -158,7 +158,7 @@ proc run_boot_dir {binaries} { # # Keep only the ELF boot image, but remove stripped binaries # - exec rm -r [run_dir]/genode + exec rm -rf [run_dir]/genode if {[have_include "image/iso"] || [have_include "image/disk"]} { # diff --git a/tool/run/run b/tool/run/run index 629c2dd730..41767c937b 100755 --- a/tool/run/run +++ b/tool/run/run @@ -767,6 +767,7 @@ proc build_core {lib modules target} { # Generate bootable core image containing all boot-modules # proc build_core_image {binaries} { + # boot module list without core set idx [lsearch $binaries "core"] set modules [lreplace $binaries $idx $idx] @@ -783,6 +784,9 @@ proc build_core_image {binaries} { # create core binary containing the boot modules build_core $core_obj $modules [run_dir]/image.elf exec [cross_dev_prefix]strip [run_dir]/image.elf + + # remove individual binaries, which are now contained in 'image.elf' + exec rm -rf [run_dir]/genode }