Originally Published: Wednesday, 6 June 2001 Author: Mike Baker
Published to: develop_articles/Development Articles Page: 7/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 7 of 9  >>

Busybox

Now that we have a booting kernel the next thing to do is commence with loading the rest of the system. The first thing we need is a shell environment to work from and this is where busybox comes in. Busybox is a small set of the most common Linux/Unix tools, perfect for this sort of application.

After grabbing the source from the above URL make any changes to Config.h that you need (you can disable many of the applications to save space). Compiling and installing Busybox is simply a matter of the following:

$ make CROSS=mipsel-linux-
...
$ mount /dev/hde2 /mnt
(/dev/hde2 is assumed to be the ext2 partition of the compact flash)

$ ./install.sh /mnt
$ mkdir /mnt/etc
$ cp scripts/inittab /mnt/etc
(At this point we've almost got a working system, we just need to copy over glibc and create a few devices.)

$ cd /mnt
$ mkdir {dev,etc,lib,proc,tmp,var}
$ echo "/dev/hde2 / ext2 remount,rw 0 0" > etc/fstab
(hde2 in this case is how the handheld sees the compact flash device)

$ echo "proc /proc defaults 0 0" >> etc/fstab
$ echo "root::0:0:root:/:/bin/sh" > etc passwd
$ mkdir etc/init.d
$ echo -e "#!bin/sh\nmount -a" > etc/init.d/rcS
$ chmod 755 etc/init.d/rcS
$ cp /usr/mipsel-linux/lib/{*o,*\.so*} lib -a
$ cd dev
$ cp /dev/MAKEDEV .
$ ./MAKEDEV generic

Congratulations, at this point you now have a minimal but functional system on your handheld. You can connect up the serial cable and play around.





  << Page 7 of 9  >>