From 7be98166ee1119361f1fa884a3f1be18e5a02bb4 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Fri, 2 Sep 2022 15:43:25 +0200 Subject: [PATCH] run: improve 'build_boot_image [build_artifacts]' This patch make the use of the result of the 'build_artifacts' function as input for 'build_boot_image' more robust. Since 'build_artifacts' obtains binary names from the progress.log, the names of core, ld.lib.so, and the timer correspond to the kernel-specific names. However, 'build_boot_image' expects the kernel-agnostic names as arguments. Kernel-specific files need special treatment when integrated in the boot image: the kernel-specific file is copied and renamed to the kernel-agnostic name. Without this patch, the kernel-specific file is copied as is (e.g., ld-nova.lib.so). So the name of the ROM module is wrong. This patch resets the kernel-specific names to the generic names so that the special-case handling comes into effect. --- tool/run/run | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tool/run/run b/tool/run/run index b7cada39d6..93a4e81690 100755 --- a/tool/run/run +++ b/tool/run/run @@ -749,6 +749,16 @@ proc copy_file {src dst} { proc copy_genode_binaries_to_run_dir { binaries } { foreach binary $binaries { + + # + # Normalize kernel-specific file names, needed when a run script passes + # [build_artifacts] to the build_boot_image command. The build artfact + # fetched from the progress.log has the kernel-specific name. + # + foreach name { "timer" "core" "ld.lib.so" } { + if {$binary == [kernel_specific_binary $name silent]} { + set binary $name } } + copy_file bin/[kernel_specific_binary $binary] [run_dir]/genode/$binary } }