Initial commit
This commit is contained in:
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
bus=14
|
||||
address=0x53
|
||||
offset=0x08
|
||||
tmp=$(i2ctransfer -y -f $bus w2@$address $offset 0x00 r32)
|
||||
for str in $tmp;do
|
||||
if [[ $str != 0x00 ]]; then
|
||||
str=$(printf "%d" "$str")
|
||||
version=$(echo "$str" | awk '{printf("%c", $str)}')
|
||||
biosversion="$biosversion$version"
|
||||
fi
|
||||
done
|
||||
echo "BIOS version got from epprom:$biosversion"
|
||||
if [ "$biosversion" == "" ]; then
|
||||
echo "BIOS version is null, skip"
|
||||
else
|
||||
mapper wait /xyz/openbmc_project/software/bios_active
|
||||
busctl set-property xyz.openbmc_project.Software.BMC.Updater /xyz/openbmc_project/software/bios_active xyz.openbmc_project.Software.Version Version s "${biosversion}"
|
||||
echo "Restored BIOS version ${biosversion}"
|
||||
fi
|
||||
Reference in New Issue
Block a user