Sophos AP55 support

you can then copy a few files and make minor changes..... and test as you go....

While I can see myself setting up the image builder and building the basic devolo_dvl1750e image, I wouldn't have the slightest idea what to modify. As I wrote in the initial post, I'm not a developer it seems it would take me days to get to the point where I actually know what to do.

Since it seems the devolo images is a pretty close fit already, I would greatly appreciate if you or someone else could help with that part (assuming it's rather an easy task for you?). Findinding a way to access the file system of the official image, gathering any requested info and testing would be my part of course, if that helps.

yes/no/maybe? :slightly_smiling_face:

sof-t-os-ap55-support.patch ( quick and dirty v2 )

--- a/target/linux/ath79/image/
+++ b/target/linux/ath79/image/
@@ -235,6 +235,14 @@ define Device/devolo_dvl1750e
 TARGET_DEVICES += devolo_dvl1750e
+define Device/sophos_ap55
+  ATH_SOC := qca9558
+  DEVICE_TITLE := Sophos AP55
+  DEVICE_PACKAGES := kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca988x-ct
+  IMAGE_SIZE := 15936k
+TARGET_DEVICES += sophos_ap55
 define Device/devolo_dvl1750i
   ATH_SOC := qca9558
   DEVICE_TITLE := devolo WiFi pro 1750i
--- /dev/null
+++ b/target/linux/ath79/dts/qca9558_sophos_ap55.dts
@@ -0,0 +1,83 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include "qca9558_devolo_dvl1xxx.dtsi"
+/ {
+	compatible = "sophos,ap55", "qca,qca9557";
+	model = "Sophos AP55";
+	aliases {
+		led-boot = &status_blue;
+		led-failsafe = &status_red;
+		led-running = &status_blue;
+		led-upgrade = &status_red;
+	};
+	keys {
+		wps {
+			label = "WPS Button";
+			linux,code = <KEY_WPS_BUTTON>;
+			gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+			debounce-interval = <60>;
+		};
+		usb_eject {
+			label = "USB Eject Button";
+			linux,code = <BTN_0>;
+			linux,input-type = <EV_SW>;
+			gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
+			debounce-interval = <60>;
+		};
+	};
+	leds {
+		compatible = "gpio-leds";
+		status_blue: status_blue {
+			label = "ap55:blue:status";
+			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+			default-state = "on";
+		};
+		status_red: status_red {
+			label = "ap55:red:status";
+			gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+		};
+	};
+	beeper {
+		compatible = "gpio-beeper";
+		gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
+	};
+	gpio_export {
+		compatible = "gpio-export";
+		gpio_usb_power {
+			gpio-export,name = "ap55:power:usb";
+			gpio-export,output = <1>;
+			gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
+		};
+	};
+&usb_phy0 {
+	status = "okay";
+&usb0 {
+	status = "okay";
+&mdio1 {
+	status = "okay";
+&eth1 {
+	status = "okay";
--- a/target/linux/ath79/base-files/etc/board.d/01_leds
+++ b/target/linux/ath79/base-files/etc/board.d/01_leds
@@ -62,6 +62,7 @@ comfast,cf-e5)
 	ucidef_set_led_switch "internet" "WAN" "$boardname:green:internet" "switch0" "0x20"
 	ucidef_set_led_netdev "lan" "LAN" "$boardname:blue:lan" "eth0"
--- a/target/linux/ath79/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/base-files/etc/board.d/02_network
@@ -15,6 +15,7 @@ ath79_setup_interfaces()
+	sophos,ap55|\
@@ -289,6 +290,7 @@ ath79_setup_macs()
 		wan_mac=$(macaddr_add "$(mtd_get_mac_binary art 4098)" -2)
+	sophos,ap55|\
 		lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
--- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -95,6 +95,10 @@ case "$FIRMWARE" in
 		ath10kcal_extract "art" 20480 2116
 		ath10kcal_patch_mac_crc $(macaddr_add $(mtd_get_mac_binary art 0) -1)
+	sophos,ap55)
+		ath10kcal_extract "art" 20480 2116
+		#ath10kcal_patch_mac_crc $(macaddr_add $(mtd_get_mac_binary art 0) -1)
+		;;
 		ath10kcal_extract "art" 20480 2116
 		ath10kcal_patch_mac $(mtd_get_mac_ascii devdata "wlan5mac")
--- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
+++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
@@ -115,6 +115,10 @@ case "$FIRMWARE" in
 		ath9k_eeprom_extract "art" 4096 1088
 		ath9k_patch_fw_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env "athaddr") +1) 2
+	sophos,ap55)
+		ath9k_eeprom_extract "art" 4096 1088
+		ath9k_patch_fw_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env "athaddr") +1) 2
+		;;

( you should check up on wikidev to see if any of the other variants are closer to yours.... usb etc..... )

quilt init
quilt import sof-t-os-ap55-support.patch
quilt push

noTE: This is for testing the resulting initramfs images.... do not use any other images!!!

crossreference with the TableofHardware and wikidev.... make edits to this file:

compare similar sections with the other .dts files in that directory

And iron out usb.... ( if it's there ).... then maybe wifi..... and finally to mess with the sysupgrade stuff so that you can work with flashing or possibly just tweak it so it will load from USB like i do :wink: )

1 Like

It might have just been terminology, but you need the full build system to make kernel changes. Same build-system prerequisites, but you clone the git repo and build from source.

1 Like

terminology, yes. I was reading up on the dev docs in between the posts so this got mixed up. Actually reading about the setup of the build system now. I'm afraid there's no way around that now (should've left that AP in the trash. time machine anyone?).

Running out of disk space on this box, will need to check where I can set up a VM for this.

I've found that 16 GB isn't enough for comfortable install of Debian and how I do my builds. A 32 GB "growable" drive is my current practice when setting up a VM-based OpenWrt builder. Growable means that it doesn't take up (much) more than you're using, and avoid those annoying surprises of running out of disk space.

Just to clarify, 16 GB is not so much of an issue for Debian, but the buildroot for a targeted (not everything and the kitchen sink, but just the stuff you need) build will be around the order of > ~10-15 GB on its own, per target arch/ branch - open end, if you build lots of additional packages.

1 Like

thanks everyone for the concerns but I have merely 16GB left of the 120GB SSD in this machine, that's all. I'd rather use another machine or clean up storage than fill up the whole HDD. I know my way around VMs and stuff, just developing isn't my thing really :slight_smile:

Looks very similar to what I had with Mojo C-65, except the flash layout is a touch different. And USB is present.

Guys, you are killing me. I'm stuck already at the "make menuconfig" because I don't know what to select, which packages to include, etc. (

Can't I just clone the repository, "copy" that devolo_dvl1750e configuration and patch it to the correct values with wulfy23's sof-t-os-ap55-support.patch, then build an image, test it, maybe change the config and build again (and again and again)?

sudo apt-get install quilt
quilt init
quilt import <thatfile>
quilt push
make menuconfig
ATH79 > GENERIC > Sophos AP55
make -j12 V=s ( wait 1 hour )
cp bin/target/.... initramfs > tftpserver

easy :wink:

1 Like

I figured the quilt part, only "quilt push" will result in "can't find file to patch". What I did was:

# install dependecies first of course... (git gawk quilt etc.)
mkdir ~/dev
cd ~/dev
git clone $repository
cd openwrt
./scripts/feeds update -a
./scripts/feeds install -a
quilt init
quilt import $patchfile
quilt push

Right now I'm trying to find out about the syntax for the quilt patch files because I'd assume this is about the "a" and "b" prefixes in the paths.

what file can't it find?

Might try

cd path/to/openwrt
git checkout -b my-sophos-branch-devel  # or whatever you want to call it
patch < path/to/sof-t-os-ap55-support.patch
# and assuming it applies cleanly
git add -u
git commit -m 'With wulfy23 sof-t-os-ap55-support.patch applied'

"can't find file to patch at input line 3" (and lines 106, 116, 134, 147)

jeff@deb-devel:~/devel/openwrt$ patch -p1 < wulfy.patch 
patching file target/linux/ath79/image/
patching file target/linux/ath79/dts/qca9558_sophos_ap55.dts
patching file target/linux/ath79/base-files/etc/board.d/01_leds
patching file target/linux/ath79/base-files/etc/board.d/02_network
patching file target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
patching file target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom

-p1 strips off one leading directory from the patch's notion of what the files are

1 Like

yeah, must have copied bad or some sort file encoding....

use jeffs command above.... try copy the file again if it doesn't work..... ( seemed to be the double @@ lines )

Thanks! That looks good. Was doing it manually at the moment (without -p1 it will ask for the file path) but I stopped that now.

I can't commit of course but at least I'm running "make -j12 V=s" now. We'll see how that goes.

You can commit to your local branches -- which is why I suggested that you make your own and commit to it. That way you can later "rebase" your changes on top of an updated master from OpenWrt. You can even have a "last good" and "devel" branch, or the like.

I see. I did follow your advice

cd ~/dev/openwrt
git checkout -b sophos-ap55-devel
patch < ~/temp/sof-t-os-ap55-support.patch
git add -u
git commit -m 'With wulfy23 sof-t-os-ap55-support.patch applied'

all commands up to "git commit" completed successfully. Unfortunately I can't get back to the console output as I startet the build in the same shell.

If it works, I might just redo all steps to get the output you need.

First build finished with errors, will try again with "-j1" as advised by make. "git commit" didn't work because I forgot to provide an identity.

Building with "-j1" is awefully slow and still hasn't finished. Realized the build process involves a lot of downloading and the machine was offline during the first run.

Thanks to everyone. Expect some (days?) delay on further updates.

About an hour for that first build on a two-core VM running on a MacBook Pro.