From 80472285913dd821b7e224be108456cb8eb58f2a Mon Sep 17 00:00:00 2001 From: christos Date: Wed, 15 May 2024 16:29:53 +0000 Subject: [PATCH] Factor out common stuff. --- distrib/sparc64/cdroms/Makefile.cdrom | 39 ++++++++++++++++++++++ distrib/sparc64/cdroms/installcd/Makefile | 34 ++----------------- distrib/sparc64/cdroms/installdvd/Makefile | 38 ++------------------- distrib/sparc64/cdroms/spec.in | 5 +++ 4 files changed, 48 insertions(+), 68 deletions(-) create mode 100644 distrib/sparc64/cdroms/Makefile.cdrom create mode 100644 distrib/sparc64/cdroms/spec.in diff --git a/distrib/sparc64/cdroms/Makefile.cdrom b/distrib/sparc64/cdroms/Makefile.cdrom new file mode 100644 index 000000000000..92cfe41118f4 --- /dev/null +++ b/distrib/sparc64/cdroms/Makefile.cdrom @@ -0,0 +1,39 @@ +# $NetBSD: Makefile.cdrom,v 1.1 2024/05/15 16:29:53 christos Exp $ + +.include + +CDRELEASE= true # include $RELEASEDIR/$RELEASEMACHINEDIR +CDKERNELS= ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/kernel/netbsd-GENERIC.gz netbsd +CD_SETS= base etc +.if ${MKKMOD} != "no" +CD_SETS+= modules +.endif +.if ${MKMAN} != "no" +CD_SETS+= man +.endif + +SYSINSTDIR!= cd ${.CURDIR}/../../../../usr.sbin/sysinst/arch/${MACHINE} && ${PRINTOBJDIR} + +CDRELEASE_NOISOS= true +CDBOOTIMAGEDIR!= cd ${NETBSDSRCDIR}/distrib/sparc64/bootfs && ${PRINTOBJDIR} +CDBOOTIMAGE= ${CDBOOTIMAGEDIR}/boot.fs +SUN_BOOT_ARGS:= - - - - ${CDBOOTIMAGE} + +SPEC_EXTRA:=${.PARSEDIR}/spec.in + +image_md_pre: + ${RM} -f cdrom/etc/gettytab cdrom/etc/ttys cdrom/etc/rc + ${HOST_LN} -fs /tmp/gettytab cdrom/etc/gettytab + ${INSTALL} ${COPY} ${.CURDIR}/../installcd/etc.ttys cdrom/etc/ttys + ${INSTALL} ${COPY} ${.CURDIR}/../installcd/etc.rc cdrom/etc/rc + ${INSTALL} ${COPY} -m 0555 ${.CURDIR}/../installcd/install.sh cdrom/install.sh + ${MKDIR} ${MKDIRPERM} cdrom/mnt2 cdrom/targetroot + ${INSTALL} ${COPY} ${SYSINSTDIR}/sysinstmsgs.?? cdrom/usr/share/sysinst/catalog/ + +image_md_post: + SUNLABEL=${TOOL_SUNLABEL:Q} \ + ${HOST_SH} ${NETBSDSRCDIR}/distrib/common/sunbootcd.sh \ + ${CDIMAGE} ${SUN_BOOT_ARGS} + +.include "${.CURDIR}/../../../common/Makefile.bootcd" + diff --git a/distrib/sparc64/cdroms/installcd/Makefile b/distrib/sparc64/cdroms/installcd/Makefile index 35877b2de6e6..0ff34b6cd12f 100644 --- a/distrib/sparc64/cdroms/installcd/Makefile +++ b/distrib/sparc64/cdroms/installcd/Makefile @@ -1,39 +1,9 @@ -# $NetBSD: Makefile,v 1.33 2024/04/24 05:16:16 nia Exp $ - -.include +# $NetBSD: Makefile,v 1.34 2024/05/15 16:29:53 christos Exp $ CDBASE= sparc64cd # gives ${CDBASE}.iso -CDRELEASE= true # include $RELEASEDIR/$RELEASEMACHINEDIR CDRELEASE_NODEBUG= true CDRELEASE_NOCOMPAT= true CDRELEASE_NOHTML= true CDRELEASE_NOTESTS= true -CDKERNELS= ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/kernel/netbsd-GENERIC.gz netbsd -CD_SETS= base etc -.if ${MKKMOD} != "no" -CD_SETS+= modules -.endif - -SYSINSTDIR!= cd ${.CURDIR}/../../../../usr.sbin/sysinst/arch/${MACHINE} && ${PRINTOBJDIR} - -CDRELEASE_NOISOS= true -CDBOOTIMAGEDIR!= cd ${NETBSDSRCDIR}/distrib/sparc64/bootfs && ${PRINTOBJDIR} -CDBOOTIMAGE= ${CDBOOTIMAGEDIR}/boot.fs -SUN_BOOT_ARGS:= - - - - ${CDBOOTIMAGE} - -image_md_pre: - ${RM} -f cdrom/etc/gettytab cdrom/etc/ttys cdrom/etc/rc - ${HOST_LN} -fs /tmp/gettytab cdrom/etc/gettytab - ${INSTALL} ${COPY} ${.CURDIR}/etc.ttys cdrom/etc/ttys - ${INSTALL} ${COPY} ${.CURDIR}/etc.rc cdrom/etc/rc - ${INSTALL} ${COPY} -m 0555 ${.CURDIR}/install.sh cdrom/install.sh - ${MKDIR} ${MKDIRPERM} cdrom/mnt2 cdrom/targetroot - ${INSTALL} ${COPY} ${SYSINSTDIR}/sysinstmsgs.?? cdrom/usr/share/sysinst/catalog/ - -image_md_post: - SUNLABEL=${TOOL_SUNLABEL:Q} \ - ${HOST_SH} ${NETBSDSRCDIR}/distrib/common/sunbootcd.sh \ - ${CDIMAGE} ${SUN_BOOT_ARGS} - -.include "${.CURDIR}/../../../common/Makefile.bootcd" +.include "${.CURDIR}/../Makefile.cdrom" diff --git a/distrib/sparc64/cdroms/installdvd/Makefile b/distrib/sparc64/cdroms/installdvd/Makefile index 9550060a4437..b5a67534abc2 100644 --- a/distrib/sparc64/cdroms/installdvd/Makefile +++ b/distrib/sparc64/cdroms/installdvd/Makefile @@ -1,38 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2024/04/26 17:36:32 nia Exp $ - -.include +# $NetBSD: Makefile,v 1.3 2024/05/15 16:29:54 christos Exp $ CDBASE= sparc64dvd # gives ${CDBASE}.iso -CDRELEASE= true # include $RELEASEDIR/$RELEASEMACHINEDIR -CDKERNELS= ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/kernel/netbsd-GENERIC.gz netbsd -CD_SETS= base etc -.if ${MKKMOD} != "no" -CD_SETS+= modules -.endif -.if ${MKMAN} != "no" -CD_SETS+= man -.endif - -SYSINSTDIR!= cd ${.CURDIR}/../../../../usr.sbin/sysinst/arch/${MACHINE} && ${PRINTOBJDIR} - -CDRELEASE_NOISOS= true -CDBOOTIMAGEDIR!= cd ${NETBSDSRCDIR}/distrib/sparc64/bootfs && ${PRINTOBJDIR} -CDBOOTIMAGE= ${CDBOOTIMAGEDIR}/boot.fs -SUN_BOOT_ARGS:= - - - - ${CDBOOTIMAGE} - -image_md_pre: - ${RM} -f cdrom/etc/gettytab cdrom/etc/ttys cdrom/etc/rc - ${HOST_LN} -fs /tmp/gettytab cdrom/etc/gettytab - ${INSTALL} ${COPY} ${.CURDIR}/../installcd/etc.ttys cdrom/etc/ttys - ${INSTALL} ${COPY} ${.CURDIR}/../installcd/etc.rc cdrom/etc/rc - ${INSTALL} ${COPY} -m 0555 ${.CURDIR}/../installcd/install.sh cdrom/install.sh - ${MKDIR} ${MKDIRPERM} cdrom/mnt2 cdrom/targetroot - ${INSTALL} ${COPY} ${SYSINSTDIR}/sysinstmsgs.?? cdrom/usr/share/sysinst/catalog/ - -image_md_post: - SUNLABEL=${TOOL_SUNLABEL:Q} \ - ${HOST_SH} ${NETBSDSRCDIR}/distrib/common/sunbootcd.sh \ - ${CDIMAGE} ${SUN_BOOT_ARGS} - -.include "${.CURDIR}/../../../common/Makefile.bootcd" - +.include "${.CURDIR}/../Makefile.cdrom" diff --git a/distrib/sparc64/cdroms/spec.in b/distrib/sparc64/cdroms/spec.in new file mode 100644 index 000000000000..ebd88a9f2b4c --- /dev/null +++ b/distrib/sparc64/cdroms/spec.in @@ -0,0 +1,5 @@ +./install.sh type=file uname=root gname=wheel mode=755 +./mnt2 type=dir uname=root gname=wheel mode=755 +./netbsd type=file uname=root gname=wheel mode=644 +./targetroot type=dir uname=root gname=wheel mode=755 +./etc/gettytab type=link uname=root gname=wheel mode=755