User Tools

Site Tools


cs:kernel_compilation
Return to Home page

Differences

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

Link to this comparison view

cs:kernel_compilation [2019/02/26 14:33] (current)
Line 1: Line 1:
 +====== How to compile a Linux kernel ======
  
 +Download Ubuntu packages:
 +<code bash>​sudo apt-get install build-essential kernel-package gcc libncurses5 libncurses5-dev libqt3-mt-dev</​code>​
 +
 +After copying a running kernel config file from /boot directory to the file .config of the kernel source files directory, run this command to check configuration options not present the config file of the /boot directory:
 +<code bash>​make oldconfig</​code>​
 +
 +To configure the kernel
 +<code bash>​make menuconfig o make xconfig</​code>​
 +
 +To compile the kernel:
 +<code bash>
 +make-kpkg clean
 +fakeroot make-kpkg --initrd --append-to-version=-rtai1 kernel_image kernel_headers ​ modules_image
 +</​code>​
 +
 +
 +With Ubuntu 10.04 --initrd does not work, so us those commands
 +<code bash>
 +update-initramfs -c -k 2.6.32.11-rtai1
 +update-grub2
 +</​code>​
 +
 +For multiprocessor compilation with bash shell:
 +<code bash>​export CONCURRENCY_LEVEL=<​n></​code>​
 +For multiprocessor compilation with tcsh shell:
 +<code bash>​setenv CONCURRENCY_LEVEL <​n></​code>​
 +
 +
 +Check those links if they exist:
 +<code bash>
 +arch/​x86/​Makefile_32.cpu
 +link include/asm with asm-86
 +</​code>​
 +
 +===== GRUB 2 =====
 +To open GRUB2 at boot press continuously left shift key.
 +
 +The configuration file of GRUB2 is: /​etc/​default/​grub
 +
 +GRUB_DEFAULT=0 Sets the default between kernel listed in /​boot/​grub/​grub.cfg\\
 +GRUB_TIMEOUT=10 : wait 10 seconds before booting with the default kernel
 +
 +Another way is to install Grub Customizer and use a graphic environment:​
 +<code bash>
 +sudo add-apt-repository ppa:​danielrichter2007/​grub-customizer
 +sudo apt-get update
 +sudo apt-get install grub-customizer
 +</​code>​

If you found any error, or if you want to partecipate to the editing of this wiki, please contact: admin [at] skenz.it

You can reuse, distribute or modify the content of this page, but you must cite in any document (or webpage) this url: https://www.skenz.it/cs/kernel_compilation?rev=1551188038&do=diff
/web/htdocs/www.skenz.it/home/data/pages/cs/kernel_compilation.txt ยท Last modified: 2019/02/26 14:33 (external edit)

Privacy Policy