Date: Tue, 25 Sep 2007 18:27:29 +0200 From: "Ulrich Spoerlein" <uspoerlein@gmail.com> To: freebsd-hackers@freebsd.org Subject: Re: Own Install CD with custom kernel Message-ID: <7ad7ddd90709250927o772264b1v34446145d292b8bd@mail.gmail.com> In-Reply-To: <20070924225841.GA75866@server.idefix.lan> References: <46F22228.5070203@fechner.net> <20070923151916.GB1444@roadrunner.spoerlein.net> <20070924225841.GA75866@server.idefix.lan>
next in thread | previous in thread | raw e-mail | index | archive | help
On 9/25/07, Matthias Fechner <idefix@fechner.net> wrote: > thx a lot for your really great answer, but I have some more short > questions. :) > Do you copy the release target to the Makefile in > /usr/src/release/Makefile or do you execute from another place? Since we need to be able to reproduce our releases, we use the chroot facility and build those releases in their very own directory. That way we can also easily use a custom make.conf, especially for the package building (which are built in that same chroot). So, with the variables as defined below, I first run the 'init' target, which sets up the chroot environment init: mkdir -p ${TLR}/usr ${TLR}/etc ${TLR}/usr/ports/local mkdir -p ${TFR}/packages ${TFR}/distfiles ${TLR}/usr/ports/packages ${TLR}/usr/ports/distfiles cd ${TLR}/usr && ${CVS} co -r ${SRCBRANCH} ${SRCDATE} src cd ${TLR}/usr/src && make -j4 buildworld DESTDIR=${TLR} cd ${TLR}/usr/src && make installworld DESTDIR=${TLR} cd ${TLR}/usr/src && make distribution DESTDIR=${TLR} cd ${TLR}/usr && ${CVS} co ${PORTSDATE} ports cp -pr ports/* ${TLR}/usr/ports/local then 'release' is run as given in my previous mail. After that, the 'packages' target does a lot of voodoo and then loops over a make variable which contains all the packages we are interested in and builds them. It is kind of messy, though as we have local patches which are to be applied to the cvs checkout. Makeing this step idempotent is ... interesting. > > rm -f ${TLR}/usr/src/release/.install.cfg > > [...] > > cd ${TRR}/R/ftp && find -d . | cpio --quiet -dumpl ${TFR} > > hm, cannot found the variables TLR and TRR anywhere defined. Can you > please give me some more information how your buildprocess looks? These are just arbitrary places where the stuff is located, they are defined as # Build tree, needs LOTS of space ... T= /build # Shortcuts TLR= $T/live/${RELEASE} TRR= $T/release/${RELEASE} TFR= $T/ftproot/pub/FreeBSD/${RELEASE} > > And files/install.cfg contains the following > > where should I store that file? > man release doesn't give here any information about it. This is documented somewhere in sysinstall(8), I guess. You can place it on a floppy (yeah, right). I put it in ${TLR}/usr/src/release/install.cfg as you saw from the example in my previous mail and it should then make it into the ISO. How exactly this works, I can't remember right now ... Ah, src/release/Makefile contains under the release.8 target: -test -f ${.CURDIR}/install.cfg \ && cp ${.CURDIR}/install.cfg ${RD}/mfsfd So it ends up in the MFS from which FreeBSD installs itself. > > So basically, sysinstall is intructed to not install any kernel, but > > after all distributions are extracted the following commands are run > > > > command=/bin/sh -c "cd /dist/${RELEASE}/kernels && ./install.sh GENERIC" > > system > > command=/bin/sh -c "cd /dist/${RELEASE}/kernels && ./install.sh SMP" > > system > > where can you say sysinstall that it should run such commands after > the installation? install.cfg, take a look at /usr/src/usr.sbin/sysinstall/install.cfg hth, Uli
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7ad7ddd90709250927o772264b1v34446145d292b8bd>