Getting started with GP2X kernel development
Use quickest way to get up and running with your own custom kernel is to install a hacked U-Boot to facilitate booting off SD card.
A hacked U-Boot with a boot-menu is available here.
To boot a kernel off SD, make a U-Boot image as described below, call it 'kernel.img' and put it in the root directory of your SD card.
The kernel currently only builds with 2.95-based GCC compilers. You can get the toolchain used by GPH here.
This toolchain should be installed in /usr/local - if you install it elsewhere (e.g. your home directory) you must create an appropriate symlink in /usr/local
There are 3 sets of kernel sources available. The offcial GP2X sources released by GamePark Holdings, the MMSP2 sources from Magic Eyes (the manufacturers of the processor), and the sources for the unofficial 'Open2x' project GP2X firmware.
All of them can be downloaded via Subversion:
svn co https://open2x.svn.sourceforge.net/svnroot/open2x open2x
Will create a folder called "open2x" containing the 4 sub folders:
trunk/kernel/linux-GPH-2.4.25_FW1/ : the offcial GP2X sources released by GamePark Holdings
trunk/kernel/linux-mmsp2-2.4.25/ : the MMSP2 sources from Magic Eyes (the manufacturers of the processor)
trunk/kernel/linux-open2x-2.4.25_FW1/ : the sources for the unofficial 'Open2x' project GP2X firmware (for the GP2x F-100) trunk/kernel/linux-open2x-2.4.26_FW2-3/ : the sources for the unofficial 'Open2x' project GP2X firmware (for the GP2x F-100)
Making a U-Boot image
The kernel Makefile for the open2x sources creates a U-Boot image for you in arch/arm/boot/kernel.img
To build your own, grab the U-Boot sources and get the 'mkimage' file out of the 'tools' directory. Since there is a limit of 1.5MB on kernel size , it also a good idea to compress your zImage with 'gzip -9'. Build an image for a compressed kernel with this command:
./mkimage -A arm -O linux -T kernel -C gzip -a 00008000 -e 00008000 -n "Kernel Name" -d zImage kernel.img