When migrate to BL2_EL3 in ARM Trusted Firmware, bl2.bin should be built out of fip.bin. Otherwise, non-TF ROM failes to load bl2.bin because it doesn't recognize fip.bin format.
So copy bl2.bin to UEFI folder after ATF built.
Signed-off-by: Haojian Zhuang haojian.zhuang@linaro.org --- atf-build.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/atf-build.sh b/atf-build.sh index 65d4dbc..db741f5 100755 --- a/atf-build.sh +++ b/atf-build.sh @@ -182,9 +182,15 @@ function build_platform # Copy resulting images to UEFI image dir # if [ $VERBOSE -eq 1 ]; then - echo "Copying bl1.bin and fip.bin to "$WORKSPACE/Build/$PLATFORM_IMAGE_DIR/$BUILD_PROFILE/FV/"" + echo "Copying bl1.bin bl2.bin and fip.bin to "$WORKSPACE/Build/$PLATFORM_IMAGE_DIR/$BUILD_PROFILE/FV/"" fi - cp -a build/"$ATF_PLATFORM/$BUILD_TYPE"/{bl1,fip}.bin "$WORKSPACE/Build/$PLATFORM_IMAGE_DIR/$BUILD_PROFILE/FV/" + if [ -f build/"$ATF_PLATFORM/$BUILD_TYPE"/bl1.bin ]; then + cp -a build/"$ATF_PLATFORM/$BUILD_TYPE"/bl1.bin "$WORKSPACE/Build/$PLATFORM_IMAGE_DIR/$BUILD_PROFILE/FV/" + fi + if [ -f build/"$ATF_PLATFORM/$BUILD_TYPE"/bl2.bin ]; then + cp -a build/"$ATF_PLATFORM/$BUILD_TYPE"/bl2.bin "$WORKSPACE/Build/$PLATFORM_IMAGE_DIR/$BUILD_PROFILE/FV/" + fi + cp -a build/"$ATF_PLATFORM/$BUILD_TYPE"/fip.bin "$WORKSPACE/Build/$PLATFORM_IMAGE_DIR/$BUILD_PROFILE/FV/" else return 1 fi