On Tue, May 20, 2014 at 12:46 AM, Ryan Harkin ryan.harkin@linaro.orgwrote:
On 19 May 2014 23:42, Roy Franz roy.franz@linaro.org wrote:
On Mon, Apr 28, 2014 at 8:46 AM, Ryan Harkin ryan.harkin@linaro.orgwrote:
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
git clone git.linaro.org/arm/uefi/uefi-tools.git PATH=$PATH:`pwd`/uefi-tools
You can also download a pre-built binary from a release or snapshot build place such as:
http://releases.linaro.org/14.04/components/kernel/uefi-linaro http://snapshots.linaro.org/components/kernel/linaro-edk2/latest
http://snapshots.linaro.org/components/kernel/linaro-edk2-release-prep/lates... http://snapshots.linaro.org/components/kernel/fvp-pre-boot/latest
- 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.
You don't need to rebuild BL1 each time. The problem is not that tight. Basically, if you have an old BL1 that loads UEFI directly, you will never be able to load a FIP. And vice versa. If you have a new BL1 that loads a FIP, you will never be able to load UEFI directly.
So, if you have the 1st ever "FIP enabled" BL1 binary, you should be able to build a FIP today, with a recent UEFI binary, and it should work fine.
You cannot put and old UEFI binary into the FIP. And you cannot put a recent UEFI binary into NOR.
old UEFI binary == a binary built to be run from address 0x0 recent UEFI binary == a binary build to be copied to RAM by a loader and run from there
Ahhh... This is the part I was missing. I was using the old BL1, so I thought I could still use new UEFI builds directly. This makes sense now.
old BL1 == one that loads BL2 and BL31 from semihosting and UEFI from NOR new BL1 == one that loads BL2, BL31 and UEFI from the FIP
Hope that helps.
Thanks, Roy