Pc Engines Apu4d4

0 views
Skip to first unread message

Fermina Enge

unread,
Aug 3, 2024, 3:13:09 PM8/3/24
to choalonanme

The motherboard specs are available on the apu4d4web page. The mountinginstructions were a bit confusing as apu cooling assembly instructionsdoes not demonstrate APU4; which has a single chip to cool down. The heatspreader placement fixtureis quite helpful to place the alu heat spreaderproperly.

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 -bios-update
(that is more or less a copu-paste of what I did to help others in the thread linked by frollic)

In this post, I will particularly show how to install Ubuntu 18.04 on PC Engines apu4d4 onto its mSATA SSD module (msata16g) using network/PXE boot and serial console. I guess all or part of this post can be applied in many different cases. There are six small steps:

I am using macOS and normally I use screen to connect to the serial port. However, after PXE, during Ubuntu installation, I see strange characters with screen but minicom works fine. I do not know the reason yet -they are using the same settings-, but if you experience such a thing, try a different program.

Attention: Later you may configure CPU core isolation for DPDK, and when you do that, the isolated cores will not be used for build as well. So if you want to re-build again, pay attention that all cores are enabled for the OS. Otherwise, the build process will take even longer.

Then configure the build. This process will take a minute or so. This creates the build folder (you can delete it and re-run this for a new and clean start) and configures this folder accordingly. The options below builds only the igb driver (otherwise all drivers are built if dependencies are satisfied), builds all examples (if not interested in the examples, do not use this) and does not build tests. By default, the build type is release and platform is native. At the end of this configuration run, it shows what is going to be build.

The use of Intel i211 with DPDK requires the ethernet port to be unbound from its OS driver (also called igb) and bound to Virtual Function I/O (vfio) driver. In other and technical words, because OS igb driver is not a bifurcated driver, VFIO should be used. Then a DPDK application can access this ethernet port (and OS cannot, so it cannot be shared between OS and DPDK application).

In order to do this, normally IOMMU has to be enabled but the embedded processor on apu4d4 does not have IOMMU. So a special configuration vfio.enable_unsafe_noiommu_mode=1 has to be added to kernel cmdline in GRUB configuration (GRUB_CMDLINE_LINUX_DEFAULT key in /etc/default/grub file).

Not a must but for consistent and higher performance, the CPU cores that will be used with a DPDK application should also be isolated (not used by Linux) and their power management should be disabled, so they always stay at power state C1. For this purpose, following can be used again to be added to GRUB_CMDLINE_LINUX_DEFAULT:

While there are 2 mainline kernel drivers (leds-apu and pcengines-apuv2) that can control the LEDs on various APU models, if you are running mainline PC Engines firmware it is advised to let ACPI handle LED control. In conjunction with the ledtrig_netdev module, the APU LEDs can be controlled through the following sysfs entries:

A common use case is to use the APU as a wireless router. In this scenario, one wired NIC (wan0) is connected upstream to an ISP and the remaining wired & wireless NICs are bridged (br0) together as the LAN. A typical LED configuration using the netdev trigger might be:

c80f0f1006
Reply all
Reply to author
Forward
0 new messages