Changeset View
Changeset View
Standalone View
Standalone View
release/tools/vmimage.subr
Show All 23 Lines | amd64:amd64 | i386:i386) | ||||
mkimg -s gpt -f ${VMFORMAT} \ | mkimg -s gpt -f ${VMFORMAT} \ | ||||
-b ${BOOTFILES}/i386/pmbr/pmbr \ | -b ${BOOTFILES}/i386/pmbr/pmbr \ | ||||
-p freebsd-boot/bootfs:=${BOOTFILES}/i386/gptboot/gptboot \ | -p freebsd-boot/bootfs:=${BOOTFILES}/i386/gptboot/gptboot \ | ||||
${SWAPOPT} \ | ${SWAPOPT} \ | ||||
-p freebsd-ufs/rootfs:=${VMBASE} \ | -p freebsd-ufs/rootfs:=${VMBASE} \ | ||||
-o ${VMIMAGE} | -o ${VMIMAGE} | ||||
;; | ;; | ||||
arm64:aarch64) | arm64:aarch64) | ||||
dd if=/dev/zero of=${BOOTFILES}/efi/esp.img bs=1k count=33292 | |||||
device=`mdconfig -a -t vnode -f ${BOOTFILES}/efi/efiboot.img` | |||||
newfs_msdos -F 32 -c 1 -L EFISYS /dev/$device | |||||
mkdir ${BOOTFILES}/esp | |||||
mount -t msdosfs /dev/$device ${BOOTFILES}/esp | |||||
mkdir -p ${BOOTFILES}/esp/EFI/BOOT | |||||
cp -p "${BOOTFILES}/efi/loader_lua/loader_lua.efi" ${BOOTFILES}/esp/EFI/BOOT/BOOTaa64.efi | |||||
umount ${BOOTFILES}/esp | |||||
rmdir ${BOOTFILES}/esp | |||||
mdconfig -d -u $device | |||||
mkimg -s mbr -f ${VMFORMAT} \ | mkimg -s mbr -f ${VMFORMAT} \ | ||||
-p efi:=${BOOTFILES}/efi/boot1/boot1.efifat \ | -p efi:=${BOOTFILES}/efi/esp.img \ | ||||
imp: I'd think should do the ${espfilename} dance too, with the rm after... I'm not thrilled about… | |||||
Done Inline ActionsYeah, me neither. bcran: Yeah, me neither. | |||||
-p freebsd:=${VMBASE} \ | -p freebsd:=${VMBASE} \ | ||||
-o ${VMIMAGE} | -o ${VMIMAGE} | ||||
impUnsubmitted Done Inline Actionssince it's also used here nearly verbatim. imp: since it's also used here nearly verbatim.
| |||||
;; | ;; | ||||
Done Inline Actionswhere is VMBASE added? This just makes an esp, but doesn't seem to create the resulting image in VMIMAGE. imp: where is VMBASE added? This just makes an esp, but doesn't seem to create the resulting image… | |||||
Done Inline ActionsGood point - not sure how I removed the mkimg command. bcran: Good point - not sure how I removed the mkimg command. | |||||
powerpc:powerpc*) | powerpc:powerpc*) | ||||
mkimg -s apm -f ${VMFORMAT} \ | mkimg -s apm -f ${VMFORMAT} \ | ||||
-p apple-boot/bootfs:=${BOOTFILES}/powerpc/boot1.chrp/boot1.hfs \ | -p apple-boot/bootfs:=${BOOTFILES}/powerpc/boot1.chrp/boot1.hfs \ | ||||
${SWAPOPT} \ | ${SWAPOPT} \ | ||||
-p freebsd-ufs/rootfs:=${VMBASE} \ | -p freebsd-ufs/rootfs:=${VMBASE} \ | ||||
-o ${VMIMAGE} | -o ${VMIMAGE} | ||||
;; | ;; | ||||
*) | *) | ||||
▲ Show 20 Lines • Show All 206 Lines • Show Last 20 Lines |
I'd think should do the ${espfilename} dance too, with the rm after... I'm not thrilled about lua here, but I'm not sure what would be better given the context this script runs in.