Skip to contentSkip to conversation

board/pcengines/apu2: add config

PATCH New Danilo Bargen 2 participants 3 messages Oct 5, 2019 – Sep 3, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 board/pcengines/apu2: add config

The apu2 by PC Engines is a 64 bit single board computer with coreboot BIOS. It only has serial output, but no graphics chip. With its 2?4 ethernet ports, it is often used to build a firewall or router.

The provided defconfig configures busybox and isolinux. It will output a hybrid ISO image that can be written to a USB stick or burned to a CD.

Configuration based on a blogpost by Tony Arkles:

http://www.better-bsp.com/blog/2017/03/02/buildrooting-for-apu2/

---
 DEVELOPERS                        |  4 +++
 board/pcengines/apu2/isolinux.cfg |  6 ++++
 board/pcengines/apu2/linux.config | 51 +++++++++++++++++++++++++++++++
 board/pcengines/apu2/readme.txt   | 40 ++++++++++++++++++++++++
 configs/pcengines_apu2_defconfig  | 16 ++++++++++
 5 files changed, 117 insertions(+)
 create mode 100644 board/pcengines/apu2/isolinux.cfg
 create mode 100644 board/pcengines/apu2/linux.config
 create mode 100644 board/pcengines/apu2/readme.txt
 create mode 100644 configs/pcengines_apu2_defconfig
DEVELOPERS +4 -0
index 7b93110179..35c31f620f 100644
@@ -611,6 +611,10 @@ F:	package/redis/
 N:	Daniel Sangue <[email protected]>
 F:	package/libftdi1/
 
+N:  Danilo Bargen <[email protected]>
+F:  board/pcengines/apu2/
+F:  configs/pcengines_apu2_defconfig
+
 N:	Danomi Manchego <[email protected]>
 F:	package/cjson/
 F:	package/jq/
board/pcengines/apu2/isolinux.cfg new file +6 -0
new file mode 100644
index 0000000000..cb19b5a89e
@@ -0,0 +1,6 @@
+serial 0 115200
+default 1
+label 1
+      kernel __KERNEL_PATH__
+      initrd __INITRD_PATH__
+      append root=/dev/sr0 console=ttyS0,115200n8
board/pcengines/apu2/linux.config new file +51 -0

51 lines not on this page · raw message

board/pcengines/apu2/readme.txt new file +40 -0
new file mode 100644
index 0000000000..9da1b802cc
@@ -0,0 +1,40 @@
+Intro
+=====
+
+This is a board configuration for the apu2 platform by PC Engines.
+
+https://pcengines.ch/apu2.htm
+
+Since the apu2 does not have any graphical output, the default configuration
+will ensure that the kernel output as well as the login prompt will be sent to
+the serial port.
+
+How to build
+============
+
+The provided defconfig creates a hybrid isolinux image that can be booted from
+either an USB stick or a CD.
+
+    $ make pcengines_apu2_defconfig
+    $ make
+
+How to write to an USB stick
+============================
+
+Once the build process is finished you will have an image
+called "rootfs.iso9660" in the output/images/ directory.
+
+Copy the bootable "rootfs.iso9660" onto the USB stick with "dd":
+
+    $ sudo dd if=output/images/rootfs.iso9660 of=/dev/sdX bs=1M conv=fsync
+    $ sudo sync
+
+How to connect to the apu2
+==========================
+
+Connect to the DB9 serial port of the apu2 board (either directly or through a
+USB adapter) with a baudrate of 115200.
+
+For example with miniterm (part of pyserial):
+
+    $ miniterm.py -f direct /dev/ttyUSB0 115200
configs/pcengines_apu2_defconfig new file +16 -0
new file mode 100644
index 0000000000..68cebb8f6a
@@ -0,0 +1,16 @@
+BR2_x86_64=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
+BR2_TARGET_GENERIC_HOSTNAME="apu2"
+BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
+BR2_SYSTEM_DHCP="eth0"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
+BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/pcengines/apu2/linux.config"
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_ISO9660=y
+BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU="board/pcengines/apu2/isolinux.cfg"
+BR2_TARGET_ROOTFS_ISO9660_HYBRID=y
+# BR2_TARGET_ROOTFS_TAR is not set
+BR2_TARGET_SYSLINUX=y
Signature · 1 line
2.23.0
#1 lore raw

PATCH 1/1 board/pcengines/apu2: add config

Quoted 12 lines · On Sat, 5 Oct 2019 02:40:23 +0200 Danilo Bargen <[email protected]> wrote:

The apu2 by PC Engines is a 64 bit single board computer with coreboot BIOS. It only has serial output, but no graphics chip. With its 2?4 ethernet ports, it is often used to build a firewall or router.

The provided defconfig configures busybox and isolinux. It will output a hybrid ISO image that can be written to a USB stick or burned to a CD.

Configuration based on a blogpost by Tony Arkles:

http://www.better-bsp.com/blog/2017/03/02/buildrooting-for-apu2/

Quoted 11 lines
---
 DEVELOPERS                        |  4 +++
 board/pcengines/apu2/isolinux.cfg |  6 ++++
 board/pcengines/apu2/linux.config | 51 +++++++++++++++++++++++++++++++
 board/pcengines/apu2/readme.txt   | 40 ++++++++++++++++++++++++
 configs/pcengines_apu2_defconfig  | 16 ++++++++++
 5 files changed, 117 insertions(+)
 create mode 100644 board/pcengines/apu2/isolinux.cfg
 create mode 100644 board/pcengines/apu2/linux.config
 create mode 100644 board/pcengines/apu2/readme.txt
 create mode 100644 configs/pcengines_apu2_defconfig

Sorry for the long delay. I've applied to our master branch, with just a fix to the commit title and the indentation of the DEVELOPERS file. Of course, if you want to send a further update to upgrade the kernel to a newer version, that would be nice. Another nice improvement would be to select a more specific CPU than just "x86-64", i.e you could select the specific x86-64 CPU that the APU2 is using.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

PATCH 1/1 board/pcengines/apu2: add config

Hello Thomas

Thank you for the merge!

At the moment the APU2 I used for developing this defconfig is in active use, so I cannot test an updated config. However, I may be able to update the config by the end of the year (no promises though!).

Danilo