Difference between revisions of "Kernel compiling"

From odroid US
Jump to: navigation, search
(Configuring the kernel)
(Building the kernel)
Line 10: Line 10:
  
 
hwFGXX  <a href="http://vktsrqogbjhm.com/">vktsrqogbjhm</a>, [url=http://rjatnkpeicze.com/]rjatnkpeicze[/url], [link=http://zrwgescusalr.com/]zrwgescusalr[/link], http://sssolqowvrpw.com/
 
hwFGXX  <a href="http://vktsrqogbjhm.com/">vktsrqogbjhm</a>, [url=http://rjatnkpeicze.com/]rjatnkpeicze[/url], [link=http://zrwgescusalr.com/]zrwgescusalr[/link], http://sssolqowvrpw.com/
 
=== Building the kernel ===
 
<pre>make -j8
 
# If you are building as root:
 
make modules_install
 
# If you are building as user:
 
sudo make modules_install
 
make zImage</pre>
 
  
 
=== Building the initial ram filesystem ===
 
=== Building the initial ram filesystem ===

Revision as of 07:36, 26 January 2013

WATCH THE SIZE OF YOUR BOOT PARTITION, MAYBE YOU HAVE TO DELETE SOME OF THE BACKUP FILES!

DO THIS ON YOUR ODROID, NOT ON YOUR PC!

These procedures assume you have an Debian-based distribution loaded on your odroid. The kernel building is not different between the distros, but getting ready to build is.

Debian/Ubuntu/Mint and others use "Debian packages", .deb files. They use tools like dpkg, apt, synaptic and so on to manage a package database.

RedHat, Centos, Fedora and Gentoo would not know about apt-get and friends -- so these instructions will not be of much use.

hwFGXX <a href="http://vktsrqogbjhm.com/">vktsrqogbjhm</a>, [url=http://rjatnkpeicze.com/]rjatnkpeicze[/url], [link=http://zrwgescusalr.com/]zrwgescusalr[/link], http://sssolqowvrpw.com/

Building the initial ram filesystem

This is not always needed -- unless you need changes in phase 1 of the Linux boot, it is best to leave this alone.

If you need a custom filesystem driver, or you want to directly mount your root file system on a thumb drive or NAS drive, this would be the area to work in. You would need to know that this is a busybox-based system completely separate from the eventual distro you intend to boot.

mkinitramfs -c gzip -o ./initramfs-$kernelversion $kernelversion
mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n initramfs -d ./initramfs-$kernelversion ./uInitrd
cp uInitrd /boot


Copying the kernel and initramfs to the boot partition

kernelversion=`cat ./include/config/kernel.release`
cp /boot/zImage /boot/zImage.prev
cp /boot/uInitrd /boot/uInitrd.prev
cp arch/arm/boot/zImage /boot
cp .config /boot/config-$kernelversion

optionally:

cp System.map /boot/System.map-$kernelversion

halt:

shutdown -h 0

power cycle after that.

The new kernel will show something like this:

uname -a

Linux odroidu2-1 3.0.57 #1 SMP Sun Jan 13 21:53:37 UTC 2013 armv7l GNU/Linux

The #1 came from the file: /usr/src/linux/.version. Each time you build, this number will be incremented.

warnings

Your new kernel built kernel modules that may not be compatible with other builds.

Please don't post a private kernel without giving a warning. If could break another system. If you make small changes, like select an additional module, the result will probably not segfault other systems. On the other hand, if you select some networking options (especially) you may find that structs don't quite line up and eventually someone will segfault.