106 comments

[ 4.7 ms ] story [ 172 ms ] thread
C-Sky is a RISC-V member, is this a RISC-V board?
"I think this may well be the last new CPU architecture we ever add to the kernel. Both nds32 and c-sky are made by companies that also work on risc-v, and generally speaking risc-v seems to be killing off any of the minor licensable instruction set projects.." -- long-time low-level kernel developer Arnd Bergmann

Wow.. that's quite the statement. Would be interesting to know more about this ISA and if it's doing anything interesting and new

> It was pointed out within minutes of my comment that there is another platform getting ready for merging (Kalray MPPA), so my prediction was clearly wrong.

https://lwn.net/Articles/770410/

(comment deleted)
It costs 39 CNY plus 9 CNY for domestic China shipping (total just under 7 USD):

http://m.zrumg.top/h.3PwbrnB?sm=9f6f7c

It's the same Taobao listing.

The link I pasted was from the 'share' feature in the Taobao app. I think they use these obfuscated domains so that the pages don't get blocked from opening when opened from a social media share. WeChat for example won't open Taobao links in the internal browser.

EDIT if I 'share' and choose 'SMS' as the destination, the Taobao app puts a regular link in the clipboard:

https://taobao.com/awp/core/detail.htm?id=556322544984

These are based on the Nationalchip GX6605S SOC, which has no mainline support, but C-Sky maintains a kernel supporting it[1].

It also seems to have buildroot support if you want to whip up an embedded platform based on it[2].

[1] https://github.com/c-sky/linux-4.9.y/

[2] https://patchwork.ozlabs.org/patch/734596/

c-sky arch has been merged into mainline: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...
Neat! I wonder how far out SOC support is though. Arch support is the very first step in terms of supporting an SOC.
I'm seeing core code (kernel, cpu, mmu, irq etc) in arch/ and a few clocksource and timer drivers. No clue about the HDMI or USB controllers for example, or even if the are using other already merged drivers for them.
How is it that all those cheap boards are always based on chips without proper support?
Maybe that's why they're cheap.
I may completely misunderstand how the design process works here, but I'd assume the cheapest SOCs would be the most popular ones, and hence most likely to have proper support. Why isn't it so?
the cheapest ones are sold for embedded purposes where a manufacturer of a single specific device is using a vendor-supplied kernel, or not linux at all (vxworks or something). Look at the OS that runs on a $25 TP-Link home 802.11n/ac router for example.

The manufacturer of the chip doesn't particularly care about making it work with a debian stretch environment, or similar.

I have a ELECOM WRH-583 router, dual band, dual Ethernet and at 65 * 35 * 20.5mm I am rather forgiving about not having Linux support. Two dimensions of the three are dictated by the two RJ45 sockets, 2 * 15.24 wide and 15mm high. The router itself has less than 44 * 30 mm PCB area to spend on actual router circuitry. SoC & 5G - PHY: RTL 8881AM, 2.4G - PHY: RTL 8188ER, RAM: ESMT M14D 5121632 (64MiB), NOR: MXIC 25L64 (8MiB).

https://pbs.twimg.com/media/Crq6x3PUEAA58NW.jpg info from http://twisave.com/ysks/2016/9/p:5

and these sort of routers are apparently not Linux compatible / capable even?

And this is why just about every embedded Linux device more than a few years old runs an ancient kernel with known vulnerabilities.
Well if you're running them headless then running armbian with a recent kernel will work on a lot of boards. The big problems come when you want driver support e.g. proprietary GPU drivers for ARM GPUs don't work because they were written for an old kernel api and ARM would rather focus on selling new GPUs than supporting older ones for sake of the tiny SBC niche.
Some of those embedded devices are not even designed to be updated on the field. And some have support planned for a limited time and then anything resembling support is dropped.

No company is going to support a product forever without getting money for it. So either the support is priced in or it is not, and if it is not, the product is correspondingly cheaper but then you get what you get. And people tend to select cheap, so there are no or few updates.

Bottom line: embedded Linux devices with outdated software and security holes are that way through conscious intent, really.

Running aftermarket firmware sometimes helps (the consumer), but only if there are no crazy things like binary blobs involved, since porting those is unlikely to be feasible.

In my opinion this is a big argument in favor of the security benefits and update ability, if you're a company putting thousands of remotely managed devices out into the field, for using an x86-64 architecture. Yes it might be more costly and expensive to have NUC sized things, but you can also be confident that you can run a fully patched OS on it in 12 or 15 years from now. If I had a core 2 duo based 1U appliance from 2007 somewhere I could quite reliably update it to Debian 9.6 or the latest centos.
> Look at the OS that runs on a $25 TP-Link home 802.11n/ac router for example.

Aren't these usually Linux too for simplicity? There is still an extreme low end doing special embedded OS just to avoid a bit of extra RAM? Seems like a poor tradeoff from just reusing almost everything else from your existing range.

vxWorks, eCos, WebOS, Symbian, RISCOS, the BSDs, and QNX aren't exactly special to a board. Nor are L4 or Mach single-platform kernels.

If it's a bit cheaper per unit to port something that's not Linux onto something you never expect an end user to access directly, that's what a manufacturer is often going to do. There are toolchains for many operating systems for many processors. Not all the world is Linux and not all the world is designed to be a general purpose computer system.

The reason these low price developer/maker boards are designed is because they can be put together for a low price. They reuse components designed to run a stack or maybe one of a few stacks in embedded devices produced at scale. Either the board maker supports it, or if enough demand for the software exists the community will help support it.

I know all those exist and are possible. My point is that if you have a full stack of software already developed for pretty much all your range (like TP-Link does) bringing up a whole new one with Wifi drivers, NAT stack, etc just for the low-power device seems like way too much effort. I went and checked and couldn't find any TP-link device that wasn't Linux based, and they do sell very low end stuff.
Judging from a quick search, it looks like this SoC was developed for DVB-S receivers. I'm guessing nobody had "run Linux" as a requirement for their satellite receiver, hence the reason this work to be supported by Linux didn't have to happen before production and sale of this chip at large scale.
DVB inadvertently also created RTLSDR. Interesting how ideas polymorph.
Don't most sat STBs run Linux? That may be a misconception on my part, but I thought most did. I don't know how to check if I'm wrong.
Not only the cheap ones.
Because that would make them expensive. The cost of those boards isn't in the hardware, it's in the people writing software and the QA that comes with it.
That's not the case. You must anyways be able to support them to get anything done so the software things already exist.

It's just that they don't bother with sharing those docs in English since it's Asia only pretty much.

No, that's not how it works. Doing proper support means getting your code mainlined and written and tested according to the rules. Doing a dirty port with crappy code that still runs is easy and cheap. Delivering a crap fork and not updating it a year after release is common because of this, same goes for a lot of commercial stuff.
That depends on your unit count. 1 Software-engineer-year, and a $6 product (let's say $3 in bulk) for which the cheapest alternative is $35 in bulk. So let's say you take $100k (because it doesn't HAVE to be the bay area), that means you can spend one software engineer year per ~3k units.

That would put just supporting this arch themselves, let's call it 3 software engineers, in range of anyone making 10k devices or more.

That's a lot of people.

That would make this

It's not a one-off deal, support in Linux for example means you either need an unconstrained spec and third party maintainers, or having some person support it full time forever (or as long as the devices exist). Unmaintained code gets thrown out, that is why so few companies and projects do it; they are almost always a one-off with a short lifespan.
It's not just cheap boards, there aren't that many embedded platforms with mainline support at any price level (and many of the ones that are are community-driven, not by the OEM). Part of it is a deeply ingrained culture of industrial secrecy, but a lot of it is perceived lack of incentive. Companies perceive little benefit to investing the effort required to submit their patches upstream, and there is also pervasive FUD about hackers examining the code for exploits, other companies stealing their IP etc.

It sucks and many people are trying to change it, but progress is very slow. FPGAs are generally in an even worse position.

Forgive my black humour, but I hope there is no extra spying chip there
For €5 an extra spying chip thrown in for free is a steal though.
Depending on whether you have control of the spying chip.
would be interested in a spying chip that works without networking, as this device has none.
FWIW, C-SKY architectural support was recently pulled: http://lkml.iu.edu/hypermail/linux/kernel/1810.3/03389.html
Pulled in this context means pulled into the tree, not removed as the common parlance might indicate, for those who were a bit confused like myself.
Wouldn't the correct (or, at least, less confusing) term then be "merged" if that's the case?
Pull is also correct. Somehow merge is a little more popular but pull is certainly correct too. Remember the word "Pull Request".
My bad, should've said merged.

I wrote the comment immediately after reading Linus's email.

Is price a really big deal for these? Do you buy them in bulk for something?
Is the price for anything a big deal?
It depends, that's why I'm asking. There isn't much difference between 6 or 12 or 24 to me for something you buy one of, especially if $24 gets you something much better (e.g. I'd rather buy Orange PI that supports Android). But even +$1 can be a big deal if you want to buy thousands of them.
Why using XX32F103C8T6 instead of its complete model at specification of UART?
Probably because they don't care if it's made by STMicroelectronics or by GigaDevice. Most likely it is made by GigaDevice, but maybe they thought calling it a GD32F103C8T6 would be meaningless to many people and calling it an STM32F103 would be dishonest and so this was a compromise. Or maybe they found a third source that would have an even less recognized name.

How did things work back in the day of (official) second-sourcing? Did you just refer to a MC68000 even if you meant generically any of MC68000/HD68000/MK68000/etc? I guess it helped that it had such a unique model number and any of them could just be referred to as a 68000. I guess calling this a 32F103 would be the equivalent in this case.

What's the power consumption like? I don't see many potential benefits other than that, compared to similarly priced Allwinner based SBCs which are more powerful and better supported currently.

Also for a dev board, there's not much GPIO/other interfaces like I2C or SPI.

It does say this: "The 5V1A is powered by JTAG and UART micro-usb, so no additional power interface is required"

A fair amount of monitors and TVs have a USB port, so it would make a decent digital signage solution. Assuming you want your content just as files on a thumb drive.

No networking it looks like.

Whenever I see these dev boards (and I have dozens), I'm always tempted to just use a cell phone.

Does your project need networking? A battery? A display? Bluetooth? Try cobbling together an arduino like solution and you'll spend > $50. You can buy a smartphone with wifi and touchscreen running android for $10.

Not everyone is looking for network, so it's perfectly fine. Plus, how would you use a phone which has restrictions from OEM?
Where can you buy a smartphone with wifi and a touchscreen for $10?

If the answer is "used", then I could also buy something like this $6 board used for $0.06 in a few years, so that doesn't count.

Alibaba is probably the easiest for folks wanting new for that price point, but I routinely see devices at that price point when visiting electronics markets in HK, Seoul, and Shenzhen. Amazon has devices sub $30 new.
Walmart and Target in the US sometimes have closeout sales on their $30 prepaid smartphones that brings them down to the $10 range. They are a huge loss leader even at $30 because they expect you to sign up and pay for at least a few months' service.
Does the phone have open source drivers and firmware so you can run and do whatever you want?

Not everyone is running 'apps'...

It's not 100% coverage, but Android + Termux covers 99% of cases I can imagine. But keep in mind I'm mostly interested in using these things as tiny web servers.
Any good solutions for getting GPIO, I2C, SPI on a phone?
On some the volume buttons can be used as GPIO
You can get USB based GPIO boards for ~$20. Some need drivers, some emulate serial. I'm guessing that with a USB-to-go cable, you could connect these to the phone.
Then you're back to $30 and can just buy an ESP32 with a screen module but suffer from the indeterministic USB stack. However you could also buy a $6 ESP32 and let it communicate with the smartphone over blue-tooth at a price point of $10 (phone) + $6 (ESP32).
Agreed. There are many ways to skin this particular cat. It all depends on your use-case.
You can use ESP chip and make it talk GPIO/I2C/SPI while communicating with your phone over WiFi.
Or use ESP chip and make it talk via USB serial (android host mode adapter < $5). Much superior to RPi+shitty screen.

But rooting can be a PITA if java@android isn't enough for you.

Well it entirely depends on what you want to do. As soon as you need GPIO, ADC, PWM, I2C or SPI a smartphone isn't going to work. But I will admit that an arduino + throwaway smartphone combination could solve a wide variety of problems.
As long as these phones have a 3.5’ headphone jack, you have 1 channel 8-20 kHz ADC and two channel 8-48 kHZ DAC. That’s not I2C or SPI but it is helpful and useful for many applications. The people at Square (payment app) can tell you all about it.
Audio DAC and ADC do not measure or output DC, which makes them useless for many applications.
"下图中,U盘旁还插着一根USB有线网卡+HUB (RT8152B), 它的上面还插着 mt7601u USB-WIFI,这样就扩展出一个有线网络 eth0 和一个无线网络 wlan0."

Not 100% sure about the meaning since I don't see a eth0 in the pic above. The Chinese text refers to the pic "below" but I still don't get it.

The text could be translated as:

Shown in the picture below, a USB-ethernet adapter/HUB (RT8152B), where a mt7601u USB-WiFi was plugged in, was plugged in besides the USB thumb drive. Thus it is expanded with a wired eth0 and a wireless wlan0.

I guess what you did not see is the ethernet adapter port like this:

https://www.amazon.com/Anker-Portable-Ethernet-Network-Noteb...

(comment deleted)
From my experience: even when you have full Android sources for the device (vendor blobs for camera/modem notwithstanding) it is PITA to do something out of the ordinary.

Want to enable hotspot on boot? Few dozen lines in Java or a shell script sending keyboard commands to open the particular settings page and enter to toggle the setting.

Want simultaneous wifi client and modem? Good luck fighting with connection manager service automatically setting up routes.

Use UART? Better hope that guys configuring the clock tree have explicitly made sure the UART clock is gated, instead of UART receiving the clock from something else by accident.

Just give me a board with gigabit ethernet, wifi+bt, emmc (NOT sd for fucks sake), like 2-4 usb As and a proper power connector (NOT the god damn micro usb) and I'm happy!
Yeah, that's going to close you way more than 7$

I'd be happy if the raspberry pi had full gigabit ethernet.

Only 64MB of RAM?

In 2013 I bought https://en.wikipedia.org/wiki/CHIP_(computer) for 10E including shipping.

ARM Cortex-A8, WiFi, bluetooth, GPIO, i2c, 4GB NAND drive, 512 MB of RAM

Serious question: given that the hardware is open, why is nobody replicating the same thing at a similar price?

2013? That wiki link says the release date was 2016, but the company "had entered insolvency. Many customers still had not received their pre-orders". Sounds like it wasn't profitable to create such cheap devices?
I love my PocketCHIP. Perfect form factor. Get one or two on eBay before they become rare!

I want to try installing OpenBSD on mine sometime soon.

Interesting that they put a full blown XX32F103 there for jtag and still use a CH340 for serial. They could easily use the F103 for both, to bring the cost down (save on USB conn, 12mhz crystal, serial IC, etc). That's savings of 0.30 USD right there.
They probably reused jtag and serial from different projects, which makes sense for a V1. If it is popular, I am sure they would implement the changes you list.
Serious question. Given the recent story [0] about spying, how much trust would put on something as obscure as this implementation of a single board computer?

The lack of trust is not yet mitigated with wide adoption by communities outside of China.

[0] - https://www.bloomberg.com/news/features/2018-10-04/the-big-h...

US also spies but in other ways. For example intel ME.
You didn’t answer the question. All you did is try to misdirect the discussion.

I think he has a valid question. I’m in the market for a replacement for my Onion Omega2’s, so I clicked the link. The fact that the product page is exclusively in Chinese does not make me confident.

Western bias? Maybe. But that doesn’t mean the concern isn’t valid. I’d worry if it was in Russian, too.

i think your concern should be relative to your value as a target of a hack. there's a reason billionaires have private bodyguards and we don't, and there's a reason high value systems are built from scratch in tightly controlled environments and use things like hardware based security
Any hacker knows that you go after the low value targets to get to the high value targets.

You hack the CEO’s secretary to get the CEO’a records. You hack the defense contractor to get to the defense agency.

The concept of a “low value” target is outdated, which is why there’s such concern about commodity IoT devices.

probs not a good idea to have this on any network with high value targets
You can mostly rust it because putting a well-hidden backdoor is a lot of work. This work must be paid for somehow. There must be a way to activate the backdoor, either at the mastermind's command, or in certain interesting circumstances. The activation's effect should be painful enough for an adversary to be worth it. Just bricking a few million consumer DVB boxes is likely not it.

Otherwise, read "Trusting trust"; if you are targeted, trusting anything at all is hard.

There are a lot of cheap linux dev boards out there now, to the point where I had trouble finding a list of boards that met my requirements[1]. There is almost certainly a sub-$20 board out there with what I need, but I ended up using an RPi just because it was "cheap enough" and had what I needed.

1: In this case, analog audio out, 1 host-side USB port, and 6 GPIOs.

The Pi Zero W is my default for the same reason, and most of mine were all of $5 due to sales at Microcenter. It's pretty hard to beat that unless you need more CPU power.

Add an industrial MicroSD card for ~$15 (to prevent the infamous SD corruption) and it's still at the $20 point but far more reliable and versatile than many of the alternatives.

Even some of my microcontroller boards cost more than that, and you can still program the Pi boards "bare metal" if you really want to, because they're popular enough that people have already done the work to make that possible.

P.S., even with a Pi Zero (W or not), you can hook up a tiny I2S audio codec board for a line level[1] or amplified[2] audio output.

[1] https://www.adafruit.com/product/3678

[2] https://www.adafruit.com/product/3006

Thanks, I didn't know the Pi Zero had I2S pins brought out; kind of funny that the unamplified board is more expensive (though just from the picture it's easy to see why; the amplified board is relying on the inductance of the load for filtering and it lacks the phone jack).