aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@alpinelinux.org>2018-04-07 23:17:07 +0000
committerCarlo Landmeter <clandmeter@alpinelinux.org>2018-04-07 23:17:07 +0000
commit955730fbe508ce0e23ea44807cf51da34d851d46 (patch)
treec197adeffd44d4e4b165c11af8d7798a088da385
parentc7da77d3c8cc19388e110ad30eaeb8822ae3a129 (diff)
downloadalpine-netboot-955730fbe508ce0e23ea44807cf51da34d851d46.tar.bz2
alpine-netboot-955730fbe508ce0e23ea44807cf51da34d851d46.tar.xz
mknetboot: uncompress arm64 kernel images
-rwxr-xr-xmknetboot.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/mknetboot.sh b/mknetboot.sh
index 91087de..1c4d084 100755
--- a/mknetboot.sh
+++ b/mknetboot.sh
@@ -73,4 +73,13 @@ for file in vmlinuz config System.map; do
fi
done
+# arm64 kernel is not a std bzImage but intead gzip compressed image
+# iPXE efi mode (default for aarch64) does not support compressed kernel image
+if [ "$ARCH" = "aarch64" ] && gunzip -t "$OUTDIR"/vmlinuz-"$FLAVOR" 2> /dev/null; then
+ TMP_KERNEL=$(mktemp)
+ zcat "$OUTDIR"/vmlinuz-"$FLAVOR" > $TMP_KERNEL && mv $TMP_KERNEL \
+ "$OUTDIR"/vmlinuz-"$FLAVOR"
+ chmod 644 "$OUTDIR"/vmlinuz-"$FLAVOR"
+fi
+
rm -f "$REPOFILE"