From 6ca9a59c2be393e393c1a4259b38a8d36394b80e Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Mon, 1 Dec 2003 09:59:46 +0000 Subject: [PATCH] Introduce /usr/src/nrelease which begins to implement the new 'live CD' ISO builder idea. This initial commit is capable of creating bootable ISO images which contain a complete working distribution but will boot into a login prompt (login as root) rather then sysinstall or a sysinstall-like utility. Development is ongoing. Critical subdirectories are remounted as MFS so most normal commands, including vi, should work just fine. --- Makefile.inc1 | 5 ++- nrelease/Makefile | 60 ++++++++++++++++++++++++++++++++++ nrelease/root/boot/loader.conf | 2 ++ nrelease/root/cpignore | 3 ++ nrelease/root/etc/fstab | 9 +++++ 5 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 nrelease/Makefile create mode 100644 nrelease/root/boot/loader.conf create mode 100644 nrelease/root/cpignore create mode 100644 nrelease/root/etc/fstab diff --git a/Makefile.inc1 b/Makefile.inc1 index 2448a50118..496f08ce29 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1,6 +1,6 @@ # # $FreeBSD: src/Makefile.inc1,v 1.141.2.62 2003/04/06 19:54:00 dwmalone Exp $ -# $DragonFly: src/Makefile.inc1,v 1.8 2003/11/09 02:36:35 dillon Exp $ +# $DragonFly: src/Makefile.inc1,v 1.9 2003/12/01 09:59:42 dillon Exp $ # # Make command line options: # -DMAKE_KERBEROS5 to build Kerberos5 @@ -52,6 +52,9 @@ SUBDIR+= include .if exists(${.CURDIR}/lib) SUBDIR+= lib .endif +.if exists(${.CURDIR}/nrelease) +SUBDIR+= nrelease +.endif .if exists(${.CURDIR}/bin) SUBDIR+= bin diff --git a/nrelease/Makefile b/nrelease/Makefile new file mode 100644 index 0000000000..3aaf11bc9c --- /dev/null +++ b/nrelease/Makefile @@ -0,0 +1,60 @@ +# $DragonFly: src/nrelease/Makefile,v 1.1 2003/12/01 09:59:43 dillon Exp $ +# +ISODIR ?= /usr/release +ISOFILE ?= ${ISODIR}/dfly.iso +ISOROOT = ${ISODIR}/root +OBJSYS= ${.OBJDIR}/../sys +KERNCONF ?= GENERIC + +.if !exists(/usr/local/bin/mkisofs) +.error "You need to install the mkisofs port so I can build the ISO" +.endif +.if !exists(/usr/local/bin/cvsup) +.error "You need to install the cvsup port so I can put cvsup in the ISO" +.endif + +release: clean buildworld1 buildkernel1 buildiso mkiso + +quickrel: clean buildworld2 buildkernel2 buildiso mkiso + +realquickrel: clean buildiso mkiso + +buildworld1: + ( cd ${.CURDIR}/..; make buildworld ) + +buildworld2: + ( cd ${.CURDIR}/..; make -DNOTOOLS -DNOCLEAN buildworld ) + +buildkernel1: + ( cd ${.CURDIR}/..; make buildkernel KERNCONF=${KERNCONF} ) + +buildkernel2: + ( cd ${.CURDIR}/..; make -DNOCLEAN buildkernel KERNCONF=${KERNCONF} ) + +buildiso: + if [ ! -d ${ISOROOT} ]; then mkdir -p ${ISOROOT}; fi + ( cd ${.CURDIR}/..; make DESTDIR=${ISOROOT} installworld ) + ( cd ${.CURDIR}/../etc; make DESTDIR=${ISOROOT} distribution ) + cpdup -X cpignore -o ${.CURDIR}/root ${ISOROOT} -vv + ( cd ${.CURDIR}/..; make DESTDIR=${ISOROOT} \ + installkernel KERNCONF=${KERNCONF} ) + mtree -deU -f ${.CURDIR}/../etc/mtree/BSD.local.dist -p ${ISOROOT}/usr/local/ + mtree -deU -f ${.CURDIR}/../etc/mtree/BSD.var.dist -p ${ISOROOT}/var + dev_mkdb -f ${ISOROOT}/var/run/dev.db ${ISOROOT}/dev + cp /usr/local/bin/mkisofs ${ISOROOT} + cp /usr/local/man/man8/mkisofs.8.gz ${ISOROOT}/usr/local/man/man8 + cp /usr/local/bin/cvsup ${ISOROOT} + cp /usr/local/man/man1/cvsup.1.gz ${ISOROOT}/usr/local/man/man1 + +mkiso: + ( cd ${ISOROOT}; mkisofs -b boot/cdboot -no-emul-boot \ + -r -J -V DragonFly -o ${ISOFILE} . ) + +clean: + if [ -d ${ISOROOT} ]; then chflags -R noschg ${ISOROOT}; fi + if [ -d ${ISOROOT} ]; then rm -rf ${ISOROOT}; fi + +realclean: clean + rm -rf ${OBJSYS}/GENERIC + +.include diff --git a/nrelease/root/boot/loader.conf b/nrelease/root/boot/loader.conf new file mode 100644 index 0000000000..662cdcf50d --- /dev/null +++ b/nrelease/root/boot/loader.conf @@ -0,0 +1,2 @@ +# $DragonFly: src/nrelease/root/boot/loader.conf,v 1.1 2003/12/01 09:59:45 dillon Exp $ +kernel_options="-C" diff --git a/nrelease/root/cpignore b/nrelease/root/cpignore new file mode 100644 index 0000000000..5556b90087 --- /dev/null +++ b/nrelease/root/cpignore @@ -0,0 +1,3 @@ +# $DragonFly: src/nrelease/root/cpignore,v 1.1 2003/12/01 09:59:44 dillon Exp $ +cpignore +CVS diff --git a/nrelease/root/etc/fstab b/nrelease/root/etc/fstab new file mode 100644 index 0000000000..e2d36a5069 --- /dev/null +++ b/nrelease/root/etc/fstab @@ -0,0 +1,9 @@ +# $DragonFly: src/nrelease/root/etc/fstab,v 1.1 2003/12/01 09:59:46 dillon Exp $ +# +# Device Mountpoint FStype Options Dump Pass# +/dev/acd0a / cd9660 ro,noauto 0 0 +swap /var mfs rw,-C,-s=8192 0 0 +swap /tmp mfs rw,-C,-s=8192 0 0 +swap /etc mfs rw,-C,-s=8192 0 0 +swap /dev mfs rw,-C,-s=8192,-i=512 0 0 +proc /proc procfs rw 0 0 -- 2.41.0