From 7be8ddced9504dda5619c61881d773b29e8f240f Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Mon, 10 Oct 2022 23:04:37 +0200 Subject: [PATCH] :penguin: Correctly handle kernel image symlink (#202) --- Earthfile | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Earthfile b/Earthfile index de6b35eea..f048410d8 100644 --- a/Earthfile +++ b/Earthfile @@ -273,9 +273,16 @@ docker: RUN kernel=$(ls /lib/modules | head -n1) && depmod -a "${kernel}" END - # If it's an ARM flavor, we want a symlink here - IF [ "$FLAVOR" = "alpine-arm-rpi" ] || [ "$FLAVOR" = "opensuse-arm-rpi" ] || [ "$FLAVOR" = "tumbleweed-arm-rpi" ] - RUN ln -sf Image /boot/vmlinuz + IF [ ! -e "/boot/vmlinuz" ] + # If it's an ARM flavor, we want a symlink here from zImage/Image + IF [ -e "/boot/Image" ] + RUN ln -sf Image /boot/vmlinuz + ELSE IF [ -e "/boot/zImage" ] + RUN ln -sf zImage /boot/vmlinuz + ELSE + RUN kernel=$(ls /lib/modules | head -n1) && \ + ln -sf "${kernel#/boot/}" /boot/vmlinuz + END END SAVE IMAGE $IMAGE