PC Engines apu4d4 bios update help

I am trying to update the bios on my pc engines apu4d4

I downloaded my bin file from here
https://pcengines.github.io/#mr-57

I went to the software tab and installed the openssh-sftp-server package and the flashrom package

i used filezilla to upload my bin file

I ran the command to update the bios and I got this error:

root@OpenWrt:~# flashrom -p internal -w apu4_v4.16.0.2.rom --fmap -i COREBOOT
flashrom v1.2 on Linux 5.4.179 (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).
Critical error: open(/dev/mem): No such file or directory
Error accessing low megabyte, 0x100000 bytes at 0x0000000000000000
/dev/mem mmap failed: No such file or directory
Failed getting access to coreboot low tables.
Found chipset "AMD FCH".
Enabling flash write... Critical error: open(/dev/mem): No such file or directory
Error accessing SB600 SPI registers, 0x1000 bytes at 0x00000000fec10000
/dev/mem mmap failed: No such file or directory
FAILED!
FATAL ERROR!
Error: Programmer initialization failed.
root@OpenWrt:~#

I did some googling but I am not understanding what I need to do to enable the /dev/mem so i can upgrade my bios

any help is appreciated

Why don't you ask PC Engines?

Even though I agree with @lleachii, you should be able to find some useful info here Tips for getting cheap used x86-based firewall with full Gbit NAT (a PC Engines APU) if you are in the US

When I updated mine (D1), I booted a specific image (not openwrt) for flashing.
Probably the TinyCore from https://pcengines.ch/howto.htm#TinyCoreLinux

2 Likes

I was hoping i was missing something and that i could update the bios from openwrt without having to boot into a special live image to do it

Yes, and no.

I believe its doable, if you enable access to /dev/mem, which is done by a kernel parameter, and will require a reboot.

It's described in the thread I linked to, but i didn't go through with it, used TinyCore.

Read here :

i used Method 4: Generic method using Debian Live USB drive

1 Like

I used the generic method here and got myself updated. thanks!

no it is not possible to use normal OpenWrt image because OpenWrt disables access to /dev/mem for security reasons. This is a compile option, so to enable it you must recompile the kernel. It's not something you can just "change" and reboot.

I had to recompile a special OpenWrt image with that option enabled, that image is available in the generic Pcengines APU upgrade guide on the OpenWrt wiki https://openwrt.org/toh/pcengines/apu-bios-update
(that is more or less a copu-paste of what I did to help others in the thread linked by frollic)

1 Like

because their instructions already tell you to do that, it's OpenWrt that causes flashrom to fail because the access to /dev/mem is disabled at kernel compile time.

1 Like

I more so meant their tools...but I understand that part now too.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.