diff options
author | Jason M. Bills <jason.m.bills@linux.intel.com> | 2021-03-26 01:45:09 +0300 |
---|---|---|
committer | Jason M. Bills <jason.m.bills@linux.intel.com> | 2021-03-27 01:41:36 +0300 |
commit | 12bef3e1bf292dec5ac15af9fb41e86f7bcfb0cb (patch) | |
tree | 608a905372f3f545d2686e29512ae3f5f5b4a78c /meta-openbmc-mods/meta-common/recipes-phosphor/fru/default-fru/checkFru.sh | |
parent | 0a1ece0568a37de9f17fd6e0bcdfd2cad2c6503f (diff) | |
download | openbmc-12bef3e1bf292dec5ac15af9fb41e86f7bcfb0cb.tar.xz |
Update to internal 0.43
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-phosphor/fru/default-fru/checkFru.sh')
-rwxr-xr-x | meta-openbmc-mods/meta-common/recipes-phosphor/fru/default-fru/checkFru.sh | 56 |
1 files changed, 17 insertions, 39 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/fru/default-fru/checkFru.sh b/meta-openbmc-mods/meta-common/recipes-phosphor/fru/default-fru/checkFru.sh index 9227beb20..18a6c7260 100755 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/fru/default-fru/checkFru.sh +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/fru/default-fru/checkFru.sh @@ -5,10 +5,7 @@ FRUPATH="/etc/fru" PRODIDPATH="/var/cache/private" fruFile="$FRUPATH/baseboard.fru.bin" prodIDFile="$PRODIDPATH/prodID" - -if [ -f $fruFile -a -f $prodIDFile ]; then - exit 0 -fi +source decodeBoardID.sh read_id() { local idx=0 @@ -23,48 +20,30 @@ read_id() { echo $result } -BOARD_ID=$(read_id) -if grep -q 'CPU part\s*: 0xb76' /proc/cpuinfo; then - # AST2500 - case $BOARD_ID in - 12) NAME="D50TNP1SB" - PRODID="0x99";; - 40) NAME="CooperCity" - PRODID="0x9d";; - 42) NAME="WilsonCity" - PRODID="0x91";; - 44) NAME="WilsonCityM" - PRODID="0x91";; - 45) NAME="WilsonCity" - PRODID="0x91";; - 60) NAME="M50CYP2SB2U" - PRODID="0x98";; - 62) NAME="WilsonPoint" - PRODID="0x9a";; - *) NAME="S2600WFT" - PRODID="0x7b";; - esac - -elif grep -q 'CPU part\s*: 0xc07' /proc/cpuinfo; then - # AST2600 - case $BOARD_ID in - 62) NAME="ArcherCity" - PRODID="0x9c";; - *) NAME="AST2600EVB" - PRODID="0x00";; - esac - +if [ -f $fruFile -a -f $prodIDFile ] && + grep -q 'CPU part\s*: 0xc07' /proc/cpuinfo; then + exit 0 fi -if [ -z "$NAME" ]; then - NAME="Unknown" -fi +NAME="Unknown" +PRODID="0x00" +EEPROM_FRU=false + +BOARD_ID=$(read_id) +decode_board_id if [ ! -e $prodIDFile ] then echo $PRODID >$prodIDFile fi +if $EEPROM_FRU; +then + # Remove baseboard filesystem FRU(if any), as this platform has EEPROM FRU. + rm -f $fruFile + exit 0 +fi + if [ ! -f $fruFile ] then cd /tmp @@ -73,4 +52,3 @@ then mv $NAME.fru.bin $fruFile fi - |