Skip to content

Commit

Permalink
🐧 Correctly handle kernel image symlink (#202)
Browse files Browse the repository at this point in the history
  • Loading branch information
mudler committed Oct 10, 2022
1 parent 8bebc8c commit 7be8ddc
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7be8ddc

Please sign in to comment.