On Mon, Apr 28, 2014 at 8:46 AM, Ryan Harkin <ryan.harkin@linaro.org> wrote:
Booting UEFI for our 64 bit models/platforms has become more complex due to upstream changes.

You can build UEFI as per usual, however, before you can boot the .fd file, you will have to wrap it into a Firmware Image Package (aka FIP).

You will not be able to mix "old " and "new" versions of UEFI and TF.


--------------------------------------------------------------------------------
- Get the UEFI build tools
--------------------------------------------------------------------------------
PATH=$PATH:`pwd`/uefi-tools

--------------------------------------------------------------------------------
- Build UEFI for the FVP models
--------------------------------------------------------------------------------
git clone git://git.linaro.org/uefi/linaro-edk2.git
cd linaro-edk2
uefi-build fvp_minimal

This will give you a .fd file, such as:
./Build/ArmVExpress-FVP-AArch64/RELEASE_GCC48/FV/FVP_AARCH64_EFI.fd

You will then need to point the "BL33" environment variable to this file, eg:

export BL33=`pwd`/Build/ArmVExpress-FVP-AArch64/RELEASE_GCC48/FV/FVP_AARCH64_EFI.fd


--------------------------------------------------------------------------------
- Build the Trusted Firmware for FVP models
--------------------------------------------------------------------------------
git clone git://git.linaro.org/arm/arm-trusted-firmware.git
CROSS_COMPILE=aarch64-linux-gnu- make PLAT=fvp all fip

You will then have two important files:
./build/fvp/release/bl1.bin
./build/fvp/release/fip.bin


--------------------------------------------------------------------------------
- Boot the model
--------------------------------------------------------------------------------
Pass the bl1.bin and fip.bin files as parameters to the model.  Eg, this is how I booted my model:

/linaro/fastmodels/FVP_Base_AEMv8A-AEMv8A/models/Linux64_GCC-4.1/FVP_Base_AEMv8A-AEMv8A -C pctl.startup=0.0.0.0 -C bp.secure_memory=0 -C cluster0.NUM_CORES=1 -C cluster1.NUM_CORES=1 -C cache_state_modelled=0 -C bp.pl011_uart0.untimed_fifos=1 -C bp.secureflashloader.fname=./build/fvp/release/bl1.bin -C bp.flashloader0.fname=./build/fvp/release/fip.bin -C bp.virtioblockdevice.image_path=/linaro/releases/oe/14.04/fastmodel/sd.img -C bp.hostbridge.interfaceName=ARMryan -C bp.smsc_91c111.enabled=true -C bp.smsc_91c111.mac_address=00:02:f7:ef:67:e6


Of course, your installation path to the models and the location of your disk image will vary.

Hope this all helps,

Regards,
Ryan.


_______________________________________________
Linaro-uefi mailing list
Linaro-uefi@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-uefi



​Hi Ryan,

   This worked.  I though I had been running older trusted firmware that did not require the FIP packaging.

I had to use the bl1.bin that I built to get it to work - the bl1.bin binary I had downloaded did not work. Will I always
need to rebuild the bl1.bin when the EFI image changes?  I'm guess no, and that my problems were due to a  mismatch
of the bl1.bin and FIP packaging.

Thanks,
Roy