So you have U-Booted your Zipit Z2?  Great!  Now you are ready to exploit one of the biggest advantages of moving from blob to U-boot…  Building your own kernel.

First off, you need to have built a cross-compiler of some sort to build the kernel.  I have posted directions for my version here in my post about building U-Boot for the Z2.  After that, you will need to make sure u-boot-tools is installed on your system.  On Gentoo you can use portage to install it but you will need to unmask the package.  To unmask that package on Gentoo, add ACCEPT_KEYWORDS=”~x86″ to your /etc/make.conf.  Then type “emerge u-boot-tools”.

Next, download the latest version of the Zipit kernel from here:

http://git.kernel.org/?p=linux/kernel/git/marex/pxa-linux-2.6.git;a=shortlog;h=refs/heads/zipitz2

To start off, I’m going to use Mozzwald’s suggested .config file.  You will need to rename it .config and put it in the base directory of your kernel.  Next, replace the <base_kernel_dir>/arch/arm/mach-pxa/z2.c with a bleeding edge one if desired.  Mozzwald and Sweetlilmre both have been diligently hacking away at that file so you could ask in the irc.freenode.net #zipit-dev channel to obtain the latest version or use this z2.c for now.

Now for the fun stuff.  You can use a make menuconfig command as follows to add your own customizations to the kernel:

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- menuconfig

Now it’s time to build the new kernel:

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j9 uImage

Now, if you built a modular kernel, you will need to build the modules and stick them somewhere:

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- modules
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- INSTALL_MOD_PATH=/where/to/drop/modules modules_install

After this is done, your new kernel should be sitting there for you ready to go in the arch/arm/boot directory and your modules are wherever you put them.  Just copy the uImage and modules to the appropriate locations on your Zipit’s SD card and you will be good to go.



If you like the content on this site, please support it by using this link to order from Amazon. You know you were going to go there and buy stuff anyhow so why not help me pay the hosting bill.