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

Next, copy the config shown below to .config and run make menuconfig. You may need to change options If you're not using the same device.

CONFIG_EXPERIMENTAL=y
CONFIG_CLASS_PDA=y
CONFIG_CASIO_E105=y
CONFIG_CPU_VR41XX=y
CONFIG_CPU_NO_FPU=y
CONFIG_ISA=y
CONFIG_CPU_LITTLE_ENDIAN=y
CONFIG_KCORE_ELF=y
CONFIG_ELF_KERNEL=y
CONFIG_BINFMT_ELF=y
CONFIG_MIPS_FPU_EMULATOR=y
CONFIG_NET=y
CONFIG_SYSVIPC=y
CONFIG_SYSCTL=y
CONFIG_PM=y
CONFIG_PM_SUSPEND_WAKEUP=y
CONFIG_PM_POWERED_SUSPEND=y
CONFIG_PM_STANDBY=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_PACKET=y
CONFIG_UNIX=y

CONFIG_INET=y
CONFIG_IP_PNP=y
CONFIG_IP_PNP_BOOTP=y
CONFIG_IDE=y
CONFIG_BLK_DEV_IDE=y
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_NETDEVICES=y
CONFIG_DUMMY=y
CONFIG_PPP=y
CONFIG_PPP_ASYNC=y
CONFIG_PPP_DEFLATE=y
CONFIG_PPP_BSDCOMP=y
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_SERIAL_CONSOLE=y
CONFIG_TOUCH_PANEL=y
CONFIG_BUTTONS=y
CONFIG_BUTTONS_GPIO=y
CONFIG_RTC=y
CONFIG_PROC_FS=y

CONFIG_EXT2_FS=y
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
CONFIG_SUNRPC=y
CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
CONFIG_MSDOS_PARTITION=y
CONFIG_FB=y
CONFIG_DUMMY_CONSOLE=y
CONFIG_FB_HPCSFB=y
CONFIG_FBCON_CFB16=y
CONFIG_FBCON_FONTS=y
CONFIG_FONT_8x16=y
CONFIG_FONT_4x6=y
CONFIG_FBCON_DISABLE_LOGO=y
CONFIG_SOUND=y
CONFIG_SOUND_VR41XX=y
CONFIG_CROSSCOMPILE=y
CONFIG_MAGIC_SYSRQ=y
CONFIG_PROC_GIUINFO=y

Start the kernel compile by running make. While you're waiting visit ftp://ftp.ltc.com/pub/linux/mips/boot and grab the CyaCE boot-loader. In order to get the system to automatically run the boot-loader upon card insertion it needs to be named AutoRun.exe and placed in CE/R4100/on the card. You'll need to create a configuration file to go with it: The CyaCE config is named cyacecfg.txt and is also placed in the CE/R4100/ directory. The cyacecfg.txt is nothing more than the following:

timeout=0
image=vmlinux
label=linux
append=root=/dev/hde2 console=ttyS0

By now the kernel compilation should be finished and you should have a vmlinux file in your kernel directory. Copy the vmlinux file to CE/R4100/on the compact flash. At this point you can verify that the kernel is compiled correctly and actually boots, you can accomplish this by hooking up a serial cable and running minicom. Set minicom to 9600 baud and insert the compact flash card. You should get the output shown below.

(If your CE device has an error message on screen with "unable to allocate heap" you'll need to perform a memory reset (hold down the power button and hit reset) and try inserting the card again.)

CyaCE ELF Program Loader
Detected 32MB of memory. Will use 32MB of it.
Loading R4000 MMU routines.
CPU revision is: 00000c60
Primary instruction cache 16kb, linesize 16 bytes.
Primary data cache 8kb, linesize 16 bytes.
Linux version 2.4.0-test9 (root@paranoia)
(gcc version egcs-2.90.29 980515 (egcs-1.0.3 release))
#8 Mon Mar 19 14:10:28 EST 2001
On node 0 totalpages: 8192
zone(0): 8192 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/hde2 init=/bin/sh console=ttyS0
Console: colour dummy device 80x25
Calibrating delay loop... 87.24 BogoMIPS
Memory: 30372k/32768k available (1534k kernel code, 2396k reserved, 78k data, 56k init)
Dentry-cache hash table entries: 4096 (order: 3, 32768 bytes)
Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 2048 (order: 2, 16384 bytes)
Checking for 'wait' instruction...  unavailable.
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 2048 bind 2048)
Starting kswapd v1.8
Console: switching to colour frame buffer device 60x53
fb0: HPC Simple frame buffer device, using 160K of video memory
No keyboard driver installed
VR41xx touch panel initialized, using IRQ 13.
loop: enabling 8 loop devices
Uniform Multi-Platform E-IDE driver Revision: 6.31
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
hde: Hitachi CVM1.1.1, ATA DISK drive
ide2 at 0xc170-0xc177,0xc376 on irq 40
hde: 125184 sectors (64 MB) w/1KiB Cache, CHS=978/4/32
Partition check:
hde: hde1 hde2
VR41xx Serial driver version 0.4 (22-Oct-2000)
ttyS00 at 0xac000000 (irq = 17) is a 16550A
ttyS01 at 0xac000000 (irq = 17) is a 16550A
VR41xx Real Time Clock Driver v1.0
PPP generic driver version 2.4.1
PPP Deflate Compression module registered
PPP BSD Compression module registered
DMA sound driver installed, using 64 buffers of 2k.
IP-Config: No network devices available.
kmem_create: Forcing size word alignment - nfs_fh
hde: hde1 hde2
hde: hde1 hde2
VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory: 56k freed
Warning: unable to open an initial console.
Kernel panic: No init found.  Try passing init= option to kernel.

At this point there's nothing on the ext2 partition for the kernel to run so you'll get a kernel panic message complaining about init. Don’t worry about it. The reason for booting the kernel here is simply to verify that it loads properly. If, for some reason your kernel doesn't get this far you might try recompiling it with a different binutils.





  << Page 6 of 9  >>