viper25

Compile Linux kernel on Ubuntu

Dec 28th, 2014
336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.57 KB | None | 0 0
  1. mkdir kernel
  2. cd kernel
  3. wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.18.1.tar.xz
  4. tar -xvJf linux-3.18.1.tar.xz
  5. cd linux-3.18.1
  6. sudo apt-get install libncurses5 libncurses5-dev kernel-package
  7. make menuconfig
  8. #Copy existing config file
  9. cp /boot/config-3.13.0-43-generic .config
  10. #Compile the main kernel (and time it if you wish). X is number of processors + 1 (Find this using cat /proc/cpuinfo | grep processor | wc -l)
  11. sudo make-kpkg -j7 --initrd --append-to-version=-mykernel-test-201412282240 kernel_image kernel_headers -j7
  12. cd ..
  13. sudo dpkg -i *.deb -j7
Advertisement
Add Comment
Please, Sign In to add comment