summaryrefslogtreecommitdiff
path: root/meta-quanta/meta-gbs/recipes-gbs/gbs-bios-update
diff options
context:
space:
mode:
authorJason M. Bills <jason.m.bills@linux.intel.com>2021-07-30 00:16:52 +0300
committerJason M. Bills <jason.m.bills@linux.intel.com>2021-07-30 00:16:52 +0300
commitbb6a14e2f317abf60677c6ad8de9c33d5760bf36 (patch)
tree00457d3677e86437cec25fd7dab6c4513a53b1a4 /meta-quanta/meta-gbs/recipes-gbs/gbs-bios-update
parentdefdca82c107f46e980c84bffb1b2c1263522fa0 (diff)
parentcf6fd27dbd8e2d1b507f8c3752b85801b2c6ef57 (diff)
downloadopenbmc-bb6a14e2f317abf60677c6ad8de9c33d5760bf36.tar.xz
Merge tag '0.63' of ssh://git-amr-1.devtools.intel.com:29418/openbmc-openbmc into update
Diffstat (limited to 'meta-quanta/meta-gbs/recipes-gbs/gbs-bios-update')
-rw-r--r--meta-quanta/meta-gbs/recipes-gbs/gbs-bios-update/files/bios-update.sh16
1 files changed, 14 insertions, 2 deletions
diff --git a/meta-quanta/meta-gbs/recipes-gbs/gbs-bios-update/files/bios-update.sh b/meta-quanta/meta-gbs/recipes-gbs/gbs-bios-update/files/bios-update.sh
index 3a215fa50..36dfa452c 100644
--- a/meta-quanta/meta-gbs/recipes-gbs/gbs-bios-update/files/bios-update.sh
+++ b/meta-quanta/meta-gbs/recipes-gbs/gbs-bios-update/files/bios-update.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Copyright 2020 Google LLC
# Copyright 2020 Quanta Computer Inc.
#
@@ -20,11 +20,23 @@
SPI_SW_SELECT=169
# Kernel control string for bind/unbind
-KERNEL_FIU_ID="c0000000.fiu"
+KERNEL_FIU_ID="c0000000.spi"
# Kernel sysfs path for bind/unbind
KERNEL_SYSFS_FIU="/sys/bus/platform/drivers/NPCM-FIU"
+# the node of FIU is spi for kernel 5.10, but
+# for less than or equal kernel 5.4, the node
+# is fiu
+for fname in $(find ${KERNEL_SYSFS_FIU} -type l)
+do
+ if [ "${fname##*\.}" == "fiu" ]
+ then
+ KERNEL_FIU_ID="c0000000.fiu"
+ break
+ fi
+done
+
IMAGE_FILE="/tmp/image-bios"
# Taken from /run/initramfs/update