diff options
author | Nathan Rossi <nathan@nathanrossi.com> | 2016-09-29 23:36:33 +1000 |
---|---|---|
committer | Nathan Rossi <nathan@nathanrossi.com> | 2016-10-11 22:36:54 +1000 |
commit | 690bd80c093fca1d12b176cd99127513f20c6c43 (patch) | |
tree | 0b76b9e1ed5fc96b7591e05f51c542ad3391e67a | |
parent | fd685adf83a998513a3a46ec72abf792c1a194bb (diff) | |
download | meta-xilinx-690bd80c093fca1d12b176cd99127513f20c6c43.tar.gz |
arm-trusted-firmware: Dynamically get entry address
Dynamically get the entry point address for the atf.ub image from the
bl31.elf based on the program headers entry point address which matches
the expected entry address (aka MEM_BASE).
Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
-rw-r--r-- | recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bb | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bb b/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bb index f384f5bc..8962429b 100644 --- a/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bb +++ b/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bb | |||
@@ -43,10 +43,17 @@ do_install() { | |||
43 | : | 43 | : |
44 | } | 44 | } |
45 | 45 | ||
46 | OUTPUT_DIR = "${S}/build/${PLATFORM}/release" | ||
47 | |||
46 | do_deploy() { | 48 | do_deploy() { |
47 | install -d ${DEPLOYDIR} | 49 | install -d ${DEPLOYDIR} |
48 | install -m 0644 ${S}/build/${PLATFORM}/release/bl31/bl31.elf ${DEPLOYDIR}/bl31-${MACHINE}.elf | 50 | install -m 0644 ${OUTPUT_DIR}/bl31/bl31.elf ${DEPLOYDIR}/bl31-${MACHINE}.elf |
49 | install -m 0644 ${S}/build/${PLATFORM}/release/bl31.bin ${DEPLOYDIR}/bl31-${MACHINE}.bin | 51 | install -m 0644 ${OUTPUT_DIR}/bl31.bin ${DEPLOYDIR}/bl31-${MACHINE}.bin |
50 | mkimage -A arm64 -O linux -T kernel -C none -a 0xfffe5000 -e 0xfffe5000 -d ${S}/build/${PLATFORM}/release/bl31.bin ${DEPLOYDIR}/atf.ub | 52 | |
53 | # Get the entry point address from the elf. | ||
54 | BL31_BASE_ADDR=$(${READELF} -h ${OUTPUT_DIR}/bl31/bl31.elf | egrep -m 1 -i "entry point.*?0x" | sed -r 's/.*?(0x.*?)/\1/g') | ||
55 | mkimage -A arm64 -O linux -T kernel -C none \ | ||
56 | -a $BL31_BASE_ADDR -e $BL31_BASE_ADDR \ | ||
57 | -d ${OUTPUT_DIR}/bl31.bin ${DEPLOYDIR}/atf.ub | ||
51 | } | 58 | } |
52 | addtask deploy before do_build after do_compile | 59 | addtask deploy before do_build after do_compile |