summaryrefslogtreecommitdiff
path: root/meta-hpe
diff options
context:
space:
mode:
authorCharles Kearney <charles.kearney@hpe.com>2023-05-30 22:27:49 +0300
committerJean-Marie Verdun <jean-marie.verdun@hpe.com>2023-07-26 01:39:15 +0300
commit1b1fb847268cf9bfb34ac00bc67dd6c3fc06576f (patch)
tree699e5ba0ec062613e0be415bf9b0a551d1ea3cf8 /meta-hpe
parenta2c75f463d33b971f4c33293813e1f99b9e9cb32 (diff)
downloadopenbmc-1b1fb847268cf9bfb34ac00bc67dd6c3fc06576f.tar.xz
meta-hpe: rl300-g11 add proliant support recipe
Change-Id: I03a92e0d873dea306222b036accb931cf033e84e Signed-off-by: Charles Kearney <charles.kearney@hpe.com>
Diffstat (limited to 'meta-hpe')
-rw-r--r--meta-hpe/meta-common/recipes-hpe/proliant-support/proliant-support.bbappend8
-rw-r--r--meta-hpe/meta-common/recipes-hpe/proliant-support/proliant-support/hpe-publish-uefi-version.sh43
2 files changed, 51 insertions, 0 deletions
diff --git a/meta-hpe/meta-common/recipes-hpe/proliant-support/proliant-support.bbappend b/meta-hpe/meta-common/recipes-hpe/proliant-support/proliant-support.bbappend
new file mode 100644
index 0000000000..46bb09873f
--- /dev/null
+++ b/meta-hpe/meta-common/recipes-hpe/proliant-support/proliant-support.bbappend
@@ -0,0 +1,8 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+# platform configuration files
+SRC_URI += "file://hpe-publish-uefi-version.sh"
+
+do_install:append() {
+ install -D ${WORKDIR}/hpe-publish-uefi-version ${D}/usr/bin/hpe-publish-uefi-version
+}
diff --git a/meta-hpe/meta-common/recipes-hpe/proliant-support/proliant-support/hpe-publish-uefi-version.sh b/meta-hpe/meta-common/recipes-hpe/proliant-support/proliant-support/hpe-publish-uefi-version.sh
new file mode 100644
index 0000000000..0cc8f2368a
--- /dev/null
+++ b/meta-hpe/meta-common/recipes-hpe/proliant-support/proliant-support/hpe-publish-uefi-version.sh
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+#
+# Copyright (c) 2021 Hewlett-Packard Development Company, L.P.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# RL300 doesn't support VROM, so we will be reading directly from
+# SPI-NOR. The whole process is a little bit slow but works
+
+# Find an MTD /dev file by name
+findmtd() {
+ echo "parameter $1"
+ m=$(grep -xl "$1" /sys/class/mtd/*/name)
+ m=${m%/name}
+ m=${m##*/}
+ echo "$m"
+}
+
+rom=uefi-master
+echo "Checking for mtd partition ${rom}"
+image=$(findmtd ${rom})
+if test -z "$image"
+then
+ echo "Unable to find mtd partition for ${rom}"
+ exit 1
+fi
+rom_mtd=${image}
+
+uefi_version="hpe-uefi-version /dev/${rom_mtd}"
+busctl set-property xyz.openbmc_project.Software.BMC.Updater /xyz/openbmc_project/software/bios_active xyz.openbmc_project.Software.Version Version s "$uefi_version"
+busctl get-property xyz.openbmc_project.Software.BMC.Updater /xyz/openbmc_project/software/bios_active xyz.openbmc_project.Software.Version Version