Linaro releases monthly binary images for the Versatile Express including support for A9, A5 and A15 CoreTiles.
This release includes Linaro Android Ice Cream Sandwich for Versatile Express. The image is able to boot A9 using UEFI. Sources are also made available so you can build your own images.
If you have any more questions or need further help, please let us know and we will do our best to help out. You can also subscribe to our mailing lists.
Binary Image Installation Instructions
There are two methods to install linaro builds:
- using pre-built image
- creating your own image with linaro image tools
Before installation begins, it is important that you ensure you Versatile Express board has the latest firmware and boot loader installed.
Pre-Installation Steps
This section talks about setting up your VE board boot loader, or setting up your firmware , etc. The idea is that the hardware state is as close to Linaro state as possible. You will need to configure your Versatile Express board in order to boot Linaro images.
Instructions in this document assume that you have mounted the Versatile Express motherboard as a mass storage device on your Linux desktop machine to the default location /media/VEMSD.
- With the Versatile Express connected to your PC via USB, press the black reset button, then at a serial console which is attached to the board enter:
usb_on
This should cause the PC to detect the firmware disk on the Versatile Express board as an external USB disk. On an Ubuntu PC machine this will be automatically mounted at /media/VEMSD, (assuming the disk had the label 'VEMSD').
UEFI
Linaro images use the UEFI bootloader to boot an image from an SD card. Currently, there are two sources for obtaining a UEFI bootloader binary:
- Copy it from the boot partition of a Linaro Android image
$ cp /media/boot/uefi_v2p-ca9.bin /media/VEMSD/SOFTWARE/A9/uefi.bin
- Build your own. The instructions are in the UEFI tab on this page.
However you get your binary, you will need to configure the board to tell the Versatile Express firmware that you want to boot into the UEFI binary at startup. Configuration instructions for your A9 boards are here.
Uboot
If you are using Uboot, follow these instructions:
- Copy the relevant U-Boot file from the boot partition of the Linaro disk image to the SOFTWARE directory of the firmware disk, giving it the name
uboot.bin. If the disks have been automatically mounted then, for the A9x4 CoreTile, this should be possible with:cp /media/boot/u-boot.bin /media/VEMSD/SOFTWARE/u-boot.bin
Note: For 2011.11 and 2011.12 releases only: the shipped version of U-Boot doesn't automatically boot from MMC, so use this one instead.
- We now need to add U-Boot to the list of NOR images, this varies depending on which CoreTile you have.
- For a CA9x4 CoreTile, edit
/media/VEMSD/SITE1/HBI0191B/images.txtand add an image to the end of the list with.NOR4UPDATE: AUTO ;IMAGE UPDATE:NONE/AUTO/FORCE NOR4ADDRESS: 47800000 ;Image Flash Address NOR4FILE: \SOFTWARE\u-boot.bin ;Image File Name NOR4LOAD: 0x60800000 ;Image Load Address NOR4ENTRY: 0x60800000 ;Image Entry Point
The TOTALIMAGES: line in the file will also need updating to account for this extra image and the 'NOR4' lines added may need to have a different number to '4' if that is not the next in sequence. Also note, the directory names for the CoreTiles may have a different final letter depending on its revision.
- For a CA9x4 CoreTile, edit
- To boot into Linaro image:
- Look for the name of the BOOTSCRIPT image in the file you edited in the previous step; this should be either
\SOFTWARE\booscr_l.txtor\SOFTWARE\booscr_r.txt. - Edit this bootscript file to have the line:
flash run u-boot
- Put the left DIP switch (next to the black reset button) into the DOWN position. Automatic boot can be disabled later by moving it UP.
- Look for the name of the BOOTSCRIPT image in the file you edited in the previous step; this should be either
- Now unmount the firmware disk:
umount /media/VEMS
- Reboot board with red button, should see U-Boot being flashed into NOR. If you went for automated boot, then the board should now also start U-Boot. Otherwise you will need to do this from the boot monitor by entering:
flash run u-boot
Before the U-Boot timer reaches zero interrupt it by pressing any key on your serial console, you should get a
Vexpress#prompt. - We now need to setup the U-Boot environment. As the default U-Boot configuration should be sufficient, all we need to do is make sure any environment from any previous U-Boot install is erased. This can be done from the U-Boot prompt with:
env default -f
- Place the SD card with the Linaro image into the Versatile Express then press the red reset button. If you went for the automatic boot option then U-Boot should now load and boot the Linaro image. Otherwise, you will have to enter
flash run u-bootat the boot monitor prompt.
Using pre-built image
Pre-requisites
- 4GB SD card or larger
- UEFI installed onto the Versatile Express
- Download the pre-built image from (vexpress-ics-gcc47-armlt-tracking-open.img.gz)
Installation Steps
- Insert SD card and note the assigned '/dev/sdX'
$ dmesg $ SDCARD=/dev/sdX (sdcard found from dmesg above) $ sudo dd bs=64k if=vexpress-ics-gcc47-armlt-tracking-open.img.gz of=$SDCARD
-
Boot your board
Note: Windows users may use the Image Writer for Windows
Building a custom image using pre-built components
Sometimes, you may wish to build your own custom image for a Versatile Express. Perhaps you wish to use a more recent snapshot of the hardware pack for Ubuntu or take the latest Android build. Whatever the reason, you will want to use the Linaro media tools to create a custom image.
Pre-requisites
- Install Ubuntu 12.04 64 bit or newer on your desktop PC (www.ubuntu.com)
- Get linaro image tools
- Method 1: using binary package for Ubuntu (PPA)
$ sudo add-apt-repository ppa:linaro-maintainers/tools $ sudo apt-get update $ sudo apt-get install linaro-image-tools
- Method 2: using source code
$ wget http://releases.linaro.org/12.07/components/platform/linaro-image-tools/linaro-image-tools-2012.07.tar.gz
- Method 1: using binary package for Ubuntu (PPA)
Android Installation Steps
- Get Artifacts
$ wget http://releases.linaro.org/12.07/android/images/vexpress-ics-gcc47-armlt-tracking-open/boot.tar.bz2 http://releases.linaro.org/12.07/android/images/vexpress-ics-gcc47-armlt-tracking-open/system.tar.bz2 http://releases.linaro.org/12.07/android/images/vexpress-ics-gcc47-armlt-tracking-open/userdata.tar.bz2
- Insert SD card and note the assigned
'/dev/sdX'or'/dev/mmcblk0'$ dmesg
- Create Media
$ sudo linaro-android-media-create --mmc /dev/sdX --dev vexpress --system system.tar.bz2 --boot boot.tar.bz2 --userdata userdata.tar.bz2
Now your SD card is ready. Insert and boot.
Building from Source Code
Compiling Linaro Android ICS RootFS+Kernel
The following simple steps download, install and compile a complete Linaro 12.07 ICS Android distribution
- Download and install Ubuntu 12.04 64bit installed on a PC. You can download Ubuntu from here.
- Install the following packages:
$ sudo apt-get install zip curl flex bison build-essential git-core gnupg gperf zlib1g-dev libx11-dev x11proto-core-dev \ gcc-multilib g++-multilib libc6-dev-i386 ia32-libs lib32z-dev gcc-4.5 g++-4.5 cpp-4.5 gcc-4.5-multilib g++-4.5-multilib \ uboot-mkimage uuid-dev openjdk-6-jdk ant lib32ncurses5-dev - Download the Android building script for the 12.07 release from here
- Run the script
$ chmod a+x linaro_android_build_cmds.sh $ ./linaro_android_build_cmds.sh
Installing Android ICS on your board
Insert the SD card into your Versatile Express board and reboot it.
If UEFI is already configured to boot a Linaro Android image, it will boot from the SD card. If not, follow the instructions in the section: “Configure UEFI” found in the UEFI tab on this page.
Compiling and installing your Kernel
Prerequisites
- Download and install Ubuntu 12.04 64 bit or newer (download)
- Install the following packages by typing:
$ sudo apt-get gcc-arm-linux-gnueabi curl git u-boot-tools libncurses5-dev - Create a working subdirectory
- Download the auto build script for the 12.07 release from here . The kernel config will be automatically downloaded.
- Run the build script
$ chmod a+x linaro_kernel_build_cmds.sh $ ./linaro_kernel_build_cmds.shNote: When you run
menuconfig, make sure you go toSystem Type -> Versatile Expressplatform type and make sure that both options are enabled.[*] Versatile Express Cortex-A9x4 tile [*] Device Tree support for Versatile Express platforms - Create the Device Tree blob if you don’t have one in your Linaro image (note, the A9 Core Tile boots using an ATAGS kernel):
$ scripts/dtc/dtc -I dts -O dtb -S 8192 arch/arm/boot/dts/vexpress-v2p-ca5s.dts -o v2p-ca5s.dtb $ scripts/dtc/dtc -I dts -O dtb -S 8192 arch/arm/boot/dts/vexpress-v2p-ca15-tc1.dts -o v2p-ca15-tc1.dtb
Installing your kernel
- Insert the SD card containing the Linaro disk image
- Copy the kernel onto the memory card
$ cp arch/arm/boot/uImage /media/boot/ - Eject the memory card
$ eject /media/boot - Insert the memory card into the Versatile Express board and power it on
Building UEFI Bootloader from source
Pre-requisites
- GCC Cross Compiler:
$ sudo apt-get gcc-arm-linux-gnueabi
- Miscellaneous tools
$ sudo apt-get git uuid-dev build-essential texinfo bison flex libgp3-dev libmpfr-dev
Compiling
git clone git://git.linaro.org/arm/uefi/uefi-next.git uefi-next.git cd uefi-next.git/edk2 export EDK_TOOLS_PATH=`pwd`/BaseTools . edksetup.sh `pwd`/BaseTools/ make -C $EDK_TOOLS_PATH build -a ARM -p ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-CTA9x4.dsc -t ARMLINUXGCC -D EDK2_ARMVE_STANDALONE=1 -D EDK2_ARMVE_SINGLE_BINARY build -a ARM -p ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-CTA5s.dsc -t ARMLINUXGCC -D EDK2_ARMVE_STANDALONE=1 build -a ARM -p ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-CTA15x2.dsc -t ARMLINUXGCC -D EDK2_ARMVE_STANDALONE=1 build -a ARM -p ArmPlatformPkg/ArmTuscanPkg/ArmTuscan.dsc -t ARMLINUXGCC -D EDK2_ARMVE_STANDALONE=1 -D EDK2_ARMVE_SINGLE_BINARY
This will produce binaries thus:
./Build/ArmVExpress-CTA9x4/DEBUG_ARMLINUXGCC/FV/ARMVEXPRESS_EFI.fd ./Build/ArmVExpress-CTA5s/DEBUG_ARMLINUXGCC/FV/ARMVEXPRESS_EFI.fd ./Build/ArmVExpress-CTA15x2/DEBUG_ARMLINUXGCC/FV/ARMVEXPRESS_EFI.fd ./Build/ArmTuscan/DEBUG_ARMLINUXGCC/FV/TUSCAN_EFI.fd
Versatile Express with A9 CoreTile
Installing UEFI on your A9 board
Copy the binary for your platform to the motherboard’s mass storage device. These examples assume that the Versatile Express board is mounted to /media/VEMSD on your Ubuntu desktop machine:
$cp ./Build/ArmVExpress-CTA9x4/DEBUG_ARMLINUXGCC/FV/ARMVEXPRESS_EFI.fd /media/VEMSD/SOFTWARE/A9/uefi.bin
Then, you add the UEFI binary into images.txt. Here is an example /media/VEMSD/SITE1/HBI0191B/images.txt:
TITLE: Versatile Express Images Configuration File [IMAGES] TOTALIMAGES: 3 ;Number of Images (Max : 32) NOR0UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE NOR0ADDRESS: BOOT ;Image Flash Address NOR0FILE: \SOFTWARE\bm_v500l.axf ;Image File Name NOR1UPDATE: AUTO NOR1ADDRESS: 40000000 NOR1NAME: BOOTSCRIPT NOR1FILE: \SOFTWARE\bootscr.txt NOR2UPDATE: AUTO NOR2ADDRESS: 44000000 NOR2FILE: \SOFTWARE\A9\uefi.bin NOR2LOAD: 44000000 NOR2ENTRY: 44000000
Next you need to modify
board.txt
to tell the board to swap the NOR banks and boot from UEFI instead of the ARM Boot Monitor.
An example board.txt:
BOARD: HBI0191 TITLE: V2P-CA9 Configuration File ; Do not place comments within the [SECTION] blocks. [DCCS] TOTALDCCS: 1 ;(1) Total Number of DCCS - Do not change this value M0FILE: dbb_v112.ebf ;DCC0 Filename M0MODE: MICRO ;DCC0 Programming Mode [FPGAS] TOTALFPGAS: 0 ;(0) - Do not change this value F0FILE: NONE ;FPGA0 Filename F0MODE: NONE ;FPGA0 Programming Mode [TAPS] TOTALTAPS: 6 ;(6) - Do not change this value T0NAME: STM32TMC ;TAP0 Device Name T0FILE: NONE ;TAP0 Filename T0MODE: NONE ;TAP0 Programming Mode T1NAME: STM32CM3 ;TAP1 Device Name T1FILE: NONE ;TAP1 Filename T1MODE: NONE ;TAP1 Programming Mode T2NAME: ispCLOCK5610V ;TAP2 Device Name T2FILE: ispm_1v.svf ;TAP2 Filename T2MODE: PLD ;TAP2 Programming Mode T3NAME: ispCLOCK5610V ;TAP3 Device Name T3FILE: isps_1v.svf ;TAP3 Filename T3MODE: PLD ;TAP3 Programming Mode T4NAME: XC2C64A ;TAP4 Device Name T4FILE: smbmux.svf ;TAP4 Filename T4MODE: PLD ;TAP4 Programming Mode T5NAME: XC2C64A ;TAP5 Device Name T5FILE: vconvb.svf ;TAP5 Filename T5MODE: PLD ;TAP5 Programming Mode [OSCCLKS] TOTALOSCCLKS: 3 ;Total Number of OSCCLKS (3) - Do not change this value OSC0: 40.0 ;OSC0 Frequency in MHz (EXTSAXICLK) OSC1: 23.75 ;OSC1 Frequency in MHz (CLCDCLK) OSC2: 66.67 ;OSC2 Frequency in MHz (TCREFCLK) [SCC REGISTERS] TOTALSCCS: 3 ;Total Number of SCC registers defined SCC: 0x000 0xBB8A802A ;CFGRW0 Power up settings - MCLK, AXICLKs, FCLK PLL configuration SCC: 0x004 0x10001F09 ;CFGRW1 Power up settings - Remap bits, A9 static signals, MCLK PLL SCC: 0x008 0x00000000 ;CFGRW2 Power up settings - Misc, A9 static signals ; Alternative Clock options ; ; To use these values, copy the SCC: line and replace the lines in the [SCC REGISTERS] section above. ; Do not place comments between the [SCC REGISTERS] and the last SCC: line. ; Slow : FCLK = 80, FAXI = 80, SAXI = 40, MCLK = 160 ; @ OSC2 = 40 MHz ;SCC: 0x000 0xCFBF8A3C ;SCC: 0x004 0x00001F09 ; Normal : FCLK = 400, FAXI=200, SAXI = 50, MCLK = 266 ; @ OSC2 = 66.67 MHz ;SCC: 0x000 0xBB8A802A ;SCC: 0x004 0x00001F09
The line in bold above is the only line that needs changing from the default board.txt file.
Original entry:
SCC: 0x004 0x00001F09
New entry:
SCC: 0x004 0x10001F09
Eject the motherboard mass storage device:
$ eject /media/VEMSD
Reboot your board and it will boot into UEFI.
Configuring UEFI for Versatile Express A9
If your board has not been configured for UEFI before, you will need to create a boot config. Interrupt boot at the countdown to enter the Boot Manager menu:
The default boot selection will start in 10 seconds [1] NorFlash [2] EBL [3] Boot Manager Start: 3 [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] NorFlash 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) [2] VenHw(E7223039-5836-41E1-B542-D7EC736C5E59) [3] VenHw(02118005-9DA7-443A-92D5-781F022AEDBB) [4] VenHw(1F15DA3C-37FF-4070-B471-BB4AF12A724A) [5] VenHw(CC2CBF29-1498-4CDD-8171-F8B6B41D0909) Select the Boot Device: 1 File path of the EFI Application or the kernel: uImage Has FDT support? [y/n]n Add an initrd: [y/n] y File path of the initrd: uInitrd Arguments to pass to the binary: console=tty0 console=ttyAMA0,38400n8 rootwait ro init=/init androidboot.console=ttyAMA0 mmci.fmax=4000000 Description for this new Entry: Android on MMC [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] Android on MMC [2] EBL [3] Boot Manager Start: 1
User input is shown in bold above; the blue text indicates which option is being chosen by the user’s input.
The command line options shown above are suitable for booting Android on an A9 Core Tile. If you wish to boot Ubuntu, then use the following command line:
console=ttyAMA0,38400n8 root=/dev/mmcblk0p2 rootwait ro mem=1024M ip=dhcp clcd=xvga mmci.fmax=4000000
Accessing Source Code
Linaro Android ICS Source Code
When you run the linaro_android_build_cmds.sh , it will download the entire source code for both Android ICS and the kernel.
The pinned and source manifests can be found here
Kernel Source Code
If you wish to obtain the exact source code used to generate the Linaro 12.06 cycle, you can use the linaro_kernel_build_cmds.sh to download the source and build it.
It is advised that you update your Versatile Express board firmware to the latest version. To update your VE board firmware, please follow the instructions below.
This updated binary for the IOFPGA enables the MMC device to be run at the full 12MHz clock speed on all CoreTiles and is also required for its correct functioning with the power management features on TC2.
These instructions assume that you have the Versatile Express motherboard's mass storage device mounted to /media/VEMSD.
- Download IOFPGA-MMC-fix.tar.gz from here
This file containts two files.
io_xx_l.bitandio_xx_r.bit - Untar the file
$ cd /media/VEMSD/MB/HBI0190D/ $ tar zxvf /IOFPGA-MMC-fix.tar.gz
- Update
board.txtto use the new filesEdit the file
/media/VEMSD/MB/HBI0190D/board.txt. EntriesMBIOFPGAandMBIOFPGA1need to be configured to useio_xx_l.bitandMBIOFPGA3needs to be configured to useio_xx_r.bit.Here is an example of the FPGAS section of the file with the original entries commented out:
[FPGAS] ;MBIOFPGA: io_b107.bit ;REQUIRED TO ALLOW UPDATE FROM VECD v1.x MBIOFPGA: io_xx_l.bit ;REQUIRED TO ALLOW UPDATE FROM VECD v1.x ;MBIOFPGA1: io_b107.bit ;MB LEGACY IOFPGA IMAGE FOR SITE 1 BOOT MASTER MBIOFPGA1: io_xx_l.bit ;MB LEGACY IOFPGA IMAGE FOR SITE 1 BOOT MASTER MBIOFPGA2: io_b207.bit ;MB LEGACY IOFPGA IMAGE FOR SITE 2 BOOT MASTER ;MBIOFPGA3: io_b115.bit ;MB A SERIES IOFPGA IMAGE FOR SITE 1 BOOT MASTER MBIOFPGA3: io_xx_r.bit ;MB A SERIES IOFPGA IMAGE FOR SITE 1 BOOT MASTER MBIOFPGA4: io_b215.bit ;MB A SERIES IOFPGA IMAGE FOR SITE 2 BOOT MASTER MBMUXFPGA: mux_b1c.bit ;MB MUXFPGA IMAGE