BIOS Update instructions of PC Engines APU1, APU2 and APU3
This tutorial does not require serial access to the device.
As long as you have a PC and an ethernet port (or a USB-Ethernet adapter) on your PC you can follow the instructions in this article.
PC Engines APUs are similar x86-64 devices and their bios upgrade procedure is exactly the same. The only difference is the bios file you download from https://pcengines.github.io/ so be VERY SURE you are downloading the BIOS for the right APU device.
All APU1 will work with a file that is called apu1_v4.14.0.3.rom at this moment (version may increase in the future as they update it).
All APU2 will work with a file that is called apu2_v4.14.0.3.rom at this moment (version may increase in the future as they update it).
All APU3 will work with a file that is called apu3_v4.14.0.3.rom at this moment (version may increase in the future as they update it).
The benefit of installing BIOS updates is that you should get ECC RAM support enabled if your APU2 or APU3 has 4GB of RAM, and all APUs should get CPU boost feature, so the CPU frequency remains its normal 1 Ghz when all cores are in use but if there are tasks that load mostly one or two cores the CPU will turn off one or two cores and increase frequency of the cores left active to 1.4 Ghz, to increase performance on single-core workloads. While this isn't as important for OpenWrt as it is for pfSense and other firewall operating systems based on FreeBSD, it's still good to have it. Also newer BIOS versions have better support for SDCards.
The OpenWrt firmware image to use for this procedure
OpenWrt default images ship with /dev/mem access disabled so the tool we use to update the firmware cannot work.
I assembled an OpenWrt firmware image with that feature enabled, integrating web interface and all other tools you need for this procedure.
apu-bios-update-openwrt-x86-64-generic-squashfs-combined.img.gz
Uncompress and flash it to a USB drive or SD card, insert and power on the device.
Windows users can use 7-Zip or WinRAR to extract the IMG file. Rufus can be used to write the IMG file to a USB or SD card.
- Rufus: https://rufus.ie/en/
- 7-Zip: https://www.7-zip.org/
Prepare the device and connect to the internet
- Connect a cable from one of the two ports near to the USB ports (LAN) to your PC, disconnect your PC from any other wifi or internet connections.
- Connect the WAN port of the APU to the cable/DSL modem, disconnecting the router. It should reach the internet through the APU device now. This process will take only a few minutes.
If your current network setup does not allow you to just disconnect the router and connect to a modem over the ethernet port, please check if your current main router also has an IP in the same 192.168.1.x network.
If that is the case, change the IP of the LAN interface of the APU device from its own Luci web interface at 192.168.1.1, click on Network -→ Interfaces and click on Edit button of the LAN interface. Then change the IP, click Save, then click on the small arrow on the right side of the “Save and Apply” button, and select “Apply Unchecked”, the button changes to red and becomes “Apply Unchecked”, click on it and confirm the action. After it has started doing it, pull the LAN eternet cable from the PC, wait 10 seconds, connect it again and go to the new address you set.
Now you can connect a cable from the WAN port on the APU device (the ethernet port closest to the Serial port) to a LAN port of your current router. It should reach the internet through the APU device now.
Downloading the BIOS image and updating it
- If you want to use the web interface, go to 192.168.1.1 with Firefox/Chrome/Edge, click Login (don't set a password, we don't need it here) Click on Services -→ Terminal, it will open a page with a terminal screen (this is luci-app-ttyd package). If it shows a “unable to connect” error message click on Try Again button or reboot the device.
- write “root” as login and press Return/Enter key, It will now show console screen.
- You can also connect with ssh to root@192.168.1.1, or through the RS-232 console port, the following commands are the same.
- check that internet is accessible with ping -c 5 8.8.8.8
- download the latest firmware image from the repo https://pcengines.github.io/ and REMEMBER TO CHECK IT IS FOR THE RIGHT APU (APU1 or APU2 or APU3) you can copy the link from the “Binary” list and then rightclick on the terminal window to paste it with (for example) wget https://3mdeb.com/open-source-firmware/pcengines/apu2/apu2_v4.14.0.3.rom
- You can check the current installed firmware version with dmidecode It will dump a big amount of text, we care about the first few lines where you see BIOS Information and the Version string.
- give the flashing command flashrom -w apu* -p internal:boardmismatch=force This command may or may not print a bunch of errors about flash chips not recognized, but it will eventually find a chip it likes and start the flashing process. When it has finished it will say verifying flash VERIFIED and gives you back the console.
- reboot with reboot or just pull the power and see if all is still good or you cooked the device.
- Close any open OpenWrt tabs from the browser and start a new browser session, retry connecting to the device in 20-25 seconds or so it should be accessible again.
- Open the Kernel Log and look for the line starting with SMBIOS to verify the udated BIOS version.
Example of flashrom command output
root@OpenWrt:~# flashrom -w apu* -p internal:boardmismatch=force flashrom v1.2 on Linux 5.4.143 (x86_64) flashrom is free software, get the source code at https://flashrom.org Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns). coreboot table found at 0x77fae000. Found chipset "AMD FCH". Enabling flash write... OK. Found Winbond flash chip "W25Q64.V" (8192 kB, SPI) mapped at physical address 0x00000000ff800000. 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 contents... done. Erasing and writing flash chip... Erase/write done. Verifying flash... VERIFIED.
Example of stock dmidecode output
# dmidecode 3.2 Getting SMBIOS data from sysfs. SMBIOS 2.7 present. 7 structures occupying 306 bytes. Table at 0x77FB7020. Handle 0x0000, DMI type 0, 24 bytes BIOS Information Vendor: coreboot Version: 88a4f96 Release Date: 03/07/2016 ROM Size: 8192 kB Characteristics: PCI is supported PC Card (PCMCIA) is supported BIOS is upgradeable Selectable boot is supported ACPI is supported Targeted content distribution is supported BIOS Revision: 4.0 Firmware Revision: 0.0 Handle 0x0001, DMI type 1, 27 bytes System Information Manufacturer: PC Engines Product Name: apu2 Version: 1.0 Serial Number: 123456789 UUID: Not Settable Wake-up Type: Reserved SKU Number: Not Specified Family: Not Specified Handle 0x0002, DMI type 2, 8 bytes Base Board Information Manufacturer: PC Engines Product Name: apu2 Version: 1.0 Serial Number: 123456789 Handle 0x0003, DMI type 3, 21 bytes Chassis Information Manufacturer: PC Engines Type: Desktop Lock: Not Present Version: Not Specified Serial Number: Not Specified Asset Tag: Not Specified Boot-up State: Safe Power Supply State: Safe Thermal State: Safe Security Status: None OEM Information: 0x00000000 Height: Unspecified Number Of Power Cords: Unspecified Contained Elements: 0 Handle 0x0004, DMI type 4, 42 bytes Processor Information Socket Designation: Not Specified Type: Central Processor Family: Pentium Pro Manufacturer: AuthenticAMD ID: 01 0F 73 00 FF FB 8B 17 Signature: Type 0, Family 22, Model 48, Stepping 1 Flags: FPU (Floating-point unit on-chip) VME (Virtual mode extension) DE (Debugging extension) PSE (Page size extension) TSC (Time stamp counter) MSR (Model specific registers) PAE (Physical address extension) MCE (Machine check exception) CX8 (CMPXCHG8 instruction supported) APIC (On-chip APIC hardware supported) SEP (Fast system call) MTRR (Memory type range registers) PGE (Page global enable) MCA (Machine check architecture) CMOV (Conditional move instruction supported) PAT (Page attribute table) PSE-36 (36-bit page size extension) CLFSH (CLFLUSH instruction supported) MMX (MMX technology supported) FXSR (FXSAVE and FXSTOR instructions supported) SSE (Streaming SIMD extensions) SSE2 (Streaming SIMD extensions 2) HTT (Multi-threading) Version: AMD GX-412TC SOC Voltage: Unknown External Clock: Unknown Max Speed: Unknown Current Speed: Unknown Status: Unpopulated Upgrade: Other L1 Cache Handle: Not Provided L2 Cache Handle: Not Provided L3 Cache Handle: Not Provided Serial Number: Not Specified Asset Tag: Not Specified Part Number: Not Specified Core Count: 4 Characteristics: None Handle 0x0005, DMI type 32, 11 bytes System Boot Information Status: No errors detected Handle 0x0006, DMI type 127, 4 bytes End Of Table
Example of post-update dmidecode output
root@OpenWrt:/# dmidecode # dmidecode 3.2 Getting SMBIOS data from sysfs. SMBIOS 3.0 present. 13 structures occupying 554 bytes. Table at 0x7EE85040. Handle 0x0000, DMI type 0, 26 bytes BIOS Information Vendor: coreboot Version: v4.14.0.3 Release Date: 08/10/2021 ROM Size: 8192 kB Characteristics: PCI is supported PC Card (PCMCIA) is supported BIOS is upgradeable Selectable boot is supported ACPI is supported Targeted content distribution is supported BIOS Revision: 4.13 Firmware Revision: 0.0 Handle 0x0001, DMI type 1, 27 bytes System Information Manufacturer: PC Engines Product Name: apu2 Version: 1.0 Serial Number: 1159568 UUID: Not Settable Wake-up Type: Reserved SKU Number: 2 GB Family: Not Specified Handle 0x0002, DMI type 2, 14 bytes Base Board Information Manufacturer: PC Engines Product Name: apu2 Version: 1.0 Serial Number: 1159568 Asset Tag: Not Specified Features: None Location In Chassis: Not Specified Chassis Handle: 0x0003 Type: Motherboard Handle 0x0003, DMI type 3, 22 bytes Chassis Information Manufacturer: PC Engines Type: Desktop Lock: Not Present Version: Not Specified Serial Number: Not Specified Asset Tag: Not Specified Boot-up State: Safe Power Supply State: Safe Thermal State: Safe Security Status: None OEM Information: 0x00000000 Height: Unspecified Number Of Power Cords: 1 Contained Elements: 0 SKU Number: Not Specified Handle 0x0004, DMI type 4, 48 bytes Processor Information Socket Designation: CPU0 Type: Central Processor Family: Pentium Pro Manufacturer: AuthenticAMD ID: 01 0F 73 00 FF FB 8B 17 Signature: Type 0, Family 22, Model 48, Stepping 1 Flags: FPU (Floating-point unit on-chip) VME (Virtual mode extension) DE (Debugging extension) PSE (Page size extension) TSC (Time stamp counter) MSR (Model specific registers) PAE (Physical address extension) MCE (Machine check exception) CX8 (CMPXCHG8 instruction supported) APIC (On-chip APIC hardware supported) SEP (Fast system call) MTRR (Memory type range registers) PGE (Page global enable) MCA (Machine check architecture) CMOV (Conditional move instruction supported) PAT (Page attribute table) PSE-36 (36-bit page size extension) CLFSH (CLFLUSH instruction supported) MMX (MMX technology supported) FXSR (FXSAVE and FXSTOR instructions supported) SSE (Streaming SIMD extensions) SSE2 (Streaming SIMD extensions 2) HTT (Multi-threading) Version: AMD GX-412TC SOC Voltage: Unknown External Clock: Unknown Max Speed: Unknown Current Speed: Unknown Status: Populated, Enabled Upgrade: Unknown L1 Cache Handle: 0x0006 L2 Cache Handle: 0x0007 L3 Cache Handle: Not Provided Serial Number: Not Specified Asset Tag: Not Specified Part Number: Not Specified Characteristics: Hardware Thread Execute Protection Handle 0x0005, DMI type 7, 27 bytes Cache Information Socket Designation: CACHE1 Configuration: Enabled, Not Socketed, Level 1 Operational Mode: Unknown Location: Internal Installed Size: 0 kB Maximum Size: 0 kB Supported SRAM Types: Unknown Installed SRAM Type: Unknown Speed: Unknown Error Correction Type: Unknown System Type: Data Associativity: 8-way Set-associative Handle 0x0006, DMI type 7, 27 bytes Cache Information Socket Designation: CACHE1 Configuration: Enabled, Not Socketed, Level 1 Operational Mode: Unknown Location: Internal Installed Size: 0 kB Maximum Size: 0 kB Supported SRAM Types: Unknown Installed SRAM Type: Unknown Speed: Unknown Error Correction Type: Unknown System Type: Instruction Associativity: 2-way Set-associative Handle 0x0007, DMI type 7, 27 bytes Cache Information Socket Designation: CACHE2 Configuration: Enabled, Not Socketed, Level 2 Operational Mode: Unknown Location: Internal Installed Size: 2048 kB Maximum Size: 2048 kB Supported SRAM Types: Unknown Installed SRAM Type: Unknown Speed: Unknown Error Correction Type: Unknown System Type: Unified Associativity: 16-way Set-associative Handle 0x0008, DMI type 32, 11 bytes System Boot Information Status: No errors detected Handle 0x0009, DMI type 16, 23 bytes Physical Memory Array Location: System Board Or Motherboard Use: System Memory Error Correction Type: None Maximum Capacity: 2 GB Error Information Handle: Not Provided Number Of Devices: 1 Handle 0x000A, DMI type 17, 40 bytes Memory Device Array Handle: 0x0009 Error Information Handle: Not Provided Total Width: 64 bits Data Width: 64 bits Size: 2048 MB Form Factor: SODIMM Set: None Locator: DIMM 0 Bank Locator: CHANNEL A Type: DDR3 Type Detail: Synchronous Unbuffered (Unregistered) Speed: 1333 MT/s Manufacturer: Not Specified Serial Number: 00000000 Asset Tag: Not Specified Part Number: Not Specified Rank: 1 Configured Memory Speed: 1333 MT/s Minimum Voltage: 1.5 V Maximum Voltage: 1.5 V Configured Voltage: Unknown Handle 0x000B, DMI type 41, 11 bytes Onboard Device Reference Designation: SATA controller Type: SATA Controller Status: Enabled Type Instance: 0 Bus Address: 0000:00:11.0 Handle 0x000C, DMI type 127, 4 bytes End Of Table
Examples of Kernel Log output showing "before and after" firmware versions
Before update
[ 0.000000] SMBIOS 2.7 present. [ 0.000000] DMI: PC Engines apu2/apu2, BIOS 88a4f96 03/07/2016
After update
[ 0.000000] SMBIOS 3.0 present. [ 0.000000] DMI: PC Engines apu2/apu2, BIOS v4.14.0.3 08/10/2021