metalx1000

Compiling a Linux Kernel on Debian

Dec 14th, 2014 (edited)
1,694
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.75 KB | None | 0 0
  1. sudo apt-get install build-essential libncurses-dev bison flex libssl-dev libelf-dev
  2. #make sure you have plenty of room on you drive
  3. #get the kernel from http://kernel.org
  4. url="$(wget -qO- "https://www.kernel.org/"|grep tar|head -n 1|cut -d\" -f2)"
  5. wget "$url" -O linux.tar.xz
  6. tar -xJvf linux.tar.xz
  7.  
  8. cd linux
  9. make clean && make mrproper
  10. cp /boot/config-`uname -r` ./.config
  11. make menuconfig
  12. #choose “LOAD” and “.config” then exit and save
  13.  
  14. #This will take a while
  15. #make-kpkg clean
  16. #fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers
  17. make deb-pkg clean      
  18. fakeroot make deb-pkg --initrd --append-to-version=-custom kernel_image kernel_headers
  19.  
  20. #this creates two .deb files in the current dir
  21. #install them
Add Comment
Please, Sign In to add comment