Difference between revisions of "CM-A510: U-Boot: Firmware Update"

From Compulab Mediawiki
Jump to: navigation, search
m (1 revision(s))
(Hard Disk)
 
(One intermediate revision by one other user not shown)
Line 15: Line 15:
 
* The U-Boot boot-loader will start and you will get a command prompt
 
* The U-Boot boot-loader will start and you will get a command prompt
 
{{Note| 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!}}
 
{{Note| 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 [[CM-A510:_U-Boot:_Firmware_Update#Network_TFTP_download|Network TFTP download]], from a [[CM-A510:_U-Boot:_Firmware_Update#USB_flash_drive|USB flash drive]] (with FAT filesystem), or from a [[CM-A510:_U-Boot:_Firmware_Update#Hard Disk|Hard disk]] (with FAT/EXT2 filesystem).
+
U-Boot firmware can be updated from a [[CM-A510:_U-Boot:_Firmware_Update#Network_TFTP_download|Network TFTP download]], from a [[CM-A510:_U-Boot:_Firmware_Update#USB_flash_drive|USB flash drive]] (with FAT/EXT2 filesystem), or from a [[CM-A510:_U-Boot:_Firmware_Update#Hard Disk|Hard disk]] (with FAT/EXT2 filesystem).
 
Either method is done from U-Boot command line.
 
Either method is done from U-Boot command line.
  
Line 22: Line 22:
 
In order to use this update method, you need:
 
In order to use this update method, you need:
 
* TFTP service/server installed on your host system
 
* TFTP service/server installed on your host system
* Firmware file should reside in the root directory of TFTP service
+
* Copy the firmware binary image {{filename|cm-a510-firmware}} from [http://compulab.co.il/products/computer-on-modules/cm-a510/#devres 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!
 
To update the U-Boot firmware via tftp download, follow the instructions precisely!
Line 35: Line 35:
 
</pre>
 
</pre>
 
* Download the firmware using the {{cmd|bubt}} command.  
 
* Download the firmware using the {{cmd|bubt}} command.  
** Type: ''bubt <firmware filename>''
+
** Type: ''bubt cm-a510-firmware''
** Type: ''y'' to override U-Boot environment with default one
+
** Type: ''N'' to preserve the existing U-Boot environment
 
<pre>
 
<pre>
CM-A510>> bubt cm-a510-firmware                   
+
CM-A510 # bubt cm-a510-firmware                   
 
Using egiga0 device
 
Using egiga0 device
 
TFTP from server 10.1.1.209; our IP address is 10.1.1.175
 
TFTP from server 10.1.1.209; our IP address is 10.1.1.175
Line 47: Line 47:
 
         ######
 
         ######
 
done
 
done
Bytes transferred = 693248 (a9400 hex)
+
Bytes transferred = 680868 (a63a4 hex)
Checking file size:             [Done]
+
Checking file size: [Done]
Override Env parameters to default? [y/N] y
+
Override Env parameters to default? [y/N] N
Unprotecting flash:            [Done]
+
Erasing 0x0 - 0xc0000: [Done]
Erasing 0xc0000 - 0xd0000:      [Done]
+
Writing image to flash: [Done]
Erasing 0x0 - 0xc0000:         [Done]
 
Writing image to flash:         [Done]
 
Protecting flash:              [Done]
 
 
</pre>
 
</pre>
  
Line 60: Line 57:
 
==== USB flash drive ====
 
==== USB flash drive ====
 
{{Note| Please, connect your flash drive directly to the base board of the module! Do not use any USB hubs or other separating equipment!}}
 
{{Note| 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 {{filename|cm-a510-firmware}} from [http://compulab.co.il/products/computer-on-modules/cm-a510/#devres 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!
 
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
 
* Start the U-Boot USB subsystem and check that your storage device is ready and contains the firmware
 
** Type: ''usb start''
 
** Type: ''usb start''
** Type: ''fatls usb 0'' to ensure you have the firmware in place
+
** Type: ''fatls/ext2ls usb 0'' to ensure you have the firmware in place
 
<pre>
 
<pre>
CM-A510>> usb start
+
CM-A510 # usb start
 
(Re)start USB...
 
(Re)start USB...
 
USB:  scanning bus for devices... 2 USB Device(s) found
 
USB:  scanning bus for devices... 2 USB Device(s) found
 
       scanning bus for storage devices... 1 Storage Device(s) found
 
       scanning bus for storage devices... 1 Storage Device(s) found
CM-A510>> fatls usb 0
+
CM-A510 # fatls usb 0
   693248   cm-a510-firmware
+
   680868   cm-a510-firmware
  
 
1 file(s), 0 dir(s)
 
1 file(s), 0 dir(s)
Line 76: Line 75:
  
 
* Load the firmware to memory
 
* Load the firmware to memory
** Type: ''fatload usb 0 200000 <firmware filename>''
+
** Type: ''fatload/ext2load usb 0 200000 cm-a510-firmware''
  
 
<pre>
 
<pre>
CM-A510>> fatload usb 0 200000 cm-a510-firmware
+
CM-A510 # fatload usb 0 200000 cm-a510-firmware
 
reading cm-a510-firmware
 
reading cm-a510-firmware
  
693248 bytes read
+
680868 bytes read
 
</pre>
 
</pre>
 
* Proceed to [[CM-A510: U-Boot: Firmware Update#Update process|Update process]] section
 
* Proceed to [[CM-A510: U-Boot: Firmware Update#Update process|Update process]] section
  
 
==== Hard Disk ====
 
==== Hard Disk ====
 +
* Copy the firmware binary image {{filename|cm-a510-firmware}} from [http://compulab.co.il/products/computer-on-modules/cm-a510/#devres 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!
 
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
 
* Start the U-Boot SATA subsystem and check that your storage device is ready and contains the firmware
Line 92: Line 93:
 
** Type: ''fatls/ext2ls ide 0:1'' to ensure you have the firmware in place
 
** Type: ''fatls/ext2ls ide 0:1'' to ensure you have the firmware in place
 
<pre>
 
<pre>
CM-A510>> ide reset
+
CM-A510 # ide reset
  
 
Reset IDE:  
 
Reset IDE:  
Line 104: Line 105:
 
             Capacity: 152627.8 MB = 149.0 GB (312581808 x 512)
 
             Capacity: 152627.8 MB = 149.0 GB (312581808 x 512)
  
CM-A510>> ext2ls ide 0:1
+
CM-A510 # ext2ls ide 0:1
   693248   cm-a510-firmware
+
   680868   cm-a510-firmware
  
 
1 file(s), 0 dir(s)
 
1 file(s), 0 dir(s)
Line 111: Line 112:
  
 
* Load the firmware to memory
 
* Load the firmware to memory
** Type: ''fatload/ext2load ide 0:1 200000 <firmware filename>''
+
** Type: ''fatload/ext2load ide 0:1 200000 cm-a510-firmware''
  
 
<pre>
 
<pre>
CM-A510>> ext2load ide 0:1 200000 cm-a510-firmware
+
CM-A510 # ext2load ide 0:1 200000 cm-a510-firmware
 
reading cm-a510-firmware
 
reading cm-a510-firmware
  
693248 bytes read
+
680868 bytes read
 
</pre>
 
</pre>
 
* Proceed to [[CM-A510: U-Boot: Firmware Update#Update process|Update process]] section
 
* Proceed to [[CM-A510: U-Boot: Firmware Update#Update process|Update process]] section
Line 123: Line 124:
 
==== Network TFTP download ====
 
==== Network TFTP download ====
 
In order to use this update method, you need:
 
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
+
* Setup a TFTP server
To update the U-Boot firmware via tftp download, follow the instructions precisely!
+
* Put the firmware binary image {{filename|cm-a510-firmware}} in the root directory of the TFTP server
* Download the firmware to module's memory
+
* Setup U-Boot networking:
** Type: ''tftp 200000 <firmware filename>''
+
: for dynamic IP configuration:
 +
<pre>
 +
# dhcp
 +
</pre>
 +
: or for static IP configuration:
 +
<pre>
 +
# setenv ipaddr <ip address>
 +
</pre>
 +
* Setup the TFTP server ip address:
 +
<pre>
 +
# setenv serverip <server ip>
 +
</pre>
 +
 
 +
* Load the firmware binary image into the memory:
 
<pre>
 
<pre>
CM-A510>> tftp 200000 cm-a510-firmware
+
CM-A510 # tftp 200000 cm-a510-firmware
 
Using egiga0 device
 
Using egiga0 device
 
TFTP from server 10.1.1.209; our IP address is 10.1.1.175
 
TFTP from server 10.1.1.209; our IP address is 10.1.1.175
Line 138: Line 152:
 
         ######
 
         ######
 
done
 
done
Bytes transferred = 693248 (a9400 hex)
+
Bytes transferred = 680868 (a63a4 hex)
 
</pre>
 
</pre>
 
* Proceed to [[CM-A510: U-Boot: Firmware Update#Update process|Update process]] section
 
* Proceed to [[CM-A510: U-Boot: Firmware Update#Update process|Update process]] section
Line 146: Line 160:
 
{{Warning| DO NOT RESET OR POWER OFF THE MODULE DURING THE UPDATE PROCESS! DOING SO MAY RESULT IN DISABLED MODULE!}}
 
{{Warning| 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
+
* Flash the firmware to on board SPI flash storage:
** Type: ''sf probe 0''
 
** Type: ''sf protect off''
 
** Type: ''sf erase 0 c0000''
 
** Type: ''sf write 200000 0 c0000''
 
 
<pre>
 
<pre>
CM-A510>> sf probe 0
+
CM-A510 # sf probe 0
SF: Got idcode ef 40 14 00 00
+
SF: Detected W25Q32BL with page size 4 kB, total 1 MB
SF: Detected W25Q32BV with page size 256, total 1048576 bytes
+
1024 KiB W25Q32BL at 0:0 is now current device
1024 KiB W25Q32BV at 0:0 is now current device
+
CM-A510 # sf erase 0 c0000
CM-A510>> sf protect off
+
CM-A510 # sf write 200000 0 c0000
CM-A510>> sf erase 0 c0000
 
CM-A510>> sf write 200000 0 c0000
 
 
</pre>
 
</pre>
 
* Now you may reset the board
 
* Now you may reset the board

Latest revision as of 13:51, 2 February 2015

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