-
-
Save Manawyrm/d4a6fe18ca4c129179f527e9d0854099 to your computer and use it in GitHub Desktop.
Script to mod the PhoenixBIOS of a ThinkPad T43 to replace an Option ROM and include a custom boot logo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
coreutils\touch DUMMY | |
REM Create a temp dir to extract the original BIOS | |
coreutils\rm -r temp | |
coreutils\mkdir temp | |
coreutils\cp $0197000.ROM temp\bios.rom | |
cd temp | |
REM List and Extract | |
..\phnxdeco.exe bios.rom -l | |
..\phnxdeco.exe bios.rom -x | |
cd .. | |
REM Copy the old Option ROM (binary) | |
coreutils\cp temp\phoenix_.R2 OP_OLD.ROM | |
REM Convert the old Option ROM BIOS to MOD using Phoenix Prepare | |
prepare OP_OLD.SCR | |
coreutils\cp 15ad07b0.rom NVMEPAD1.ROM | |
REM Convert Option ROM BIOS to MOD using Phoenix Prepare | |
prepare OPROM1.SCR | |
REM Pad the Option ROM Module to same size | |
coreutils\dd bs=1 if=DUMMY of=OPROMPAD.MOD seek=23361 | |
coreutils\dd bs=1 if=NVMEPAD1.MOD of=OPROMPAD.MOD conv=notrunc | |
REM Make a copy of the original BIOS to work with | |
coreutils\cp $0197000.ROM MOD.ROM | |
REM Replace the module | |
phnxmod.exe MOD.ROM OP_OLD.MOD OPROMPAD.MOD | |
REM Replace the logo | |
REM 0x2816 (10262) bytes available (compressed!) | |
REM L.00 ( LOGO) 00DA2 (03490) => 25876 (153718) LZINT ( 2%) A0187h | |
prepare LOGO.SCR | |
coreutils\dd bs=1 if=LOGO.MOD of=MOD.ROM skip=5 seek=655751 conv=notrunc | |
REM Calculate the new checksum | |
phnxcksm.exe MOD.ROM | |
coreutils\rm *.LOG | |
coreutils\rm *.MOD | |
coreutils\rm DUMMY |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment