[BACK]Return to Makefile.bootcd CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / distrib / common

Annotation of src/distrib/common/Makefile.bootcd, Revision 1.2

1.2     ! oster       1: #      $NetBSD: Makefile.bootcd,v 1.1 2006/06/02 22:35:22 hubertf Exp $
1.1       hubertf     2: #
                      3: # Makefile snipped to create a CD/DVD ISO
                      4: #
                      5:
                      6: # XXX TODO:
                      7: # 1) merge with src/distrib/cdrom
                      8: # 2) teach makefs to add data from more than 1 directory (see below)
                      9:
                     10: #
                     11: # Required variables:
                     12: #      CDBASE          Basename of the iso
                     13: #      CDKERNEL        Kernel to copy from ../instkernel (or it's obj dir)
                     14: #
                     15: # Optional variables:
                     16: #      CDRELEASE       Set to 'true' to include $RELEASEDIR/$MACHINE on the CD
                     17: #      BOOT            Defaults to $DESTDIR/usr/mdec/boot
                     18: #      BOOTXX_CD9660   Defaults to $DESTDIR/usr/mdec/bootxx_cd9660
                     19: #      CDBOOTOPTIONS   Options for installboot, eg -o console=com0,speed=9600
                     20: #      CDROMS_RELEASEDIR Where to install ${CDBASE}.iso
                     21: #
                     22:
                     23: BOOT?=         ${DESTDIR}/usr/mdec/boot
                     24: BOOTXX_CD9660?=        ${DESTDIR}/usr/mdec/bootxx_cd9660
                     25: CDRELEASE?=    false
                     26: CDROMS_RELEASEDIR?=    installation/cdrom
                     27:
                     28: CDINSTALLBOOT= "${TOOL_INSTALLBOOT} ${CDBOOTOPTIONS} -m${MACHINE} @IMAGE@ ${MDEC}/bootxx_cd9660"
                     29:
                     30: # Stuff that should come from elsewhere - XXX where? - HF
                     31: CP?=           cp
                     32: RM?=           rm
                     33: MKDIR?=                mkdir -p
                     34: CHMOD?=                chmod
                     35:
                     36:
                     37: CLEANFILES+=   ${CDBASE}.iso
                     38: CLEANFILES+=   bootxx
                     39:
                     40:
                     41: # for PRINTOBJDIR
                     42: .include <bsd.own.mk>
                     43:
                     44: .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
                     45:
                     46: _INSTKERELNOBJDIR!=    cd ${.CURDIR}/../../instkernel && ${PRINTOBJDIR}
                     47:
                     48:
1.2     ! oster      49: dependall all: prepare .WAIT copy-releasedir .WAIT image
1.1       hubertf    50:
                     51: prepare:
                     52:        ${MKDIR} cdrom
                     53:        ${CP} ${_INSTKERELNOBJDIR}/${CDKERNEL} cdrom/netbsd
                     54:        ${RM} -f cdrom/boot
                     55:        ${CP} ${DESTDIR}/usr/mdec/boot cdrom/boot
                     56:        ${RM} -f bootxx
                     57:        ${CP} ${DESTDIR}/usr/mdec/bootxx_cd9660 bootxx
                     58:        ${CHMOD} +w bootxx
                     59:        ${TOOL_INSTALLBOOT} \
                     60:                -t raw ${CDBOOTOPTIONS} -m${MACHINE} \
                     61:                bootxx ${DESTDIR}/usr/mdec/bootxx_cd9660
                     62:
                     63: # Copy $RELEASEDIR/${MACHINE} in the CDROM dir
                     64: #
                     65: # XXX This could be done a lot easier if makefs(8) could
                     66: # XXX include more than one directory on the image - HF
                     67: #
                     68: copy-releasedir:
                     69:        if ${CDRELEASE} ; then                                          \
                     70:                if [ ! -d ${RELEASEDIR}/${MACHINE} ]; then              \
                     71:                        echo "No releasedir ${RELEASEDIR}/${MACHINE}, aborting" ; \
                     72:                        exit 1 ;                                        \
                     73:                fi ;                                                    \
                     74:                ${MKDIR} cdrom/${MACHINE} ;                             \
                     75:                release_destdir=`pwd`/cdrom/${MACHINE} ;                \
                     76:                cd ${RELEASEDIR}/${MACHINE} ;                           \
                     77:                echo Copying `pwd` to $$release_destdir ... ;           \
                     78:                pax -rw -pe -v . $$release_destdir ;                    \
                     79:        fi
                     80:
                     81: image:
                     82:        ${TOOL_MAKEFS} -t cd9660 \
                     83:                -o 'bootimage=i386;bootxx,no-emul-boot' \
                     84:                ${CDBASE}.iso cdrom
                     85:
                     86: release:
                     87:        ${RELEASE_INSTALL} ${CDBASE}.iso ${RELEASEDIR}/${MACHINE}/installation/cdrom
                     88:
                     89: clean:
                     90:        ${RM} -fr cdrom
                     91:
                     92: .include <bsd.prog.mk>

CVSweb <webmaster@jp.NetBSD.org>