gpu

May 1, 2020

Finally, how to flash AMD VBIOS in Linux

Check my previous post to know more about the background of this story.

After publishing my rant on the web about the lack of a native GNU/Linux application to flash my the VBIOS of my AMD card, it turns out that the Linux version was in a public repository in GitHub. Simple like that.

Downloading

You can get the tool on GitHub (check the commit log for older versions) or get from AUR: amdvbflash.

Using

Every option of amdvbflash requires administrative privileges, so use sudo to run it. To get all options, just run the tool without arguments:

$ sudo amdvbflash
AMDVBFLASH version 4.69, Copyright (c) 2020 Advanced Micro Devices, Inc.

--- amdvbflash v4.69 ---
-h, -?, /h, /?          Help (this screen)
...

Use -i to list all cards in the system:

$ sudo amdvbflash -i

adapter seg  bn dn dID       asic           flash      romsize test    bios p/n
======= ==== == == ==== =============== ============== ======= ==== ================
   0    0000 03 00 731F Navi10          GD25Q80C        100000 pass 113-EXT900170-L07

Back up current image with -s <Num> <File> [Size] (recommend before flashing):

$ sudo amdvbflash -s 0 bios.rom

0x100000 bytes saved, checksum = 0x7CE5

Gather details of a VBIOS image file using -biosfileinfo <File>:

$ sudo amdvbflash -biosfileinfo bios.rom

    Product Name is :    NAVI10 A1/A2 D18901 XLE 6GB 300e/750m
    Device ID is    :    731F
    Bios Version    :    017.001.000.049.900170
    Bios P/N is     :    113-EXT900170-L07
    Bios SSID       :    5120
    Bios SVID       :    1849
    Bios Date is    :    01/17/20 01:27

Finally, to flash your card with an image, use -p <Num> <File>:

$ sudo amdvbflash -p 0 bios.rom

The software does a sign check using a public key from AMD, so it will only flash “trusted” images. You can test the signature with -rsa <filename> option. Keep in mind that this verification is done solely in software, so it can be bypassed using binary hacking.

As noted by u/nikomo , bypassing this check is not a good idea:

AMD GPUs starting from Vega GPUs check the signature and refuse to start if it doesn’t validate.


Thanks Patrick for sharing the tool with me!


© André Almeida 2020
Licensed as CC BY 4.0

Powered by Hugo & Kiss.