diff options
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.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 |