CM-A510: U-Boot: Firmware Update

From Compulab Mediawiki
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/EXT2 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
  • Copy the firmware binary image cm-a510-firmware from U-Boot package for CM-A510 to 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 cm-a510-firmware
    • Type: N to preserve the existing U-Boot environment
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 = 680868 (a63a4 hex)
Checking file size:		[Done]
Override Env parameters to default? [y/N] N
Erasing 0x0 - 0xc0000: 		[Done]
Writing image to 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!
  • Copy the firmware binary image cm-a510-firmware from U-Boot package for CM-A510 to the root directory of USB drive
  • Plug the USB storage device into the USB host connector (P11/P15) on SB-A510.

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/ext2ls 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
  680868   cm-a510-firmware

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

680868 bytes read

Hard Disk

  • Copy the firmware binary image cm-a510-firmware from U-Boot package for CM-A510 to the root directory of SATA drive
  • Connect SATA drive to the SATA connector P18 of SB-A510

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
  680868   cm-a510-firmware

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

680868 bytes read

Network TFTP download

In order to use this update method, you need:

  • Setup a TFTP server
  • Put the firmware binary image cm-a510-firmware in the root directory of the TFTP server
  • Setup U-Boot networking:
for dynamic IP configuration:
# dhcp
or for static IP configuration:
# setenv ipaddr <ip address>
  • Setup the TFTP server ip address:
# setenv serverip <server ip>
  • Load the firmware binary image into the memory:
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 = 680868 (a63a4 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 on board SPI flash storage:
CM-A510 # sf probe 0
SF: Detected W25Q32BL with page size  4 kB, total  1 MB
1024 KiB W25Q32BL at 0:0 is now current device
CM-A510 # sf erase 0 c0000
CM-A510 # sf write 200000 0 c0000
  • Now you may reset the board

See also