blob: 22755ddf8758b7e71d8006fcbedf55c65d85fd80 [file] [log] [blame]
Patrick Venture6dd5cc92018-11-09 18:27:28 -08001SUMMARY = "Phosphor OEM IPMI In-band Firmware Update over BLOB"
2DESCRIPTION = "This package handles a series of OEM IPMI commands that implement the firmware update handler over the BLOB protocol."
Ed Tanous9936f862022-09-19 09:13:20 -07003HOMEPAGE = "http://github.com/openbmc/phosphor-ipmi-flash"
Patrick Venture6dd5cc92018-11-09 18:27:28 -08004LICENSE = "Apache-2.0"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
Willy Tufedadb52021-09-17 09:46:45 -07006DEPENDS += " \
7 phosphor-ipmi-blobs \
8 phosphor-logging \
9 sdbusplus \
10 systemd \
11 ipmi-blob-tool \
12 function2 \
13"
Andrew Geisslera2acbee2023-03-15 18:00:42 -050014SRCREV = "1b23b77285ae55eb570218f1d4634fb57aede5f0"
Andrew Geissler79ca37b2019-06-19 18:52:19 +000015PACKAGECONFIG ?= "cleanup-delete"
Willy Tufedadb52021-09-17 09:46:45 -070016PACKAGECONFIG[cleanup-delete] = "-Dcleanup-delete=enabled,-Dcleanup-delete=disabled"
Patrick Venturee4c64072019-06-28 19:28:28 -070017# If using static-layout, reboot-update is a good option to handle updating.
Brandon Kimc0323d62019-09-17 17:14:48 -070018# To be able to track the update status, update-status option can be used.
19# Note that both reboot-update and update-status cannot be enabled at the same time.
Willy Tufedadb52021-09-17 09:46:45 -070020PACKAGECONFIG[reboot-update] = "-Dreboot-update=true,-Dreboot-update=false"
21PACKAGECONFIG[update-status] = "-Dupdate-status=true,-Dupdate-status=false"
Patrick Venture5bcb8672019-07-19 14:07:22 -070022# Default options for supporting various flash types:
Willy Tufedadb52021-09-17 09:46:45 -070023PACKAGECONFIG[static-bmc] = "-Dupdate-type=static-layout,-Dupdate-type=none"
24PACKAGECONFIG[ubitar-bmc] = "-Dupdate-type=tarball-ubi,-Dupdate-type=none"
25PACKAGECONFIG[host-bios] = "-Dhost-bios=true,-Dhost-bios=false"
Patrick Venture700db3c2019-07-15 09:39:43 -070026# Hardware options to enable transmitting the data from the host.
Willy Tufedadb52021-09-17 09:46:45 -070027# Only one type of p2a or lpc can be enabled.
28PACKAGECONFIG[aspeed-p2a] = "-Dp2a-type=aspeed-p2a,,,,,aspeed-lpc nuvoton-lpc nuvoton-p2a-vga nuvoton-p2a-mbox"
29PACKAGECONFIG[aspeed-lpc] = "-Dlpc-type=aspeed-lpc,,,,,aspeed-p2a nuvoton-lpc nuvoton-p2a-vga nuvoton-p2a-mbox"
30PACKAGECONFIG[nuvoton-lpc] = "-Dlpc-type=nuvoton-lpc,,,,,aspeed-p2a aspeed-lpc nuvoton-p2a-vga nuvoton-p2a-mbox"
31PACKAGECONFIG[nuvoton-p2a-vga] = "-Dp2a-type=nuvoton-p2a-vga,,,,,aspeed-p2a aspeed-lpc nuvoton-lpc nuvoton-p2a-mbox"
32PACKAGECONFIG[nuvoton-p2a-mbox] = "-Dp2a-type=nuvoton-p2a-mbox,,,,,aspeed-p2a aspeed-lpc nuvoton-lpc nuvoton-p2a-vga"
33PACKAGECONFIG[net-bridge] = "-Dnet-bridge=true,-Dnet-bridge=false"
Ed Tanous9936f862022-09-19 09:13:20 -070034PV = "1.0+git${SRCPV}"
35PR = "r1"
Patrick Venture700db3c2019-07-15 09:39:43 -070036
Ed Tanous9936f862022-09-19 09:13:20 -070037SRC_URI = "git://github.com/openbmc/phosphor-ipmi-flash;branch=master;protocol=https"
Patrick Ventured190c732019-07-15 09:50:03 -070038
Patrick Venture6dd5cc92018-11-09 18:27:28 -080039S = "${WORKDIR}/git"
Andrew Geisslerbae19af2019-07-08 19:51:12 +000040SYSTEMD_PACKAGES = "${PN}"
Willy Tufedadb52021-09-17 09:46:45 -070041SYSTEMD_SERVICE:${PN} += " \
42 phosphor-ipmi-flash-bmc-prepare.target \
43 phosphor-ipmi-flash-bmc-verify.target \
44 phosphor-ipmi-flash-bmc-update.target \
45"
Patrick Williams12fc9392021-08-06 09:16:53 -050046SYSTEMD_SERVICE:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'host-bios', '${HOST_BIOS_TARGETS}', '', d)}"
Patrick Venture6dd5cc92018-11-09 18:27:28 -080047
Ed Tanous9936f862022-09-19 09:13:20 -070048inherit meson pkgconfig systemd
49
50EXTRA_OEMESON = "-Dtests=disabled -Dhost-tool=disabled"
51EXTRA_OEMESON:append = " -Dmapped-address=${IPMI_FLASH_BMC_ADDRESS}"
52
53do_configure[depends] += "virtual/kernel:do_shared_workdir"
54
Willy Tufedadb52021-09-17 09:46:45 -070055FILES:${PN}:append = " ${libdir}/ipmid-providers"
56FILES:${PN}:append = " ${libdir}/blob-ipmid"
Patrick Williams12fc9392021-08-06 09:16:53 -050057FILES:${PN}:append = " ${libdir}/tmpfiles.d"
Patrick Venture6dd5cc92018-11-09 18:27:28 -080058
59BLOBIPMI_PROVIDER_LIBRARY += "libfirmwareblob.so"
William A. Kennington IIIa89d9242021-01-29 20:18:02 -080060BLOBIPMI_PROVIDER_LIBRARY += "libversionblob.so"
Gaurav Gandhi8563c832022-01-05 00:50:25 +000061BLOBIPMI_PROVIDER_LIBRARY += "liblogblob.so"
Andrew Geissler79ca37b2019-06-19 18:52:19 +000062BLOBIPMI_PROVIDER_LIBRARY += "${@bb.utils.contains('PACKAGECONFIG', 'cleanup-delete', 'libfirmwarecleanupblob.so', '', d)}"
Patrick Venture3c1a03b2019-05-08 07:43:10 -070063
Ed Tanous9936f862022-09-19 09:13:20 -070064# Set this variable in your recipe to set it instead of using MAPPED_ADDRESS directly.
65IPMI_FLASH_BMC_ADDRESS ?= "0"
66# If they enabled host-bios, add those three extra targets.
67HOST_BIOS_TARGETS = " \
68 phosphor-ipmi-flash-bios-prepare.target \
69 phosphor-ipmi-flash-bios-verify.target \
70 phosphor-ipmi-flash-bios-update.target \
71"