$_ BSDHowTo.ch
How To... Why not..? Scripts Patches RSS logo

How to update the firmware on PC Engines APUs

Last update: 2020-06-01


This post is about updating the firmware on the PC Engines APU boards. Most people are afraid of bricking such boards with firmware updates. Indeed, it is easy to brick a board if you try to update the firmware along the way of doing something else. But if you pay attention to what you do and follow the instructions closely you will benefit from bugfixes and improvements that come along with the updates.


If you follow the instructions in this document you are responsible for the results. I cannot be held reliable for any damage to your hardware because you followed the instructions in this document.


Beside OpenBSD you will need to install two software packages for this task:

$ doas pkg_add -i flashrom pciutils

Always check the pkg-readme for flashrom after installation/update of the packge. You find it in /usr/local/share/doc/pkg-readmes/flashrom. Read it carefully, follow the links in it and read the documents found there carefully.

The next step is to find out which of the different APU models you are running. The easiest way is to grep(1) for ^bios0: in the output of dmesg(8):

$ dmesg | grep ^bios0:
bios0: vendor coreboot version "v4.11.0.6" date 04/26/2020
bios0: PC Engines apu#

Visit the PC Engines firmware page to get information about the firmware versions available and the download links for the firmware images. Use ftp(1) to download the firmware you wish to install on your APU:

$ ftp <url_to_new_rom_file>


Now you are ready for the real action. Due to the memory protection in OpenBSD you must reboot into single user mode first. At the boot prompt enter the following:

boot>boot -s

After the device configuration the system will ask you for the path of your preferred shell. Press Enter here to use the default. Then enter the following commands:

# mount -a -t nonfs
# ldconfig -m /usr/local/lib

No news is good news, so if you don't get any output from these two commands everything is ready for the show. As far as I know the addition :boardmismatch=force is only required for APU2 boards. On other boards you should be able to run the command without it. That gives you an additional safeguard in case you try to flash an APU1 rom to an APU3 board.

# flashrom -p internal -w /home/user/<romfile>
flashrom v1.1 on OpenBSD 6.7 (amd64)
flashrom is free software, get the source code at https://flashrom.org

Using clock_gettime for delay loops (clk_id: 3, resolution: 1ns).
coreboot table found at 0xdffae000.
Found chipset "AMD FCH"
Enabling flash write... OK.
Found Winbond flash chip "W25Q64.V" (8192 kB, SPI) mapped at physical address 0x
This coreboot image (PC Engines:apu2) does not appear to
be correct for the detected mainboard (PC Engines:PCEngines apu2).
Proceeding anyway because user forced us to.
Reading old flash chip conetents... done.
Erasing and writing flash chip... Erase/write done.
Verifying flash... VERIFIED.

The output of the command should look similar to my example above. If this is the case your update was successful. It is time to initiate a cold boot of the APU board:

# setpci -s 18.0 6c.L=10:10
# reboot