Notes from a newbie wannabe kernel developer.
I'm running Ubuntu on my Mac (working pretty well btw). I separated 10GBs for / and ~100GB for /home and I do my work on /home.
I also changed some things on my /etc/default/grub
so I can change the kernel on boot if I need to (really important, if the new kernel doesn't boot, you might have a hard time switching to the old one if grub's splash screen doesn't show up)
# I changed it to 10s, my default was 0
GRUB_TIMEOUT=10
# Fix grub menu not showing even with timeout configured
GRUB_TIMEOUT_STYLE=menu
GRUB_TERMINAL=console
# Linux Foundation Training - Enable printing early boot messages to vga using the earlyprink=vga kernel boot option:
GRUB_CMDLINE_LINUX="earlyprink=vga"
After changing it, run sudo update-grub
.
Little script for that, based on [1].
# Change the version accordingly
export VERSION=5.8.0-rc5+
rm /boot/vmlinuz-$VERSION
rm /boot/initrd.img-$VERSION
rm /boot/System.map-$VERSION
rm /boot/config-$VERSION
rm -rf /lib/modules/$VERSION/
rm /var/lib/initramfs-tools/$VERSION
update-grub
sudo apt-get install build-essential vim git cscope libncurses-dev libssl-dev bison flex git-email
I got really confused about which tree should I clone: gregkh's staging, linux_stable, linux_mainline or linux_next?
On [2], linux_mainline is used, then let's use it.
# From [3]
git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux_mainline
Cloning is really slow, and resolving deltas can be really CPU intensive. I wish git.kernel.org was faster! More on that @ [4]
[1] https://askubuntu.com/questions/594443/how-can-i-remove-compiled-kernel