diff options
author | Jason M. Bills <jason.m.bills@linux.intel.com> | 2020-01-07 21:40:08 +0300 |
---|---|---|
committer | Jason M. Bills <jason.m.bills@linux.intel.com> | 2020-01-07 21:43:56 +0300 |
commit | 820013481a115100d5f8f22dc01aac8cc0363a23 (patch) | |
tree | 99cd46b66d5b9b97d38265d553f4fb60fee0d6a2 /meta-openbmc-mods/meta-common/recipes-phosphor/fru/default-fru | |
parent | 965a056096e5e043748da8766fa50cb7afedb608 (diff) | |
download | openbmc-820013481a115100d5f8f22dc01aac8cc0363a23.tar.xz |
Update to internal 2020-01-07
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')
-rwxr-xr-x | meta-openbmc-mods/meta-common/recipes-phosphor/fru/default-fru/checkFru.sh | 49 |
1 files changed, 35 insertions, 14 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 9f22b179e..3bf1aedb5 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 @@ -2,8 +2,11 @@ # this script checks the gpio id and loads the correct baseboard fru FRUPATH="/etc/fru" +PRODIDPATH="/var/cache/private" fruFile="$FRUPATH/baseboard.fru.bin" -if [ -f $fruFile ]; then +prodIDFile="$PRODIDPATH/prodID" + +if [ -f $fruFile -a -f $prodIDFile ]; then exit 0 fi @@ -24,20 +27,29 @@ BOARD_ID=$(read_id) if grep -q 'CPU part\s*: 0xb76' /proc/cpuinfo; then # AST2500 case $BOARD_ID in - 12) NAME="D50TNP1SB";; - 40) NAME="CooperCity";; - 42) NAME="WilsonCity";; - 45) NAME="WilsonCity";; - 60) NAME="M50CYP2SB2U";; - 62) NAME="WilsonPoint";; - *) NAME="S2600WFT";; + 12) NAME="D50TNP1SB" + PRODID="0x99";; + 40) NAME="CooperCity" + PRODID="0x9d";; + 42) NAME="WilsonCity" + 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";; - *) NAME="AST2600EVB";; + 62) NAME="ArcherCity" + PRODID="0x9c";; + *) NAME="AST2600EVB" + PRODID="0x00";; esac fi @@ -46,8 +58,17 @@ if [ -z "$NAME" ]; then NAME="Unknown" fi -cd /tmp -mkdir -p $FRUPATH -mkfru $NAME -mv $NAME.fru.bin $fruFile +if [ ! -e $prodIDFile ] +then + echo $PRODID >$prodIDFile +fi + +if [ ! -f $fruFile ] +then + cd /tmp + mkdir -p $FRUPATH + mkfru $NAME + mv $NAME.fru.bin $fruFile +fi + |