Skip to content

Commit

Permalink
Remove script logic for most BIOS flash tools
Browse files Browse the repository at this point in the history
Releases now ship a UEFI Shell script to perform the updates. The
firmware-update `firmware.nsh` will call the model-specific
`firmware.nsh` file.

Signed-off-by: Tim Crawford <[email protected]>
  • Loading branch information
crawfxrd committed Dec 13, 2024
1 parent 2325f02 commit 75c6c23
Showing 1 changed file with 0 additions and 139 deletions.
139 changes: 0 additions & 139 deletions res/firmware.nsh
Original file line number Diff line number Diff line change
Expand Up @@ -104,145 +104,6 @@ if "%2" == "bios" then
endif
endif

# Flash with asusefiflash and exit if possible
if exist asusefiflash.efi then
asusefiflash.efi firmware.cap
exit %lasterror%
endif

# Flash with AsusFwUpdate and exit if possible
# For: thelio-mega-r2
if exist AsusFwUpdate.efi then
AsusFwUpdate.efi -FlashBIOS /P /D /U firmware.cap
exit %lasterror%
endif

# Flash with AsusFwUpd and exit if possible
# For: thelio-major-r4
if exist AsusFwUpd.efi then
AsusFwUpd.efi -FlashBIOS /P /C firmware.cap
exit %lasterror%
endif

# Flash with msiefiflash and exit if possible
# For: thelio-b4
if exist msiefiflash.efi then
msiefiflash.efi firmware.rom /K /RLC:E
exit %lasterror%
endif

# Flash with msiAFUE51503 and exit if possible
# For: thelio-r3
if exist msiAFUE51503.efi then
msiAFUE51503.efi firmware.rom /P /FAB /N /K /CAPSULE /Q
exit %lasterror%
endif

# Flash with ASRockAfuEfix64 and exit if possible
# For: thelio-spark-b1
if exist ASRockAfuEfix64.efi then
ASRockAfuEfix64.efi firmware.rom /P /B /N /L

# Turn off RGB (spark-b1 only, so far)
if exist RGBTool.efi then
RGBTool.efi /off
endif

exit %lasterror%
endif

# Flash with WRX90AfuEfix64 and exit if possible
# For: thelio-mega-r3
if exist WRX90AfuEfix64.efi then
WRX90AfuEfix64.efi firmware.rom /P /B /N /L /CAPSULE

exit %lasterror%
endif

# Flash with efiflash and exit if possible
if exist efiflash.efi then
efiflash.efi firmware.rom /C /NR \NoOemId
exit %lasterror%
endif

# Flash with uefiflash if possible, should reboot automatically
if exist uefiflash.efi then
if exist uefiflash.tag then
rm uefiflash.tag
if exist uefiflash.tag then
echo "failed to remove uefiflash.tag"
exit 1
endif
exit 0
else
echo > uefiflash.tag
if not exist uefiflash.tag then
echo "failed to create uefiflash.tag"
exit 1
endif

uefiflash.efi firmware.rom
exit 1
endif
endif

# Flash with h2offt if possible, will require reboot and then will
# shut down automatically
if exist h2offt.efi then
h2offt.efi firmware.rom -all -n
exit %lasterror%
endif

# meer5, meer6, meer7, meer8
# Set logo, should reboot automatically
if exist iflashv.efi then
if exist iflashv.tag then
rm iflashv.tag
if exist iflashv.tag then
echo "failed to remove iflashv.tag"
exit 1
endif
exit 0
else
# Set DMI information if possible and exit
if exist idmiedit.efi then
idmiedit.efi SET.DMS
if not "%lasterror%" == "0" then
exit %lasterror%
endif
endif

# meer7, meer8
# Set all BIOS default settings and attempt to re-enable
# iSetupCfg password protection setting (SCEPWD)
if exist isetupcfg.efi then
if exist SETTINGS.TXT then
isetupcfg.efi /i /cpwd admin /s SETTINGS.TXT /ds
endif
isetupcfg.efi /i /cpwd admin /ms SCEPWD /qv 0x00 /ds
if not "%lasterror%" == "0" then
exit %lasterror%
endif
endif

# Update logo
iflashv.efi firmware.rom /K1
if not "%lasterror%" == "0" then
exit %lasterror%
endif

echo > iflashv.tag
if not exist iflashv.tag then
echo "failed to create iflashv.tag"
exit 1
endif

# Update BIOS, should reboot
iflashv.efi firmware.rom /Q
exit 1
endif
endif

echo "bios: no flash implementation found"
exit 1
endif
Expand Down

0 comments on commit 75c6c23

Please sign in to comment.