Benutzer-Werkzeuge

Webseiten-Werkzeuge


freebsd:build_own_cd

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
freebsd:build_own_cd [2007/10/05 10:49]
Idefix /* Build a Custom CD */
freebsd:build_own_cd [2013/12/15 20:08] (aktuell)
idefix freebsd-build_own_cd umbenannt in freebsd:build_own_cd
Zeile 1: Zeile 1:
 +====== Build Own Generic CD ======
 +<​code>​
 +mkdir -p /​usr/​local/​etc/​cvsup
 +cp /​usr/​share/​examples/​cvsup/​cvs-supfile /​usr/​local/​etc/​cvsup/​ncvs
 +</​code>​
 +Edit the file:
 +<​code>​
 +  * default host=cvsup5.de.freebsd.org
 +  * default base=/usr
 +  * default prefix=/​home/​storage/​ncvs
 +  * default release=cvs
 +  * default delete use-rel-suffix
 +
 +  -  If your network link is a T1 or faster, comment out the following line.
 +  * default compress
 +
 +  -  Add these
 +src-all
 +src-crypto
 +src-eBones
 +src-secure
 +src-sys-crypto
 +ports-all
 +doc-all
 +  - www
 +
 +cvsroot-all
 +</​code>​
 +Now checkout the sources:
 +<​code>​
 +mkdir /​home/​storage/​ncvs
 +cvsup -g -L2 ncvs
 +</​code>​
 +
 +Now compile your own system:
 +<​code>​
 +cd /usr/src
 +make buildworld
 +</​code>​
 +
 +Create now the release files:
 +<​code>​
 +cd /​usr/​src/​release
 +/​etc/​rc.d/​adjkerntz start
 +adjkerntz -i
 +make release CHROOTDIR=/​home/​storage/​ownfreebsd BUILDNAME=test \\
 +CVSROOT=/​home/​storage/​ncvs RELEASETAG=RELENG_6 MAKE_ISOS=1
 +</​code>​
 +
 +====== ​ Build a Custom CD  ======
 +Delete /usr/src and check it out from your local repository:
 +<​code>​
 +cd /usr
 +rm -R src
 +mkdir -p /usr/src
 +cd /usr
 +cvs -R  -d /​home/​storage/​ncvs ​ co  -P -r RELENG_6 src
 +cd /usr/
 +cp -pR src src.orig
 +</​code>​
 +
 +Then apply your changes to /usr/src (kernel config files, patches everything you need).<​br>​
 +We will use a unattened install procedure to install the own build kernels so we don't have to modify the sysinstall package.<​br>​
 +To use our own install script edit:<​br>​
 +  *  /​usr/​src/​usr.sbin/​sysinstall/​Makefile
 +
 +and add:
 +<​code>​
 +CFLAGS+= -DLOAD_CONFIG_FILE=install.cfg
 +</​code>​
 +
 +Now create a install.cfg file in /​usr/​src/​release for an example see here.
 +
 +Create a directory for own packages that will be included to the CD:
 +<​code>​
 +mkdir -p /​root/​ownpackages/​disc1
 +</​code>​
 +Now copy all packages to the directory /​root/​ownpackages/​disc1.
 +
 +Make a diff with:
 +<​code>​
 +cd /usr
 +diff -Nur src.orig src >/​root/​patch.diff
 +</​code>​
 +
 +You can try if the patch works with:
 +<​code>​
 +mkdir -p /​home/​storage/​ownfreebsd/​usr
 +cd /​home/​storage/​ownfreebsd/​usr && cvs -R  -d /​home/​storage/​ncvs ​ co  -P -r RELENG_6 src
 +patch -s -d /​home/​storage/​ownfreebsd/​usr/​src ​ < /​root/​patch.diff
 +
 +cd /usr/src
 +make buildworld
 +
 +cd /​usr/​src/​release
 +make release KERNELS_BASE="​I4B I4BSMP GENERIC SMP" \\
 +CHROOTDIR=/​home/​storage/​ownfreebsd BUILDNAME=FreeBSD-I4B \\
 +CVSROOT=/​home/​storage/​ncvs RELEASETAG=RELENG_6 MAKE_ISOS=1 \\
 +CD_PACKAGE_TREE=/​root/​ownpackages \\
 +KERNEL_FLAGS=-j4 WORLD_FLAGS=-j4 \\
 +LOCAL_PATCHES=/​root/​patch.diff PATCH_FLAGS=-p1 KERNELS="​I4B I4BSMP"​ |tee /​root/​build.log
 +
 +make release CHROOTDIR=/​home/​storage/​ownfreebsd BUILDNAME=FreeBSD-I4B \\
 +CVSROOT=/​home/​storage/​ncvs RELEASETAG=RELENG_6 MAKE_ISOS=1 \\
 +KERNEL_FLAGS=-j4 WORLD_FLAGS=-j4 \\
 +LOCAL_PATCHES=/​root/​patch.diff PATCH_FLAGS=-p1 KERNELS="​I4B I4BSMP GENERIC SMP" |tee /​root/​build.log
 +</​code>​
 +
 +For Quick Build
 +<​code>​
 +make release -DNOPORTS -DNODOC KERNELS_BASE="​I4B I4BSMP GENERIC SMP" \\
 +CHROOTDIR=/​home/​storage/​ownfreebsd BUILDNAME=FreeBSD-I4B \\
 +CVSROOT=/​home/​storage/​ncvs RELEASETAG=RELENG_6 MAKE_ISOS=1 \\
 +KERNEL_FLAGS=-j4 WORLD_FLAGS=-j4 \\
 +LOCAL_PATCHES=/​root/​patch.diff PATCH_FLAGS=-p1 KERNELS="​I4B I4BSMP"​ |tee /​root/​build.log
 +</​code>​
 +
 +If you want that the new generated kernel should be installed you have to edit /​usr/​src/​release/​Makefile and replace GENERIC with your kernel.
 +
 +=====  Rebuild changes ​ =====
 +<​code>​
 +cd /​usr/​src/​release
 +make rerelease -DRELEASENOUPDATE -DNOPORTS -DNODOC KERNELS_BASE="​I4B I4BSMP GENERIC SMP" \\
 +CHROOTDIR=/​home/​storage/​ownfreebsd BUILDNAME=FreeBSD-I4B \\
 +CVSROOT=/​home/​storage/​ncvs RELEASETAG=RELENG_6 MAKE_ISOS=1 \\
 +KERNEL_FLAGS=-j4 WORLD_FLAGS=-j4 \\
 +KERNELS="​I4B I4BSMP"​ |tee /​root/​build.log
 +</​code>​
 +
 +=====  Rebuild only the Kernels ​ =====
 +<​code>​
 +cd /​usr/​src/​release
 +make release.3 CHROOTDIR=/​home/​storage/​ownfreebsd BUILDNAME=FreeBSD-I4B \\
 +CVSROOT=/​home/​storage/​ncvs RELEASETAG=RELENG_6 MAKE_ISOS=1 \\
 +LOCAL_PATCHES=/​root/​patch.diff PATCH_FLAGS=-p1 KERNELS="​I4B I4BSMP"​ \\
 +-DNOCLEAN -DNO_CLEAN | tee /​root/​build.log
 +</​code>​
 +
 +=====  Replace install.cfg ​ =====
 +We replace now the install.cfg with a new version:
 +<​code>​
 +cd /mnt
 +mkdir img
 +cd /​usr/​home/​storage/​ownfreebsd/​R/​cdrom/​disc1/​floppies
 +</​code>​
  
freebsd/build_own_cd.txt · Zuletzt geändert: 2013/12/15 20:08 von idefix