Firmware

From Spykee Developer Wiki

Jump to: navigation, search

The flash procedure is standard. You can use the software provided with Spykee and send the file from there. However, some firmware comes with instructions and are contained in Archives, so please read instructions of each firmware before doing anything. Please note that we do NOT guarantee that these firmwares work and we cannot be held responsible for bricking your robot.



Contents

Firmware downloads and descriptions

Telnet-Enabled Firmware
Lustinblack
Telnet-Enabled with NFS and unionfs Firmware
ioctl
Telnet, NFS, UnionFs and USB Mount Firmware v1.6.66
Lustinblack
URBI Users - Use this firmware to come back to the 1.666 Firmware. This firmware only works on URBI Spykee. Telnet, NFS, UnionFs and USB Mount Firmware v3.6.66
Lustinblack

Backup rootfs and mtdblocks

In case something goes wrong, it's always a good thing to backup your mtdblocks. Log in the robot using telnet.

Get /dev/mtdblock1 :

dd -if=/dev/mtdblock1 -of=/tmp/mtdblock1

Send /tmp/mtdblock1 to your pc using sz or another tool.

  • You can mount the mtdblock1 on your Linux machine if you want to, it's the rootfs of your system.
mount -t squashfs -o loop mtdblock1 /mnt/spykee

Do the same with all the mtdblocks in /dev (ls /dev/mtdblock*)


Bad Firmware Flash Recovery Procedure

Login on the J2 serial connector, reboot spykee and press a key to go in U-Boot to fix the mtdblocks.

Load your mtdblock1 (rootfs) in RAM using ymodem protocol. If you did not back up your rootfs, download the telnet enabled firmware above, rename the extension to tar and extract the rootfs in the firmware directory.

Run the following command, then in hyperterminal, you'll go to Transfer -> Send File using YModem (Select your rootfs file):

Command in UBoot : loady
  • This will take a while, flash image is > 2megabytes, @ 38400 bps it's long

After transfer, the rootfs will be in RAM at address 0x00400000.

Now, Erase the ROOTFS flash section in flash, this is needed to fill the flash with FF, otherwise it cannot be written to, it is VERY IMPORTANT to not make any mistake here, so be very careful :

Command in UBoot : era FFCE0000 +002B0000

Copy your original mtdblock1 (the one you've just uploaded in ymodem) from 0x00400000 (address in RAM that loady used to download your mtdblock1) to 0xFFCE0000 (Again, DON'T MAKE ANY MISTAKE AT ALL) :

Command in UBoot : cp.b 400000 FFCE0000 002B0000
Command in UBoot : reset

If all went well, your robot will boot and everything will be fine.

Make your own rootfs

Using mksquashfs version 3.2, you can create your own rootfs and then flash it by making a firmware binary and using the spykee console software, OR, you can write it directly in flash when telneting spykee!

First of all, when you create your rootfs, you will soon see that the size of the rootfs squash file is NOT the same as the original rootfs one (mtdblock1)..

This step is important, else, you'll need to recover from a bad flash if you don't create your rootfs correctly!

Using a hex editor, compare the original rootfs with your new rootfs. In my case, I had to fill up my new rootfs with the data at the end of the original rootfs. Suppose your new rootfs is 2,469,888 bytes and the original rootfs is 2,818,048 bytes, you'll have to take the 348,160 bytes of data missing from your new rootfs from the original file.

Here is a command that will copy the needed Data from your Source Rootfs into your Destination Rootfs:

dd if=SRCrootfs of=DSTrootfs conv=notrunc skip=`stat -c %s DSTrootfs` oflag=append bs=1 count=`stat -c %s SRCrootfs`

Now you can send this DSTrootfs into spykee and flash it using :

flashcp /tmp/DSTrootfs /dev/mtd1
reboot 

Hopefully, your robot will reboot correctly and your new rootfs in place!

Enjoy!

Personal tools
donation
Google AdSense