[Help needed] Gigabyte A5 K1 bios reflash

Hello, I unlocked the BIOS on my Gigabyte A5 K1 (it’s some Clevo barebones, as far as I can gather) using this guide:

That worked fine. However, I enabled resizable BAR through the settings and now the laptop does not POST. I tried disconnecting the CMOS battery and all other power, but the laptop still does not post.
I am assuming I have no other choice but to reflash the bios. I can extract the binary from the exe download on Gigabytes site, and I am in the process of getting a CH341A with a clip and 1.8v adapter. The BIOS chip appears to be a winbond 74m12jwsiq. Is there any other consideration I need to take into account before following this guide? Can reflashing the BIOS following this guide make things even worse? Am I missing something? Here is the guide in question:

There are some examples of stock bios not working when flashed. I’d recommend dumping you own firmware and empty NVRAM instead of flashing stock.

Didn’t you make a backup/ dump of your bios before modifying? What about flashing this dump back?

I unfortunately did not. How would I go about emptying the nvram?

No backup, no empathy…

Take NVRAM and FTW store from stock bios for example

It appears that the stock bios has empty NVRAM, or at least I don’t understand what I’m doing:

Meanwhile, the nvram I pulled from the chip is full of invalid entries. Do you have any suggestion on what I should do?

Please attach / post the file you pulled from the chip.

Hello, here’s the file:
https://file.io/KuAITKTBVhN6

I have also included the .efi file from the latest BIOS download from Gigabyte’s page, which I believe should be what’s on the chip as well. Thank you for checking.

image

??

https://file.io/137wMTH9A99c

Please try again.

Try, it’s just the NVRAM emptied.

backup_NVR.zip (5.8 MB)

Please read the spi chip back in a separate process and compare to the original file, both should be a 100% identical.

Hello, thank you! I’ll try this. I’m unsure what you mean by reading back the SPI separately. Could you elaborate? Should I do that before flashing your modified binary?

Sorry, I don’t trust any verify messages.

Flash completely with whatever options the program deems necessary.

Leave the clamp in place, read the chip again and save as a different file.

Compare this freshly dumped file to the original file.

I would like to thank you very much for the quick response and help on this. The laptop is working fine, thanks to your nvram cleared binary. I don’t think this bios is too fit for modding, as touching anything seems to make it break, and not even a working backup/dump with “load optimized defaults” after I flashed your binary fixes it, only the nvram clear binary makes it go alive again. Everything seems to be working otherwise. Again, thank you.

Thanks for the feedback and good to hear that it worked out :+1:

What do you mean / what did you try?

A “working backup” should work when flashed back with the programmer, shouldn’t it?

After I flashed the nvram cleared binary, I booted the laptop and loaded optimized defaults in the bios. I then shut it down and made a backup of the chip again. I unlocked the BIOS again, and only went and enabled svm. The laptop did not boot. I wrote the backup I had just made, but it would not post again. I used the nvram cleared binary you provided, and it booted up fine. I believe unlocking the bios via setvars really garbles the nvram.

Ah, OK- thanks for the explanation. But that should normally work out!

Do you mind posting the backup made with defaults loaded that refused to work?

backup_default is just after loading defaults, 2backup_default is after setvars

1 Like

That batch file from the JessCT archive executes writing the NVRAM dump of some store. It was provided by another owner of Gigabyte A5.

I didn’t compare the backups attached, but you’re probably right.
Changing 1200 variables at a time could easily cause the laptop did not boot. Due to difference in bios versions or smh else.

New batch file should change only one variable and preserve the rest.

1 Like

Thanks a lot! Enabling ReBAR now works!

Maybe a good idea to just update the relevant variable instead of overwriting the complete store :+1:

@Sweet_Kitten Maybe the new zip could be mentioned in / copied into the original thread?

@TFF
The only difference between the two last backups backup_default and 2backup_default is a ~0x87000 block that reappeared (0x314E2A - 0x39C51F) This block seems to be static, it’s there 100% identical in the bricked dump, in the firmware with emptied NVRAM, in a stock bios and disappears in backup_default and reappears in 2backup_default.

There’s no difference in NVRAM between the backup_default and 2backup_default, so if ‘after setvars’ means running that script, it might not have run correctly.

(Custom store fom original script is still identical despite 0x212 though, setup has some differences, unclear if relevant, especially since NVRAM wasn’t changed in the files I checked)