X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/17c7b6c3fdc48301e50d22cc6138ede16bd1be24..ecf4c24b4e8e714dd20b8327948b0f7f8b991424:/target/linux/x86/image/gen_image.sh?ds=sidebyside diff --git a/target/linux/x86/image/gen_image.sh b/target/linux/x86/image/gen_image.sh index d48e3720d..5d4c0dd34 100755 --- a/target/linux/x86/image/gen_image.sh +++ b/target/linux/x86/image/gen_image.sh @@ -28,10 +28,13 @@ ROOTFSSIZE="$(($4 / 512))" BLOCKS="$((($KERNELSIZE / 2) - 1))" -genext2fs -d "$KERNELDIR" -b "$BLOCKS" "$OUTPUT.kernel" -dd if="$OUTPUT.kernel" of="$OUTPUT" bs=512 seek="$KERNELOFFSET" conv=notrunc [ -n "$PADDING" ] && dd if=/dev/zero of="$OUTPUT" bs=512 seek="$ROOTFSOFFSET" conv=notrunc count="$ROOTFSSIZE" dd if="$ROOTFSIMAGE" of="$OUTPUT" bs=512 seek="$ROOTFSOFFSET" conv=notrunc + +[ -n "$NOGRUB" ] && exit 0 + +genext2fs -d "$KERNELDIR" -b "$BLOCKS" "$OUTPUT.kernel" +dd if="$OUTPUT.kernel" of="$OUTPUT" bs=512 seek="$KERNELOFFSET" conv=notrunc #rm -f "$OUTPUT.kernel" which chpax >/dev/null && chpax -zp $(which grub)