git: 8baa4e964719 - stable/14 - powerpc: fix release image building for Apple partitions
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 30 Jan 2026 05:06:35 UTC
The branch stable/14 has been updated by adrian:
URL: https://cgit.FreeBSD.org/src/commit/?id=8baa4e9647192e476a0a14a796e36aef6ea4607e
commit 8baa4e9647192e476a0a14a796e36aef6ea4607e
Author: Adrian Chadd <adrian@FreeBSD.org>
AuthorDate: 2026-01-11 03:59:41 +0000
Commit: Adrian Chadd <adrian@FreeBSD.org>
CommitDate: 2026-01-30 05:06:09 +0000
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)
---
release/powerpc/mkisoimages.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/release/powerpc/mkisoimages.sh b/release/powerpc/mkisoimages.sh
index 62656cdaaede..a526d6d20445 100644
--- a/release/powerpc/mkisoimages.sh
+++ b/release/powerpc/mkisoimages.sh
@@ -72,7 +72,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"