blob: 5c30801a04dfd30c791cc5f6f5ad622424b67aeb [file] [log] [blame]
Patrick Venture6dd5cc92018-11-09 18:27:28 -08001HOMEPAGE = "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"
Patrick Venture24d981d2019-06-28 15:34:15 -07005PV = "1.0+git${SRCPV}"
Patrick Venture6dd5cc92018-11-09 18:27:28 -08006LICENSE = "Apache-2.0"
7LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
8
Willy Tufedadb52021-09-17 09:46:45 -07009inherit meson pkgconfig systemd
Patrick Venture6dd5cc92018-11-09 18:27:28 -080010
Willy Tufedadb52021-09-17 09:46:45 -070011DEPENDS += " \
12 phosphor-ipmi-blobs \
13 phosphor-logging \
14 sdbusplus \
15 systemd \
16 ipmi-blob-tool \
17 function2 \
18"
Patrick Venture6dd5cc92018-11-09 18:27:28 -080019
Andrew Geissler79ca37b2019-06-19 18:52:19 +000020PACKAGECONFIG ?= "cleanup-delete"
Willy Tufedadb52021-09-17 09:46:45 -070021PACKAGECONFIG[cleanup-delete] = "-Dcleanup-delete=enabled,-Dcleanup-delete=disabled"
Patrick Venturee4c64072019-06-28 19:28:28 -070022# If using static-layout, reboot-update is a good option to handle updating.
Brandon Kimc0323d62019-09-17 17:14:48 -070023# To be able to track the update status, update-status option can be used.
24# Note that both reboot-update and update-status cannot be enabled at the same time.
Willy Tufedadb52021-09-17 09:46:45 -070025PACKAGECONFIG[reboot-update] = "-Dreboot-update=true,-Dreboot-update=false"
26PACKAGECONFIG[update-status] = "-Dupdate-status=true,-Dupdate-status=false"
Patrick Venture5bcb8672019-07-19 14:07:22 -070027
28# Default options for supporting various flash types:
Willy Tufedadb52021-09-17 09:46:45 -070029PACKAGECONFIG[static-bmc] = "-Dupdate-type=static-layout,-Dupdate-type=none"
30PACKAGECONFIG[ubitar-bmc] = "-Dupdate-type=tarball-ubi,-Dupdate-type=none"
31PACKAGECONFIG[host-bios] = "-Dhost-bios=true,-Dhost-bios=false"
Andrew Geissler79ca37b2019-06-19 18:52:19 +000032
Patrick Venture700db3c2019-07-15 09:39:43 -070033# Hardware options to enable transmitting the data from the host.
Willy Tufedadb52021-09-17 09:46:45 -070034# Only one type of p2a or lpc can be enabled.
35PACKAGECONFIG[aspeed-p2a] = "-Dp2a-type=aspeed-p2a,,,,,aspeed-lpc nuvoton-lpc nuvoton-p2a-vga nuvoton-p2a-mbox"
36PACKAGECONFIG[aspeed-lpc] = "-Dlpc-type=aspeed-lpc,,,,,aspeed-p2a nuvoton-lpc nuvoton-p2a-vga nuvoton-p2a-mbox"
37PACKAGECONFIG[nuvoton-lpc] = "-Dlpc-type=nuvoton-lpc,,,,,aspeed-p2a aspeed-lpc nuvoton-p2a-vga nuvoton-p2a-mbox"
38PACKAGECONFIG[nuvoton-p2a-vga] = "-Dp2a-type=nuvoton-p2a-vga,,,,,aspeed-p2a aspeed-lpc nuvoton-lpc nuvoton-p2a-mbox"
39PACKAGECONFIG[nuvoton-p2a-mbox] = "-Dp2a-type=nuvoton-p2a-mbox,,,,,aspeed-p2a aspeed-lpc nuvoton-lpc nuvoton-p2a-vga"
40PACKAGECONFIG[net-bridge] = "-Dnet-bridge=true,-Dnet-bridge=false"
Patrick Venture700db3c2019-07-15 09:39:43 -070041
Willy Tufedadb52021-09-17 09:46:45 -070042EXTRA_OEMESON = "-Dtests=disabled -Dhost-tool=disabled"
Patrick Venture51c0f092019-05-15 12:19:16 -070043
Patrick Ventured190c732019-07-15 09:50:03 -070044# Set this variable in your recipe to set it instead of using MAPPED_ADDRESS directly.
45IPMI_FLASH_BMC_ADDRESS ?= "0"
Willy Tufedadb52021-09-17 09:46:45 -070046EXTRA_OEMESON:append = " -Dmapped-address=${IPMI_FLASH_BMC_ADDRESS}"
Patrick Ventured190c732019-07-15 09:50:03 -070047
Patrick Venture6dd5cc92018-11-09 18:27:28 -080048S = "${WORKDIR}/git"
Patrick Williamsbb99d222022-01-24 15:55:09 -060049SRC_URI = "git://github.com/openbmc/phosphor-ipmi-flash;branch=master;protocol=https"
Andrew Geissler76a34c72022-01-07 20:40:13 +000050SRCREV = "a49a3f79e4bea32929d7be8201645c7d83b0f2ae"
Andrew Geisslerbae19af2019-07-08 19:51:12 +000051
52SYSTEMD_PACKAGES = "${PN}"
Willy Tufedadb52021-09-17 09:46:45 -070053SYSTEMD_SERVICE:${PN} += " \
54 phosphor-ipmi-flash-bmc-prepare.target \
55 phosphor-ipmi-flash-bmc-verify.target \
56 phosphor-ipmi-flash-bmc-update.target \
57"
Andrew Geisslerbae19af2019-07-08 19:51:12 +000058
59# If they enabled host-bios, add those three extra targets.
Willy Tufedadb52021-09-17 09:46:45 -070060HOST_BIOS_TARGETS = " \
61 phosphor-ipmi-flash-bios-prepare.target \
62 phosphor-ipmi-flash-bios-verify.target \
63 phosphor-ipmi-flash-bios-update.target \
64"
Andrew Geisslerbae19af2019-07-08 19:51:12 +000065
Patrick Williams12fc9392021-08-06 09:16:53 -050066SYSTEMD_SERVICE:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'host-bios', '${HOST_BIOS_TARGETS}', '', d)}"
Patrick Venture6dd5cc92018-11-09 18:27:28 -080067
Willy Tufedadb52021-09-17 09:46:45 -070068FILES:${PN}:append = " ${libdir}/ipmid-providers"
69FILES:${PN}:append = " ${libdir}/blob-ipmid"
Patrick Williams12fc9392021-08-06 09:16:53 -050070FILES:${PN}:append = " ${libdir}/tmpfiles.d"
Patrick Venture6dd5cc92018-11-09 18:27:28 -080071
72BLOBIPMI_PROVIDER_LIBRARY += "libfirmwareblob.so"
William A. Kennington IIIa89d9242021-01-29 20:18:02 -080073BLOBIPMI_PROVIDER_LIBRARY += "libversionblob.so"
Gaurav Gandhi8563c832022-01-05 00:50:25 +000074BLOBIPMI_PROVIDER_LIBRARY += "liblogblob.so"
Andrew Geissler79ca37b2019-06-19 18:52:19 +000075BLOBIPMI_PROVIDER_LIBRARY += "${@bb.utils.contains('PACKAGECONFIG', 'cleanup-delete', 'libfirmwarecleanupblob.so', '', d)}"
Patrick Venture3c1a03b2019-05-08 07:43:10 -070076
77do_configure[depends] += "virtual/kernel:do_shared_workdir"