Recompiling the Linux Kernel

From GumstixDocsWiki

Jump to: navigation, search

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


Customers working with:

1/ The Gumstix Overo series or

2/ OpenEmbedded on the Verdex Pro series

should follow the instructions at gumstix.net and the related user wiki.


The instructions are for customers using buildroot, only.


Note: all gumstix verdex motherboards available at www.gumstix.com are pre-flashed with Linux and the OpenEmbedded build environment

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

For customers using buildroot:


If you want to recompile the linux kernel for your gumstix board, follow these steps.

cd <gumstix-buildroot>
cd build_arm_nofpu
cd linux-<the version of linux you're using>
make ARCH=arm menuconfig

Note that CROSS_COMPILE is NOT required when doing the menuconfig. It's fine to provide it (like if you've created an alias or script), but for hand typing, it's completely unnecessary.

Like most things in software development, there are often many ways of achieving the same result. Here are two different methods which can be used to rebuild the kernel:

make ARCH=arm CROSS_COMPILE=`pwd`/../staging_dir/bin/arm-linux-
cd <gumstix-buildroot>
make

Personally, I prefer to do the following instead:

rm arch/arm/boot/compressed/vmlinux
cd <gumstix-buildroot>
make

Removing that particular vmlinux file will trigger buildroot's make to rebuild the kernel with all of the appropriate command line options.

The reason I prefer the second approach is that sometimes rebuilding the kernel can take a while (certain config options can cause many files to be rebuilt). In the first approach you need to do two make - wait-a-whiles. The second approach involves a single make - wait-a-while step The wait-a-while will be the sum of the two wait-a-whiles from the first approach, but it means I can go and do something else while I'm waiting and not have to come back until the whole thing is done.

Personal tools