Module Name: src
Committed By: jmcneill
Date: Sun Oct 11 14:24:50 UTC 2020
Modified Files:
src/distrib/evbarm: Makefile
Added Files:
src/distrib/evbarm/isoimage: Makefile Makefile.cdrom boot.cfg.in
Log Message:
Create a bootable El Torito installation ISO.
To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/distrib/evbarm/Makefile
cvs rdiff -u -r0 -r1.1 src/distrib/evbarm/isoimage/Makefile \
src/distrib/evbarm/isoimage/Makefile.cdrom \
src/distrib/evbarm/isoimage/boot.cfg.in
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/distrib/evbarm/Makefile
diff -u src/distrib/evbarm/Makefile:1.12 src/distrib/evbarm/Makefile:1.13
--- src/distrib/evbarm/Makefile:1.12 Thu May 28 15:27:59 2020
+++ src/distrib/evbarm/Makefile Sun Oct 11 14:24:50 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.12 2020/05/28 15:27:59 jmcneill Exp $
+# $NetBSD: Makefile,v 1.13 2020/10/11 14:24:50 jmcneill Exp $
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@@ -9,6 +9,9 @@ SUBDIR= gzboot instkernel
.if ${MACHINE_ARCH} == "aarch64" || ${MACHINE_ARCH} == "earmv7hf"
SUBDIR+= installimage
.endif
+.if ${MACHINE_ARCH} == "aarch64"
+SUBDIR+= isoimage
+.endif
TARGETS+= release
.if ${MACHINE_CPU} == "arm"
@@ -19,6 +22,9 @@ release: check_RELEASEDIR .WAIT ${MDECBO
${RELEASE_INSTALL} ${MDECBOOT} ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation
.endif
+iso_image:
+ ${MAKEDIRTARGET} isoimage iso_image
+
install_image:
${MAKEDIRTARGET} installimage install_image
Added files:
Index: src/distrib/evbarm/isoimage/Makefile
diff -u /dev/null src/distrib/evbarm/isoimage/Makefile:1.1
--- /dev/null Sun Oct 11 14:24:50 2020
+++ src/distrib/evbarm/isoimage/Makefile Sun Oct 11 14:24:50 2020
@@ -0,0 +1,15 @@
+# $NetBSD: Makefile,v 1.1 2020/10/11 14:24:50 jmcneill Exp $
+
+.include <bsd.own.mk>
+.include "${.CURDIR}/Makefile.cdrom"
+
+CDBASE= evbarm-${MACHINE_ARCH}cd # gives ${CDBASE}.iso
+CDRELEASE= true # include $RELEASEDIR/$RELEASEMACHINEDIR
+CDRELEASE_NODEBUG= true
+CLEANFILES+= boot.cfg
+
+prepare_md_post:
+ ${TOOL_SED} "s/@@VERSION@@/${DISTRIBVER}/" \
+ < ${.CURDIR}/boot.cfg.in > boot.cfg
+
+.include "${.CURDIR}/../../common/Makefile.bootcd"
Index: src/distrib/evbarm/isoimage/Makefile.cdrom
diff -u /dev/null src/distrib/evbarm/isoimage/Makefile.cdrom:1.1
--- /dev/null Sun Oct 11 14:24:50 2020
+++ src/distrib/evbarm/isoimage/Makefile.cdrom Sun Oct 11 14:24:50 2020
@@ -0,0 +1,33 @@
+# $NetBSD: Makefile.cdrom,v 1.1 2020/10/11 14:24:50 jmcneill Exp $
+
+.include <bsd.own.mk>
+.include <bsd.endian.mk>
+
+SYSINSTDIR!= cd ${.CURDIR}/../../../usr.sbin/sysinst/arch/${MACHINE} && ${PRINTOBJDIR}
+
+EFIBOOTIMG= efiboot.img
+CLEANFILES+= ${EFIBOOTIMG}
+.if ${MKREPRO_TIMESTAMP:Uno} != "no"
+MAKEFS_TIMESTAMP=-T "${MKREPRO_TIMESTAMP}"
+.endif
+
+# Need multidot for the boot loader to read kernel modules as it doesn't
+# understand rockridge.
+CDMAKEFSOPTIONS= bootimage=i386;${EFIBOOTIMG},platformid=efi,no-emul-boot
+CDRELEASE_NOISOS= true
+CD_SETS=
+
+${EFIBOOTIMG}: ${DESTDIR}/usr/mdec/bootaa64.efi
+ ${RM} -f ${EFIBOOTIMG}
+ ${RM} -rf efiboot/EFI/boot efiboot/netbsd efiboot/ramdisk.fs
+ ${MKDIR} ${MKDIRPERM} efiboot/EFI/boot
+ ${INSTALL} ${COPY} -m 0444 ${DESTDIR}/usr/mdec/bootaa64.efi efiboot/EFI/boot/
+ ${TOOL_MAKEFS} -M 1m -m 1m -B ${TARGET_ENDIANNESS} ${MAKEFS_TIMESTAMP} \
+ -t msdos -o F=12,c=1 ${EFIBOOTIMG} efiboot
+
+image_md_pre: ${EFIBOOTIMG}
+ ${RM} -f cdrom/netbsd
+ ${INSTALL} ${COPY} -m 0444 ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/kernel/netbsd-GENERIC64.gz cdrom/netbsd.gz
+ ${INSTALL} ${COPY} -m 0444 boot.cfg cdrom/boot.cfg
+ ${TOOL_GZIP_N} -d cdrom/netbsd.gz
+ ${INSTALL} ${COPY} -m 0444 ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/ramdisk/ramdisk.fs cdrom/ramdisk.fs
Index: src/distrib/evbarm/isoimage/boot.cfg.in
diff -u /dev/null src/distrib/evbarm/isoimage/boot.cfg.in:1.1
--- /dev/null Sun Oct 11 14:24:50 2020
+++ src/distrib/evbarm/isoimage/boot.cfg.in Sun Oct 11 14:24:50 2020
@@ -0,0 +1,8 @@
+banner=Welcome to the NetBSD @@VERSION@@ installation CD
+banner================================================================================
+banner=
+banner=If you encounter a problem while booting, report a bug at
+banner=https://www.NetBSD.org/.
+menu=Install NetBSD:initrd ramdisk.fs;boot netbsd
+menu=Drop to boot prompt:prompt
+timeout=30