diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2023-10-26 14:27:04 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2023-10-26 14:27:04 +0000 |
commit | 219d09e568083d01396ae7ce268eddce20d28b5c (patch) | |
tree | a85882e3cfa1d586f6e81a10a6233b84b8da7846 /distrib | |
parent | 79821af0ad2daaa6782747e06c13f32919757e44 (diff) |
construct EFI bootable cdXX.iso and instalXX.iso files
Diffstat (limited to 'distrib')
-rw-r--r-- | distrib/arm64/iso/Makefile | 43 | ||||
-rw-r--r-- | distrib/arm64/ramdisk/Makefile | 37 |
2 files changed, 73 insertions, 7 deletions
diff --git a/distrib/arm64/iso/Makefile b/distrib/arm64/iso/Makefile index 4fb09fadc41..50a531fe067 100644 --- a/distrib/arm64/iso/Makefile +++ b/distrib/arm64/iso/Makefile @@ -1,7 +1,8 @@ -# $OpenBSD: Makefile,v 1.7 2023/10/18 01:45:42 deraadt Exp $ +# $OpenBSD: Makefile,v 1.8 2023/10/26 14:27:01 deraadt Exp $ FS= install${OSrev}.img FSSIZE= 1126400 +CDROM= install${OSrev}.iso MOUNT_POINT= /mnt @@ -43,7 +44,20 @@ PIFILES=\ PIDTBO=\ disable-bt.dtbo -all: ${FS} +all: ${FS} ${CDROM} + +cdbr: ${RELDIR}/BOOTAA64.EFI + dd if=/dev/zero of=cdbr bs=512 count=5760 + vnconfig -v cdbr > vnd + fdisk -iy -b "5744@16:c" `cat vnd` >/dev/null + newfs -t msdos /dev/r`cat vnd`i + mount ${MOUNT_ARGS_msdos} /dev/`cat vnd`i ${MOUNT_POINT} + mkdir -p ${MOUNT_POINT}/efi/boot + cp ${RELDIR}/BOOTAA64.EFI ${MOUNT_POINT}/efi/boot/bootaa64.efi + echo bootaa64.efi > ${MOUNT_POINT}/efi/boot/startup.nsh + umount ${MOUNT_POINT} + vnconfig -u `cat vnd` + rm -f vnd ${FS}: ${BASE} ${XBASE} dd if=/dev/zero of=${FS} bs=512 count=${FSSIZE} @@ -82,11 +96,34 @@ ${FS}: ${BASE} ${XBASE} vnconfig -u `cat vnd` rm -f vnd +${CDROM}: ${BASE} ${XBASE} cdbr + rm -rf ${.OBJDIR}/cd-dir + mkdir -p ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE} + mkdir -p ${.OBJDIR}/cd-dir/etc + echo "set image /${OSREV}/${MACHINE}/bsd.rd" > ${.OBJDIR}/cd-dir/etc/boot.conf + + cp -p ${BASE} ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE} + cp -p ${XBASE} ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE} + + cat ${RELDIR}/SHA256 ${RELXDIR}/SHA256 > \ + ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE}/SHA256 + # XXX no SHA256.sig + + cp -p ${.OBJDIR}/cdbr ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE} + + mkhybrid -a -R -T -L -l -d -D -N -o ${.OBJDIR}/${CDROM} \ + -A "OpenBSD ${OSREV} ${MACHINE} Install CD" \ + -P "Copyright (c) `date +%Y` Theo de Raadt, The OpenBSD project" \ + -p "Theo de Raadt <deraadt@openbsd.org>" \ + -V "OpenBSD/${MACHINE} ${OSREV} Install CD" \ + -b ${OSREV}/${MACHINE}/cdbr -c ${OSREV}/${MACHINE}/boot.catalog \ + ${.OBJDIR}/cd-dir + install: cp ${CDROM} ${FS} ${RELDIR}/ clean cleandir: - rm -f ${CDROM} ${FS} + rm -f ${CDROM} ${FS} cdbr rm -rf cd-dir .include <bsd.obj.mk> diff --git a/distrib/arm64/ramdisk/Makefile b/distrib/arm64/ramdisk/Makefile index 248daf75b65..ad90790235d 100644 --- a/distrib/arm64/ramdisk/Makefile +++ b/distrib/arm64/ramdisk/Makefile @@ -1,7 +1,8 @@ -# $OpenBSD: Makefile,v 1.28 2023/04/28 08:45:25 krw Exp $ +# $OpenBSD: Makefile,v 1.29 2023/10/26 14:27:03 deraadt Exp $ FS= miniroot${OSrev}.img FSSIZE= 88064 +CDROM= cd${OSrev}.iso MOUNT_POINT= /mnt MTREE= ${UTILS}/mtree.conf RAMDISK= RAMDISK @@ -40,7 +41,20 @@ PIFILES=\ PIDTBO=\ disable-bt.dtbo -all: ${FS} +all: ${FS} ${CDROM} + +cdbr: /usr/mdec/BOOTAA64.EFI bsd.rd + dd if=/dev/zero of=cdbr bs=512 count=5760 + vnconfig -v cdbr > vnd + fdisk -iy -b "5744@16:c" `cat vnd` >/dev/null + newfs -t msdos /dev/r`cat vnd`i + mount ${MOUNT_ARGS_msdos} /dev/`cat vnd`i ${MOUNT_POINT} + mkdir -p ${MOUNT_POINT}/efi/boot + cp /usr/mdec/BOOTAA64.EFI ${MOUNT_POINT}/efi/boot/bootaa64.efi + echo bootaa64.efi > ${MOUNT_POINT}/efi/boot/startup.nsh + umount ${MOUNT_POINT} + vnconfig -u `cat vnd` + rm -f vnd ${FS}: bsd.rd dd if=/dev/zero of=${FS} bs=512 count=${FSSIZE} @@ -71,6 +85,21 @@ ${FS}: bsd.rd vnconfig -u `cat vnd` rm -f vnd +${CDROM}: ${BASE} ${XBASE} cdbr + rm -rf ${.OBJDIR}/cd-dir + mkdir -p ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE} + mkdir -p ${.OBJDIR}/cd-dir/etc + echo "set image /${OSREV}/${MACHINE}/bsd.rd" > ${.OBJDIR}/cd-dir/etc/boot.conf + cp ${.OBJDIR}/bsd.rd ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE} + cp -p ${.OBJDIR}/cdbr ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE} + mkhybrid -a -R -T -L -l -d -D -N -o ${.OBJDIR}/${CDROM} \ + -A "OpenBSD ${OSREV} ${MACHINE} Install CD" \ + -P "Copyright (c) `date +%Y` Theo de Raadt, The OpenBSD project" \ + -p "Theo de Raadt <deraadt@openbsd.org>" \ + -V "OpenBSD/${MACHINE} ${OSREV} Install CD" \ + -b ${OSREV}/${MACHINE}/cdbr -c ${OSREV}/${MACHINE}/boot.catalog \ + ${.OBJDIR}/cd-dir + bsd.rd: mr.fs cp bsd bsd.rd rdsetroot bsd.rd mr.fs @@ -108,13 +137,13 @@ unconfig: install: cp bsd.rd ${RELEASEDIR}/bsd.rd chmod a+r ${RELEASEDIR}/bsd.rd - cp ${FS} ${RELEASEDIR} + cp ${FS} ${CDROM} ${RELEASEDIR} .endif clean cleandir: rm -f *.core mr.fs instbin instbin.mk instbin.cache \ lib*.a lib*.olist instbin.map *.o *.lo *.c bsd.rd rm -f instbin.conf - rm -rf cd-dir mr.fs.d + rm -rf cd-dir mr.fs.d cdbr .include <bsd.obj.mk> |