blob: 19238f97a62ebaae46688d49491efba06eaab1f8 [file] [log] [blame]
Andrew Geissler84ad7c52020-06-27 00:00:16 -05001inherit esw deploy
2
3COMPATIBLE_MACHINE = "microblaze-pmu"
4
5ESW_COMPONENT_SRC = "/lib/sw_apps/zynqmp_pmufw/src"
6
7DEPENDS += "xilstandalone xiltimer xilfpga xilskey"
8
9do_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
15PMU_FIRMWARE_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"
16PMU_FIRMWARE_BASE_NAME[vardepsexclude] = "DATETIME"
17
18do_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
28addtask deploy before do_build after do_package
29
30FILES_${PN} = "${base_libdir}/firmware/pmufw*"