diff options
author | Marius Strobl <marius@FreeBSD.org> | 2018-06-07 18:24:25 +0000 |
---|---|---|
committer | Marius Strobl <marius@FreeBSD.org> | 2018-06-07 18:24:25 +0000 |
commit | 470f228f628faaa5be2b163fb30f44325e835d7a (patch) | |
tree | 6de2b38a3e8a591ece0b11901d83e628f7b21e49 /release/amd64 | |
parent | 89e560f441bb214495715039288c99442b3b5aea (diff) | |
download | src-test-470f228f628faaa5be2b163fb30f44325e835d7a.tar.gz src-test-470f228f628faaa5be2b163fb30f44325e835d7a.zip |
- Once we have shifted arguments up to thrice, base-bits-dir is $1 rather
than $4. Introduce $BASEBITSDIR for clarity and to avoid repeating this
mistake in the future. Fixing this ensures that we pick up newly built
boot bits native to the target rather for/from the host.
- Apply some of the argument quoting fixes done in r287635 but missing in
later revisions.
Notes
Notes:
svn path=/head/; revision=334805
Diffstat (limited to 'release/amd64')
-rw-r--r-- | release/amd64/mkisoimages.sh | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/release/amd64/mkisoimages.sh b/release/amd64/mkisoimages.sh index ca7a813601253..d45687bc20a4f 100644 --- a/release/amd64/mkisoimages.sh +++ b/release/amd64/mkisoimages.sh @@ -36,8 +36,9 @@ if [ -z $MKIMG ]; then fi if [ "$1" = "-b" ]; then + BASEBITSDIR="$4" # This is highly x86-centric and will be used directly below. - bootable="-o bootimage=i386;$4/boot/cdboot -o no-emul-boot" + bootable="-o bootimage=i386;$BASEBITSDIR/boot/cdboot -o no-emul-boot" # Make EFI system partition (should be done with makefs in the future) dd if=/dev/zero of=efiboot.img bs=4k count=200 @@ -46,7 +47,7 @@ if [ "$1" = "-b" ]; then mkdir efi mount -t msdosfs /dev/$device efi mkdir -p efi/efi/boot - cp "$4/boot/loader.efi" efi/efi/boot/bootx64.efi + cp -p "$BASEBITSDIR/boot/loader.efi" efi/efi/boot/bootx64.efi umount efi rmdir efi mdconfig -d -u $device @@ -54,6 +55,7 @@ if [ "$1" = "-b" ]; then shift else + BASEBITSDIR="$3" bootable="" fi @@ -66,9 +68,9 @@ LABEL=`echo "$1" | tr '[:lower:]' '[:upper:]'`; shift NAME="$1"; shift publisher="The FreeBSD Project. https://www.FreeBSD.org/" -echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > "$1/etc/fstab" +echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > "$BASEBITSDIR/etc/fstab" $MAKEFS -t cd9660 $bootable -o rockridge -o label="$LABEL" -o publisher="$publisher" "$NAME" "$@" -rm -f "$1/etc/fstab" +rm -f "$BASEBITSDIR/etc/fstab" rm -f efiboot.img if [ "$bootable" != "" ]; then @@ -84,15 +86,15 @@ if [ "$bootable" != "" ]; then done # Create a GPT image containing the partitions we need for hybrid boot. - imgsize=`stat -f %z $NAME` + imgsize=`stat -f %z "$NAME"` $MKIMG -s gpt \ --capacity $imgsize \ - -b $4/boot/pmbr \ + -b "$BASEBITSDIR/boot/pmbr" \ $espparam \ - -p freebsd-boot:=$4/boot/isoboot \ + -p freebsd-boot:="$BASEBITSDIR/boot/isoboot" \ -o hybrid.img # Drop the PMBR, GPT, and boot code into the System Area of the ISO. - dd if=hybrid.img of=$NAME bs=32k count=1 conv=notrunc + dd if=hybrid.img of="$NAME" bs=32k count=1 conv=notrunc rm -f hybrid.img fi |