SideArm kernel
and root filesystem reflash procedure
1. Cold boot a SideARM and get the bootloader's attention by typing ^C after the "CS8900A found" message. Next, erase the flash
allocated for the JFFS2 root filesystem. Erase blocks in the Intel Strataflash part that we use on the SideARM are 128KBytes
in length and equally sized (i.e. no boot block). The bootloader's 'eraseflash' command takes a starting and ending block number
to erase. In our case the starting block number is 3.
IBoot> eraseflash 3
Do you wish to erase flash blocks 3-127? [y/n] y
2. Download the latest sidearm Linux kernel image from moonjelly. The file /tftpboot/sidearm4/zImage.current always points to the most
current image.
IBoot> download tftp:134.89.12.225 sidearm4/zImage.current
0xc0000000
3. Reprogram the Linux kernel
IBoot> flashverify 0x60000 0xc0000000 0x100000
Flashing: 160000
4. Download the root filesystem
image. The
file /tftpboot/sidearm4/root-final.jffs2
always points to the most current image.
NOTE:
make note of the hex size printed by this 'download' command, as it will
be needed for the subsequent 'flashverify' command.
IBoot> download tftp:134.89.12.225 sidearm4/root-final.jffs2 0xc0000000
Downloading sidearm.test/root-final.jffs2: 00900000
Downloaded 9437184 bytes at 60 kB/s
5. Program the flash with the bootloader's 'flashverify' command. NOTE: You should use the hex size value indicated by the previous 'download'
command as the length argument to flashverify. The starting offset is (0x60000 + 0x100000 = 0x160000). We have downloaded
the image to the start of SDRAM (0xc0000000), use this as the base address (2nd argument).
IBoot> flashverify 0x160000 0xc0000000 0xDownloadSizeHere
Flashing: 00A60000
6. Issue the 'createfis' command which creates a redboot partition table. In this case, the important entry is
the last one (116 blocks), which indicates where the JFFS2 image starts. This entry number is used as a parameter to the
mtd driver at startup (root=1f04).
IBoot> createfis 1 2 8 116
Flashing: 01000000
7. Finally, reboot the system.
IBoot> reboot
Restarting...
The SideARM will come up and calculate some cryptographic key values for 'ssh', which will take a few minutes. You can then edit
/etc/hostname and change and specify the hostname of the sidearm.
Note that the procedure for making this filesystem is documented in a script file (clonesa.sh) in the moosmc/scripts directory.
Copy this file and edit it if you intend to use it. This file assumes that you have a working sidearm root filesystem, clones it,
and then creates the JFFS2 image file using mkfs.jffs2. You may have to install the jffs2 utilities on your SideARM if they are
not already installed.