I recently stumbled upon TashTalk, a bitbanged implementation of LocalTalk to UART on a PIC12. I thought it might be fun to try and get a low-cost Linux board with the TashTalk embedded, thus began journey down the rabbit hole of low-cost, Chinese made SBCs.
This is a series of blog posts exploring how embedded Linux works (especially OpenWRT) to build an Apple LocalTalk to Ethernet bridge. This is the first part, in what I plan to be a small series of posts.
- Part 1 - Aim and Hardware
- Part 2 - OpenWRT MIPS (HLK-7621) and TashTalk
- Part 3 - Bringing up OpenWRT on Luckfox Pico Plus (ARM)
- Part 4 - Bringing up OpenWRT on the Milk-V Duo
- Part 5 - Modifying TashRouter
- Part 6 - ADB Support?
- Part 7 - Custom Boards
- Part 8 - Upstreaming Changes?
Aim
The ultimate aim of the project is to build an all-in-one solution for bridging 68K and early PPC Macintosh computers with the modern world. Realistically though, I hope to learn how to build embedded Linux images, cross-compile code, and a bit about u-boot.
From a hardware perspective, I want something that could:
-
Integrate a Local Talk -> Ethernet Bridge with TashTalk and MultiTalk
-
Provide NAS-like functionality via USB storage to AppleShare (Netatalk), SMB, FTP and HTTP clients.
-
Provide ADB device emulation (eg keyboard and mouse) from USB devices, building on ADB-Test-Device.
-
Provide SCSI device emulation via optional RA-SCSI/PI-SCSI software and hardware support.
-
Audio-out for CD-ROM emulation (or some other audio thing, eg re-implement the Lacie FM radio!?).
-
Optional: run off POE so an external power-pack isn't required, drop it in your network and be done.
-
Be self-contained, turn-key like. No custom config, no external SD card, etc.
Hardware
The hardware requirements for this solution are not substantial.
- ~700-1Ghz CPU - likely much slower would be fine.
- 128-256MB RAM - though 64MB might be fine if we don't use Python.
- Ethernet (at least 100Mbps - ideally GBE)
- Ideally inbuilt storage, doesn't have to be huge (~64MB should be enough). SD cards just add extra cost.
- UART - at least 3: 1 for console, one for LocalTalk, one for ADB - both need to support a 1Mhz rate and have CTS/RTS.
- [Optiona] USB Host support (USB 2.0 minimum)
- Ideally enough GPIO/Peripherals to handle a SCSI interface and sound output (~25 PINS)
- Cost < $10USD - otherwise just use a RaspPi.
- Availability: not just a fly-by-night TaoBao item
Evaluation
When looking at the items they'll be assessed on:
- Availability - how hard is to order a module, is there more than 1 supplier? Can we order the SOC on its own (eg to breakout more IO?).
- Software Support - can I bring up OpenWRT quickly? Is it a mainlined Kernel - does OpenWRT support it?
- Documentation - can I get the docs, including programming manuals?
These aren't hard and fast rules, but go a long way to getting where I need to go.
Why not the Raspberry PI?
The Raspberry PI is a great product, but I'm deliberately not targeting it. The pricing of PIs is still significant ($45USD, a long way from the $20USD they started at), availability can still be difficult (especially in quantity), and the low-end compute modules and Zero boards don't have any Ethernet capabilities.
The candidates
After looking at a bunch of different items, I narrowed it down to the following:
- HLK-7621 - a module based on MT7621A.
- Luckfox Pico - a low cost module with optional ethernet. Based on RV1103.
- Milk-V Duo - another low-cost module with RISC-V. Based on CV1800B.
... and ordered some boards.
Software
I ideally want to use OpenWRT for this project. OpenWRT is already designed for resource constrained environments, has native support for MIPS and ARM (maybe RISCV ?), package management and a Web UI.
It's anticipated that at least a few changes to OpenWRT and custom packages will need to be created to get a workable image. In no particular order:
- A board definition with whatever bespoke config I end up going with. Will require alternate mode of various devices to enable enough GPIO.
- Potentially patches to the MT7621 UART config to support a 1Mhz option (while not documented, it looks like the UART register accepts custom clock dividers, so getting to 1Mhz should be doable)
- Building out MultiTalk as a package (hopefully the Go runtime isn't too big!)
- Patching Ra/PiSCSI to use different GPIO ports, memory address (looks like this has been virtualised a bit).
- Building a PiSCSI package
- Building an ADB keyboard & mouse device
The Boards
Left to Right:
Luckfox Pico Plus, MilkV Duo in dev-holder, HLK-7621 Dev Board.
HLK-7621
Out of the shortlisted options, on paper the HLK-7621 module looks to be the winner. It is supported by OpenWRT, has some very nice features, is available as a module, a decent dev-board and more features than I need.
I was able to bring it up quiclky with the pre-built images from OpenWRT. I was also able to modify the board definition files to enable the additional UART and successfully build and flash the image (see next post). Despite the claim of being "UART lite" in the datasheet, CTS/RTS are exposed and I was able to connect at 1Mbps to the UART.
Luckfox Pico Plus
There's a lot to like about the Luckfox board. It has an integarated Ethernet port, built in Flash storage and the series scales up to 256MB of Flash and RAM. The Pico Plus board I ordered is the lowest end part with built-in Ethernet and Flash. It consists of 64MB of RAM and 128MB of Flash.
I was able to Flash it with the pre-built buildroot images from Luckfox, as well as boot Ubuntu 22 from SD Card.
As a dev-target, I think the Pro Max is the better board - 64MB is just too restrictive as a development tool.
Milk-V Duo
This is an odd series. The entire chipset changes completely as you go up. I bought the lowest end "Duo" which consists of:
- CVITEK CV1800B SoC
- 2x RISC V cores, C906@1Ghz + C906@700Mhz
- 64MB RAM
- No built in storage
- Ethernet Phy
Side Note
It looks like there's a "stamp" like module that I wasn't aware of when looking; the Duo-Module-01. This one is $15 USD which is a bit outside the target price range of this project, but might be a good contender for future projects.
Comparison
Feature | HLK-7621 | Luckfox Pico Plus | Milk-V Duo |
---|---|---|---|
Web | https://www.hlktech.net/index.php?id=436 | https://www.luckfox.com/Luckfox-Pico/EN-Luckfox-Pico-Plus | https://milkv.io/duo |
SoC | Mediatek MT7621A | Rockchip RV1103 | CVITEK CV1800B |
Instruction Set | Dual MIPS | ARM | RISC V |
RAM | 256MB | 64MB | 64MB |
Storage | 32MB | 128MB | SD |
Ethernet | 2xGBE / 5 port switch | 10/100 Ethernet (built-in) | 10/100 Ethernet PHY |
UART | 3x UART "lite" | 4x UART | 4x UART |
GPIO | Lots! | "up to" 25 | "up to" 25 |
USB | Yes - 1x USB 3 + 1x USB 2.0 or 2x USB 2.0 | 1 USB-C 2.0 | 1x USB-C 2.0 |
Other | 3x PCIE Host | ||
Price | ~$12USD | ~$10USD | ~$9USD |
Of interest, both the Luckfox Pico and DuoV boards have the same form factor as the Raspberry PI Pico.
Next
Building OpenWRT and/or Linux for each of these devices, enabling the UART and getting TashTalk up and running.
Leave a Comment