Personal tools
You are here: Home Members gillesgigan gumstix Recompling the kernel
Document Actions

Recompling the kernel

by Gilles Gigan last modified 2008-10-04 08:53

This page describes the steps to recompile the kernel and add the PWC driver for it

The steps are taken from the gumstix wiki page on webcams

and from here too

The following assumes the current working dir is ~/gumstix/gumstix-oe. To start with, make sure the OpenEmbedded install can build a root fs image successfully. To do this, run:

bitbake gumstix-basic-image

and check if it is successful. This will create a basic root FS image with minimal programs.

Meanwhile, partition an SD card this way: first partition: Fat16 - 50Mb; Second partition: Ext2; (on debian, install dosfstools package to have mkfs.vfat)

Now we need a kernel capable of booting off an SD card. Copy the OE config files to user.collections:

cp -r  com.gumstix.collection/conf/ user.collection/

Edit the verdex config file

vi user.collection/conf/machine/gumstix-custom-verdex.conf

and uncomment the line MACHINE_FEATURES  += "mmcroot"

# enable one of the following if you want to target build for uimage/rootfs on mmc/microSD or CF
MACHINE_FEATURES  += "mmcroot"
#MACHINE_FEATURES  += "cfroot"

Make sure dev files for ncurses are installed with

sudo apt-get install libncurses5-dev

Assuming the basic image build has already started, a default kernel config file is located at

tmp/work/gumstix-custom-verdex-angstrom-linux-gnueabi/gumstix-kernel-2.6.21-r1/linux-2.6.21

Enter the  directory, and configure other required kernel features with:

make ARCH=arm menuconfig

Copy the generated .config file to where we need it:

cp tmp/work/gumstix-custom-verdex-angstrom-linux-gnueabi/gumstix-kernel-2.6.21-r1/linux-2.6.21/.config user.collection/packages/linux/gumstix-kernel-2.6.21/gumstix-custom-verdex/defconfig

Build the new kernel

bitbake -c rebuild gumstix-kernel

The root fs image, kernel and module are located in tmp/deploy/glibc/images/gumstix-custom-verdex/

Assuming the two SD card partitions are mounted on /media/disk (fat16 kernel partition) and /media/disk-1 (ext2 root FS partition), copy the kernel (uImage), gumstix-factory.script and the root fs using:

sudo tar -zxvf tmp/deploy/glibc/images/gumstix-custom-verdex/gumstix-basic-image-gumstix-custom-verdex.tar.gz -C /media/disk-1/
sudo cp tmp/deploy/glibc/images/gumstix-custom-verdex/modules-2.6.21-r1-gumstix-custom-verdex.tgz /media/disk-1/home/root
cp extras/mmc-root/gumstix-factory.script /media/disk
cp tmp/deploy/glibc/images/gumstix-custom-verdex/uImage-2.6.21-r1-gumstix-custom-verdex.bin /media/disk/uImage

Unmount the SD card, place it back in the gumstix and start it.

On the gumstix, unpack the modules and copy the need ones (or all of them)

cd /home/root
tar -zxvf modules-2.6.21-r1-gumstix-custom-verdex.tgz
cp -r lib/modules/2.6.21/kernel/drivers/media/ /lib/modules/2.6.21/kernel/drivers/
depmod -ae

et voila


Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: