Skip to content

Commit a1602d4

Browse files
committed
kernel: armbian: ensure kernel.tar contains entry for the / (root) directory
- quite esoteric, but it seems LinuxKit uses the kernel.tar's root entry as its own entry - if that is missing, then the final product rootfs will have root dir with very strange permissions Signed-off-by: Ricardo Pardini <[email protected]>
1 parent 755117d commit a1602d4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

bash/kernel/kernel_armbian.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,11 @@ function calculate_kernel_version_armbian() {
9090
# Get the kernel image...
9191
RUN cp -v boot/vmlinuz* /armbian/output/kernel
9292
93-
# Create a tarball with the modules in lib
94-
RUN tar -cvf /armbian/output/kernel.tar lib
93+
# Create a tarball with the modules in lib.
94+
# Important: this tarball needs to have permissions for the root directory included! Otherwise linuxkit rootfs will have the wrong permissions on / (root)
95+
WORKDIR /armbian/modules_only
96+
RUN mv /armbian/image/lib /armbian/modules_only/
97+
RUN tar -cvf /armbian/output/kernel.tar .
9598
9699
# Create a tarball with the dtbs in usr/lib/linux-image-*
97100
RUN { cd usr/lib/linux-image-* || { echo "No DTBS for this arch, empty tar..." && mkdir -p usr/lib/linux-image-no-dtbs && cd usr/lib/linux-image-* ; } ; } && pwd && du -h -d 1 . && tar -czvf /armbian/output/dtbs.tar.gz . && ls -lah /armbian/output/dtbs.tar.gz

0 commit comments

Comments
 (0)