Date: Wed, 24 Nov 2004 15:19:34 -0600 From: Nikolas Britton <freebsd@nbritton.org> To: "Conrad J. Sabatier" <conrads@cox.net> Cc: freebsd-questions@freebsd.org Subject: Re: make arguments and buildworld Message-ID: <41A4FAE6.5050802@nbritton.org> In-Reply-To: <20041124063639.7989b859@dolphin.local.net> References: <20041124052857.85B3.GERARD-SEIBERT@rcn.com> <41A46DF0.3000008@nbritton.org> <20041124063639.7989b859@dolphin.local.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Conrad J. Sabatier wrote: >On Wed, 24 Nov 2004 05:18:08 -0600, Nikolas Britton ><freebsd@nbritton.org> wrote: > > > >>Gerard Seibert wrote: >> >> >> >>>I am going to do a fresh install of FreBSD 5.3 this weekend on my >>>computer. Immediately after the installation I want to do a >>>buildworld and install a custom kernel. >>> >>>My question is what special arguments should I use in the 'make.conf' >>>file for this project. Is it really necessary to change this file at >>>all? I was reading the handbook and it mentioned the 'CFLAGGS' entry >>>and a few others. >>> >>> >>> >>> >>I'd recommend leaving CFLAGS and COPTFLAGS alone (I've only managed to >>make problems when I set these), >> >> > >Well, that, of course, is a matter of opinion. If you want the most >optimization possible, you could try using "-O2" or even "-O3". I've >been using "-O3" quite successfully here lately, with the exception of a >couple of ports which required changing it to "-O2". > > -O is the only officially supported optimization, that of course is a matter of opinion, but I like to error on the side of caution. "# CFLAGS controls the compiler settings used when compiling C code. # Note that optimization settings other than -O and -O2 are not recommended # or supported for compiling the world or the kernel - please revert any # nonstandard optimization settings to "-O" before submitting bug reports # without patches to the developers. # Note also that at this time the -O2 setting is known to expose bugs in # libalias(3), and possibly other parts of the system." >I believe the "-pipe" switch is on by default (as well as "-O", but if >not, it does help to speed up builds a bit as well. > > that is correct, -O and -pipe are on by default so there is no need to add them to CFLAGS and COPTFLAGS. > > >>but I would change CPUTYPE to your >>CPU Type, options are: >> >>AMD CPU: athlon-mp, athlon-xp, athlon-4, athlon-tbird, athlon, k6-3, >>k6-2, k6, k5 >> >> > >And don't forget athlon64! In fact, I initially setup my amd64 box by >installing from an i386 CD set I had here, then cross-compiling the >world and kernel using "-march=athlon64 -m64". > > AMD CPU: athlon64, athlon-mp, athlon-xp, athlon-4, athlon-tbird, athlon, k6-3, k6-2, k6, k5 Alpha/AXP architecture: ev67 ev6 pca56 ev56 ev5 ev45 ev4 Intel ia64 architecture: itanium CPUTYPE?=Foobar allows to buildworld for a different CPUTYPE. man make.conf and read this for me examples: /usr/share/examples/etc/make.conf > > >>Intel CPU: p4, p3, p2, i686, i586/mmx, i586, i486, i386 >> >>If you want to rebuild a custom kernel add this: >>KERNCONF=FOOBAR >> >> > >And copy /usr/src/sys/${ARCH}/conf/GENERIC to >/usr/src/sys/${ARCH}/conf/FOOBAR and edit to taste, where ${ARCH} equals >your machine architecture (i386, amd64, etc.). > > > >>-------------------------------------------------------------- >>For your kernel config file comment out everything you don't need >>(make sure you have a "working" kernel b4 you buildworld), i.g: >> >>cpu I486_CPU >>cpu I586_CPU >>device eisa >>device atapifd # ATAPI floppy drives >>device atapist # ATAPI tape drives >>all the SCSI Controllers >>etc. >>Don't forget to add in sound support etc. etc. >> >>--------------------------------------------------------------- >>then buildworld: >># cvsup -g -L 2 foobar-supfile (set the cvs release tag to RELENG_5_3) >># cd /usr/src >># make -j2 buildworld && make -j2 buildkernel && make -j2 >>Installkernel && reboot >>test your new kernel, if it works drop down to single user mode >># shutdown now >># cd /usr/src >># make installworld >># reboot >>If system is still working then mergemaster >># mergemaster >># reboot >>Done. >> >>rm -r /usr/obj/* >> >> http://archive.pilgerer.org/mharc/html/freebsd-questions/2004-11/msg00173.html >> >> >>>I would welcome any feedback that is available. >>> >>>Thanks! >>> >>> > > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41A4FAE6.5050802>