summaryrefslogtreecommitdiff
path: root/meta-quanta/meta-gbs/recipes-gbs/gbs-bios-update/files/bios-update.sh
diff options
context:
space:
mode:
authorjmbills <jason.m.bills@intel.com>2021-08-03 01:45:08 +0300
committerGitHub <noreply@github.com>2021-08-03 01:45:08 +0300
commit10ad77d5bc86709d8ff7f95e7040e39f1c153903 (patch)
tree307cedb87f4c0a329740c55ac364ed489d1d8fc2 /meta-quanta/meta-gbs/recipes-gbs/gbs-bios-update/files/bios-update.sh
parentc6b1c6ba7a01b7987d65d61c262c44c320193108 (diff)
parent67327ddc580cb9a85219a534844832a1682780d4 (diff)
downloadopenbmc-10ad77d5bc86709d8ff7f95e7040e39f1c153903.tar.xz
Merge pull request #69 from Intel-BMC/update2021-0.631-0.63
Update
Diffstat (limited to 'meta-quanta/meta-gbs/recipes-gbs/gbs-bios-update/files/bios-update.sh')
-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