Kernel/building on linux

< Kernel

Use this guide to help you create an working Open2x gp2xkernel.img file that can be installed on your GP2X (with Open2x firmware) or run from an SD card (call resulting kernel kernel.img on the root of the SD) if you have an Open2x bootloader installed.

This guide shows, how to compile the Open2x kernel with the current Open2x (gcc 3.4.4) tool chain.

Pre-requisites

 * 1) Ensure you have a correctly installed and working kernel toolchain. You can use a pre-made tool chain or compile your own.


 * 1) Download (checkout) everything necessary to create the kernel image.
 * 2) Latest Open2x kernel sources (linux-open2x-2.4.26_FW2-3) from SVN. Browse the source @ https://open2x.svn.sourceforge.net/svnroot/open2x/trunk/kernel/linux-open2x-2.4.26_FW2-3/
 * 3) Download the pre-built MKIMAGE package (or the entire bootloader source if you prefer) - TODO: Add link, DJWillis.


 * 1) Todo┬┤s before compiling the kernel.
 * 2) Extract the pre-built MKIMAGE package and note what version you need (It includes a Linux/X86 bin in ./Linux and Windows bin in ./Windows) - Make sure you know the path to this file.

Compiling the Kernel

 * 1) Edit the open2x-kernel.sh script to suit your environment.
 * 2) Set the path "OPEN2X=" to point to your kernel tool chain, defaults should be fine.
 * 3) Set the vaue "CROSS_COMPILE=" to the name of your tool set (again, defaults should be fine).
 * 4) Set the path "U_BOOT_MKIMAGE=" to point to the location were your MKIMAGE binary resides (downloaded from Pre-requisites).
 * 5) Start the compiling process (./open2x-kernel.sh)
 * 6) After a few seconds, menuconfig will start. If you donΓÇÖt want to make changes to the default kernel config, just cancel and say: "No, do not save new configuration", otherwise configure as desired.

Note: Compiling the kernel can take 15-45 minutes.

Make sure you note any log messages, if the build fails the script will tell you what went wrong.

When finished you will have a gp2xkernel-open2x-%date%.zip with the kernel, README and all modules with a little installer script for the modules.

Congratulations! You successfully created an Open2x kernel image!

(Original guide by Zwirch)