Firmware upgrade on ARM Versatile Express A9 and TC2

1. Register an ARM account if you don't have one:

https://silver.arm.com

2. Download "Versatile Express DVD version 5.0" to a Microsoft Windows machine:

https://silver.arm.com/download/download.tm?pv=1335158

3. Decompress the ZIP file "VE050-BN-00000-r5p0-00rel0.zip", then a file named "Versatile_Express_5_0.msi" should show up.

4. On a Microsoft Windows machine, double click to install it. The installation will extract all files to "Program Files" folder if it wasn't changed. After the installation finished, create a package for all the files it released, then copy this package to a USB flash disk. Now this Windows machine has finished its job.

5. Power on the board, with a Android or ubuntu image to let it enter the system.

6. Find out a specific USB port on back panel of the board, in the middle of a red and a black round button, but below it. After the board booted to system, use a USB cable connect from that port to your Linux PC, then the storage of the board will be mounted to your host machine automatically.

7. Create a back up folder on your Linux PC, copy all files in the board storage to your back up folder. This is very important!

8. Plug in USB flash disk, copy the package to local disk, decompress it, a folder named "Recovery" should be found under the path "Versatile_Express_5_0/boards".

9. Delete all files in board storage partition, then copy all files from that "Recovery" folder to it. This process will take 5 - 10 minutes.

10. If your board is TC2, then download ARM CPU Migration patch for version 5.0 from here (For CoreTile A9, jump to step 11):

https://silver.arm.com/download/download.tm?pv=1357386

Then decompress file "VE050-PA-00001-r5p0-00rel0.tgz" and copy all files in folder "CPUmigrationPatch" to the board storage partition.

11. Download additional Linaro firmware from here:

https://wiki.linaro.org/ARM/VersatileExpress?action=AttachFile&do=get&target=vemsd-armlt-20130326-001.zip

Decompress the package then copy all files in folder "vemsd-armlt-20130326-001" to the board storage partition. In step, some files in board storage will be replaced, and this is as expected.

12. Use "dd" to flash another SD card with Linux Linaro ubuntu build 446:

http://snapshots.linaro.org/raring/pre-built/vexpress/446/vexpress-raring_developer_20130829-446.img.gz

13. After SD card flashing completed, plug it out then plug it in to your Linux PC, then copy the UEFI binary file to the board storage partition (Please change XXXX to your real path, and the UEFI file name on the board should be renamed to "uefi.bin"):

$ cp /media/rootfs/usr/lib/uefi/vexpress/uefi_v2p-ca9.bin /media/XXXX/SOFTWARE/A9/uefi.bin

If your board is other type, TC2 for example, then please copy the corresponding file to the folder of your CoreTile type. If SD card flashing is done by "dd", then don't forget to copy "uefi_v2p-ca9.bin" to the SD card boot partition.

14. umount or safely remove the board storage partition. This can be done by click the USB icon in most Linux distributions. Plug out USB cable from the board, exit Minicom, plug out power cable of the board.

15. Re-launch Minicom, the speed setting should be 38400 8n1, plug in power cable of the board. It now should boot into "Cmd> ".

16. Run following commands under the "Cmd> ":

Cmd> flash

Cmd> eraseall

Cmd> exit

Cmd> reboot

"eraseall" will take 10 - 15 minutes. After "reboot" executed, the board will then apply the new firmware which you copied to its storage. There will be many log output shows up in serial console. This work will take around 10 minutes.

17. If all new firmware files have been applied successfully, then a 10 seconds count down should be started. After interrupted it, the output like this should be shown in serial console:

The default boot selection will start in   8 seconds

[1] Linaro image on SD card
        - VenHw(09831032-6FA3-4484-AF4F-0A000A8D3A82)/HD(1,MBR,0x00000000,0x3F,0x19FC0)/uImage
        - Initrd: VenHw(09831032-6FA3-4484-AF4F-0A000A8D3A82)/HD(1,MBR,0x00000000,0x3F,0x19FC0)/uInitrd
        - Arguments: console=tty0 console=ttyAMA0,38400n8 root=/dev/mmcblk0p2 rootwait ro androidboot.console=ttyAMA0 mmci.fmax=12000000
        - LoaderType: Linux kernel with ATAG support
-----------------------
Global FDT Config
        - VenHw(09831032-6FA3-4484-AF4F-0A000A8D3A82)/HD(1,MBR,0x00000000,0x3F,0x19FC0)/v2p-ca9.dtb
-----------------------
[a] Boot Manager
[b] Shell

If above information shows up, it means the UEFI upgrade has been done successfully.

18. Exit Minicom, plug out power cable of the board, eject that Android SD card, insert the SD card with Linux Linaro ubuntu build 301 image, re-launch Minicom and plug in the board power cable. If the board booted to "Cmd> " again, simply run "reboot" to trigger a normal boot. This because the settings in "config.txt" file of the board storage. You can change the value of "AUTORUN" from "FALSE" to "TRUE" if you want the board to boot directly after power on.

19. After 10 seconds count down got interrupted and boot menu shows, perform following sequences to re-configure the boot menu:

The default boot selection will start in   8 seconds

[1] Linaro image on SD card
        - VenHw(09831032-6FA3-4484-AF4F-0A000A8D3A82)/HD(1,MBR,0x00000000,0x3F,0x19FC0)/uImage
        - Initrd: VenHw(09831032-6FA3-4484-AF4F-0A000A8D3A82)/HD(1,MBR,0x00000000,0x3F,0x19FC0)/uInitrd
        - Arguments: console=tty0 console=ttyAMA0,38400n8 root=/dev/mmcblk0p2 rootwait ro androidboot.console=ttyAMA0 mmci.fmax=12000000
        - LoaderType: Linux kernel with ATAG support
-----------------------
Global FDT Config
        - VenHw(09831032-6FA3-4484-AF4F-0A000A8D3A82)/HD(1,MBR,0x00000000,0x3F,0x19FC0)/v2p-ca9.dtb
-----------------------
[a] Boot Manager
[b] Shell
Start: a

[1] Add Boot Device Entry
[2] Update Boot Device Entry
[3] Remove Boot Device Entry
[4] Update FDT path
[5] Return to main menu
Choice: 3

[1] Linaro image on SD card
        - VenHw(09831032-6FA3-4484-AF4F-0A000A8D3A82)/HD(1,MBR,0x00000000,0x3F,0x19FC0)/uImage
        - Arguments: console=tty0 console=ttyAMA0,38400n8 root=/dev/mmcblk0p2 rootwait ro androidboot.console=ttyAMA0 mmci.fmax=12000000
Delete entry: 1

[1] Add Boot Device Entry
[2] Update Boot Device Entry
[3] Remove Boot Device Entry
[4] Update FDT path
[5] Return to main menu
Choice: 1

[1] boot (51 MB)
        - VenHw(09831032-6FA3-4484-AF4F-0A000A8D3A82)/HD(1,MBR,0x00000000,0x3F,0x19FC0)
[2] VenHw(E7223039-5836-41E1-B542-D7EC736C5E59)
        - VenHw(E7223039-5836-41E1-B542-D7EC736C5E59)
[3] VenHw(02118005-9DA7-443A-92D5-781F022AEDBB)
        - VenHw(02118005-9DA7-443A-92D5-781F022AEDBB)
[4] VenHw(1F15DA3C-37FF-4070-B471-BB4AF12A724A)
        - VenHw(1F15DA3C-37FF-4070-B471-BB4AF12A724A)
[5] VenHw(CC2CBF29-1498-4CDD-8171-F8B6B41D0909)
        - VenHw(CC2CBF29-1498-4CDD-8171-F8B6B41D0909)
Select the Boot Device: 1

File path of the EFI Application or the kernel: uImage
Boot Type: [a] ATAGS, [g] Global FDT or [l] Local FDT? [a/g/l] l
Add an initrd: [y/n] y
File path of the initrd: uInitrd
Arguments to pass to the binary: console=tty0 console=ttyAMA0,38400n8 root=/dev/mmcblk0p2 rootwait ro androidboot.console=ttyAMA0 mmci.fmax=12000000
File path of the local FDT: v2p-ca9.dtb
Description for this new Entry: uImage (local FDT) on SD card

[1] Add Boot Device Entry
[2] Update Boot Device Entry
[3] Remove Boot Device Entry
[4] Update FDT path
[5] Return to main menu
Choice: 5

[1] uImage (local FDT) on SD card
        - VenHw(09831032-6FA3-4484-AF4F-0A000A8D3A82)/HD(1,MBR,0x00000000,0x3F,0x19FC0)/uImage
        - Initrd: VenHw(09831032-6FA3-4484-AF4F-0A000A8D3A82)/HD(1,MBR,0x00000000,0x3F,0x19FC0)/uInitrd
        - Arguments: console=tty0 console=ttyAMA0,38400n8 root=/dev/mmcblk0p2 rootwait ro androidboot.console=ttyAMA0 mmci.fmax=12000000
        - FDT: VenHw(09831032-6FA3-4484-AF4F-0A000A8D3A82)/HD(1,MBR,0x00000000,0x3F,0x19FC0)/v2p-ca9.dtb
        - LoaderType: Linux kernel with Local FDT
-----------------------
Global FDT Config
        - VenHw(09831032-6FA3-4484-AF4F-0A000A8D3A82)/HD(1,MBR,0x00000000,0x3F,0x19FC0)/v2p-ca9.dtb
-----------------------
[a] Boot Manager
[b] Shell
Start: 1

Then the board should boot up with local device tree support.

20. After the board booted to ubuntu system, run this command in serial console to test device tree:

# cat /proc/device-tree/model

The return message should be:

root@localhost:~# cat /proc/device-tree/model
V2P-CA9
root@localhost:~#

The boot menu configuration can be used for both Android and ubuntu, and current settings can also be saved automatically from last modification. However, sometimes the re-configuration is required if it's failed to load the kernel, especially if the board had not been used for days without power cable plugged in. On the Android side, the device tree information should look like this:

root@android:/ # cd /proc/device-tree
root@android:/proc/device-tree # ls
#address-cells
#size-cells
aliases
arm,hbi
arm,vexpress,site
cache-controller@1e00a000
chosen
clcd@10020000
compatible
cpus
dcc
interrupt-controller@1e001000
interrupt-parent
memory-controller@100e0000
memory-controller@100e1000
memory@60000000
model
name
panels
pmu
scu@1e000000
smb
timer@100e4000
timer@1e000600
watchdog@100e5000
watchdog@1e000620
root@android:/proc/device-tree #

21. There is a script which can automatic configure the boot manu. However, for the first time of firmware upgrade, manually type to input is recommended. Also, the boot menu settings now can be saved automatically from last successful modification, then it's unnecessary to configure it everytime. To use the scripts, please walk through following procedures:

$ git clone git://git.linaro.org/arm/uefi/uefi-tools.git
$ cd uefi-tools
$ git branch -a
* master
  remotes/origin/HEAD -> origin/master
  remotes/origin/add-args
  remotes/origin/boot-menu-arg
  remotes/origin/master

Be sure you're in "master" branch. Then set the user environment to your ".bashrc" file (Please replace XXXX to your real path):

$ vi ~/.bashrc
# Add ARM Versatile Express A9 UEFI Boot Support - New
export PATH=${PATH}:/XXXX/uefi-tools

If you have old script settings in your environment file, disable it by adding "# " at the beginning of the line.

Save and exit VI by type ":wq" + Enter.

$ source ~/.bashrc

Then exit current console and open a new one, run "which" command to test it:

$ which uefi-config
/XXXX/uefi-tools/uefi-config
$ which slowuart
/XXXX/uefi-tools/slowuart

Then the usage of this tool is (For CoreTile A9):

$ uefi-config -l v2p-ca9.dtb > /dev/ttyUSB0

If you're using TC2, change that dtb file to TC2's. If you got a permission error about the ttyUSB0, then change it to 777:

$ sudo chmod 777 /dev/ttyUSB0


CategoryHowTo

Platform/QA/VEFirmwareUpdate (last modified 2013-08-30 07:46:33)