Disclaimer: The following information in this document can be out of date. Follow the instructions at your own risk.
from Zaurus User Group, ZUG Downloads, Roms, theKompany. Don't be disturbed on the wrong version of the zImage it is the right. Store both files on a CF card and rename them to initrd.bin and zImage. Additionally you can download the setup /home filesystem script prep-home-sd_test5.zip to create or move the /home on a SD card.
The script is to find here: prep-home-sd_test5.zip
Before copying script to CF card make an unzip of it. I had trouble to start the execution of the script on the z. The shell reported always some ununderstandable errors. The cause were return signs in the script file. You can remove them by executing the following command on the z in a system terminal:
cat originalFileName | tr -d '\r' > newFileName
I will also put all needed files in my kflog home directory under ~axel.
But before doing move read the following text from the author:
This is the updated version of the prep-home-sd.sh script, which is used set up an SD card as your /home filesystem. This is to be used in conjunction with the TKCrom Version 2-alpha3 release. You can also modify the standard sharp rom, or tkc-v1 rom to work with this script, by modifying the /root/etc/rc.d/rc.sysinit script to match the one that is included with the version-2-alpha3 tkcrom. The main difference between using this method of /home on SD v.s. some of the other roms that implement this, is that you can switch between the SD and /home on the ramdisk simply by rebooting with or without the prep'd SD card inserted.Fixes in this version:
cd /etc/pcmcia
Load file serial into an editor (e.g. vi serial). Goto line 59 via command :59 and hit return. In this line should be to see the following content:
cardctl suspend
Comment line out with a hashmark inserted at the left side.
cardctl suspend -> #cardctl suspend
Store the changed file.
Insert GPS CF card into the Z. In the lower line should come up a message, that a new card has been inserted. Now you can check, if your card has been recognized by the OS. Enter command cardctl ident and look at the output. For my BC-307 GPS card there is printed out the following:
Socket 0:
product info: "CF CARD", "GENERIC", "", ""
manfid: 0x0279, 0x950b
function: 2 (serial)
Socket 1:
no product info available
Load the file config in an editor and check, if your manfid is already contained in that file. If not, make an new entry in the following manner at the end of the file behind the latest card record. The base are the data displayed with the command cardctl ident. The card id can be any string.
card "GPS CF Card BC-307"
manfid 0x0279, 0x950b
bind "serial_cs"
Store the changed file.
Change into the directory /etc/rc.d.
cd /etc/rc.d
Due to a bug in the kernel the serial card driver will not be loaded automatically during insertion of cf card. We automate that now. Load file rc.serial into an editor. The following line should be inserted before the exit 0 statement:
/sbin/insmod serial_cs
Content of file after insertion:
#!/bin/sh
/sbin/insmod serial_cs
exit 0
To avoid a reboot we will load the necessary kernel driver by hand. Enter the command:
/sbin/insmod serial_csThe following is printed out on the screen during command execution:
Using /lib/modules.rom/2.4.18-rmk7-pxa3-embedix/kernel/drivers/char/pcmcia/serial_cs.oVia lsmod command we can control, if the kernel has bound the driver.
Module Size Used by serial_cs 4624 0 (unused) registers 13904 0 (unused) ...Now execute the command:
cat /var/lib/pcmcia/stabto see, if the kernel has assigned a serial device to our card. If all is ok you should see something like that:
Socket 0: Serial or Modem 0 serial serial_cs 0 ttyS3 4 67 Socket 1: emptyImportant is the assigned device, ttyS3. We need it later on for the configuration of cumulus. Now we can do a very simple test, if the serial CF interface is working. We set the speed of the uart to 4800 bps and try to read then data from it.
stty 4800 < /dev/ttyS3 cat /dev/ttyS3If we have luck and the GPS is sending data we can see the NMEA records:
6,1.2,73.0,M,44.6,M,0.0,0000*4F $GPGSA,A,3,11,14,31,20,22,28,,,,,,,2.2,1.2,1.8*37 $GPRMC,152829.201,A,5228.1136,N,01334.1011,E,0.129664,135.72,060304,,*04First record maybe corrupted but the rest looks very good. With Control C you can stop the output. Additionally, if you got no success you can switch on the system log daemon. Do the following:
cd /etcLoad file syslog.conf into an editor. Goto line 7 and remove the hashmark at the beginning of the line.
before
#*.info;mail.none;news.none;authpriv.none;cron.none /var/log/messages
after
*.info;mail.none;news.none;authpriv.none;cron.none /var/log/messages
Save changed file and start syslog daemon with:
/etc/rc.d/init.d/syslog start
Go into the log directory
cd /var/log
and look into the file messages what is logged during removing and inserting of CF card.
Messages during remove CF
Mar 6 15:39:48 localhost kernel: sa1100_pcmcia_init(0)
Mar 6 15:39:48 localhost kernel: tty03 unloaded
Mar 6 15:39:48 localhost cardmgr[153]: executing: './serial stop ttyS3'
Mar 6 15:39:48 localhost cardmgr[153]: + losetup: not found
Mar 6 15:39:48 localhost cardmgr[153]: + losetup: not found
Messages during insert CF
Mar 6 15:39:52 localhost cardmgr[153]: initializing socket 0
Mar 6 15:39:52 localhost cardmgr[153]: socket 0: Serial or Modem
Mar 6 15:39:52 localhost kernel: ttyS03 at port 0xc5270400 (irq = 35) is a 16C950/954Mar 6 15:39:52 localhost cardmgr[153]: executing: './serial start ttyS3'
Don't forget to switch off system log daemon with:
/etc/rc.d/init.d/syslog stop
otherwise the daemon works further on.
Have a lot of fun with cumulus
Axel