Patrick Venture | 6dd5cc9 | 2018-11-09 18:27:28 -0800 | [diff] [blame] | 1 | SUMMARY = "Phosphor OEM IPMI In-band Firmware Update over BLOB" |
| 2 | DESCRIPTION = "This package handles a series of OEM IPMI commands that implement the firmware update handler over the BLOB protocol." |
Ed Tanous | 9936f86 | 2022-09-19 09:13:20 -0700 | [diff] [blame] | 3 | HOMEPAGE = "http://github.com/openbmc/phosphor-ipmi-flash" |
Patrick Venture | 6dd5cc9 | 2018-11-09 18:27:28 -0800 | [diff] [blame] | 4 | LICENSE = "Apache-2.0" |
| 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" |
Willy Tu | fedadb5 | 2021-09-17 09:46:45 -0700 | [diff] [blame] | 6 | DEPENDS += " \ |
| 7 | phosphor-ipmi-blobs \ |
| 8 | phosphor-logging \ |
| 9 | sdbusplus \ |
| 10 | systemd \ |
| 11 | ipmi-blob-tool \ |
| 12 | function2 \ |
| 13 | " |
Andrew Geissler | 92e3aec | 2022-12-08 12:00:45 -0600 | [diff] [blame] | 14 | SRCREV = "db45fd46f6caf1dd13b4a121e3b4e38eae51146a" |
Andrew Geissler | 79ca37b | 2019-06-19 18:52:19 +0000 | [diff] [blame] | 15 | PACKAGECONFIG ?= "cleanup-delete" |
Willy Tu | fedadb5 | 2021-09-17 09:46:45 -0700 | [diff] [blame] | 16 | PACKAGECONFIG[cleanup-delete] = "-Dcleanup-delete=enabled,-Dcleanup-delete=disabled" |
Patrick Venture | e4c6407 | 2019-06-28 19:28:28 -0700 | [diff] [blame] | 17 | # If using static-layout, reboot-update is a good option to handle updating. |
Brandon Kim | c0323d6 | 2019-09-17 17:14:48 -0700 | [diff] [blame] | 18 | # 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 Tu | fedadb5 | 2021-09-17 09:46:45 -0700 | [diff] [blame] | 20 | PACKAGECONFIG[reboot-update] = "-Dreboot-update=true,-Dreboot-update=false" |
| 21 | PACKAGECONFIG[update-status] = "-Dupdate-status=true,-Dupdate-status=false" |
Patrick Venture | 5bcb867 | 2019-07-19 14:07:22 -0700 | [diff] [blame] | 22 | # Default options for supporting various flash types: |
Willy Tu | fedadb5 | 2021-09-17 09:46:45 -0700 | [diff] [blame] | 23 | PACKAGECONFIG[static-bmc] = "-Dupdate-type=static-layout,-Dupdate-type=none" |
| 24 | PACKAGECONFIG[ubitar-bmc] = "-Dupdate-type=tarball-ubi,-Dupdate-type=none" |
| 25 | PACKAGECONFIG[host-bios] = "-Dhost-bios=true,-Dhost-bios=false" |
Patrick Venture | 700db3c | 2019-07-15 09:39:43 -0700 | [diff] [blame] | 26 | # Hardware options to enable transmitting the data from the host. |
Willy Tu | fedadb5 | 2021-09-17 09:46:45 -0700 | [diff] [blame] | 27 | # Only one type of p2a or lpc can be enabled. |
| 28 | PACKAGECONFIG[aspeed-p2a] = "-Dp2a-type=aspeed-p2a,,,,,aspeed-lpc nuvoton-lpc nuvoton-p2a-vga nuvoton-p2a-mbox" |
| 29 | PACKAGECONFIG[aspeed-lpc] = "-Dlpc-type=aspeed-lpc,,,,,aspeed-p2a nuvoton-lpc nuvoton-p2a-vga nuvoton-p2a-mbox" |
| 30 | PACKAGECONFIG[nuvoton-lpc] = "-Dlpc-type=nuvoton-lpc,,,,,aspeed-p2a aspeed-lpc nuvoton-p2a-vga nuvoton-p2a-mbox" |
| 31 | PACKAGECONFIG[nuvoton-p2a-vga] = "-Dp2a-type=nuvoton-p2a-vga,,,,,aspeed-p2a aspeed-lpc nuvoton-lpc nuvoton-p2a-mbox" |
| 32 | PACKAGECONFIG[nuvoton-p2a-mbox] = "-Dp2a-type=nuvoton-p2a-mbox,,,,,aspeed-p2a aspeed-lpc nuvoton-lpc nuvoton-p2a-vga" |
| 33 | PACKAGECONFIG[net-bridge] = "-Dnet-bridge=true,-Dnet-bridge=false" |
Ed Tanous | 9936f86 | 2022-09-19 09:13:20 -0700 | [diff] [blame] | 34 | PV = "1.0+git${SRCPV}" |
| 35 | PR = "r1" |
Patrick Venture | 700db3c | 2019-07-15 09:39:43 -0700 | [diff] [blame] | 36 | |
Ed Tanous | 9936f86 | 2022-09-19 09:13:20 -0700 | [diff] [blame] | 37 | SRC_URI = "git://github.com/openbmc/phosphor-ipmi-flash;branch=master;protocol=https" |
Patrick Venture | d190c73c | 2019-07-15 09:50:03 -0700 | [diff] [blame] | 38 | |
Patrick Venture | 6dd5cc9 | 2018-11-09 18:27:28 -0800 | [diff] [blame] | 39 | S = "${WORKDIR}/git" |
Andrew Geissler | bae19af | 2019-07-08 19:51:12 +0000 | [diff] [blame] | 40 | SYSTEMD_PACKAGES = "${PN}" |
Willy Tu | fedadb5 | 2021-09-17 09:46:45 -0700 | [diff] [blame] | 41 | SYSTEMD_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 Williams | 12fc939 | 2021-08-06 09:16:53 -0500 | [diff] [blame] | 46 | SYSTEMD_SERVICE:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'host-bios', '${HOST_BIOS_TARGETS}', '', d)}" |
Patrick Venture | 6dd5cc9 | 2018-11-09 18:27:28 -0800 | [diff] [blame] | 47 | |
Ed Tanous | 9936f86 | 2022-09-19 09:13:20 -0700 | [diff] [blame] | 48 | inherit meson pkgconfig systemd |
| 49 | |
| 50 | EXTRA_OEMESON = "-Dtests=disabled -Dhost-tool=disabled" |
| 51 | EXTRA_OEMESON:append = " -Dmapped-address=${IPMI_FLASH_BMC_ADDRESS}" |
| 52 | |
| 53 | do_configure[depends] += "virtual/kernel:do_shared_workdir" |
| 54 | |
Willy Tu | fedadb5 | 2021-09-17 09:46:45 -0700 | [diff] [blame] | 55 | FILES:${PN}:append = " ${libdir}/ipmid-providers" |
| 56 | FILES:${PN}:append = " ${libdir}/blob-ipmid" |
Patrick Williams | 12fc939 | 2021-08-06 09:16:53 -0500 | [diff] [blame] | 57 | FILES:${PN}:append = " ${libdir}/tmpfiles.d" |
Patrick Venture | 6dd5cc9 | 2018-11-09 18:27:28 -0800 | [diff] [blame] | 58 | |
| 59 | BLOBIPMI_PROVIDER_LIBRARY += "libfirmwareblob.so" |
William A. Kennington III | a89d924 | 2021-01-29 20:18:02 -0800 | [diff] [blame] | 60 | BLOBIPMI_PROVIDER_LIBRARY += "libversionblob.so" |
Gaurav Gandhi | 8563c83 | 2022-01-05 00:50:25 +0000 | [diff] [blame] | 61 | BLOBIPMI_PROVIDER_LIBRARY += "liblogblob.so" |
Andrew Geissler | 79ca37b | 2019-06-19 18:52:19 +0000 | [diff] [blame] | 62 | BLOBIPMI_PROVIDER_LIBRARY += "${@bb.utils.contains('PACKAGECONFIG', 'cleanup-delete', 'libfirmwarecleanupblob.so', '', d)}" |
Patrick Venture | 3c1a03b | 2019-05-08 07:43:10 -0700 | [diff] [blame] | 63 | |
Ed Tanous | 9936f86 | 2022-09-19 09:13:20 -0700 | [diff] [blame] | 64 | # Set this variable in your recipe to set it instead of using MAPPED_ADDRESS directly. |
| 65 | IPMI_FLASH_BMC_ADDRESS ?= "0" |
| 66 | # If they enabled host-bios, add those three extra targets. |
| 67 | HOST_BIOS_TARGETS = " \ |
| 68 | phosphor-ipmi-flash-bios-prepare.target \ |
| 69 | phosphor-ipmi-flash-bios-verify.target \ |
| 70 | phosphor-ipmi-flash-bios-update.target \ |
| 71 | " |