# PC Engines GmbH - FAQ, HowTo, etc. ...

### Welcome to the HOW-TO pages of PC Engines

This webpage contains a collection of answers to frequently asked questions and problems people have.
Suggestions, corrections, additions, etc. may be sent to support1207[at]pcengines.ch
Please also see our forum for more information at pcengines.info/forums
Troubleshooting

- The loop-back test: put a paper clip in the female DB9 connector which would go on the alix/apu board at pins 2 and 3, then you should receive typed characters in your terminal emulation program. This tests the terminal emulation program, the USB-RS232 and the serial cable and this test MUST work before blaming any board attached to it. But this test does not prove whether or not a null-modem cable is used.
- The most common mistake people make is not using a null-modem cable: If you have a multimeter, check that the pins 2 and 3 are crossed. Do NOT use gender changers!
- The default baud rate for alix boards is 38400,8n1 and for apu boards 115200,8n1.
- The recommended terminal emulation program for any platform is PuTTY.
- Pressing the button S1 while powering up, temporarily enables a previously in the BIOS disabled serial console.
- To test if an apu board boots up, even if there is no serial console, boot it with TinyCore and a beep should be heard after about 30s-40s.

The output of the BIOS redirected to the serial port can be disabled, this can be useful when the port is needed for a controlling device.
"May the Null modem cable be with you!"
alix Prepare a CF with this FreeDOS image and add the files found in the BIOS file alix v0.99m found here
Then boot the alix and execute sb.com
As an alternative there is also an Xmodem upload methode, for alix2 see alix2.upd and for alix3d2 see alix3.upd
If an alix board is bricked an LPC1a adapter for the corresponding board is needed. Please leave a note when ordering which board it is needed for.

The alix3d3 and alix1d have an AwardBIOS, because TinyBIOS does not support VGA and AC97.
In case of the alix3d3, if the VGA port and AC97 are not used, the TinyBIOS of the alix3d2 can be used instead.

## All BIOS versions with release notes for apu boards: https://pcengines.github.io/

apu boards We suggest using TinyCore which comes with the tool `flashrom`. Once an USB stick is prepared with TinyCore the BIOS file needs to be copied to the USB stick.
There are coreboot legacy versions and coreboot mainline versions for all boards
If an apu board is bricked an spi1a is needed, except apu1 boards need a lpc1aapu
building corebot for apu1 coreboot source: www.pcengines.ch/tmp/coreboot_140908.tar.gz
Voyage Linux image for apu with the complete toolchain to build the BIOS: www.pcengines.ch/tmp/apu_bios_builder.img.gz
SageBios_PCEngines_apu_sources_for_publishing_20140401_GPL_package.tar.gz
SageBios_PCEngines_apu_sources_for_publishing_20140405_GPL_package.tar.gz
building corebot for apu2 and apu3 For building apu2 coreboot please see: Building firmware using APU2 image builder
Setting up of a bootable drive to support apu flash upgrades can be a bit tricky.
TinyCore Linux is a small system that boots up quite quickly. The apu board can boot TinyCore from an USB memory stick or from an SD card in the internal slot.
Installation under Windows
apu1/apu2 TinyCore USB installer v1.8
Installation under Linux or MacOS Format a USB stick or SD card with a FAT file system, then make it bootable with syslinux.
Finally extract the files found in apu2-tinycore6.4.img.gz or TinyCore6.4_2017.tar.bz2 and copy them to the USB stick.
Instructions for FreeBSD
Source for building apu-tinycore-usb-installer.exe using NSIS
Please visit http://linux.voyage.hk/.
The root password of Voyage Linux is 'voyage'.
General informations How to prepare any storage device with Voyage Linux on any Linux machine based on the official Voyage tarball:

- run some Linux, perhaps Voyage Linux on an alix board or any other PC
- attach the target storage device
- get the Voyage Linux tar.gz file, wget http://...
- decompress the image with tar xfvj
- cd into the new directory and execute ./usr/local/sbin/voyage.update and follow the steps

apu Instead of getting an USB-mSATA adapter for a single use, you can boot the apu from USB and write an image on the mSATA inserted in the apu board.
To install Voyage Linux on an mSATA module follow these steps:

- prepare an USB stick with TinyCore USB installer v1.8
- get the latest amd64.tar.bz2 file from http://www.voyage.hk/download/voyage/amd64/, and copy it to the TinyCore USB-Stick
- boot TinyCore on the apu board
- cp voyage-0.X_amd64.tar.bz2 /tmp/
- cd /tmp/
- mkdir /mnt/cf
- tar xf voyage-0.X_amd64.tar.bz2
- cd voyage-0.X_amd64
- start the installation script with /tmp/voyage-0.X_amd64/usr/local/sbin/voyage.update

for autologin install mingetty and change /etc/inittab accordingly
`#T0:23:respawn:/sbin/getty -L ttyS0 115200
T0:23:respawn:/sbin/mingetty --autologin root --noclear ttyS0`
For a nice comparision of the speed of the Ethernet port under different OS types see: IPFire vs. pfSense
Many installation images do not redirect the console to the serial port.
The redirection is usually needed in two places.

1. the bootloader: see syslinux.cfg
2. the console prompt: /etc/inittab which might need something like this: `ttyS0::respawn:/sbin/getty -nl /sbin/autologin 115200 ttyS0`

Linux installation images usually have a compressed filesystem like initrd.gz which can be expanded. After changing some files, it can be compressed again.
These are the typical steps:

1. decompress
   - `gunzip initrd.gz` (returns one file called 'initrd')
   - `mkdir initrd_rootfs`
   - `sudo sh -c 'cd initrd_rootfs && cpio -i' < initrd`
2. change some files
3. compress
   - `sh -c 'cd cinitrd_rootfs && sudo find . | sudo cpio -H newc -o' | gzip -9 > initrd.gz`

alix
apu
alix

- download OPNSense (OPNsense-X.Y-OpenSSL-nano-x86.img.bz2) or pfSense (pfSense-X.Y.Z-RELEASE-4g-x86-nanobsd.img.gz) image. (nano, x86, non-vga)
- decompress the image and write it to a CF using a USB-CF adapter

apu

- download the latest serial memstick amd64 installer for OPNSense (e.g. OPNsense-17.7-OpenSSL-serial-amd64.img.bz2) or pfSense (e.g. pfSense-CE-memstick-serial-2.3.4-RELEASE-amd64.img.gz)
- write image to an USB stick using Etcher (Etcher is a graphical writing tool for Mac OS, Linux and Windows)
- boot apu1/apu2 from USB with installed mSATA/SD
- follow the instructions of the installer

https://teklager.se/en/knowledge-base/apu2-1-gigabit-throughput-pfsense/
apu1 / apu2 boot via iPXE and get the installation image directly from IPfire via HTTP without the need of preparing a bootable storage device.
These are the steps:

- enable network boot in the apu BIOS setup
- boot the apu and press CTRL-B to get into the iPXE console
- receive an IP address from your local DHCP Server by typing: ifconf
- type: chain http://boot.ipfire.org/releases/ipfire-boot/latest/ipxe.kpxe
- install IPfire with the serial console option

Option 1: Ubuntu
The unmodified files 'initrd.gz' and 'linux' from mini.iso plus a modified 'syslinux.cfg' can be found here.
This allows an easy installation of Ubuntu on apu boards.
Simply add these three files to the FAT partition of an USB stick previously prepared with the TinyCore USB installer v1.8.
Here is another guide to prepare an USB stick with Ubuntu 16.04

Option 2: Ubuntu Server installation

- Download ubuntu server iso, e.g. ubuntu-16.04.7-server-amd64.iso
- Use rufus or any suitable tool to write it to an USB drive
- Delete (or remark with #) the line "ui gfxboot bootlogo" in /isolinux/isolinux.cfg
- Power-up apu board and boot from USB
- Press TAB to modify kernel boot options and add "vga = 0x000 console=ttyS0,115200n8 --- "
- Enable ssh towards the end of the installation for remote login.

CentOS7 disk image for all apu boards (Dec. 2018)

1. make an USB stick bootable with syslinux or use the convenient TinyCore USB installer.
   The USB installer labels the disc TINYCORE, which syslinux.cfg refers to, change as needed, see below
2. copy all folders from the CentOS-7-x86_64-Minimal.iso to the USB drive
3. change the content of syslinux.cfg in the root directory of the USB drive to this:
   `SERIAL 0 115200
   CONSOLE 0
   default centos
   ALLOWOPTIONS 0
   TIMEOUT 600
   label centos
   kernel isolinux/vmlinuz
   append initrd=isolinux/initrd.img inst.stage2=hd:LABEL=TINYCORE quiet console=ttyS0,115200n8
   `

### or do this:

1. dd CentOS iso image directly to USB Stick, it will be bootable dd if=CentOS-7-x86_64-Minimal-1611.iso of=/dev/<USB Stick>
2. Boot APU2 from USB Stick â CentOS installer boot menu is automatically visible on the APU serial console (attached screenshot apu2_install_1.png)
3. Select âInstall CentOS Linux Linux 7â and use TAB to edit boot options
4. append âconsole=ttyS0,115200n8â and Enter to boot
5. It takes about 20 seconds before the output of the installerâs boot appears.
6. follow the installation as usual

Why install ESXi? Because, once ESXi is installed any other OS can be installed as a guest of ESXi, even OS's which depend on a graphics adapter like Windows.
ESXi 6.5 Image (root pw: vmwareesxi) also see Instructions for vSphere Hypervisor ESXi 6.5.0 installation on APU2 (4GB RAM required)

1. Preparing the installation:
   - ESXi needs 4GB RAM
   - Download the latest ESXi installer .ISO image from VMware (ESXi Version 6.0.0 Update2 or later is needed)
   - Write the ESXi installer .iso file to a USB memstick. Rufus on Windows is recommended. Allow Rufus to update menu.c32.
   - After the flashing process is complete, edit one line in the file boot.cfg file in the root directory of the USB stick like this:
     `kernelopt=runweasel text nofb com1_baud=115200 com1_Port=0x3f8 tty2Port=com1 gdbPort=none logPort=none`
2. Boot the apu1/apu2 board with the USB stick and install ESXi on the SD or on the mSATA
3. After the installation succeeded, the same change in boot.cfg needs to be done on the SD/mSATA to redirect the console to the serial port. Boot the apu board with TinyCore and edit the file.
4. Once the apu successfully started ESXi as shown below, start VMware and connect to the remote server.
5. Open a browser with the provided address and start the vSphere Web Client. Or use the depricated 'VMware vSphere Client' (Windows only) can help configure the host and the guest. Please see VMware Knowledge Base

ESXi 6.5 Image (root pw: vmwareesxi) also see
Important: the SD slot on the apu2 boards is directly connected to the CPU and needs the module SDHCI to work.
Do not use an SD to boot FreeBSD based OS like pfSense and OPNSense on apu2 boards. Only very recent kernel versions fully support booting via SDHCI.
Try an USB-SD adapter in case of related troubles. If it works with the USB-SD adapter, but not in the SD slot, then the SDHCI module is missing ...
This is a short and incomplete list of working 3G miniPCIe modems:

Manufacturer | Series | URL | comment
--- | --- | --- | ---
Sierra Wireless | MC8790 | http://www.sierrawireless.com/... |
Sierra Wireless | MC730x | http://www.sierrawireless.com/... |
Sierra Wireless | MC77xx | http://www.sierrawireless.com/... |
Ericsson | f5521 |  |
Ericsson | f5321gw |  |
HUAWEI | ME909u-521 | http://consumer.huawei.com |

Avoid Sierra Wireless modules ending with a "V" standing for voice, as they have a proprietary pinout.
Many usefull informations can also be found here: TXLAB.

Hint: check for SIM card with:
AT+CMEE=2
AT+cpin?

The MAC address of the first NIC on all PC Engines boards is derived of its serial number, the following NICs have subsequent addresses.
This is the conversion from MAC ID to serial number and vice versa:

MAC ID = 00:0d:b9 (our OUI) : (serial + 64) * 4
serial = (MAC ID & 0x000000FFFFFF) / 4 - 64

MAC ID Serial converter

MAC ID |  |
Serial number |  |

What the all alix and apu boards have in common The LED's on the boards are connected as inputs, and should be removed if these signals are intended to be used GPIOs.
Otherwise the LEDs will die due to the appllied 3.3V.
The button S1 is also a regular GPIO connected to the CPU.
alix The LEDs are D4, D5, D6 plus the button S1, which all are also connected to J13.
For additional GPIOs an I2C IO-Expander from various chip manufacturer are available, like NXP or TI. There are also many inexpensive easy to use modules available at aliexpress.com.
Also see here and here.
What all apu boards have in common The apu boards have two types of GPIOs:

- GPIOs connected to the CPU, e.g. the three LEDs and button S1, see https://github.com/pcengines/apu_gpio_lib
- GPIOs connected to the NCT5104, see https://github.com/pcengines/linux-gpio-nct5104d

apu1 apu1-leds.tgz
apu2/apu3/apu4 https://github.com/pcengines/apu_gpio_lib
NCT5104 Datasheet v1.9
I2C This is what is needed under Voyage Linux to get I2C working:
`root@voyage:~# apt-get install i2c-tools libi2c-dev
root@voyage:~# modprobe i2c-dev
root@voyage:~# i2cdetect 0
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0.
I will probe address range 0x03-0x77.
Continue? [Y/n]
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: 10 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
`
This section provides information about add-on cards for apu boards.
known good

Function | Manufacturer | Card type | Chipset | Comment | Source
--- | --- | --- | --- | --- | ---
Network | LogiLink | PCIe | RTL8111 |  |
USB | LogiLink | PCIe | μPD720202 | datasheet |
SATA | IOcrest | PCIe | Marvell 88SE9215 | gets rather hot | Amazon aliexpress

known bad

Function | Manufacturer | Card type | Chipset | Comment | Source
--- | --- | --- | --- | --- | ---
Network | unknown | half-sized miniPCIe | RTL8111 |  |
SATA | asmedia | PCIe | asm106x |  |

alix Disk Images

winxpe_raw_files-tools-instructions.rar *
winxp16gb.img.gz *
winxp_4gb_image.rar *
voyage-0.9.2.img.zip

*Please make sure you have a valid license
Use this alix_FreeDOS_Installer_v1.3 to create FreeDOS bootable CF card.
apu Disk Images

CentOS7 disk image for all apu boards (Dec. 2018)
centosapu20140822.gz
OpenBSD_install55_Serial115200_amd64.img.tar.gz
apu_bios_builder.img.gz
debian-7.8-amd64-CD-1.iso

How to write compressed disk images to mSATA Prepare an USB stick with TinyCore, add the compressed image to the stick and boot the apu board with it.
Use the command "fdisk -l" to determine the device name of the target storage.
In the following commands it is presumed that /dev/sdX is the target device name (but sda or sdb is more likely):

zip | `unzip -p diskimage.img.zip | pv | dd of=/dev/sdX bs=1M`
gz | `gzip -dc diskimage.img.gz | pv | dd of=/dev/sdX bs=1M`
tar.gz | `tar xzOf diskimage.img.tar.gz | pv | dd of=/dev/sdb bs=1M`
xz | `tar xvfJ diskimage.tar.xz | pv | dd of=/dev/sdb bs=1M`
bz2 | `bzip2 -dc diskimage.img.bz2 | pv | dd of=/dev/sdb bs=1M`

Note: "`pv`" is a pipe-viewer and displays the progress.
Links to installation instructions for apu

Install CentOS / RHEL v6.x
Install NethServer over CentOS

Â© 2002-2018 PC Engines GmbH. All rights reserved.