Imbrium Logo

µCsimm Configuration


I have the original distribution CD from http://www.uClinux.org/. I would suggest getting it and runnig the setup program from there. It makes things simpler and I had used it to test everything. The manual which comes with the uCsimm is also quite nice, it helped me a bit here and there and I could start off a lot faster.

I wrote down some of the things I did for my reference and thought I'd put them on my page.


Connecting the uCsimm to the Computer

Connect the uCSimm to the power supply. Note that +6V is the outside pin of the plug), connect the serial cable and use minicom set up with the proper port (/dev/ttyS0 in my case) with no flow control and set to 9600 Baud. Press the reset button, if necessary, the bootloader should show up with a prompt.

I would suggest soldering the 2 LEDs in place on the uCsimm since there have been problems with the 30-pin adapter not making proper contact with the gardener board and thus causing cable problems upon start of the kernel. The cathode (short pin) of the 3mm LED is on the bottom (facing towards the uCsimm-pins).

Connect the RJ-45 cable. The top diode should light up. If not, wiggle the uCsimm in the gardener board and see if that fixes the problem. I had to bend the metal springs on the SIMM socket a bit until it worked right. I also cleaned the contacts of the uCsimm with an eraser.



Now build the working directory, for example:

	# cd /home
	# mkdir uclinux ; cd uclinux
	# buildenv
	# make

This is what i entered into my romdisk/etc/rc:

	#!/bin/sh
	#
	# system startup.
	# set up the hostname
	/bin/hostname simm
	# attach the interfaces
	/sbin/ifattach
	/sbin/ifattach \
	--addr 192.168.25.9 \
	--mask 255.255.255.0 \
	--net 192.168.25.0 \
	--gw 192.168.25.1 eth0
	# expand the ramdisk
	/sbin/expand /ramfs.img /dev/ram0
	# mount ramdisk, proc and nfs
	/bin/mount -t ext2 /dev/ram0 /var
	/bin/mount -t proc proc /proc
	/bin/mount -t nfs 192.168.25.5:/home/uclinux /usr
	# start up the internet superserver
	/sbin/inetd &
	# that's it... sucess
	exit 0

To see if the romdisk is properly working and all the files are where you want them, do this to check:

	# mount -r -o loop -t romfs romdisk.img /mnt/romfs

Be careful about the romdisk file system and the way the /dev filesystem is built: This is done via genromfs. If you have the wrong genromfs (like I did), e.g. from the RedHat distribution, the dev filesystem will not work and you will get the error message Unable to open an initial console If you look into the romdisk.img by mounting it, you should be able to see the real device node under /dev.

Upon having set up everything they way it was explained in the manual, I successfully got a kernel image to the uCsimm.


Login and password

I logged in with rootand password uClinux.


Using NFS to Mount the Home Directory

I had some problems with exporting my home directory on my NFS server. After finally attempting to mount some other directory, which then worked, I put the following written in my /etc/exports file:

	/home/uclinux (rw)

Make sure that the directory exported is world readable. If it is not, the following error message will appear:

	# mount -t nfs 192.168.25.5:/home/uwe/uclinux /usr
	nfs_fhget: getattr error = 13
	nfs_read_super: get root inode failed
	mount failed

Using KDE and konsole or xterm or whatever:

To enable the backspace to work correctly, do an

	# stty erase ^H

Compiling a new kernel for the uCsimm

Get a stock 2.0.38 kernel from ftp.kernel.org
Get the latest patch from www.uclinux.org. The patch will look something like uClinux-2.0.38.1pre7.diff.gz.

Go to the uClinux directory: cd /opt/uClinux and unpack the kernel:

tar xvzf linux-2.0.38.tar.gz

Now apply the downloaded patch:

gunzip -cuClinux-2.0.38.1pre7.diff.gz | patch -p1

Configure the kernel:

make menuconfig

Note: On my uCsimm the upper and lower 8 data bits are hardware-swapped. If this is the case, the CS8900 byte swap in Network options must be turned off. If this is set incorrectly, the crystallan device upon boot will not be found (you can seen this in the boot messages.)

Compile the kernel:

	# make dep

Oops, did you get the following error message upon this?:

	make[2]: *** [fastdep] Error 135
	make[2]: Leaving directory `/opt/uClinux/linux-2.0.38.1pre7/drivers/char'
	make[1]: *** [fastdep] Error 2
	make[1]: Leaving directory `/opt/uClinux/linux-2.0.38.1pre7/drivers'
	make: *** [dep-files] Error 2

In this case, you will have to replace the file ./linux/scripts/mkdep.c and substitute it with a mkdep.c from a stock 2.4 kernel and redo the "make dep"

	# make clean
	# make linux.bin

Ok, now there is a new linux.bin in the /opt/uClinux/linux directory which holds the kernel image for the uClinux device. This can be programmed into the uCsimm with the same minicom procedure as explained above.