diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2020-04-22 21:06:02 +0300 |
---|---|---|
committer | Andrew Geissler <geissonator@yahoo.com> | 2020-04-27 19:52:12 +0300 |
commit | e161514219e0dc8a957dabbb8529fb9fcac4e115 (patch) | |
tree | 5de46006517d690f5793eec41281d60611228ecd /meta-ibm/recipes-phosphor/mboxd | |
parent | a3f54c8b8cbd50bc86efdc52cfb7d348d8c19d21 (diff) | |
download | openbmc-e161514219e0dc8a957dabbb8529fb9fcac4e115.tar.xz |
meta-ibm: move all meta-witherspoon metadata
The metadata common to all IBM systems is confusingly split between
meta-ibm and meta-witherspoon. Move everything to meta-ibm.
The meta-ibm README is re-written to more accurately reflect the scope
of the layer.
Allow the configuration samples (bblayers.conf.sample,
local.conf.sample) to be sourced from either meta-ibm or
meta-witherspoon until such a time that any workflows and tooling have
had the opportunity to move to meta-ibm.
(From meta-ibm rev: 6e05ef2e90b214eaf4e43ee7027bbbb1d8d09442)
Change-Id: I3ec890d5300f9649c974ea6b9dca93a2e8a889ab
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Diffstat (limited to 'meta-ibm/recipes-phosphor/mboxd')
3 files changed, 43 insertions, 0 deletions
diff --git a/meta-ibm/recipes-phosphor/mboxd/mboxd/check-pnor-format.service b/meta-ibm/recipes-phosphor/mboxd/mboxd/check-pnor-format.service new file mode 100644 index 000000000..88bf0ad39 --- /dev/null +++ b/meta-ibm/recipes-phosphor/mboxd/mboxd/check-pnor-format.service @@ -0,0 +1,11 @@ +[Unit] +Description=Check PNOR UBI format +Before=mboxd.service + +[Service] +ExecStart={bindir}/check_pnor_format.sh +Type=oneshot +RemainAfterExit=yes + +[Install] +RequiredBy=mboxd.service diff --git a/meta-ibm/recipes-phosphor/mboxd/mboxd/check_pnor_format.sh b/meta-ibm/recipes-phosphor/mboxd/mboxd/check_pnor_format.sh new file mode 100644 index 000000000..ec043eaf9 --- /dev/null +++ b/meta-ibm/recipes-phosphor/mboxd/mboxd/check_pnor_format.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +# Get the mtd device number (mtdX) +findmtd() { + m="$(grep -xl "$1" /sys/class/mtd/*/name)" + m="${m%/name}" + m="${m##*/}" + echo "${m}" +} + +pnormtd="$(findmtd pnor)" +pnor="${pnormtd#mtd}" +pnordev="/dev/mtd${pnor}" + +if [[ ! "$(dd if=${pnordev} bs=1 count=3 2> /dev/null)" = "UBI" ]]; then + echo "${pnordev} is not formatted UBI" + exit 1 +fi diff --git a/meta-ibm/recipes-phosphor/mboxd/mboxd_%.bbappend b/meta-ibm/recipes-phosphor/mboxd/mboxd_%.bbappend new file mode 100644 index 000000000..e23d8fa45 --- /dev/null +++ b/meta-ibm/recipes-phosphor/mboxd/mboxd_%.bbappend @@ -0,0 +1,14 @@ +MBOXD_FLASH_SIZE_ibm-ac-server = "64M" +MBOXD_FLASH_SIZE_mihawk = "64M" +MBOXD_FLASH_SIZE_rainier = "64M" + +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SYSTEMD_SERVICE_${PN}_append_df-openpower-ubi-fs = " check-pnor-format.service" + +SRC_URI_append_df-openpower-ubi-fs = " file://check_pnor_format.sh" + +do_install_append_df-openpower-ubi-fs() { + install -d ${D}${bindir} + install -m 0755 ${WORKDIR}/check_pnor_format.sh ${D}${bindir}/check_pnor_format.sh +} |