Print an explicit "Dummy Hello World!" from the dummy "test" that is used by x86 EFI to probe the basic setup. Relying on the last line to match an arbitrary, undocumented string in x86's boot flow is evil and fragile, e.g. a future patch to share boot code between EFI and !EFI will print something AP bringup info after the "enabling apic" line. Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx> --- scripts/runtime.bash | 2 +- x86/dummy.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/runtime.bash b/scripts/runtime.bash index 7d0180b..bbf87cf 100644 --- a/scripts/runtime.bash +++ b/scripts/runtime.bash @@ -132,7 +132,7 @@ function run() last_line=$(premature_failure > >(tail -1)) && { skip=true - if [ "${CONFIG_EFI}" == "y" ] && [[ "${last_line}" =~ "enabling apic" ]]; then + if [ "${CONFIG_EFI}" == "y" ] && [[ "${last_line}" =~ "Dummy Hello World!" ]]; then skip=false fi if [ ${skip} == true ]; then diff --git a/x86/dummy.c b/x86/dummy.c index 5019e79..7033bb7 100644 --- a/x86/dummy.c +++ b/x86/dummy.c @@ -1,4 +1,12 @@ +#include "libcflat.h" + int main(int argc, char **argv) { + /* + * scripts/runtime.bash uses this test as a canary to determine if the + * basic setup is functional. Print a magic string to let runtime.bash + * know that all is well. + */ + printf("Dummy Hello World!"); return 0; } -- 2.36.1.476.g0c4daa206d-goog