CompileGumstixKernel - GobySoft/goby GitHub Wiki
Compiling the Gumstix kernel
This is a walk-through for compiling the Gumstix 2.6.39 power management kernel (uImage
), using the Emdebian/Debian tools (instead of using OpenEmbedded/Bitbake). The steps should be similar for newer kernels.
2014-12-15 Note: Use the updated kernel source at https://github.com/gumstix/linux
I created this walk-through on Ubuntu 12.04; any recent Debian or derivative should suffice.
-
Prepare your system (gcc-4.3 cross-toolchain from Emdebian, for more details, see http://wiki.debian.org/EmdebianToolchain#Get_the_binaries):
sudo bash apt-get install git u-boot-tools emdebian-archive-keyring echo "deb http://www.emdebian.org/debian squeeze main" >> /etc/apt/sources.list apt-get update apt-get install gcc-4.3-arm-linux-gnueabi exit
-
Use git to fetch the kernel source:
git clone git://www2.sakoman.com/git/linux-omap-2.6.git cd linux-omap-2.6 git checkout --track -b omap-2.6-pm origin/omap-2.6.39-pm
(Here's where you could choose a newer kernel version by choosing a different git branch).
-
Set your environmental variables to use the correct cross-toolchain (download: kernel-dev-deb.env)
source kernel-dev-deb.env
-
The kernel configuration used here (config-2.6.39) is a slightly modified version of Steve Sakoman's PM configuration from the Open Embedded repository. See his blog post as well.
-
Copy the downloaded config to
linux-omap-2.6.git/.config
and (if desired)make menuconfig
to modify it.
-
When you have a .config that makes you happy, build the image
uImage
and modulesmake include/linux/version.h make uImage make modules
-
To install them:
make modules_install INSTALL_MOD_PATH=/media/rootfs cp arch/arm/boot/uImage /media/boot
Change
/media/rootfs
and/media/boot
to correspond to your root filesystem and boot partitions. See InstallOnGumstixOvero for details on partitioning your SD card and creating a filesystem.