Wednesday, March 23, 2016

Ubuntu kernel Rebuild


# Get source
apt-get source linux-image-$(uname -r)

# Get tools
apt-get build-dep linux-image-$(uname -r)

# Copy current config
cp -v /boot/config-$(uname -r)   .config

# Customize config
make menuconfig

# parallel build
make -j

# Install kernel modules first (~260MB with debug symbols stripped)
make INSTALL_MOD_STRIP=1 modules_install

# Install kernel image (~6MB)
make install

# Reboot



References:
https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel