Mini how-to , compile release image for i386

Maybe you have a netbook for work(simple tasks) , ssh to servers,switchs..etc
in my case, intel atom with 2GB of ram
and compile world and kernel is a hard task, the i386 support will be droped in 15 release I think..but meanwile

In FreeBSD-14.1-RELEASE :

*Edit
/etc/src.conf
to your needs

*Move to
Code:
/usr/src

*Copy the kernel conf file and edit the GENERIC
Code:
cp sys/i386/conf/GENERIC sys/i386/conf/GENERIC.back

*Edit
sys/i386/conf/GENERIC

*Next buildworld and kernel

Code:
make -j[number of cores] buildworld  TARGET=i386
make -j[number of cores] buildkernel TARGET=i386

*When finish
Diff:
cd release
make obj
make release TARGET=i386
make install DESTDIR=(folder to copy the images iso,img,etc)

and that is all , in the final directory now you have the images for instalation

forget..the kernel source filename can parsed to buildkernel but this if only for the example
 
You really should create a new kernel file (ex. NEWKERNEL), include GENERIC, then modify the knobs you need / want in that.
 
You really should create a new kernel file (ex. NEWKERNEL), include GENERIC, then modify the knobs you need / want in that.
thanks for the opinion...but obviously you dont read

Code:
forget..the kernel source filename can parsed to buildkernel but this if only for the example

Code:
*Copy the kernel conf file and edit the GENERIC
 
Mister Tingo knows exactly what he is talking about. Take a look at some of the other kernconfs for the giant clue bat.

And I know howto compile kernel securely
this post is not for newbies, I asume that the person who read, knows how to tune their src.conf and the kernel conf file
 
show me what I have to learn
OK so this method is not wrong. Its just not the best approach.
In fact the handbook gives similar bad advice. Copy/backup GENERIC and modify.

cp sys/i386/conf/GENERIC sys/i386/conf/GENERIC.back

Now look at how i386 memory "Physical Address Extensions" are implemented on a i386 build.
/usr/src/sys/i386/conf/PAE
Code:
#
# PAE -- Generic kernel configuration file for FreeBSD/i386 PAE
#
# $FreeBSD$

include GENERIC

ident        PAE-GENERIC

# To make a PAE kernel, the next option is needed
options     PAE            # Physical Address Extensions Kernel

So instead of relisting everything in GENERIC they use "include" and then add an 'option' for PAE.

Additionally you can opt to use GENERIC and remove options from it with your own kernconf.

Code:
# The following drivers don't build with PAE enabled.
makeoptions    WITHOUT_MODULES="ctl dpt hptmv ida"
nodevice    dpt
nodevice    hptmv
nodevice    ida

So as you can see there is no need to copy GENERIC and edit.
Use includes and options.
 
OK so this method is not wrong. Its just not the best approach.
In fact the handbook gives similar bad advice. Copy/backup GENERIC and modify.



Now look at how i386 memory "Physical Address Extensions" are implemented on a i386 build.
/usr/src/sys/i386/conf/PAE
Code:
#
# PAE -- Generic kernel configuration file for FreeBSD/i386 PAE
#
# $FreeBSD$

include GENERIC

ident        PAE-GENERIC

# To make a PAE kernel, the next option is needed
options     PAE            # Physical Address Extensions Kernel

So instead of relisting everything in GENERIC they use "include" and then add an 'option' for PAE.

Additionally you can opt to use GENERIC and remove options from it with your own kernconf.

Code:
# The following drivers don't build with PAE enabled.
makeoptions    WITHOUT_MODULES="ctl dpt hptmv ida"
nodevice    dpt
nodevice    hptmv
nodevice    ida

So as you can see there is no need to copy GENERIC and edit.
Use includes and options.

Yes, is the best metod , I agreed
but I allways copy the GENERIC file and create a new one from that, and then edit and remove options
(I'am not a newbie but neither a expert in fbsd) so,many things could go wrong ?
Thanks for the explanation
 
Back
Top