Flashrom error on apu2

Hi all,

getting an error on apu2 board while updating the fw to 4.19.0.1. The same after rebooting ipfire.
What could be the culprit?

pakfire status

Core-Version: 2.27-x86_64
Core-Update-Level: 175
Last update: 41m 44s ago
Last core-list update: 27m 51s ago
Last server-list update: 27m 53s ago
Last packages-list update: 27m 52s ago
Core-Update available: no
Package-Updates available: 0
Reboot required: no
+++

pakfire info flashrom

Name: flashrom
Summary:
Version: 1.2-2
Size: 170.00 KB
Dependencies:
Pakfile: flashrom-1.2-2.ipfire
Service InitScripts:
Installed: yes
Status: up-to-date
+++

pwd ; ls -al

/lib/firmware/pcengines/apu
total 51208
drwxr-xr-x 2 root root 4096 Jun 12 15:22 .
drwxr-xr-x 3 root root 4096 Jun 9 22:34 …
-rw-r–r-- 1 root root 2097152 Jun 9 20:36 apu1_v4.17.0.3.rom
-rw-r–r-- 1 root root 8388608 Jun 9 20:36 apu2_v4.19.0.1.rom
-rw-r–r-- 1 root root 8388608 Jun 9 20:36 apu3_v4.19.0.1.rom
-rw-r–r-- 1 root root 8388608 Jun 9 20:36 apu4_v4.19.0.1.rom
-rw-r–r-- 1 root root 8388608 Jun 9 20:36 apu5_v4.19.0.1.rom
-rw-r–r-- 1 root root 8388608 Jun 9 20:36 apu6_v4.19.0.1.rom
-rw-r–r-- 1 root root 8388608 Jun 9 20:36 apu7_v4.19.0.1.rom
+++

firmware-update update

Detected PC Engines apu2 running BIOS version v4.17.0.2
New firmware version available: v4.19.0.1

You are going to flash the firmware on device. This is a dangerous operation
that might potentially damage your device.

Please do NOT TURN OFF the system while the update is in progress and do
not abort the process.

Firmware file: /lib/firmware/pcengines/apu/apu2_v4.19.0.1.rom

Do you want to proceed? [y/n] y
Flashing process is starting now…
PLEASE DO NOT TURN OFF THE SYSTEM WHILE FLASHING!
flashrom v1.2 on Linux 6.1.30-ipfire (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 0xcfed0000.
flashrom: symbol lookup error: flashrom: undefined symbol: pci_filter_init, version LIBPCI_3.3
Error: Flashing the firmware was not successful

1 Like

The specific error flashrom: symbol lookup error: flashrom: undefined symbol: pci_filter_init, version LIBPCI_3.3 is saying that the flashrom program is trying to use a function called pci_filter_init from a library related to the PCI subsystem, but it can’t find this function.

This is the first time I encounter this problem. Did you manage to update the firmware before?

@ms can this be an IPFire build problem?

Before 175 no issues updating the apu2 fw.
If this is not a build problem i do scratch install ipfire. No problem.

CHers

pciutils was updated from version 3.8.0 to 3.9.0 and the updated library was shipped with CU175.

I just ran ldd on flashrom in CU174 and CU175 and the libraries are linked to the same file in both cases.
libpci.so.3

Try running the following command on your C175 system

ldd /usr/sbin/flashrom

In terms of the library file links it should be the same as what I just found

linux-vdso.so.1 (0x00007fff93990000)
libpci.so.3 => /lib/libpci.so.3 (0x00007a2469992000)
libusb-1.0.so.0 => /usr/lib/libusb-1.0.so.0 (0x00007a2469972000)
libc.so.6 => /lib/libc.so.6 (0x00007a246978c000)
libresolv.so.2 => /lib/libresolv.so.2 (0x00007a246977a000)
libudev.so.1 => /lib/libudev.so.1 (0x00007a2469752000)
libatomic.so.1 => /usr/lib/…/lib64/libatomic.so.1 (0x00007a2469748000)
/lib64/ld-linux-x86-64.so.2 (0x00007a24699be000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007a246972c000)

If the libpci.so.3 link is missing then something went wrong during the upgrade.

If all the links are the same then I don’t understand what is happening.

I did the upgrade to that version on my apu4 on CU174 and everything went without a hitch and the library links are the same as the above ones for CU175.

The symlink for libpci.so.3 to libpci.so.3.9.0 can be checked as follows:-

ls -hal /lib/libpci.so.3*
lrwxrwxrwx 1 root root 15 Jun 9 21:13 /lib/libpci.so.3 → libpci.so.3.9.0
-rwxr-xr-x 1 root root 140K Jun 9 22:27 /lib/libpci.so.3.9.0

This shows that the new library, libpci.so.3.9.0 is on the system and libpci.so.3 is symlinked to it.

Does your system show the same?

1 Like

7 posts were split to a new topic: Why i have there such a number in APU BIOS?

As mentioned a scratch install of CU175 solved the issue.

Thank you for your time spent.

3 Likes

My system shows the same as above but i cannot upgrade with flashrom anymore - at least not from my

Board       : PC Engines apu4
HW Version  : 1.0
...
BIOS Version: v4.16.0.4 (05/25/2022)

I get the same error message as Nils:

...
coreboot table found at 0xcfed0000.
flashrom: symbol lookup error: flashrom: undefined symbol: pci_filter_init, version LIBPCI_3.3
Error: Flashing the firmware was not successful

ldd /usr/sbin/flashrom

linux-vdso.so.1 (0x00007fffcf7c7000)
libpci.so.3 => /lib/libpci.so.3 (0x000078c12b3ec000)
librt.so.1 => /lib/librt.so.1 (0x000078c12b3e7000)
libusb-1.0.so.0 => /usr/lib/libusb-1.0.so.0 (0x000078c12b3c7000)
libc.so.6 => /lib/libc.so.6 (0x000078c12b1e1000)
libresolv.so.2 => /lib/libresolv.so.2 (0x000078c12b1cf000)
libudev.so.1 => /lib/libudev.so.1 (0x000078c12b1a7000)
libatomic.so.1 => /usr/lib/../lib64/libatomic.so.1 (0x000078c12b19b000)
/lib64/ld-linux-x86-64.so.2 (0x000078c12b417000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x000078c12b180000)

ls -hal /lib/libpci.so.3*

lrwxrwxrwx 1 root root   15 Jun 12 17:13 /lib/libpci.so.3 -> libpci.so.3.9.0
-rwxr-xr-x 1 root root 140K Jun 12 18:29 /lib/libpci.so.3.9.0

So the only solution is to reinstall from scratch ?

Your best choice may be to re-install version Core Update 174 and then do the firmware-update and then do the core update to 175.

There does look to be a problem with the pciutils package version 3.9.0

Fedora have found a problem with the cpupower package that is caused by the pciutils package and having the same error message as you and @rossomonza reported.

Fedora apparently made some changes to their pciutils install to make things work but currently I can’t access the fedorproject.org site at all. I keep getting:-

The connection has timed out

An error occurred during a connection to fedoraproject.org. PR_IO_TIMEOUT_ERROR

Error code: PR_IO_TIMEOUT_ERROR

Any fix will require a new compile build to make pciutils work and so will end up in CU176. Hence my suggestion to re-install CU174 and then do the apu firmware update.

2 Likes

My inability to access the fedoraproject.org sites was something to do with the IPFire Proxy. I changed my browser to use the system proxy and sites are accessible now.

Anyway, found the patch that Fedora have used for pciutils-3.9.0 to fix the problem of some symbols not being made available.

However version pciutils-3.10.0 has been released and Fedora have installed that and it doesn’t need the extra patch anymore as they have removed it. So I will submit an update patch for pciutils-3.10.0

Your quickest solution will still be to re-install CU174, do the firmware update then upgrade to CU175.

After APU BIOS version 4.19.0.1 I think it will be a long time, if at all, before another BIOS update is issued.
See:-
https://community.ipfire.org/t/implication-of-eol-firmware-announcement-for-apu-boards/9316

2 Likes

ok, thx for your ideas.

Maybe i will then wait for a 176 with corrected pciutils pkg - I did not reinstall from scratch yet (the setup of the Huawei 600VE modem was a bit tricky) and so far everything else runs smoothly.

With the GX-412TC EOL the FW will probably have to move to a new SOC anyway. :face_with_diagonal_mouth:

That’s sad, it was a very good platform for ipfire.