Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/distrib/cdrom First draft of multiple-arch CD-ROM creation s...



details:   https://anonhg.NetBSD.org/src/rev/4269cbfaa59c
branches:  trunk
changeset: 499796:4269cbfaa59c
user:      tv <tv%NetBSD.org@localhost>
date:      Wed Nov 29 16:35:03 2000 +0000

description:
First draft of multiple-arch CD-ROM creation system.  This is extremely
rough at this point, and needs more fleshing out in several areas.  Does not
yet do packages or check for the existence of support programs--to be fixed.

diffstat:

 distrib/cdrom/Makefile                                |  391 ++++++++++++++++++
 distrib/cdrom/NetBSD-1.5.mk                           |   48 ++
 distrib/cdrom/hide-hfs.lst                            |   29 +
 distrib/cdrom/hide-iso.lst                            |    1 +
 distrib/cdrom/hide-jol.lst                            |    4 +
 distrib/cdrom/macppc_installboot/Makefile             |   14 +
 distrib/cdrom/macppc_installboot/bootxx.raw           |  Bin 
 distrib/cdrom/macppc_installboot/macppc_installboot.c |   39 +
 distrib/cdrom/macppc_installboot/mkmacppcboot.c       |   74 +++
 9 files changed, 600 insertions(+), 0 deletions(-)

diffs (truncated from 634 to 300 lines):

diff -r 53a49682bca2 -r 4269cbfaa59c distrib/cdrom/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/cdrom/Makefile    Wed Nov 29 16:35:03 2000 +0000
@@ -0,0 +1,391 @@
+# $NetBSD: Makefile,v 1.1 2000/11/29 16:35:03 tv Exp $
+#
+# Consult "*.conf" for the configuration variables; this Makefile is typically
+# not edited for basic configuration changes.
+##############################################################################
+
+all:
+
+.if exists(site.conf)
+.include "site.conf"
+.endif
+
+.if !defined(RELEASE)
+.BEGIN:
+       @echo "Please set RELEASE in the environment or in site.conf to the basename"
+       @echo "of the release configuration file to use.  For example:"
+       @echo "> ${MAKE} RELEASE=foo"
+       @echo "will use the configuration file foo.conf."
+       @false
+.endif
+
+.if exists(${RELEASE}.conf)
+.include "${RELEASE}.conf"
+.elif !target(.BEGIN)
+.BEGIN:
+       @echo "Error: File does not exist: ${RELEASE}.conf"
+       @false
+.endif
+
+CD_RELEASE?=
+RELEASENAME=           NetBSD-${CD_RELEASE}
+MKISOFS_ARGS=          -f -A "NetBSD ${CD_RELEASE}" \
+                       -hide-list ${.CURDIR}/hide-iso.lst \
+                       -hide-rr-moved -m Split -m cdrom
+
+ALL_PORTS=
+.for image in ${CD_IMAGES}
+BASE_PORTS.${image}?=
+ALL_PORTS:=            ${ALL_PORTS} ${BASE_PORTS.${image}}
+.endfor
+
+.if exists(${RELEASENAME}.mk)
+.include "${RELEASENAME}.mk"
+.elif !target(.BEGIN)
+.if !empty(CD_RELEASE)
+.BEGIN:
+       @echo "Error: File does not exist: ${RELEASENAME}.mk"
+       @echo "(specified by variable CD_RELEASE in ${RELEASE}.conf)"
+       @false
+.else
+.BEGIN:
+       @echo "Error: CD_RELEASE not set in ${RELEASE}.conf"
+       @false
+.endif
+.endif
+
+SUBDIR=
+
+.if !empty(ALL_PORTS:Mmacppc)
+SUBDIR+=       macppc_installboot
+.endif
+
+.if !empty(SUBDIR)
+.include <bsd.subdir.mk>
+.endif
+
+.include <bsd.obj.mk>
+
+##### Default paths for programs #####
+
+MKISOFS?=      /usr/pkg/bin/mkisofs
+MKSUNBOOTCD?=  /usr/pkg/sbin/mksunbootcd
+RSYNC?=                /usr/pkg/bin/rsync
+ALPHA_IBOOT?=  /sys/arch/alpha/stand/installboot/installboot
+PMAX_IBOOT?=   /sys/arch/pmax/stand/installboot/installboot
+VAX_IBOOT?=    /sys/arch/vax/stand/installboot/installboot
+.if !empty(ALL_PORTS:Mmacppc)
+MACPPC_IBOOTDIR!= cd ${.CURDIR}/macppc_installboot && ${MAKE} print-objdir
+MACPPC_IBOOT=  ${MACPPC_IBOOTDIR}/macppc_installboot
+.endif
+
+RSYNC_SITE?=   ftp.netbsd.org:/pub/NetBSD/
+RSYNC_ARGS?=   -va --delete --rsh=ssh
+RSYNC_EXCLUDE+=        --exclude=/* --exclude=Split --exclude=cdrom
+
+DISTDIR?=      ./download
+STAGEDIR?=     ./staging
+IMAGEDIR?=     .
+EXTFILEDIR?=   ./extfiles
+EASTER_EGG?=   /dev/null
+
+RELEASE_SUBDIR?=${RELEASENAME}
+
+##### MACHINE_ARCH for possible shared sets for each port #####
+
+MACHINE_ARCH.amiga=    m68k
+MACHINE_ARCH.amigappc= powerpc
+MACHINE_ARCH.arc=      mipsel
+MACHINE_ARCH.atari=    m68k
+MACHINE_ARCH.bebox=    powerpc
+MACHINE_ARCH.cobalt=   mipsel
+MACHINE_ARCH.hp300=    m68k
+MACHINE_ARCH.hpcmips=  mipsel
+MACHINE_ARCH.luna68k=  m68k
+MACHINE_ARCH.mac68k=   m68k
+MACHINE_ARCH.macppc=   powerpc
+MACHINE_ARCH.mipsco=   mipseb
+MACHINE_ARCH.mvme68k=  m68k
+MACHINE_ARCH.news68k=  m68k
+MACHINE_ARCH.newsmips= mipseb
+MACHINE_ARCH.next68k=  m68k
+MACHINE_ARCH.ofppc=    powerpc
+MACHINE_ARCH.pmax=     mipsel
+MACHINE_ARCH.prep=     powerpc
+MACHINE_ARCH.sgimips=  mipseb
+MACHINE_ARCH.sun3=     m68k
+MACHINE_ARCH.sun3x=    m68k
+MACHINE_ARCH.x68k=     m68k
+
+##### Fetched directories from FTP server #####
+
+.if defined(ALL_PORTS) && !empty(ALL_PORTS)
+RSYNC_INCLUDE+=                --include "/${RELEASENAME}/" \
+                       --include "/${RELEASENAME}/shared/"
+RSYNC_EXCLUDE+=                --exclude "/${RELEASENAME}/[a-z]*" \
+                       --exclude "/${RELEASENAME}/shared/[a-z]*/"
+.endif
+
+.for port in ${ALL_PORTS}
+RSYNC_INCLUDE+=                --include "/${RELEASENAME}/${port}/"
+.if defined(MACHINE_ARCH.${port})
+RSYNC_INCLUDE+=                --include "/${RELEASENAME}/${MACHINE_ARCH.${port}}/" \
+                       --include "/${RELEASENAME}/shared/${MACHINE_ARCH.${port}}/"
+.endif
+.endfor
+
+##### Boot info and additional options for various platforms #####
+
+.if defined(PUBLISHER)
+MKISOFS_ARGS+=         -P "${PUBLISHER}"
+.endif
+
+.if defined(PREPARER)
+MKISOFS_ARGS+=         -p "${PREPARER}"
+.endif
+
+.for image in ${CD_IMAGES}
+ports:=${BASE_PORTS.${image}}
+
+.if !defined(VOLID.${image}) && !target(.BEGIN)
+.BEGIN:
+       @echo "Error: VOLID.${image} not set in ${RELEASE}.conf"
+       @false
+.endif
+
+MKISOFS_ARGS.${image}= -V "${VOLID.${image}}"
+
+.if defined(ABSTRACT.${image})
+MKISOFS_ARGS.${image}+=        -abstract ${ABSTRACT.${image}}
+.endif
+
+# Options specified in release config file
+
+EXTFILES?=
+INTFILES.${image}?=
+INTDIRS.${image}?=
+ADDFILES.${image}?=
+
+.for port in ${ports}
+EXTFILES+=             ${EXTFILES.${port}}
+INTFILES.${image}+=    ${INTFILES.${port}}
+INTDIRS.${image}+=     ${INTDIRS.${port}}
+ADDFILES.${image}+=    ${ADDFILES.${port}}
+MKISOFS_ARGS.${image}+=        ${MKISOFS_ARGS.${port}}
+.endfor
+
+# i386
+
+.if !empty(ports:Mi386)
+MKISOFS_ARGS.${image}+=        -b ${BOOTFILE.i386} -c boot.catalog
+.endif
+
+# Mac (mac68k, macppc)
+
+.if !empty(ports:Mmac*)
+MKISOFS_ARGS.${image}+=        -hfs -part -hide-hfs-list ${.CURDIR}/hide-hfs.lst \
+                       --macbin
+
+.if !empty(ports:Mmacppc)
+MKISOFS_ARGS.${image}+= -boot-hfs-file macppc_installboot/macppcboot.raw
+.endif
+
+.elif defined(USE_APPLE_ISO)
+MKISOFS_ARGS.${image}+=        -apple --macbin
+.endif
+
+# Sun (sparc, sparc64, sun3)
+
+.if !empty(ports:Msparc*) || !empty(ports:Msun3*)
+SUN_BOOT.123:= /dev/null
+SUN_BOOT.4:=   /dev/null
+SUN_BOOT.5:=   /dev/null
+
+.if !empty(ports:Msparc)
+SUN_BOOT.123:= ${BOOTFILE.sparc}
+.endif
+
+.if !empty(ports:Msun3)
+.if !defined(BOOTFILE.sun3x)
+# NetBSD >= 1.4; sun3 and sun3x are the same
+SUN_BOOT.5:=   ${BOOTFILE.sun3}
+.endif
+SUN_BOOT.4:=   ${BOOTFILE.sun3}
+.endif
+
+.if !empty(ports:Msun3x) && defined(BOOTFILE.sun3x)
+# NetBSD < 1.4; sun3 and sun3x are separate
+SUN_BOOT.5:=   ${BOOTFILE.sun3x}
+.endif
+
+.if !empty(ports:Msparc64)
+.if (${SUN_BOOT.5} != "/dev/null")
+# add warning
+SUN_BOOT.5:=   ${SUN_BOOT.5} ${BOOTFILE.sparc64}
+.else
+SUN_BOOT.5:=   ${BOOTFILE.sparc64}
+.endif
+.endif
+
+SUN_BOOT_ARGS.${image}:= ${SUN_BOOT.123} ${SUN_BOOT.123} ${SUN_BOOT.123} ${SUN_BOOT.4} ${SUN_BOOT.5}
+.endif
+
+.endfor
+
+##### Additional options for host OS's #####
+
+# (USE_APPLE_ISO is tested above)
+
+.if defined(USE_ROCK_RIDGE)
+MKISOFS_ARGS+=         -r
+.endif
+
+.if defined(USE_LONG_NAMES)
+MKISOFS_ARGS+=         -l
+.endif
+
+.if defined(USE_TRANS_TBL)
+MKISOFS_ARGS+=         -T
+.endif
+
+.if defined(USE_JOLIET)
+MKISOFS_ARGS+=         -J -hide-joliet-list ${.CURDIR}/hide-jol.lst
+.if defined(USE_TRANS_TBL)
+MKISOFS_ARGS+=         -hide-joliet-trans-tbl
+.endif
+.endif
+
+##### File extract rule #####
+
+USE-FILE: .USE
+       @case $> in \
+               /*,link) \
+                       echo "ln -sf ${>:S/,link$//} $@"; \
+                       ln -sf ${>:S/,link$//} $@;; \
+               *,link) \
+                       echo "ln -sf `pwd -P`/${>:S/,link$//} $@"; \
+                       ln -sf `pwd -P`/${>:S/,link$//} $@;; \
+               *.tgz,*) \
+                       echo "Extracting: $> --> $@..."; \
+                       tar --fast-read -xzOf ${>:C/,.*$//} ${>:C/^.*,//} >$@;; \
+               *.gz) echo "gunzip -c <$> >$@"; gunzip -c <$> >$@;; \
+               *) echo "Unknown archive method for $@"; false;; \
+       esac
+
+##### Makefile rules #####
+
+.for image in ${CD_IMAGES}
+all: ${IMAGEDIR}/${image}.iso
+
+stage-${image}:
+       mkdir -p ${STAGEDIR}/${image} ${EXTFILEDIR}
+.if defined(BASE_PORTS.${image}) && !empty(BASE_PORTS.${image})
+.if !empty(RELEASE_SUBDIR)
+       mkdir -p ${STAGEDIR}/${image}/${RELEASE_SUBDIR}
+.endif
+.for dir in ${INTDIRS.${image}}
+       mkdir -p ${STAGEDIR}/${image}/${dir}
+.endfor
+.for arch in ${BASE_PORTS.${image}}
+       ln -sf `cd ${DISTDIR} && pwd -P`/${RELEASENAME}/${arch} ${STAGEDIR}/${image}/${RELEASE_SUBDIR}/
+.endfor
+.endif
+
+extfileprep:
+.for file in ${EXTFILES}
+extfileprep: ${EXTFILEDIR}/${file:C/:.*$//}



Home | Main Index | Thread Index | Old Index