Adriana Kobylak | 4e70c3c | 2019-09-09 15:49:09 -0500 | [diff] [blame] | 1 | SUMMARY = "OpenPOWER Host Firmware Image" |
| 2 | DESCRIPTION = "Adds the OpenPOWER Host Firmware image to the BMC image" |
| 3 | PR = "r1" |
| 4 | |
| 5 | inherit allarch |
| 6 | |
| 7 | HOST_FW_LICENSE ?= "Apache-2.0" |
| 8 | HOST_FW_LIC_FILES_CHKSUM ?= "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" |
| 9 | HOST_FW_SRC_URI ?= "" |
| 10 | |
| 11 | LICENSE = "${HOST_FW_LICENSE}" |
| 12 | LIC_FILES_CHKSUM = "${HOST_FW_LIC_FILES_CHKSUM}" |
| 13 | SRC_URI = "${HOST_FW_SRC_URI}" |
| 14 | |
| 15 | DEPENDS = "squashfs-tools-native" |
| 16 | |
| 17 | S = "${WORKDIR}" |
| 18 | B = "${WORKDIR}/build" |
| 19 | do_compile[cleandirs] = "${B}" |
| 20 | |
| 21 | do_compile() { |
| 22 | if [ -n "${HOST_FW_SRC_URI}" ]; then |
| 23 | unsquashfs -d ${B}/squashfs-root ${S}/pnor.xz.squashfs |
| 24 | fi |
| 25 | } |
| 26 | |
| 27 | do_install() { |
| 28 | install -d ${D}${datadir}/${BPN} |
| 29 | |
| 30 | if [ -n "${HOST_FW_SRC_URI}" ]; then |
| 31 | install -m 0440 ${B}/squashfs-root/* ${D}${datadir}/${BPN} |
| 32 | fi |
| 33 | } |