LEDE/OpenWRT on a PC Engines APU2(c4)


The PC Engines APU2 is a fanless quad-core AMD x64 SoC with 3 decent ethernet ports, an mSATA slot and 2 mini-pcie slots, one attached to a SIM card holder for GSM modems.

I bought it to keep up with the symmetric 50 mbit line I upgraded to and have resources left over for IPsec VPNs, IPv6 tunnels, cjdns tunnels, DN42 BGP VPNs and BIRD6 for my own IPv6 PI space.

Standard LEDE install

The LEDE devs decided not to have separate targets for the APUx series of boards but went with standard x86 target support and added the patches so they can be installed via opkg. This is great as you just dd LEDE version >=17.01.1 with luci on to the SSD/HDD/SD/USB, run opkg update and then install these packages for the rest of the hardware. Lots of interesting chatter on github here.

PACKAGES:=beep flashrom libsensors lm-sensors usbutils wpad-mini \ kmod-ath9k kmod-ath10k kmod-gpio-button-hotplug kmod-gpio-nct5104d \ kmod-hwmon-core kmod-hwmon-k10temp kmod-leds-apu2 kmod-leds-gpio kmod-pcspkr \ kmod-sound-core kmod-sp5100_tco kmod-usb-core kmod-usb-ohci kmod-usb-serial \ kmod-usb2 kmod-usb3 \ -kmod-e1000e -kmod-e1000 -kmod-r8169

To bring up a WLE600vx card, you may need the ath10k-firmware-qca988x package.

Custom LEDE build

The joy of LEDE is that we can create a custom build, and thank go out to the sweet work done by https://github.com/riptidewave93

So git clone https://github.com/riptidewave93/LEDE-APU2.git and celebrate the (enabled) AMD Jaguar CPU optimizations with the -march=btver2 -mtune=btver2 GCC options. This can apparently (boost performance around 50% on some applications). His script makes creating builds as easy as:
build.sh modify

Performance under Linux is significantly better (even without GCC optimizations) than FreeBSD, the links below put the CPU’s AES-NI under load.

Continue reading “LEDE/OpenWRT on a PC Engines APU2(c4)”


Make a Null Modem Cable and enable Serial Console Access – OpenBSD 4.1


The story..

I finally blew the dust off the old P-200 and installed OpenBSD on it after Spike sent me an ISA card. In my excitement of it all, I didn’t bother to check if the card was an ISA or an EISA, and yup, it flew across 2 oceans only to turn out to be a *sniff* 32 bit EISA Intel 10/100 NIC.

So now I have a mess in my room with PC parts all over and a box I can’t use as a router as it only has 3 PCI slots, and I need one for the display. Which was the first reason for me wanting an ISA card; the motherboard has 3 empty ISA slots.

Every local vendor I asked laughed me out of their stores when I said ISA. Bastards.

Secretly hoping Spike would cut his hands opening rusty cabinets, I retired the PII-350Mhz box running Slackware for a while. This lasted until I noticed my modem connected with its cable and remembered I had a spare cable. Some rummaging later, and lo behold, I now had two RS-232 cables.

The OpenBSD box has 2 com ports, one’s a DB-25 and the other a DB-9, this isn’t an issue, but OpenBSD can only use Com1 (Windows term) for serial console communication on i386 and AMD architectures. Ensuring both sides needed DB-9, and a quick printout of the pinout from nullmodem.com had me looking for my solder gun. Well, it’s a pen, but the first guy who lent me his, called it a solder gun, and the name’s stuck.

For those of you attempting this for the first time, don’t be disparaged by comments like this from OpenBSD:

If you have soldered leads on to any electric applicance before, this is just as easy. Ensure your solder pen has a really fine tip and a comfortable grip and you’ll be on your way. It’s not cake, but it’s definitely not hard.

At Hungry Hacker, we historically follow ghetto scientific methodologies so obviously, I sleeved the wires and trimmed the copper strands with my God given tools, my teeth. Yes, I open soda/beer bottles with them too when a bottle opener is MIA cause I’m too lazy to walk and get one.

You, on the other hand, may want to use a plier to denude the wires.

So without further ado, here’s the photologue:

Minutes after soldering the first wire, I remembered why I hadn’t soldered anything in over 5 years – because I suck at it. Notice how well arranged the working desk is? See how well spaced out the tools are?

Such things go a long way towards a professional fit and finish.

For you weirdo’s who notice such stuff, yes, that’s a Logitech Z5500 controller at the back

I used my trusty Shimano fishing pliers as a makeshift clamp –

After soldering the first wire, I decided to roll a spliff in an attempt to appease the “shaky hands” Gods.

But all it made me do was change the music from Paul Van Dyk to Alan Parsons Project.

Well, and a few other things, but we’ll stick to the technology discussion at hand.

Always keep a mug of cold water handy in case something hot needs to be cooled fast.

This is what shoddy soldering looks like when the dust’s settled –

Some might say it’s alright, but I learnt, or tried to at least, from someone for whom it was a craft and I fall short in my opinion.

All the extra unused wires were twirled together and chassis ground _|_ (by soldering) on to the metal bracket along with the built in Earth _|_ wire (thicker black wire not shown). I forgot to take a picture of this. Doh!

It’s a good idea to do this and twist the wires as much as possible before soldering them on to the contacts. This reduces Near End Crosstalk (NExT); and is exactly why wires inside network (Cat 5/6) cables are twisted.

My serial cable length is just short of 12 inches and I wasn’t too worried.

Another look at the finished product –

I could only salvage one DB-9 connector casing, the other one was a moulded type and wasted. The one in the back of the photo was snapped back on and connected to the BSD box.

Today’s male serial connectors on back-panels of ATX cabinets and boards are wa-ay more accessible for “naked” female serial receptacles.

I shut off the PCs – Connecting serial/PS2 devices with the power on is a bad idea as fried keyboards in my room will attest.

Edit /etc/ttys to allow serial consoles with root logins and presto! –

Allow Com1 (tty00) in /etc/ttys to accept root logins by changing it to:

tty00 "/usr/libexec/getty std.9600" vt220 on secure

A final look at things and I edited /etc/boot.conf to pipe the boot messages to console by adding: set tty com0

This will show the bootup process in console. It’s a shame the motherboard doesn’t support redirecting BIOS events to console.

That would’ve owned!

I would love to make something like this guy did soon.

I detest Hyper Terminal back from the BBS days –

Putty is my one-stop shop for all remote communication, I finished by fixing up serial settings and this brought a sense of fulfillment as the clock struck 9.

Check the Serial settings in Putty to make sure Flow Control is Off and the line speed is set to 9600 baud or whatever you set it in /etc/ttys to.

A final check and it’s time to pack up the screw-driver set and tuck the PCI VGA card away.

Time to use OpenBSD’s tight UKC to disable video and other frivolous things I don’t need.. oh, and might as well install Slackware 12 on the PII-350 now..

Questions/Flames/Autograph requests?

See email address in the disclaimer on top.


The little b1sh that he is, fwaggle conveniently “found” his ISA NIC a day after I received Spike’s. Just over “A YEAR” after he said he had one he’d look for. He then shamelessly started to fornicate it and posted pictures.

I hope you burn in the fires of hell *****breath.