diff options
| author | Adrian Chadd <adrian@FreeBSD.org> | 2026-01-10 19:59:41 -0800 |
|---|---|---|
| committer | Adrian Chadd <adrian@FreeBSD.org> | 2026-01-15 22:26:30 -0800 |
| commit | 4b5b8d69b23a73e932a8d46829b1ec65ba50be36 (patch) | |
| tree | 219471f7a8547a6ae9bd89b1205b1a5802d23a73 | |
| parent | df4e99bb884786eb0554e2a259795c44a5295154 (diff) | |
powerpc: fix release image building for Apple partitions
awk changed somewhere between 14 and 15 and it stopped accepting
a hexadecimal number as its input - it will always return 0.
This results in a very badly written apple boot block.
So just remove it; do the math in shell.
PR: kern/292341
Differential Revision: https://reviews.freebsd.org/D54639
Reviewed by: imp
MFC after: 1 week
(cherry picked from commit 7afa03963c448a14b1735a10eaf84941b0b74862)
| -rw-r--r-- | release/powerpc/mkisoimages.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/release/powerpc/mkisoimages.sh b/release/powerpc/mkisoimages.sh index 705545dead4b..ac02e2513e93 100644 --- a/release/powerpc/mkisoimages.sh +++ b/release/powerpc/mkisoimages.sh @@ -75,7 +75,7 @@ if [ -n "$bootable" ]; then # Apple boot code uudecode -p "`dirname "$0"`/hfs-boot.bz2.uu" | bunzip2 > $BOOTBLOCK OFFSET=$(hd $BOOTBLOCK | grep 'Loader START' | cut -f 1 -d ' ') - OFFSET=0x$(echo 0x$OFFSET | awk '{printf("%x\n",$1/512);}') + OFFSET=$((0x${OFFSET} / 512)) dd if="$BASEBITSDIR/boot/loader" of=$BOOTBLOCK seek=$OFFSET conv=notrunc bootable="-o bootimage=macppc;$BOOTBLOCK -o no-emul-boot" |
