Andrew Geissler | 84ad7c5 | 2020-06-27 00:00:16 -0500 | [diff] [blame] | 1 | inherit esw deploy |
| 2 | |
| 3 | COMPATIBLE_MACHINE = ".*-zynqmp" |
| 4 | |
| 5 | ESW_COMPONENT_SRC = "/lib/sw_apps/zynqmp_fsbl/src" |
| 6 | |
| 7 | DEPENDS += "xilstandalone xiltimer xilffs xilsecure xilpm device-tree" |
| 8 | |
| 9 | PSU_INIT = "${RECIPE_SYSROOT}/${includedir}/devicetree/psu_init*" |
| 10 | |
| 11 | do_configure_prepend() { |
| 12 | # Copy psu_init* files to fsbl source code |
| 13 | cp ${PSU_INIT} ${S}/${ESW_COMPONENT_SRC} |
| 14 | } |
| 15 | |
| 16 | do_install() { |
| 17 | install -d ${D}/${base_libdir}/firmware |
| 18 | # Note that we have to make the ELF executable for it to be stripped |
| 19 | install -m 0755 ${B}/zynqmp_fsbl* ${D}/${base_libdir}/firmware |
| 20 | } |
| 21 | |
| 22 | ZYNQMP_FSBL_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" |
| 23 | ZYNQMP_FSBL_BASE_NAME[vardepsexclude] = "DATETIME" |
| 24 | |
| 25 | do_deploy() { |
| 26 | |
| 27 | # We need to deploy the stripped elf, hence why not doing it from ${D} |
| 28 | install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/zynqmp_fsbl.elf ${DEPLOYDIR}/${ZYNQMP_FSBL_BASE_NAME}.elf |
| 29 | ln -sf ${ZYNQMP_FSBL_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf |
| 30 | ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/zynqmp_fsbl.elf ${WORKDIR}/package/${base_libdir}/firmware/zynqmp_fsbl.bin |
| 31 | install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/zynqmp_fsbl.bin ${DEPLOYDIR}/${ZYNQMP_FSBL_BASE_NAME}.bin |
| 32 | ln -sf ${ZYNQMP_FSBL_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin |
| 33 | } |
| 34 | |
| 35 | addtask deploy before do_build after do_package |
| 36 | |
| 37 | CFLAGS_append_aarch64 = " -DARMA53_64" |
| 38 | CFLAGS_append_armrm = " -DARMR5" |
| 39 | |
| 40 | FILES_${PN} = "${base_libdir}/firmware/zynqmp_fsbl*" |