CM-A510: U-Boot: Firmware Update

From Compulab Mediawiki
Revision as of 11:35, 3 November 2010 by Dimitry (talk | contribs) (1 revision(s))
Jump to: navigation, search

CM-A510 Firmware Update process

Preliminary

Some basic steps are needed to be taken in order to update the CM-A510 firmware successfully:

  • Make sure to power off the CM-A510 board
  • Connect the host PC to the CM-A510 via the serial cable supplied with the CM-A510 evaluation kit.
  • Start terminal console application on your host system and configure the following:
    • Set the serial port to the COM port to which the serial cable is connected.
    • Set baud rate to 115200 bps
    • 8 bit per frame
    • 1 stop bit
    • no parity
    • no flow control
  • Turn on the CM-A510 system
  • The U-Boot boot-loader will start and you will get a command prompt
Admolition note.png If you have an operating system installed or U-Boot environment configured for auto boot, you will have to stop the auto boot sequence by pressing any key in your terminal application during the start of the boot process!

U-Boot firmware can be updated from a Network TFTP download, from a USB flash drive (with FAT filesystem), or from a Hard disk (with FAT/EXT2 filesystem). Either method is done from U-Boot command line.

Preferred U-Boot Update Option

Admolition warning.png DO NOT RESET OR POWER OFF THE MODULE DURING THE UPDATE PROCESS! DOING SO MAY RESULT IN DISABLED MODULE!

In order to use this update method, you need:

  • TFTP service/server installed on your host system
  • Firmware file should reside in the root directory of TFTP service

To update the U-Boot firmware via tftp download, follow the instructions precisely!

  • You can use U-boot dhcp command to obtain IP address or manually set ipaddr environment variable:
> setenv ipaddr <CM-A510 ip address>
  • Set serverip environment variable and save the new environment to SPI flash:
> setenv serverip <host ip address>
> saveenv
  • Download the firmware using the bubt command.
    • Type: bubt <firmware filename>
    • Type: y to override U-Boot environment with default one
CM-A510>> bubt cm-a510-firmware                   
Using egiga0 device
TFTP from server 10.1.1.209; our IP address is 10.1.1.175
Filename 'cm-a510-firmware'.
Load address: 0x2000000
Loading: #################################################################
         #################################################################
         ######
done
Bytes transferred = 693248 (a9400 hex)
Checking file size:             [Done]
Override Env parameters to default? [y/N] y
Unprotecting flash:             [Done]
Erasing 0xc0000 - 0xd0000:      [Done]
Erasing 0x0 - 0xc0000:          [Done]
Writing image to flash:         [Done]
Protecting flash:               [Done]

Other U-Boot Update Options

USB flash drive

Admolition note.png Please, connect your flash drive directly to the base board of the module! Do not use any USB hubs or other separating equipment!

To update the U-Boot firmware via USB flash drive, follow the instructions precisely!

  • Start the U-Boot USB subsystem and check that your storage device is ready and contains the firmware
    • Type: usb start
    • Type: fatls usb 0 to ensure you have the firmware in place
CM-A510>> usb start
(Re)start USB...
USB:   scanning bus for devices... 2 USB Device(s) found
       scanning bus for storage devices... 1 Storage Device(s) found
CM-A510>> fatls usb 0
  693248   cm-a510-firmware

1 file(s), 0 dir(s)
  • Load the firmware to memory
    • Type: fatload usb 0 200000 <firmware filename>
CM-A510>> fatload usb 0 200000 cm-a510-firmware
reading cm-a510-firmware

693248 bytes read

Hard Disk

To update the U-Boot firmware via Hard Disk, follow the instructions precisely!

  • Start the U-Boot SATA subsystem and check that your storage device is ready and contains the firmware
    • Type: ide reset
    • Type: fatls/ext2ls ide 0:1 to ensure you have the firmware in place
CM-A510>> ide reset

Reset IDE: 
Marvell Serial ATA Adapter
Integrated Sata device found
[0 0 0]: Enable DMA mode (6)
  Device 0 @ 0 0:
Model: Hitachi HTS543216L9A300                  Firm: FB2OC40C Ser#: 090902FB22005CFBBP0A
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 152627.8 MB = 149.0 GB (312581808 x 512)

CM-A510>> ext2ls ide 0:1
  693248   cm-a510-firmware

1 file(s), 0 dir(s)
  • Load the firmware to memory
    • Type: fatload/ext2load ide 0:1 200000 <firmware filename>
CM-A510>> ext2load ide 0:1 200000 cm-a510-firmware
reading cm-a510-firmware

693248 bytes read

Network TFTP download

In order to use this update method, you need:

  • TFTP service/server installed on your host system
  • Firmware file should reside in the root directory of TFTP service

To update the U-Boot firmware via tftp download, follow the instructions precisely!

  • Download the firmware to module's memory
    • Type: tftp 200000 <firmware filename>
CM-A510>> tftp 200000 cm-a510-firmware
Using egiga0 device
TFTP from server 10.1.1.209; our IP address is 10.1.1.175
Filename 'cm-a510-firmware'.
Load address: 0x200000
Loading: #################################################################
         #################################################################
         ######
done
Bytes transferred = 693248 (a9400 hex)
Admolition note.png If you get the "could not establish link" message, check that your ethernet plugs are in place and try again.

Update process

Admolition warning.png DO NOT RESET OR POWER OFF THE MODULE DURING THE UPDATE PROCESS! DOING SO MAY RESULT IN DISABLED MODULE!
  • Flash the firmware to onboard NAND storage
    • Type: sf probe 0
    • Type: sf protect off
    • Type: sf erase 0 c0000
    • Type: sf write 200000 0 c0000
CM-A510>> sf probe 0
SF: Got idcode ef 40 14 00 00
SF: Detected W25Q32BV with page size 256, total 1048576 bytes
1024 KiB W25Q32BV at 0:0 is now current device
CM-A510>> sf protect off
CM-A510>> sf erase 0 c0000
CM-A510>> sf write 200000 0 c0000
  • Now you may reset the board

See also