The $8 Linux Computer
thelittleengineerthatcould.blogspot.com
thelittleengineerthatcould.blogspot.com
$10.80 RISC-V AIoT module supports Linux:
https://news.ycombinator.com/item?id=33874032
EDIT: This is the official website for the Sipeed M1s showcasing the specs and application video for AIoT:
My man, ESP32 boards get you 802.11 WiFi for like $5 these days.
Zigbee is the kind of protocol designed for even simpler, more power efficient microcontrollers. Think closer to a $1 microcontroller instead.
There is a reason we have lol WiFi light bulbs. The uC that powers the smarts are really cheap these days.
And if anyone figures outbhow to use that NPU you could even do some inference to get some trends or something. Or even a classifier that could detect a short or water leak perhaps.
I dunno radios (skipped that class way back in college). I'm guessing that although 802.11 and Zigbee use 2.4 Ghz, you might need 2x radios physically tuned for the correct frequencies, and listening at the same time.
Looks like channel 1 802.11 is different than channel 15 Zigbee for instance, so bridging the two might need two different radios.
So you'd need a 802.11 radio + Zigbee Radio working as a team (even if ESP32 has enough CPU power to handle both, there are likely physical limitations to radio designs).
And I'm pretty sure that the radios use more power than the microcontroller in any case.
------
In any case, there seem to be many 802.11 to Zigbee bridges already available. So you should only attempt the project as a learning experience.
OTOH I remember that ZigBee is somehow more buttoned-up than BT and even wi-fi, so it's not commonly seen on likes of ESP32 and other small MCUs.
This is a good example of tradeoffs: slower and less throughput, but way more robustness.
Higher MCS levels of 802.11 cut down on error correction to 25% or 10%, achieving more throughput but less robustness.
I dunno how Zigbee does it, but I assume it has more error correction at slower (ie: more reliable) speeds than even WiFi MCS 1.
Do they all talk to each other in a mesh network, or do they all connect to your router in WIFI infrastructure mode?
> ESP-WIFI-MESH is a wireless communication network with nodes organized in a mesh topology using the simultaneous AP-STA feature on Espressif SoCs. It provides a self-forming and self-healing network, with ease of deployment. The network topology of ESP-WIFI-MESH can scale up to 1000 nodes in large areas.
https://www.espressif.com/en/products/sdks/esp-wifi-mesh/ove...
https://randomnerdtutorials.com/esp-mesh-esp32-esp8266-painl...
---
I didn't know that home WiFi routers have difficulty with more than a dozen connections, but I imagine ESP MESH could be a way around it, where a few devices connect to your router and act as access points for the rest of them.
https://www.espressif.com/en/products/software/esp-now/overv...
But yeah, we need to recycle these phones by making them home servers, etc.
Basically you get most of the useful functionality from installing Linux, without needing root.
It runs blender and gcc pretty well!
How does Linux handle this? Can you just run an executable and have it automatically scheduled onto whichever cores can execute it? Wouldn't the kernel itself have to be compiled for both architectures?
EDIT: Maybe I was overthinking this -- I found what looks like the devicetree file for the BL808, and it seems like only the single RV64 core is supported:
https://lore.kernel.org/lkml/20221127132448.4034-7-jszhang@k...
If so, then that would be pretty awesome. I think that people have been trying to get real-time working on Raspberry Pis. It seems that they get kinda close, but never manage to get all the way.
Another "big-player" option is ST which has the STM32MP1[3], which features a single Cortex-A7 alongside a Cortex-M4.
[1]: https://www.nxp.com/products/processors-and-microcontrollers...
[2]: https://www.nxp.com/products/processors-and-microcontrollers...
[3]: https://www.st.com/en/microcontrollers-microprocessors/stm32...
Perhaps it's better with the newer BSPs on the 8, but I wouldn't be too quick to jump back into it.
But I imagine that the larger SoCs are a more complex beast where getting everything to play nice with upstream Linux would be a greater challenge.
It's just the coprocessor stuff they're weak on. It's easier to just link up to a Cortex-M3 offboard, but then again NXP has completely screwed up their supply chain and these parts are somewhat hard to get.
Cortex-R is also pretty common (R5 on Zynq-7000 and R7 on UltraScale MPSoC, for example)
It's not, xlen is fixed on that core like most RISC-V cores.
> How does Linux handle this? Can you just run an executable and have it automatically scheduled onto whichever cores can execute it? Wouldn't the kernel itself have to be compiled for both architectures?
With asymmetric multiprocessing like you get with OpenAMP. The RV32 cores are more real time management cores. One core only has an MPU, no MMU. The other core doesn't even have that. So run something like freertos (or just a superloop) on those cores to babysit realtime tasks and either respond quicker and/or more deterministically than Linux can, or avoid waking up the Linux core.
This would seem to be what's happened here with Linux running on, and really only in charge of, a small portion of the SOC. https://www.usenix.org/conference/osdi21/presentation/fri-ke...
To paraphrase what he says at the end of the talk, it would be a great idea to think about the kind of OS which could take these three cores properly into account.
Really folks. It doesn't take new research or exotic OS design ideas, to do something that has been common practice for a decade. Let's quit pretending linux is driving any innovation. It's followed behind in OS design, often by years.
On Linux this is a module that exposes a character device with one off ioctls.
On Windows this a kernel mode driver that exposes a Device object with one off DeviceIoControls.
I really don't think the reputation is deserved in this case, both kernels added equivalent support for this workflow back in the 90s.
https://github.com/bouffalolab/bl_docs/blob/main/BL808_DS/en...
https://github.com/bouffalolab/bl_docs/blob/main/BL808_RM/en...
I think they are positioned to be the new low-cost esp32 variant.
I couldn't find any info on this from its datasheet.
I mean the thing has two USB ports, TWO! And you can't use either, hahaha!
I wrote up part 2 here: http://thelittleengineerthatcould.blogspot.com/2022/12/the-8...
But yeah, not plug-n-play. I still have to find out how to get network or SD-Card.
Nothing about this board makes any sense lol.
https://github.com/bouffalolab/bl_docs/blob/main/BL808_DS/en...
The BCM2835 was destined for a cheap set top box but for reasons not known publicly the manufacturer of that box didn't take those chips.
While a great achievement and very interesting article, the same can be said from many RTOS that offer POSIX compatibility.
It'd be great for iteration to have a solid OS that cares about networking and updates and a an application layer you can move fast and break things with without risking soft-bricking your device.
I'm currently finding this with interpreted platforms like Espruino and Micropython, but don't understand at all why they have to be the only ones making this possible.
But the internal flash of a MCU can only be erased in pages that can range up to 4k or 8k depending on the platform. So that already limits how many free pages you might have that you could dedicate to an application.
What usually is done is to partition the flash into two areas, so you have two firmware slots. This allows you do do OTA updates: While you run from slot A you can write the new firmware to slot B, once you verified the firmware in slot B you set a flag that tell the bootloader to boot from slot B next time. (Oh and you need different firmware images for slot A and slot B as ROM addresses will be different and there is no address translations. Some bootloaders will avoid this always copying slot B to slot A if it's newer than slot A, but IMHO that's unnecessarily complex/inefficient. You might as well always generate both slot images and let the firmware decide which one to request).
Another question is, why would you even want to dynamically load applications? Those systems are not interactive, if you have some sensor monitoring the water level of your pot plant or the vibrations on some industrial equipment, it will only ever run that single application. It might get updates if it's doing some networking, but that will just be an update of the whole firmware.
https://docs.micropython.org/en/latest/zephyr/quickref.html
Very weird seeing the Zephyr booting message I've seen so many times followed by the micropython repl startup message I've seen so many times.
Hard to think of a good app for that topology. In the sense that I could stick circuitpython or micropython on a ESP32, or zephyr on a ESP32, so an app running both would get me ... ?
Conceptually, the *python people "could in theory" give up on porting to infinite number of new boards and focus really hard on working under Zephyr, and let Zephyr worry about porting to infinite number of new boards.
The idea of upgrading my MicroPython under Zephyr under MCUboot under Eclipse hawkBit over the wifi is pretty intriguing sounding challenge.
I have not dug into this technology stack other than recreationally. I'm a little unclear how interop works beyond the existing example of passing simple hardware pins thru. For example if MicroPython had a library that interop directly with the Zephyr RTOS features, that would be quite handy. Another thing I notice is the interop in the docs is simple pin pass thru, hard to even imagine how Zephyr's wide variety of networking stacks would pass thru for Python to use. It looks like there is nothing developed at this point where the uC could run a RTOS thread to "do stuff" while a MicroPython thread handled a wifi UI or UI in general or handled the non-RTOS tasks, although that would be cool.
The Onion was $5, and included a proper serial interface, an SD card slot and wifi. It might have also had Bluetooth, but I'm not sure as this was seven years ago.
It was a great little machine. Very promising to have an entire Linux machine the size and shape of a 6502.
Alas, the company that made it put out a firmware update that made them act unpredictably, then another that ended up bricking machines. And at a cost of $5, there was no margin for customer support. The last time I looked into it, several years ago, the company appeared to be in pivot mode.
There was a vibrant emerging market of tiny SBCs in the years before COVID. Now everything is Raspberry Pi and Arduino. If you can get one.
Oh, I see, they produce satirical news now
I think it should be possible to use another ESP32 or ESP8266 for programming.
Soon enough, it will be the even smaller $1 Linux computer.
And then, the even smaller $0.10 Linux computer.
In the future, even toilet paper will be running Linux.
Pine64 keep making these silly little mistakes limiting their products' appeal.
Might just be me, but I value the ability to quickly get started without a lot of setup and debugging hardware before getting to the software aspect. I don't want to keep the thing fully set up on my desk, I'd like to put it in a bag and get it out whenever I feel like it.
The WiFi capability may make this easier after the initial setup, but it's still an unnecessary hurdle.
https://gist.github.com/lupyuen/7a0c697b89abccda8e38b33dfe5e...
I guess after the restock this won't be a problem since it'll be the second batch?
This little $8 board will run circles around even an RPi 4 when it comes to doing something like controlling a long strip of ws2812b RGB LEDs, as an example.
Why would a Raspberry Pi have any issue with this?
The very similar Allwinner D1 can push HDMI though. It's got the same main core (T-Head c906) and is about the same price point. That SoC doesn't have the nice wireless interfaces builtin though.
As processors become more powerful, voice I/O becomes the cheapest way to interact - microphones and speakers, or even just a Bluetooth link, are much less expensive and less bulky than a screen and keyboard.
That was about 10x as expensive but probably more bang per buck.
I am hoping it gets first class support from some distro! Definitely don't want to rely on starfive support.
My first linux computer was a 33Mhz i386. I can't remember the amount of RAM, but it must have been 2MB or maybe 4MB.
This thing has 64MByte of RAM, after login, 44MB of it is free.
- processing data from a marine radar (it streams individual A-scopes as UDP stream), aggregating the sweeps into a .png image, denoising and uploading and handling some related logic (antenna tilt, gain settings)
- weather station pulling in data via serial/GPIO/... and publishing them as a webserver (lighttpd) and uploading them via OpenVPN to a cloud storage; firmware in the sensors can be easily updated and debugged remotely because the system runs avrdude and openocd
- emergency serial console - connected via USB to serial adapter to server, and you can SSH into it (again through OpenVPN/Wireguard), open a serial terminal or power-cycle the machine
- LoRaWAN gateway
And the best thing is that all this was written in Python! (with occasional C functions where native performance is required) So you have all the comfort of a high-level language and a full comfort of a standard Linux stack (though a bit limited because it is Busybox).
64MByte RAM, (45MByte of it free after logging in.)
In fact I don't think there's anything stopping you from just running on the larger MCU cores and simply disabling the large core if you really wanted to for some reason.
That is all that needs to be said about this...
https://www.raspberrypi.com/news/supply-chain-update-its-goo...
I get that the Rpi will use less power, but I imagine many people will be like me and have it overclocked to 2.1ghz, and my heatsink was pretty warm all day long.
I've recently picked up a Optiplex 3070 with a i5 9500t for $120 and bought 32gb of ram off ebay for another $40. Considering a Rpi 4 is going for $100 on eBay, it's not a bad deal at all.
Typically recommended are lithium iron phosphate (LiFePO4) or lithum polymer (LiPo) batteries, both of which have higher capacity, better discharge profile, and can be recharged (the latter while the device is in operation).
Unfortunately it has no sleep mode (the supported power-down modes erase the main RAM, leaving only 64KiB region, so it's unusable for suspending of the booted-up Linux), so it will last a few hours at most.
This is a common problem with almost all of such boards. And we see great power management is definitely possible: Android phones can suspend to milliwatts for a decade. But there is no support in this hardware, where you can run "normal" Linux, not Android :(
With the shared memory bus, you can hand over tasks between the cores. You may not have the same software running on each core, but the data can be the same.
For your use then, you could just use the lowest power microcontroller with 64GB ram. You can't get that ability anywhere else.
It's 64 MB RAM
I'm hoping the MCU in the chip is the same as the BL602 chip- the 602 has a fully opensource firmware for the radio and cpu, can run zig and lora: https://lupyuen.github.io/
For me, I'm looking forward to using a riscV MCU with a decent amount of ram, as a fixed platform to build an OS on.
It's not, but it's similar. The BL602 has a SiFive E24, the cores in the BL602 are all T-Head cores (the mid core is a T-Head e907).
3 cores
> For your use then, you could just use the lowest power microcontroller with 64GB ram. You can't get that ability anywhere else.
I don't think the LP core has access to PSRAM. So most of the networking would run on the mid core, and the LP core just makes decisions to wake up a bigger core based on the events it sees.
Otherwise it feels like a pretty standard Linux.
Do you have a suggestion for a better platform?