Skip to content
Snippets Groups Projects

Add update script for Linux 64 (B68, C93, D63)

Merged Andrea Petrini requested to merge Bringup into Development
1 file
+ 73
0
Compare changes
  • Side-by-side
  • Inline
+ 73
0
#!/bin/sh
echo ""
echo "##############################################"
echo "##############################################"
echo "######### SECO Update utility v1.0 ###########"
echo "##############################################"
echo "##############################################"
echo ""
if [ "$(id -u)" != "0" ]; then
echo ''
echo 'This script must be run as root'
echo ''
exit 1
fi
if ! [ -d "/usr/lib64" ]; then
if ! [ -e "/lib64" ]; then
echo "Create symbolc link to /lib64"
ln -s /lib /lib64
fi
fi
if [ -z "$1" ]
then
echo "Please specify as first argument the BIOS name to update"
exit 1
fi
bios_name=$1
if [ ! -f $bios_name ]
then
echo "Specified BIOS file not found"
exit 1
fi
seco_board=$(dmidecode | grep "Handle 0x0002" -A 10 | grep "Product Name" | awk '{print $3}')
if [ "x$seco_board" == "x" ]
then
echo "Error: not able to read board model"
exit 1
else
echo "Board detected: $seco_board"
fi
#Specify the tool to use for the update
update_tool="/usr/bin/EtaAfuOemLnx64"
if [ ! -f $update_tool ]
then
echo "Update script not found"
exit 1
fi
chmod +x $update_tool
case $seco_board in
"B68") cmd="$update_tool $bios_name /P /N /L /X" ;; #APL
"D63") cmd="$update_tool $bios_name /DESC /EC /GBE /ME /PAD /N /NB /OA /P /NETWORK /AB /FSPS /FSPM /FSPT /B /DATABACKUP /DATA /BB1BACKUP /BB1 /ABU /FSPSU /FSPMU /FSPTU /BBU /TSNMACADDR /TCCCACHECFG /TCCBUFFER /TCCPTCMBINARY /TCCSTREAMCFG" ;; #TGL
"C93") cmd="$update_tool $bios_name /B /P /N /L /FDR /MER /PDR" ;; #EHL
*) echo "Error: board not supported by the utility"
exit 1
;;
esac
$cmd
echo ""
echo "Please shutdown the system to complete the procedure"
echo ""
Loading