How to change your boot splash logo using an SPI programmer, UEFITool and flashrom
This is a quick guide on how to retrieve and change the firmware of a machine in order to replace the logo shown on the UEFI boot screen.
First, open up the machine and identify the SPI flash chip. In my case, the machine is a refurbished Fujitsu Esprimo Q920 (more powerful and cheaper than a Raspberry Pi) and its SPI flash is easily identifiable.
Afterwards, hook up an SPI programmer like the CH341A.
If all the pins are in the right place and the cables are good you can use
flashrom
to read the firmware from the chip (some programmers are unsupported
by flashrom
, in which case this step is more involved).
$ sudo apt install flashrom
$ sudo flashrom --programmer ch341a_spi -c MX25L6405 -r firmware.bin
As a next step, you need to find the place in which the boot splash logo image
is saved in the firmware file. For that, UEFITool
can do the job. Download a
stable release (not NE), extract it and run the tool:
$ wget https://github.com/LongSoft/UEFITool/releases/download/0.28.0/UEFITool_0.28.0_linux_x86_64.zip
$ unzip UEFITool_0.28.0_linux_x86_64.zip
$ ./UEFITool
Then click File -> Open Image File and find firmware.bin on the filesystem to open it.
Next, find where the image of the boot splash logo is saved.
If you’re lucky, you can search for it using the GUID
7BB28B99-61BB-11D5-9A5D-0090273FC14D
.
Right click on the Raw Section of the entry, then Extract as and save the file as image.unkown.
Then use file
to identify its format, which in my case is Bitmap:
$ file logo.unknown
logo.unknown: PC bitmap, Windows 3.x format, 409 x 198 x 4, image size 41184, resolution 2834 x 2834 px/m, cbSize 41302, bits offset 11
Use your favorite image program to generate an image in the same format (and
slightly smaller in size so that UEFITool
doesn’t complain). In my case,
the replacement image looked like this:
Back in UEFITool
, right click on the Raw section of the entry again, then
click Replace body and find your new logo image on the file system. Then click
on File -> Save Image File to save a modified firmware image named say
modified.bin.
Finally, use flashrom
to write the modified firmware image to the flash chip:
$ sudo flashrom --programmer ch341a_spi -c MX25L6405 -w modified.bin
With that, you’ve successfully modified your firmware’s boot splash logo image, the result of which in my case looked like this:
References
https://www.reddit.com/r/hackintosh/comments/fa4ay1/guide_how_to_create_your_own_bios_splash_page/