Add standalone "iso-image" target that can be run with DESTDIR and RELEASEDIR
set in src/etc after a "make release" in both "src" and "xsrc", to create a ISO-image of the release in $RELEASEDIR/installation/cdrom. Hook for architecture dependent pre/post-processing in etc/etc.*/Makefile.inc are available as 'iso-image_md_post' and 'iso-image_md_pre', see etc/etc.i386/Makefile.inc as an example. Might be useful for setting up bootable CDs on alpha, sparc, ... Reviewed by Todd Whitesel and Thomas Klausner.
This commit is contained in:
parent
235368355b
commit
b4b75848de
38
etc/Makefile
38
etc/Makefile
@ -1,4 +1,4 @@
|
||||
# $NetBSD: Makefile,v 1.160 2000/08/23 20:48:42 jhawk Exp $
|
||||
# $NetBSD: Makefile,v 1.161 2000/09/11 21:53:30 hubertf Exp $
|
||||
# from: @(#)Makefile 8.7 (Berkeley) 5/25/95
|
||||
|
||||
# Environment variables without default values:
|
||||
@ -45,6 +45,14 @@
|
||||
TZDIR= /usr/share/zoneinfo
|
||||
LOCALTIME?= UTC
|
||||
|
||||
# Flags for creating ISO CDROM image
|
||||
# mkisofs is expected to be in $PATH, install via pkgsrc/sysutils/cdrecord
|
||||
MKISOFS?= mkisofs
|
||||
MKISOFS_FLAGS+= -J -l \
|
||||
-r -T -v \
|
||||
-P "The NetBSD Project" \
|
||||
-m "${RELEASEDIR}/instalation/cdrom"
|
||||
|
||||
# setting NOOBJ prevents "make obj" from doing anything;
|
||||
# an objdir would break the installation stuff below
|
||||
MKOBJ= no
|
||||
@ -118,7 +126,8 @@ obj:
|
||||
mkdir -p ${KERNOBJDIR}
|
||||
|
||||
.ifndef DESTDIR
|
||||
distribution distrib-dirs release snapshot snap_pre snap_md_pre snap_md_post:
|
||||
distribution distrib-dirs release snapshot snap_pre snap_md_pre \
|
||||
snap_md_post iso-image:
|
||||
@echo setenv DESTDIR before doing that!
|
||||
@false
|
||||
.else
|
||||
@ -247,7 +256,7 @@ distrib-dirs:
|
||||
cd ${DESTDIR}; rm -f sys; ln -s usr/src/sys sys
|
||||
|
||||
.if !defined(RELEASEDIR)
|
||||
release snapshot snap_pre snap_md_pre snap_md_post:
|
||||
release snapshot snap_pre snap_md_pre snap_md_post iso-image:
|
||||
@echo setenv RELEASEDIR before doing that!
|
||||
@false
|
||||
.else
|
||||
@ -255,6 +264,29 @@ release snapshot: distribution snap_pre snap_md_pre snap_kern snap_md_post
|
||||
(cd ../distrib/sets; ${MAKE} sets)
|
||||
sh ../distrib/sets/makesums -t ${RELEASEDIR}/binary/kernel '*.gz'
|
||||
|
||||
# Standalone target to create a CDROM image after the release
|
||||
# was composed. Should be run after "make build" in both src and xsrc
|
||||
iso-image: iso-image_md_post
|
||||
|
||||
iso-image_mi: iso-image_md_pre
|
||||
@if ${MKISOFS} --version; then \
|
||||
mkdir -p ${RELEASEDIR}/installation/cdrom ; \
|
||||
${MKISOFS} ${MKISOFS_FLAGS} \
|
||||
-o ${RELEASEDIR}/installation/cdrom/netbsd-${MACHINE}.iso \
|
||||
${RELEASEDIR} ; \
|
||||
sh ../distrib/sets/makesums -t ${RELEASEDIR}/installation/cdrom '*.iso' ; \
|
||||
else \
|
||||
echo "install pkgsrc/sysutils/cdrecord and type 'make iso-image'." ; \
|
||||
fi
|
||||
|
||||
# Setup the $RELEASEDIR to produce a bootable CD image:
|
||||
iso-image_md_pre:
|
||||
# nothing here -- look in the machine-dependent Makefile.inc
|
||||
|
||||
# Fixup the CD-image to be bootable
|
||||
iso-image_md_post: iso-image_mi
|
||||
# nothing here -- look in the machine-dependent Makefile.inc
|
||||
|
||||
snap_pre:
|
||||
/bin/rm -rf ${RELEASEDIR}
|
||||
${INSTALL} ${INSTPRIV} -d -o root -g wheel -m 755 ${RELEASEDIR}
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: Makefile.inc,v 1.23 2000/08/23 21:00:46 jhawk Exp $
|
||||
# $NetBSD: Makefile.inc,v 1.24 2000/09/11 21:53:31 hubertf Exp $
|
||||
#
|
||||
# etc.i386/Makefile.inc -- i386-specific etc Makefile targets
|
||||
#
|
||||
@ -10,6 +10,9 @@ EXTRA_KERNELS+= GENERIC_TINY
|
||||
BUILD_KERNELS+= INSTALL INSTALL_SMALL INSTALL_TINY
|
||||
INSTALLATION_DIRS += installation/misc
|
||||
|
||||
# mkisofs arguments to generate bootable iso image
|
||||
MKISOFS_FLAGS+= -b installation/floppy/boot-big.fs
|
||||
|
||||
# Build the boot floppies and install them
|
||||
snap_md_post:
|
||||
.ifndef UPDATE
|
||||
@ -20,3 +23,9 @@ snap_md_post:
|
||||
cd ${.CURDIR}/../distrib/notes && ${MAKE} release
|
||||
cd ${.CURDIR}/../sys/arch/i386/stand/dosboot && ${MAKE} release
|
||||
sh ../distrib/sets/makesums -t ${RELEASEDIR}/installation/floppy '*.gz'
|
||||
|
||||
# For "make iso-image"
|
||||
iso-image_md_pre:
|
||||
echo iso-image_md_pre ${MACHINE_ARCH}
|
||||
iso-image_md_post:
|
||||
echo iso-image_md_post ${MACHINE_ARCH}
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: release.7,v 1.7 1999/05/10 19:34:22 is Exp $
|
||||
.\" $NetBSD: release.7,v 1.8 2000/09/11 21:53:31 hubertf Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
@ -302,6 +302,31 @@ this set to locations outside the United States and Canada.)
|
||||
.It Sy installation/
|
||||
installation helper items
|
||||
.Bl -tag -width "diskimage/"
|
||||
.It Sy cdrom/
|
||||
CDROM images in ISO 9660 format, usually created with
|
||||
.Dq make iso-image
|
||||
in
|
||||
.Pa src/etc
|
||||
after a
|
||||
.Dq make release
|
||||
in both
|
||||
.Pa src
|
||||
and
|
||||
.Pa xsrc .
|
||||
.Bl -tag -width "netbsd-ARCH.iso"
|
||||
.It Sy BSDSUM
|
||||
.It Sy CKSUM
|
||||
.It Sy MD5
|
||||
.It Sy README
|
||||
.It Sy SYSVSUM
|
||||
.It Xo
|
||||
.Sm off
|
||||
.Sy netbsd-
|
||||
.Em <machine_arch>
|
||||
.Sy .iso
|
||||
.Sm on
|
||||
.Xc
|
||||
.El
|
||||
.It Sy diskimage/
|
||||
disk images, for those platforms that provide them
|
||||
.Bl -tag -width "diskimage-rz25.gz"
|
||||
|
Loading…
Reference in New Issue
Block a user