Originally Published: Wednesday, 6 June 2001 Author: Mike Baker
Published to: develop_articles/Development Articles Page: 5/9 - [Printable]

OSDN Handheld Months: Installing Linux on a Casio E105

Linux.com Senior Developer Mike Baker takes us step-by-step through installing a Linux system on a MIPS-based Windows CE device. If pre-built distributions are not for you, then this article is.

  << Page 5 of 9  >>

Building the Kernel

The first thing you'll need is a cross compiler and its supporting applications and libraries. Some distributions already contain a complete mipsel toolchain although my experience has been that these are generally not up to date with the latest patches, so instead I download from:

ftp://Linux-vr.sourceforge.net/pub/linux-vr/RPMS/i386/

The minimal set of RPMs you'll need for compiling the kernel is listed below.  You may want to grab the C++ RPMs too since they'll be used later to compile Blackbox.

binutils-mipsel-linux-2.8.1-2lv.i386.rpm

binutils (ar,as,ld,nm,ranlib,strip) compiled to support little endian MIPS (mipsel)

egcs-mipsel-linux-1.0.3a-3lv.i386.rpm

mipsel version of egcs (compiler)

glibc-devel-mipsel-linux-2.0.7sf-20lv.i386.rpm

mipsel version glibc (GNU C library)

Now for the kernel sources, you'll find these in Linux-vr's cvs.

$ cvs -d:pserver:anonymous@cvs.linux-vr.sourceforge.net:/cvsroot/linux-vr login
(Logging in to anonymous@cvs.linux-vr.sourceforge.net)
CVS password: <enter>
$ cvs -d:pserver:anonymous@cvs.linux-vr.sourceforge.net:/cvsroot/linux-vr co linux
$ cd linux

At this point we need to make a minor change so that the compact flash is detected. Edit arch/mips/vr41xx/ide-vr41xx.c and find the function vr41xx_ide_default_io_base(); and change case 2 to return 0xc170 like shown here:

static ide_ioreg_t vr41xx_ide_default_io_base(int index) {

switch (index) {

case 0: return 0x1f0;

case 1: return 0x170;

case 2: return 0xc170;

case 3: return 0;

case 4: return 0;

case 5: return 0;

default:

return 0;

}

}





  << Page 5 of 9  >>