CompileGumstixKernel

Toby Schneider edited this page May 26, 2016 · 8 revisions

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.

  1. 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
    
  2. 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).

  3. Set your environmental variables to use the correct cross-toolchain (download: kernel-dev-deb.env)

    source kernel-dev-deb.env
    
  4. 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.

  5. Copy the downloaded config to linux-omap-2.6.git/.config and (if desired)

    make menuconfig
    

    to modify it.

  6. When you have a .config that makes you happy, build the image uImage and modules

    make include/linux/version.h
    make uImage
    make modules
    
  7. 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.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.