Custom kernel build for 8.2-RC3

Hello to all :)

Have:

uname-a
Code:
FreeBSD gw-151-143.cnm.local 8.2-RC3 FreeBSD 8.2-RC3 # 1: Mon Feb 14 20:20:52 EET 2011 [email]root@gw-151-20.cnm.local[/email]: / 
usr/src/sys/amd64 / compile / GENERIC amd64

I want to recompile the kernel myself.

Code:
cd / usr/src/sys/amd64/conf /
[root @ gw-151-143 / usr/src/sys/amd64/conf] #
[root @ gw-151-143 / usr/src/sys/amd64/conf] # config AMD64_IPFW
Kernel build directory is ../compile/AMD64_IPFW
Don't forget to do `` make cleandepend & & make depend''
[root @ gw-151-143 / usr/src/sys/amd64/conf] # cd ../compile/AMD64_IPFW
[root @ gw-151-143 / usr/src/sys/amd64/compile/AMD64_IPFW] # make cleandepend & & make depend $ $ make & & make install

Reload
uname-a
Code:
FreeBSD gw-151-143.cnm.local 8.2-RC3 FreeBSD 8.2-RC3 # 1: Mon Feb 14 20:20:52 EET 2011 [email]root@gw-151-20.cnm.local[/email]: / 
usr/src/sys/amd64 / compile / GENERIC amd64

The file AMD64_IPFW
Code:
ident AMD64_IPFW

Technology type
Code:
make buildkernel KERNCONF = AMD64_IPFW
make installkernel KERNCONF = AMD64_IPFW

Also tried.

Someone tell me what to do .....:stud
 
And in the process, such a nice looking line

Code:
>>> Kernel build for AMD64_IPFW completed on Wed Feb 16 01:38:46 EET 2011

Immediately do

make installkernel KERNCONF = AMD64_IPFW

Reboot and get
Code:
[root @ gw-151-143 / usr / home / kris] # uname-a
FreeBSD gw-151-143.cnm.local 8.2-RC3 FreeBSD 8.2-RC3 # 1: Mon Feb 14 20:20:52 EET 2011 [email]root@gw-151-20.cnm.local[/email]: / 
usr/src/sys/amd64 / compile / GENERIC amd64

Word GENERIC - this is a global variable or something?
 
Kris said:
I want to recompile the kernel yourself.
Code:
cd / usr/src/sys/amd64/conf /
[root @ gw-151-143 / usr/src/sys/amd64/conf] #
[root @ gw-151-143 / usr/src/sys/amd64/conf] # config AMD64_IPFW
Kernel build directory is ../compile/AMD64_IPFW
Don't forget to do `` make cleandepend & & make depend''
[root @ gw-151-143 / usr/src/sys/amd64/conf] # cd ../compile/AMD64_IPFW
[root @ gw-151-143 / usr/src/sys/amd64/compile/AMD64_IPFW] # make cleandepend & & make depend $ $ make & & make install
This is a really old and unsupported way of doing it. This went out the window sometime during the 4.x era.
 
And can you do something about the weird whitespace everywhere? It's hard to see whether you are making mistakes or that you're copy-pasting weird stuff.
 
I've already read this page. But after a successful build and install of kernel its name is Generic.

I am trying cvsup my /usr/src/. I am clearing /usr/obj before building kernel.

All stages of compiling and instalation of kernel - over handbook. But nothing. My kernel name after reboot - GENERIC.
 
Ok. What I am doing.

Code:
cp /sys/amd64/conf/GENERIC AMD64_IPFW
rm -rf /usr/obj/*

cd /usr/src/

make buildkernel KERNCONF=AMD64_IPFW
make installkernel KERNCONF=AMD64_IPFW

reboot
BUT after reboot
Code:
uname -a
FreeBSD gw-151-143.cnm.local 8.2-RC3 FreeBSD 8.2-RC3 #1: Mon Feb 14 20:20:52 EET 2011     [email]root@gw-151-
20.cnm.local[/email]:/usr/src/sys/amd64/compile/GENERIC  amd64
 
What's the output of
Code:
sysctl kern.bootfile

Are you somehow booting from a non-standard path?

(While your way of compiling is no longer preferred, I do this myself occationally and has never seen it to fail. The downside is that you have to manually make a backup of /boot/kernel if you want it).
 
My kern.bootfile

Code:
[root@gw-151-143 /etc/ipfw]# sysctl kern.bootfile
kern.bootfile: /boot/kernel/kernel

My ident in custom kernel

Code:
[root@gw-151-143 /etc/ipfw]# cat /sys/amd64/conf/AMD64_IPFW|grep ident
ident           AMD64_IPFW

No, nothing ... standart boot configuration ...
 
Make sure everything is cleaned out correctly.

# cd /usr/src && make clean

Then start over using the proper way.
 
Ok.
I am doing

Code:
cd /usr/src && make clean

make buildkernel KERNCONF=AMD64_IPFW
make installkernel KERNCONF=AMD64_IPFW

reboot
And nothing

Code:
[root@gw-151-143 /usr/home/kris]# uname -a
FreeBSD gw-151-143.cnm.local 8.2-RC3 FreeBSD 8.2-RC3 #1: Mon Feb 14 20:20:52 EET 2011     [email]root@gw-151-
20.cnm.local[/email]:/usr/src/sys/amd64/compile/GENERIC  amd64

I thought perhaps version of binary files differ from the version of the kernel.
But no.

Code:
[root@gw-151-143 /usr/home/kris]# file /bin/ls
/bin/ls: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked (uses shared libs), for FreeBSD 8.2, stripped

I am already out of ideas ....
 
Can you look at the timestamp on the /boot/kernel/kernel file? I have a feeling your installkernel actually fails somewhere and isn't overwriting the kernel.

Are there any errors when doing installkernel?
 
Code:
[root@gw-151-143 /usr/home/kris]# ls -la /boot/kernel/kernel
-r-xr-xr-x  1 root  wheel  10440897 Feb 16 16:30 /boot/kernel/kernel

Its my correct time at Ukraine
 
Code:
Kernel install log

--------------------------------------------------------------
>>> Installing kernel
--------------------------------------------------------------
cd /usr/obj/usr/src/sys/AMD64_IPFW;  MAKEOBJDIRPREFIX=/usr/obj  MACHINE_ARCH=amd64  MACHINE=amd64  CPUTYPE=   
GROFF_BIN_PATH=/usr/obj/usr/src/tmp/legacy/usr/bin  GROFF_FONT_PATH=/usr/obj/usr/src/tmp/legacy/usr/share/groff_font  
GROFF_TMAC_PATH=/usr/obj/usr/src/tmp/legacy/usr/share/tmac 
PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/usr/obj/usr/src/tmp/usr/sb
in:/usr/obj/usr/src/tmp/usr/bin:/usr/obj/usr/src/tmp/usr/games:/sbin:/bin:/usr/sbin:/usr/bin  make KERNEL=kernel install
thiskernel=`sysctl -n kern.bootfile` ;  if [ ! "`dirname "$thiskernel"`" -ef /boot/kernel ] ; then  chflags -R noschg /boot/kernel ;  rm -rf 
/boot/kernel ;  else  if [ -d /boot/kernel.old ] ; then  chflags -R noschg /boot/kernel.old ;  rm -rf /boot/kernel.old ;  fi ;  mv /boot/kernel 
/boot/kernel.old ;  sysctl kern.bootfile=/boot/kernel.old/"`basename "$thiskernel"`" ;  fi
mkdir -p /boot/kernel
install -p -m 555 -o root -g wheel kernel /boot/kernel
install -p -m 555 -o root -g wheel kernel.symbols /boot/kernel
cd /usr/src/sys/modules; MAKEOBJDIRPREFIX=/usr/obj/usr/src/sys/AMD64_IPFW/modules KMODDIR=/boot/kernel DEBUG_FLAGS="-g" MACHINE=amd64 
KERNBUILDDIR="/usr/obj/usr/src/sys/AMD64_IPFW" SYSDIR="/usr/src/sys" make  install
===> aac (install)
install -o root -g wheel -m 555   aac.ko /boot/kernel
install -o root -g wheel -m 555   aac.ko.symbols /boot/kernel
===> accf_data (install)
install -o root -g wheel -m 555   accf_data.ko /boot/kernel
install -o root -g wheel -m 555   accf_data.ko.symbols /boot/kernel
===> accf_dns (install)
.................
..................
===> zlib (install)
install -o root -g wheel -m 555   zlib.ko /boot/kernel
install -o root -g wheel -m 555   zlib.ko.symbols /boot/kernel
kldxref /boot/kernel
 
Is there anything in /etc/make.conf or /etc/src.conf that might interfere?
 
Nothing wrong

Code:
[root@gw-151-143 /usr/src]# cat /etc/make.conf
# added by use.perl 2002-01-01 03:03:08
PERL_VERSION=5.8.9
[root@gw-151-143 /usr/src]# cat /etc/src.conf
cat: /etc/src.conf: No such file or directory
[root@gw-151-143 /usr/src]#
 
What happens if you remove the underscore from the kernel name, install it to a separate directory, and then tell the system to boot from that directory?

Code:
# cd /usr/src/sys/amd64/conf
# mv AMD64_IPFW MYKERNEL
# ee MYKERNEL
<set ident line to MYKERNEL>
# cd /usr/src
# make cleanworld
# make KERNCONF=MYKERNEL buildkernel
# make KERNCONF=MYKERNEL KODIR=/boot/MYKERNEL installkernel
<check the output to make sure it's installing to [file]/boot/MYKERNEL/[/file]
# nextboot -k MYKERNEL
# shutdown -r now
It should boot using /boot/MYKERNEL/kernel. Check the sysctl to make sure. And then check the output of uname(1).

If that works, then rename /boot/kernel to /boot/GENERIC and rename (or copy) /boot/MYKERNEL to /boot/kernel and reboot to make it permanent.
 
I did everything as you wrote step by step.
but

Code:
[root@gw-151-143 /usr/home/kris]# uname -a
FreeBSD gw-151-143.cnm.local 8.2-RC3 FreeBSD 8.2-RC3 #1: Mon Feb 14 20:20:52 EET 2011     root@gw-151-20.cnm.local:/usr/src/sys/amd64/compile/GENERIC  amd64
[root@gw-151-143 /usr/home/kris]# sysctl -a|grep kernel.boot
[root@gw-151-143 /usr/home/kris]# sysctl -a|grep kernel
kern.bootfile: /boot/kernel/kernel
kern.module_path: /boot/kernel;/boot/modules

I do not know what to think .... This poltergeist ..... How can this be?
 
The kernel basically hasn't been recompiled since the first post in this topic.

Post #1
Code:
#1: Mon Feb 14 20:20:52 EET 2011

Post #21
Code:
#1: Mon Feb 14 20:20:52 EET 2011
 
About loader.conf

Code:
[root@gw-151-143 /usr/home/kris]# cat /boot/loader.conf
geom_mirror_load=YES
if_em_load="YES"
if_bge_load="YES"

About hasn't been recompiled

Code:
[root@gw-151-143 /usr/home/kris]# date
Wed Feb 16 23:45:09 EET 2011
[root@gw-151-143 /usr/home/kris]# uname -a
FreeBSD gw-151-143.cnm.local 8.2-RC3 FreeBSD 8.2-RC3 #1: Mon Feb 14 20:20:52 EET 2011     root@gw-151-20.cnm.local:/usr/src/sys/amd64/compile/GENERIC  amd64
[root@gw-151-143 /usr/home/kris]#

Yes it's true. But why???? After all, I see the process of compiling the kernel, see the installation process according to the parameters in the make commands.
After rebooting the impression that nothing happened ....:(
 
It's like it doesn't end up in /boot/kernel/kernel at all. Maybe try a find(1) on files called kernel (initially) in /boot and /usr?
 
Back
Top