modify_compile_linux_kernel_in_ubuntu

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
modify_compile_linux_kernel_in_ubuntu [20.09.2010 15:28] Pascal Sutermodify_compile_linux_kernel_in_ubuntu [20.09.2010 17:17] (current) Pascal Suter
Line 9: Line 9:
   apt-get install fakeroot kernel-wedge build-essential makedumpfile kernel-package libncurses5-dev   apt-get install fakeroot kernel-wedge build-essential makedumpfile kernel-package libncurses5-dev
   sudo apt-get build-dep linux   sudo apt-get build-dep linux
-  apt-get build-dep --no-install-recommends linux-image-$(uname -r) +  apt-get build-dep --no-install-recommends linux-image-`uname -r` 
-  apt-get source linux-image-$(uname -r)+  apt-get source linux-image-`uname -r
 + 
 +  * in ubuntu 10.04 you need to copy the package scripts for ubuntu because otherwhise the initrd file will not be generated (more details in [https://help.ubuntu.com/community/Kernel/Compile|this wiki article]]) 
 +   
 +  cp linux-2.6.32/debian/control-scripts/{postinst,postrm,preinst,prerm} kernel-package/pkg/image/ 
 +  cp linux-2.6.32/debian/control-scripts/headers-postinst kernel-package/pkg/headers/
  
   * cd into the linux-xxx directory that was created containing the sources   * cd into the linux-xxx directory that was created containing the sources
-  * if edit the config +  * if you want, edit the config 
  
   make menuconfig   make menuconfig
  
-  * compile and build a deb package +  * compile and build a deb package (nothe, the overlay-dir is only needed for ubuntu 10.04 (and maybe later too?))
  
   make-kpkg clean   make-kpkg clean
-  fakeroot make-kpkg --initrd --append-to-version=-custom.1.0 kernel_image kernel_headers+  fakeroot make-kpkg --overlay-dir=$HOME/kernel-package/ --initrd --append-to-version=-custom.1.0 kernel_image kernel_headers
  
   * install the new kernel    * install the new kernel 
  • modify_compile_linux_kernel_in_ubuntu.txt
  • Last modified: 20.09.2010 17:17
  • by Pascal Suter