Compiling Kernel Debugging and Know-Hows.

I was having the known problem with Text Console using CTRL + ALT + F1-F8 bug of tearing / square pixelated screens.
I am currently still trying/testing with some options in /boot/loader.conf file to see if I can fix this issue of the tearing with Nvidia drivers 510.60.2.

Similar to:


And one of the solution is to re-compile the kernel the GENERIC


=====================================================

I created a Bhyve VM of FBSD 13p2 and decided to build kernel and install kernel for testing purposes.

Code:
git clone https://git.freebsd.org/src.git /usr/src
&& \
vi /sys/amd64/conf/GENERIC
206 #options         #VESA                    #Add support for VESA BIOS Extensions (VBE)
&& \
cp -v /sys/amd64/conf/GENERIC /sys/amd64/conf/CUSTOM-TEST1
&& \
cd /sys/amd64/conf
&& \
make buildkernel KERNCONF=CUSTOM-TEST1
#make buildkernel KERNCONF=GENERIC
make installkernel KERNCONF=CUSTOM-TEST1
#make installkernel KERNCONF=GENERIC
&& \
shutdown -r now
ls -lah /boot/kernel
ls -lah /boot/kernel.old

After reviewing the /boot/kernel folder I am still seeing the vesa.ko file inside the /boot/kernel, did I do something wrong?

How can I debug if vesa.ko is truly not compiled in kernel?

How do more experienced developers debug kernel issues or if the kernel compiled correctly?

Any advice what to do / not do while compiling kernel?
 
After reviewing the /boot/kernel folder I am still seeing the vesa.ko file inside the /boot/kernel, did I do something wrong?

How can I debug if vesa.ko is truly not compiled in kernel?

How do more experienced developers debug kernel issues or if the kernel compiled correctly?

Any advice what to do / not do while compiling kernel?
Usually, there are sysctls that can be tweaked without rebuilding the kernel.

If the kernel boots, then your compilation can be considered a success, or at least a 'Pheeew, at least I did not mess up!'.

Not every .ko file in /boot/kernel/ gets loaded by kldload - just check using kldstat...

IIRC, a debugger takes a single file, and reverse-compiles it... so that you 'see' how the program progresses... that's one way to debug that I remember from college, but on these Forums, there are ppl who know much better than me about the debugging process...

When I tried to compile / recompile my own kernel, I just followed the relevant chapters in the Handbook. Of course, it's important to actually have sources in /usr/src...
 
I wonder whether install-kernel just copies files to /boot/kernel or whether it deletes the files in that folder beforehand.. The vesa.ko might be from previous kernel. There are these make options: delete-old delete-old-dirs delete-old-files delete-old-libs
I will check the makefiles..
 
I wonder whether install-kernel just copies files to /boot/kernel or whether it deletes the files in that folder beforehand..
The command install-kernel doesn't just copy files to /boot/kernel/ - it also reworks symlinks to all kinds of libs. And no, older kernels don't get deleted. Evidence of that is in the boot menu... Did you read this section of the Handbook (https://docs.freebsd.org/en/books/handbook/cutting-edge/#makeworld), esp. Section 25.6.4?
 
Back
Top