
This README file describes how to create the filesystem on a VPAC1 256MB PC
card with NOR flash, using the jffs2 filesystem.  This procedure is updated
from the binary copy of the jffs2 image from the bootloader, and instead
uses a kernel with an initramfs containing the filesystem creation tools.

John Kelley 
September 2010 
j.kelley@astro.ru.nl

-----

0. How do I know which type of PC card I have?  Look at the "Product No."
on the DIMM module sticker.  If it starts with "270", you have a NOR card
and can continue with these instructions.  Another check -- the NOR PC
cards have the letter "i" on the processor (Intel).

1. First, connect to the board over the serial link.  Reboot the board, and
press a key to enter the bootloader.  You must also be connected to the
digitizer Ethernet port, with the PC having an IP address of
192.168.61.161.  The PC must be running a TFTP server.

2. Next, boot into the initramfs kernel.  The zImage*.dat file referenced
below should be located in the PC's tftpboot directory.

> set bootargs console=ttyS0,38400
> tftp zImage-vpac1-ubifs-initramfs.dat
> wtags 80000100; go

3. The kernel should boot and give you a login prompt.  Log in as root (no password).

4. Activate the Ethernet interface.  Edit /etc/network/interfaces and add

iface eth0 inet static
address 192.168.61.100
netmask 255.255.255.0

Save the file, then at the command line, bring up the interface with the command:

# ifup eth0

5. Now create the flash filesystem and copy over the root filesystem.

# flash_eraseall /dev/mtd2
# mount -t jffs2 /dev/mtdblock2 /mnt
# tftp -r rootfs-vpac1-ubifs-256-2.6.27.48.tar.gz -l /tmp/rootfs.tar.gz -g 192.168.61.161
# gunzip /tmp/rootfs.tar.gz
# tar xvf /tmp/rootfs.tar -C /mnt
# sync

The "sync" command will take a long time.

# umount /mnt

6. Now you can kill the terminal program.  Upload a new kernel using the
scripts on the PC: 

$ cd digitizer/scripts
$ ./loadkernel <digitizer serial #>

7. The next script will set the IP address and fix up the hostname:

$ ./fix_network_kernel <serial #> <station #>

8. The final script will set up the DAQ user and software:

$ ./setup_daq <serial #> <station #>

