#!/bin/sh

echo ''
echo 'Alder Lake N and Amston Lake BIOS updater - Linux 32 bit Version'
echo ''

if [ "$(id -u)" != "0" ]; then
   echo ''
   echo 'This script must be run as root'
   echo ''
   exit 1
fi

if [ -z "$1" ] || [ ! -f $1 ];then
  echo ''
  echo 'Please enter the BIOS file parameter : ./bios_update_x32.sh official_bios.xxx '
  echo ''
  exit 1
fi
chmod +x EtaAfuOemLnx32

./EtaAfuOemLnx32 $1 /EC /ME /PADDING0 /N /NB /OA /TSNMACADDR /TCCCACHECFG /TCCPTCMBINARY /TCCSTREAMCFG /P /AB /FSPS /FSPM /FSPT /B /DATABACKUP /DATA /BB1BACKUP /BB1 /ABU /FSPSU /FSPMU /FSPTU /BBU
./EtaAfuOemLnx32 $1 /DESC
echo ''
echo 'Please power off and then on the system'
echo ''
