Tech/HowTo/PC Engines

From lathama
< Tech‎ | HowTo
Jump to navigation Jump to search

About

I have used hardware from PC Engines for years now and will add some notes here where relevant

Case Labels

APU2 Linux Install

Linux on a PCEngines APU2 Series host

Assumptions
  • Serial console speed desired is 115200
  • Many if not all installers will setup the console redirection if booted that way
  • This method allows for use of recent install media without special changes.
Install Debian or any reasonable distro on a PCEngines APU2 series system
  1. Boot an install image (Normal Debian Network install would be ideal like https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-9.4.0-amd64-netinst.iso)
  2. hover in the grub menu the Install option
  3. press TAB to edit command line
  4. backspace to vga and retype this
  5. vga=no console=ttyS0,115200n8 initrd=/install.amd/initrd.gz --- console=ttyS0,115200n8
  6. press enter and be happy

Notes: There is no VGA device, there is an HDMI device unused so you do need to set vga=no

APU1 Firmware Update

Modern Linux systems may not allow iomem access because security is a thing. So if you see /dev/mem mmap failed: Operation not permitted then follow these steps

Edit /etc/default/grub
GRUB_CMDLINE_LINUX="iomem=relaxed"
Update GRUB
update-grub2
Reboot
init 6

Flash the rom

 wget http://pcengines.ch/file/apu1_v4.8.0.3.rom.tar.gz
 tar -xf apu1_v4.8.0.3.rom.tar.gz
 flashrom -p internal:boardmismatch=force -w apu1_v4.8.0.3.rom -c "MX25L1605A/MX25L1606E/MX25L1608E"
example
root@apu1 # flashrom -p internal:boardmismatch=force -w apu1_v4.8.0.3.rom -c "MX25L1605A/MX25L1606E/MX25L1608E"
flashrom v0.9.9-r1954 on Linux 4.9.0-8-amd64 (x86_64)
flashrom is free software, get the source code at https://flashrom.org

Calibrating delay loop... OK.
coreboot table found at 0x7efdf000.
Found chipset "AMD SB7x0/SB8x0/SB9x0".
Enabling flash write... OK.
Found Macronix flash chip "MX25L1605A/MX25L1606E/MX25L1608E" (2048 kB, SPI) mapped at physical address 0x00000000ffe00000.
This coreboot image (PC Engines:apu1) does not appear to
be correct for the detected mainboard (PC Engines:APU).
Proceeding anyway because user forced us to.
Reading old flash chip contents... done.
Erasing and writing flash chip... Erase/write done.
Verifying flash... VERIFIED.
Reboot
root@apu1 # dmidecode -s bios-version
v4.8.0.3

APU4 Firmware Update

wget linkfrom https://pcengines.github.io
apt install flashrom
flashrom -p internal -w apu--the--version.rom
< much text testing to see what chip to use>
Reading old flash chip contents... done.
Erasing and writing flash chip... Erase/write done.
Verifying flash... VERIFIED.

APU2 Firmware Update

As an example here is a process but note the various versions of the bios and the downloads for APU1, APU2, APU3 etc... The steps here also force an issue where the board name does not exactly match because of a past naming mistake.

On the APU2 as root on Debian (9.4 as of this note)
mkdir /root/apu2
cd /root/apu2
wget http://pcengines.ch/file/apu2_v4.6.9.rom.tar.gz
tar -xf apu2_v4.6.9.rom.tar.gz
apt install flashrom
flashrom -p internal:boardmismatch=force -w apu2_v4.6.9.rom
flashrom v0.9.9-r1954 on Linux 4.9.0-6-amd64 (x86_64)
flashrom is free software, get the source code at https://flashrom.org
Calibrating delay loop... OK.
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 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.
After reboot
dmidecode -s bios-version
v4.6.9
Showing a clean process where the mainboard id matches after the update
flashrom -p internal -w apu2_v4.6.9.rom
flashrom v0.9.9-r1954 on Linux 4.9.0-6-amd64 (x86_64)
flashrom is free software, get the source code at https://flashrom.org

Calibrating delay loop... delay loop is unreliable, trying to continue OK.
coreboot table found at 0xcffd5000.
Found chipset "AMD FCH".
Enabling flash write... OK.
Found Winbond flash chip "W25Q64.V" (8192 kB, SPI) mapped at physical address 0x00000000ff800000.
Reading old flash chip contents... done.
Erasing and writing flash chip... Erase/write done.
Verifying flash... VERIFIED.

2018-08-28

Example update to new firmware

root@SGM-STL-PVH-002:~# wget http://pcengines.ch/file/apu2_v4.8.0.3.rom.tar.gz
root@SGM-STL-PVH-002:~# tar -xf apu2_v4.8.0.3.rom.tar.gz
root@SGM-STL-PVH-002:~# flashrom -p internal -w apu2_v4.8.0.3.rom
flashrom v0.9.9-r1954 on Linux 4.9.0-8-amd64 (x86_64)
flashrom is free software, get the source code at https://flashrom.org

Calibrating delay loop... OK.
coreboot table found at 0xcffd5000.
Found chipset "AMD FCH".
Enabling flash write... OK.
Found Winbond flash chip "W25Q64.V" (8192 kB, SPI) mapped at physical address 0x00000000ff800000.
Reading old flash chip contents... done.
Erasing and writing flash chip... Erase/write done.
Verifying flash... VERIFIED.
root@SGM-STL-PVH-002:~#

Resources

Firmware releases https://pcengines.github.io/