From 02e4bca0673838a33fd15ebc3147e218a8be7b81 Mon Sep 17 00:00:00 2001 From: Tim Crawford Date: Tue, 10 Dec 2024 23:31:58 -0700 Subject: [PATCH] Remove script logic for most BIOS flash tools 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 --- res/firmware.nsh | 139 ----------------------------------------------- 1 file changed, 139 deletions(-) diff --git a/res/firmware.nsh b/res/firmware.nsh index 80ba2f4..ad4366c 100644 --- a/res/firmware.nsh +++ b/res/firmware.nsh @@ -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