Note
Note
Note
Note
/boot/vmlinuz
- The Kernel image itself/lib/firmware
- Firmware blobs to initialize hardware/lib/modules/$VERSION/**/*.ko
- kernel modules/usr/src/linux-headers
- kernel headersNote
Note
linux-headers
package)Note
$ sudo apt-get install linux-headers
$ wget https://www.broadcom.com/wifi-driver.tar.gz
$ tar zxvf wifi-driver-source.tar.gz
$ cd wifi-driver-source/
$ make && sudo make install
$ sudo modprobe wifi-driver
$ dmesg
e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
e1000e 0000:00:19.0 eth0: Intel(R) PRO/1000 Network Connection
Note
$ git clone https://github.com/torvalds/linux
$ cd linux
$ git checkout v4.8
$ firefox https://www.kernel.org/
$ wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.8.7.tar.xz
$ tar -xf linux-4.8.7.tar.xz
Note
$ cd linux
$ rm .config; make menuconfig
$ cp arch/arm/configs/corgi_defconfig .config
$ cp /boot/config-4.8 .config
$ make oldconfig
Note
$ sudo apt-get install build-essential
$ make all # all = bzImage + modules
$ ls -hl arch/x86/bzImage
-rw-r--r-- 1 bkero bkero 4.6M Oct 31 10:52 arch/x86/bzImage
$ ls -hl drivers/net/slip/slip.ko
-rw-r--r-- 1 bkero bkero 120K Oct 31 10:50 drivers/net/slip/slip.ko
Note
initrd
or initramfs
?mkinitcpio
or mkinitramfs
$ sudo mkinitramfs -o /boot/initrd-$VERSION $VERSION
$ ls -hl /boot/initrd-$VERSION
-rw-r--r-- 1 root root 7.0M Aug 31 17:54 /boot/initramfs-4.8
$ zcat /boot/initramfs-4.8 | cpio -idmv
usr/bin/...
usr/lib/modules/...
etc/...
Note
$ apt-get build-dep linux
$ apt-get source linux
$ cd linux-3.13.0
$ debuild -b -i -uc -us
$ ls *.deb # oh god ^C^C^C
$ dpkg -i linux-kernel-4.8.deb linux-headers-4.8.deb \
linux-modules-4.8.deb # installs kernel + grub script
$ sudo reboot
Note
$ make modules_install install
$ ls /boot/vmlinuz
$ make modules_install
$ cp arch/x86/bzImage /boot/vmlinuz-myawesomekernel
Note
menuentry 'My Awesome Kernel' {
set root='hd0,msdos1'
linux /vmlinuz root=/dev/sda2
initrd /initrd.gz
}
Note
Note
Note
Note
Note
Note
$ debuild -k<gpgkey> -S
$ ls -hl ../linux*.changes
-rw-r--r-- 1 bkero bkero 8.3K Mar 4 19:00 linux_4.4.0-64.85_source.changes
$ dput ppa:<username>/<ppaname> ../linux_4.4.0-64.85_source.changes
Successfully uploaded packages.
$ sudo apt-add-repository ppa:ben-kero/linux
$ sudo apt-get update && sudo apt-get install linux
Note
Note
Note