Andrew Geissler | 84ad7c5 | 2020-06-27 00:00:16 -0500 | [diff] [blame] | 1 | inherit esw deploy |
| 2 | |
| 3 | COMPATIBLE_MACHINE = "microblaze-pmu" |
| 4 | |
| 5 | ESW_COMPONENT_SRC = "/lib/sw_apps/zynqmp_pmufw/src" |
| 6 | |
| 7 | DEPENDS += "xilstandalone xiltimer xilfpga xilskey" |
| 8 | |
| 9 | do_install() { |
| 10 | install -d ${D}/${base_libdir}/firmware |
| 11 | # Note that we have to make the ELF executable for it to be stripped |
| 12 | install -m 0755 ${B}/pmufw* ${D}/${base_libdir}/firmware |
| 13 | } |
| 14 | |
| 15 | PMU_FIRMWARE_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" |
| 16 | PMU_FIRMWARE_BASE_NAME[vardepsexclude] = "DATETIME" |
| 17 | |
| 18 | do_deploy() { |
| 19 | |
| 20 | # We need to deploy the stripped elf, hence why not doing it from ${D} |
| 21 | install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/pmufw.elf ${DEPLOYDIR}/${PMU_FIRMWARE_BASE_NAME}.elf |
| 22 | ln -sf ${PMU_FIRMWARE_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf |
| 23 | ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/pmufw.elf ${WORKDIR}/package/${base_libdir}/firmware/pmufw.bin |
| 24 | install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/pmufw.bin ${DEPLOYDIR}/${PMU_FIRMWARE_BASE_NAME}.bin |
| 25 | ln -sf ${PMU_FIRMWARE_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin |
| 26 | } |
| 27 | |
| 28 | addtask deploy before do_build after do_package |
| 29 | |
| 30 | FILES_${PN} = "${base_libdir}/firmware/pmufw*" |