kernel update

On gumstix-oe, currently we can choose kernel version 2.6.21, 2.6.22 and 2.6.24.
But even 2.6.24 is almost 2 years older than current kernel.
So we upgrade kernel to version 2.6.29.
Followings are the procedures.

Setting up microSD boot environment

When upgrade kernel, prepare new userland for upgrade kernel.
For convenience of kernel upgrade operation, we don't choose the way to write new kernel into Flash ROM but
we choose the way to make up new bootable environment on microSD.

Setting up gumstix build environment

This section describes setting up procedure of build environment for bc9 (gumstix).
We use gumstix-oe, modified and adjusted version of OpenEmbedded build environment (bitbake) by Gumstix,Inc. .
Please refer to setting up procedure of gumstix build environment in advance.

However, we build microSD boot image instead of built-in Frash ROM boot image.
So build procedure is rather different to site above.

We suppose that following operation executes by "beat" account on Ubuntu 8.04LTS.
(When you want to use Ubuntu8.10, refer to Build Environment Ubuntu 8.10
When you want to use Ubuntu9.04, refer to Build Environment Ubuntu 9.04
and adjust procedure.)

Adjusting sh

On Ubuntu, /bin/sh is symlink to dash, not to bash and sometime this cause problem.
So in order to avoid build time failure of bitbake, reconfigure /bin/sh as follows:

$ sudo dpkg-reconfigure dash

Choose "no" when you asked that setting up /bin/sh to symlink of dash.

Instlation of required applications

Install bitbake required applications as follows:

$ sudo apt-get install build-essential help2man diffstat texi2html texinfo libncurses5-dev cvs gawk 
  python-dev python-pysqlite2 python-psyco ckermit lrzsz subversion

Checking out gumstix-oe

$ mkdir ~/gumstix 
$ cd ~/gumstix 
$ svn co gumstix-oe

Setting shell environment variables

If you prefer to setting up permanently, do as follows.

$ cat gumstix-oe/extras/profile >> ~/.bashrc

or if you prefer to setting up temporally, do as follows,

$ . ~/gumstix/gumstix-oe/extras/profile


$ source  ~/gumstix/gumstix-oe/extras/profile

Setting source code caching directories

Gumstix-oe is designed to download source codes during build procedures.
Default setting store downloaded source codes into /usr/share/sources.
But for easy handling, we change to store source codes into gumstix/sources.

$ svn diff build/conf/site.conf 
Index: build/conf/site.conf
--- build/conf/site.conf	(revision 318)
+++ build/conf/site.conf	(working copy)
@@ -1,5 +1,6 @@
 # specifies where BitBake should place the downloaded sources
-DL_DIR = "/usr/share/sources"
+DL_DIR = "/home/beat/gumstix/sources"
 # specifies where BitBake should create its temporary files

Adjusting build setting

To utilize PXA270 effectively, edit as follows:

$ svn diff com.gumstix.collection/conf/machine/include/ 
Index: com.gumstix.collection/conf/machine/include/
--- com.gumstix.collection/conf/machine/include/	(revision 318)
+++ com.gumstix.collection/conf/machine/include/	(working copy)
@@ -1,6 +1,9 @@
 # Configurations for the Intel PXA27x Appications Processor Family. 
 # Please use tune-xscale for PXA255/PXA26x based processors.
-TARGET_CC_ARCH = "-march=iwmmxt -mcpu=iwmmxt -mtune=iwmmxt"
+FEED_ARCH = "iwmmxt"
+TARGET_CC_ARCH = "-march=iwmmxt -mtune=iwmmxt"
+TARGET_CC_KERNEL_ARCH = "-march=iwmmxt -mtune=iwmmxt"
 PACKAGE_ARCH = "iwmmxt"

Kernel maximum size limitation doesn't need for microSD bootable image. So increase kernel size.

$ svn diff com.gumstix.collection/conf/machine/include/ 
Index: com.gumstix.collection/conf/machine/include/
--- com.gumstix.collection/conf/machine/include/	(revision 318)
+++ com.gumstix.collection/conf/machine/include/	(working copy)
@@ -10,6 +10,7 @@
 RDEPENDS_kernel-base = ""
+KERNEL_IMAGE_MAXSIZE = "2197154" // incleased for mmcboot 
 UBOOT_ENTRYPOINT = "a0008000"
@@ -35,7 +35,7 @@
 PREFERRED_PROVIDER_bluez-utils-dbus = "bluez-utils"
-PREFERRED_VERSION_gumstix-kernel = "2.6.21"
+PREFERRED_VERSION_gumstix-kernel = "2.6.24"
 PREFERRED_VERSION_gnuplot = "4.0.0"
 PREFERRED_VERSION_dropbear = "0.47"

To generate microSD bootable image, acivate mmcboot setting.
And few adjustments for bc9 are added.

$ svn diff com.gumstix.collection/conf/machine/gumstix-custom-verdex.conf 
Index: com.gumstix.collection/conf/machine/gumstix-custom-verdex.conf
--- com.gumstix.collection/conf/machine/gumstix-custom-verdex.conf	(revision 318)
+++ com.gumstix.collection/conf/machine/gumstix-custom-verdex.conf	(working copy)
@@ -5,12 +5,12 @@
 require conf/machine/include/
-require conf/machine/include/
+require conf/machine/include/
 # Your flash size = Total flash (in MB) - 1 (for linux kernel partition)
 # Enable use of virtual terminal for LCD on tty1 if USE_VT = "1"
@@ -28,7 +28,7 @@
 MACHINE_FEATURES  += "serial"
-MACHINE_FEATURES  += "bluetooth"
+#MACHINE_FEATURES  += "bluetooth"
 # if you enable robostix you will need to disable both "lcd" and "touchscreen" features
@@ -51,7 +51,7 @@
 # enable one of the following if you want to target build for uimage/rootfs on mmc/microSD or CF
-#MACHINE_FEATURES  += "mmcroot"
+MACHINE_FEATURES  += "mmcroot"
 #MACHINE_FEATURES  += "cfroot"

Module for gumstix expansion board wifistix is known to become build error.
So we remove this module's build setting.(bc9 originally doesn't use this module.)

$ svn diff com.gumstix.collection/packages/tasks/
Index: com.gumstix.collection/packages/tasks/
--- com.gumstix.collection/packages/tasks/	(revision 318)
+++ com.gumstix.collection/packages/tasks/	(working copy)
@@ -201,7 +201,6 @@
 RDEPENDS_task-base-gumstix-wifi = "
-    wifistix-modules 

In above modification we change FEED_ARCH from armv5te to iwmmxt.
So if you want to install applications with ipkg command, you can only install self build ipks built with iwmmxt optimized.
If you want to use prebuild ipks prepared by gumstix,inc., please don't require in gumstix-custom-verdex.conf
but require and build armv5te optimized ipks.


Build kernel, kernel modules, userland by following command.~ Build is starting from arm cross-toolchain and it takes few hours or almost a half day to finish.

$ bitbake gumstix-directfb-image

When build was successfully finished, following files should be generated.

$ ls -al tmp/deploy/glibc/images/gumstix-custom-verdex/
Total 21780
drwxr-xr-x 2 beat beat     4096 2009-06-23 00:01 .
drwxr-xr-x 3 beat beat     4096 2009-06-22 22:58 ..
-rw-r--r-- 1 beat beat 10402796 2009-06-23 00:01 Angstrom-gumstix-directfb-image-glibc-ipk-2007.9-test-20090622-gumstix-custom-verdex.rootfs.jffs2
-rw-rw-r-- 1 beat beat  8713428 2009-06-23 00:01 Angstrom-gumstix-directfb-image-glibc-ipk-2007.9-test-20090622-gumstix-custom-verdex.rootfs.tar.gz
lrwxrwxrwx 1 beat beat       97 2009-06-23 00:01 gumstix-directfb-image-gumstix-custom-verdex.jffs2 -> Angstrom-gumstix-directfb-image-glibc-ipk-2007.9-test-20090622-gumstix-custom-verdex.rootfs.jffs2
lrwxrwxrwx 1 beat beat       98 2009-06-23 00:01 gumstix-directfb-image-gumstix-custom-verdex.tar.gz -> Angstrom-gumstix-directfb-image-glibc-ipk-2007.9-test-20090622-gumstix-custom-verdex.rootfs.tar.gz
-rw-rw-r-- 1 beat beat  1929321 2009-06-22 22:58 modules-2.6.24-r1-gumstix-custom-verdex.tgz
-rw-r--r-- 1 beat beat  1191276 2009-06-22 22:58 uImage-2.6.24-r1-gumstix-custom-verdex.bin

Formatting microSD

In order to make microSD bootable and layout kernel and userland on it, make two partitions and format it.
At least 128M bytes are required.
1. Format first 40M bytes of microSD as FAT16
2. Format remains as ext2
(Use fdisk、mkvfat、mkext2 or gparted etc.)
On the condition that vfat partition is mounted to /media/disk and ext2 partition to /media/disk-1,
copy required files to appropriate directory as follows:

$ sudo cp ~/gumstix/gumstix-oe/extras/mmc-root/gumstix-factory.script /media/disk/
$ sudo cp ~/gumstix/gumstix-oe/tmp/deploy/glibc/images/gumstix-custom-verdex/uImage-2.6.24-r1-gumstix-custom-verdex.bin /media/disk/uimage
$ sudo tar -C /media/disk-1/ -xvfz ~/gumstix/gumstix-oe/tmp/deploy/glibc/images/gumstix-custom-verdex/gumstix-directfb-image-gumstix-custom-verdex.tar.gz
$ sudo tar -C /media/disk-1/ -xvfz ~/gumstix/gumstix-oe/tmp/deploy/glibc/images/gumstix-custom-verdex/modules-2.6.24-r1-gumstix-custom-verdex.tgz

Booting from microSD

Insert ready microSD into bc9's microSD slot, connect serial cable to PC and power on.
Boot message appear on serial console and bc9 boot from microSD.
(But beware: nothing appear on LCD when first boot time.)
During first time boot locale setting and ssh_key generation are executed.
So first time boot take slightly longer time.~ When boot completed, login from serial console and set kernel modules as follows:

$ depmod
$ vi /etc/modules/pxafb
write only pxafb and save.
$ vi /etc/modules/fbcon
write only fbcon and save. 
$ update-modules

Then prompt appear on LCD and pxa frame buffer activated after second time boot.

by Satoshi OTSUKA

Front page   Edit Freeze Diff Backup Upload Copy Rename Reload   New List of pages Search Recent changes   RSS of recent changes
Last-modified: 2009-10-26 (Mon) 11:28:41 (4349d)