1HOMEPAGE = "http://github.com/openbmc/phosphor-ipmi-flash"
2SUMMARY = "Phosphor OEM IPMI In-band Firmware Update over BLOB"
3DESCRIPTION = "This package handles a series of OEM IPMI commands that implement the firmware update handler over the BLOB protocol."
4PR = "r1"
5PV = "1.0+git${SRCPV}"
6LICENSE = "Apache-2.0"
7LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
8
9inherit autotools pkgconfig
10inherit obmc-phosphor-ipmiprovider-symlink
11inherit systemd
12
13DEPENDS += "autoconf-archive-native"
14DEPENDS += "phosphor-ipmi-blobs"
15DEPENDS += "phosphor-logging"
16DEPENDS += "sdbusplus"
17DEPENDS += "systemd"
18DEPENDS += "ipmi-blob-tool"
19DEPENDS += "pciutils"
20DEPENDS += "function2"
21
22PACKAGECONFIG ?= "cleanup-delete"
23PACKAGECONFIG[cleanup-delete] = "--enable-cleanup-delete, --disable-cleanup-delete"
24# If using static-layout, reboot-update is a good option to handle updating.
25# To be able to track the update status, update-status option can be used.
26# Note that both reboot-update and update-status cannot be enabled at the same time.
27PACKAGECONFIG[reboot-update] = "--enable-reboot-update, --disable-reboot-update"
28PACKAGECONFIG[update-status] = "--enable-update-status, --disable-update-status"
29
30# Default options for supporting various flash types:
31PACKAGECONFIG[static-bmc] = "--enable-static-layout, --disable-static-layout"
32PACKAGECONFIG[ubitar-bmc] = "--enable-tarball-ubi, --disable-tarball-ubi"
33PACKAGECONFIG[host-bios] = "--enable-host-bios, --disable-host-bios"
34
35# Hardware options to enable transmitting the data from the host.
36PACKAGECONFIG[aspeed-p2a] = "--enable-aspeed-p2a, --disable-aspeed-p2a"
37PACKAGECONFIG[aspeed-lpc] = "--enable-aspeed-lpc, --disable-aspeed-lpc"
38PACKAGECONFIG[nuvoton-lpc] = "--enable-nuvoton-lpc, --disable-nuvoton-lpc"
39PACKAGECONFIG[nuvoton-p2a-vga] = "--enable-nuvoton-p2a-vga, --disable-nuvoton-p2a-vga"
40PACKAGECONFIG[nuvoton-p2a-mbox] = "--enable-nuvoton-p2a-mbox, --disable-nuvoton-p2a-mbox"
41PACKAGECONFIG[net-bridge] = "--enable-net-bridge, --disable-net-bridge"
42
43EXTRA_OECONF = "--disable-tests --disable-build-host-tool"
44
45# Set this variable in your recipe to set it instead of using MAPPED_ADDRESS directly.
46IPMI_FLASH_BMC_ADDRESS ?= "0"
47EXTRA_OECONF_append = " MAPPED_ADDRESS=${IPMI_FLASH_BMC_ADDRESS}"
48
49S = "${WORKDIR}/git"
50SRC_URI = "git://github.com/openbmc/phosphor-ipmi-flash"
51SRCREV = "a3f65698000d366b57d2916eae67518f89c1298b"
52
53SYSTEMD_PACKAGES = "${PN}"
54SYSTEMD_SERVICE_${PN} += "phosphor-ipmi-flash-bmc-prepare.target \
55 phosphor-ipmi-flash-bmc-verify.target \
56 phosphor-ipmi-flash-bmc-update.target"
57
58# If they enabled host-bios, add those three extra targets.
59HOST_BIOS_TARGETS = "phosphor-ipmi-flash-bios-prepare.target \
60 phosphor-ipmi-flash-bios-verify.target \
61 phosphor-ipmi-flash-bios-update.target"
62
63SYSTEMD_SERVICE_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'host-bios', '${HOST_BIOS_TARGETS}', '', d)}"
64
65FILES_${PN}_append = " ${libdir}/ipmid-providers/lib*${SOLIBS}"
66FILES_${PN}_append = " ${libdir}/blob-ipmid/lib*${SOLIBS}"
67FILES_${PN}-dev_append = " ${libdir}/ipmid-providers/lib*${SOLIBSDEV} ${libdir}/ipmid-providers/*.la"
68FILES_${PN}_append = " ${libdir}/tmpfiles.d"
69
70BLOBIPMI_PROVIDER_LIBRARY += "libfirmwareblob.so"
71BLOBIPMI_PROVIDER_LIBRARY += "libversionblob.so"
72BLOBIPMI_PROVIDER_LIBRARY += "${@bb.utils.contains('PACKAGECONFIG', 'cleanup-delete', 'libfirmwarecleanupblob.so', '', d)}"
73
74do_configure[depends] += "virtual/kernel:do_shared_workdir"
75