Factor out common stuff.

This commit is contained in:
christos 2024-05-15 16:29:53 +00:00
parent 6f685adcb6
commit 8047228591
4 changed files with 48 additions and 68 deletions

View File

@ -0,0 +1,39 @@
# $NetBSD: Makefile.cdrom,v 1.1 2024/05/15 16:29:53 christos Exp $
.include <bsd.own.mk>
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"

View File

@ -1,39 +1,9 @@
# $NetBSD: Makefile,v 1.33 2024/04/24 05:16:16 nia Exp $
.include <bsd.own.mk>
# $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"

View File

@ -1,38 +1,4 @@
# $NetBSD: Makefile,v 1.2 2024/04/26 17:36:32 nia Exp $
.include <bsd.own.mk>
# $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"

View File

@ -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