diff options
author | George Hung <george.hung@quantatw.com> | 2021-06-02 05:53:27 +0300 |
---|---|---|
committer | George Hung <george.hung@quantatw.com> | 2021-06-04 09:06:30 +0300 |
commit | c1989599dfeaef5166c22fe1cae085a2966a8e2e (patch) | |
tree | 67be782e9d31e8624bfaac4e68b76dfab570349c /meta-quanta/meta-gbs | |
parent | 78c28a4e34610b7d087471341a131d8a7d05bc1e (diff) | |
download | openbmc-c1989599dfeaef5166c22fe1cae085a2966a8e2e.tar.xz |
meta-quanta: gbs: fix bios update script minior issue
- check the FIU node for different kernel version
- replace sh by bash for the script
Signed-off-by: George Hung <george.hung@quantatw.com>
Change-Id: I20f72f2979f75cb6d22a9870c48619a507891005
Diffstat (limited to 'meta-quanta/meta-gbs')
-rw-r--r-- | meta-quanta/meta-gbs/recipes-gbs/gbs-bios-update/files/bios-update.sh | 16 |
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 |