319 points · by pfrog · 6y ago · 103 comments
A downside of ARM SBCs is that they pretty much all have an expiry date. Due to their closed nature, when the community pulls the plug, they're gone (SW-wise). x86 boards last virtually forever. While they're somewhat compatible with standard Linux distro, in order to have full support, one needs to use the adhoc ARM distros.
First, the "closed nature" thing is just as true about x86 as it is about ARM; you don't get full specs for any machine these days, Broadcom or not. Rather, from the perspective of "Linux developers who write code on and deploy to Linux" — or maybe "Linux Desktop Users" — the difference is in peripheral discovery and setup, of which x86 has ACPI and UEFI to dynamically discover and configure devices upon every boot, while ARM boards use device tree, which is static and requires up front, BSP-specific descriptions.
Userspace binaries for AArch64 Linux will work across most devices. A RPi4 running Ubuntu and a RockPro64 running Ubuntu will use the same binaries just fine. The problem is when vendors have kernel patches or workarounds that make booting harder. But it's not like literally all software stops working on a specific date. If you have the kernel and dtb, you can make it work and keep your system booting. It's definitely less than ideal, if you think of it like a desktop, where timely updates are common and easy. But it's doable. And more devices seem to be moving towards an upstream-first model, so this seems like less of a problem anyway. I'll also note it's not actually hard to package a device tree blob with a userspace+kernel, it's just that most "desktop" distros make spinning custom variants unreasonably hard, IMO, so you need Buildroot/Yocto or whatever to build custom images. And again, "Linux users" like, say, most people reading this comment, don't actually want Yocto — they want Arch or Debian or whatever. A bit chicken and egg.
Furthermore, the RPi4 also supports ACPI and UEFI (upstream Tianocore) which is continuously improving, so it can support generic Linux distros. I have a "generic" Fedora 33 install working on my RPi4, with UEFI boot, all from a USB3 stick. It even installed using an ISO, and I configured the install using Anaconda, identically to x86. The Pi4 also has a production date of at least 2026, and almost the entire userspace software stack is completely upstreamed now, including kernel, graphics drivers, and peripherals. So from the perspective of someone who treats the RPi as a kind of "mini Linux Desktop", most of your complaints don't really apply at all. But...
---
The actual biggest problems with the lack of specs/dtb shit/"closed stuff" isn't when you want to treat it like a normal Linux machine with keyboard/usb/ethernet. That's easy and works today. You can get most of the desktop Raspberry Pi experience, including generic distro boot, today! It's when you want to treat it like an actual "embedded device" where you write custom drivers or poke GPIOs or use hardware features, or whatever. That's where the closedness sucks, but in that case, even if it sucks or there's no specs, there's normally no realistic x86 alternatives.
Sure, you can buy a $100 x86 device in an RPi form factor with RAM and plug a keyboard into it, and it's OK if it uses 2x as much power at load, if you just want a mini desktop that is cool. But where's the $20 x86 device that has a shitload of I/Os I can use to interface with various peripherals of my choosing, with all the accompanying good stuff like good DAC/ADCs, GPIOs, camera support, eMMC? And where can I buy them? Where's the $5 RPi Zero alternative? Because the ODROID-H2+ is $120 USD, and doesn't even have GPIOs!
It has 32GB eMMC onboard too so unlike the Pi4 there's no need to deal with external USB storage or flaky SD cards
Maybe you mean something specific by "adhoc" or "full support" that isn't apparent to me, but Ubuntu has ARM distros today and I expect that ARM support is only going to get better as (1) ARM continues to make headway in the server space and (2) Apple Silicon pressures desktop/laptop OEMs to adopt ARM.
Even the most well known SBC series is getting driver support at a glacial pace. When was the last time you waited for your x86 iGPU to get vulkan drivers?
On the other hand, there aren't many competitors that are better in terms of accessibility. Sigh. Implementing embedded devices with any sorts of "smarts" beyond some Atmel uC from scratch is a pain - one has to go with ready-made modules (ESPxx, Raspberry Pi compute module, COMexpress) to not go insane.
And it's not just the data sheets where you will run into issues (at least, usually you can find them somewhere pirated to get started). Design guides, layouting rules and certifications are a way bigger pain point... looking at you Thunderbolt.
And when you finally have your first PCB version ready, you'll soon find out that any components more intelligent than a couple transistors have sometimes ridiculous minimum order quantities. Let's take a SI2494 56k modem chip... 45$ apiece at a MOQ of 43 - which means if you want one or two you'll have to shell out about 2k $! And to add insult to injury, it's apparently still profitable to sell them for under 9$ at high quantities. This fucking rip-off is the reason why many hobbyist electronic projects are restricted to using dumbass components.
edit: I totally forgot about the software side with embedded SoCs. Basically, to boot Linux or anything else on a SoC you need firmware blobs (e.g. for the GPU or wireless radio parts) and lots of custom code (e.g. to bootstrap clocks, memory, IO). Usually the SoC vendors have an ancient fork of a Linux kernel and u-boot in which over each new chipset there gets ever more custom cruft and (often shoddily) backported stuff from newer kernels. This conglomerate is called "board support package" or BSP - and is, despite consisting of open source code, often guarded as heavily by NDAs as the data sheets.
Sometimes, especially for Mediatek stuff, these BSPs get leaked on Github... and it's always a wild ride looking into them. It's no surprise that upstream Linux doesn't have the support for whatever specific CPU... because the quality of the code is more often than not so hardcore rotten that it's a wonder you don't hear every day about some compromised IoT device.
https://www.solid-run.com/nxp-lx2160a-family/clearfog-cx-lx2...
I have a pi4 compute + base board on pre-order plus I just bought a pcie x1 m.2 M-key card off amazon. I plan to use the SD card (emmc on my model) to boot a kernel and use the m.2 card for storage.
I think the pi foundation finally realizes that the pi has the potential of becoming an affordable and accessible SoM (system on Module) with a huge community behind it.
> The official pi4 compute base board routes that to a standard pcie x1 slot instead of USB 3.0
Do you have more info on this? I am not sure how it works.
If you have 1M source floats and want 60 FPS, translates to only 6 GFlops.
On Pi4, on paper the GPU can do 32 GFlops. Again on paper, the CPU can do 8 FLOPs/cycle which translates (4 cores at 1.5 GHz) to 48 GFlops. That’s assuming you know what you’re doing, writing manually-vectorized C++ http://const.me/articles/simd/NEON.pdf abusing FMA, using OpenMP or similar for parallelism, and have a heat sink and ideally a fan.
So you’re probably good with both CPU and GPU. Personally, I would have started with NEON for that. C++ compilers have really good support for a decade now. These Vulkan drivers are brand new, and GLES 3.1 which added GPGPU is not much older, I would expect bugs in both compiler and runtime, these can get very expensive to workaround.
While I don’t have any experience with Jetson, on paper it’s awesome, with 472 GFlops. Despite the community is way smaller, nVidia is doing better job supplying libraries, CUDA toolkit has lots of good stuff, see e.g. cuFFT piece (I did use CUDA, cuFFT and other parts, just not on Jetson).
We have devices capable of many GFlops in our pockets and many TFlops on our desks, yet we pay by hours to use computers operated by companies like Amazon or Microsoft.
> rustrated with heavy dependencies and slow libraries, i’ve been experimenting with some game technology to render raw image pipelines. in particular, i’m using SDL2 and vulkan. to spur some discussion, here is a random collection of bits you may find interesting or not.
> also please note this is just a rough prototype bashed together with very little care and lots of hardcoded things just to demonstrate what’s overall possible or not.
Since that is SDL2/Vulkan based you might get something out of the discussion there
[0] https://discuss.pixls.us/t/processing-that-sucks-less/13016
For pre Pi4 boards, there is an OpenCL implementation.
Vulkan is built based on modern GPU architecture as well as being lower level then OpenGL. This makes it easier to get the best out of the hardware.
Being closer to how GPUs work underneath gives developers more flexibility for optimizing.
Vulkan was after all a spec from one GPU manufacturer (AMD), there are a handfull others with their own archs developed with their own assumptions.
I picked up a Pi zero and muddled my way through what I could in C/C++ from piecemeal guides, and from text boot mode managed to initiate a graphics mode and draw a spinning triangle. Think I threw darts at the board for linking libraries in the compilation.
I have no idea what I'm doing, and of course, the level of scaffolding that had to be put into a simple spinning triangle was just astounding. My prior experience was using three.js and BabylonJS, and poorly. Is there something convenient to use library-wise in text mode, or is a safer bet doing windows -> firefox -> three.js?
Spinning textured cube: https://github.com/Const-me/Vrmac/tree/master/RenderSamples/...
Spinning teapot with lightning, inertia, mouse and keyboard input, etc: https://github.com/Const-me/Vrmac/tree/master/RenderSamples/...
Dependencies: https://github.com/Const-me/Vrmac/blob/master/Installation.m...
Way easier to debug on Windows, because visual studio and renderdoc. There’re a few incompatibilities but these are minor. Here’s one example, in a vertex shader: https://github.com/Const-me/Vrmac/blob/master/RenderSamples/...
Immediate-mode UIs are by far the easiest for quick and dirty work. Near trivial to get stuff up on screen you can interact with.
Haven’t tested their Vulkan support, but I did GLES 3.1, D3D 11 and D3D 12, all 3 worked great for me.
Is there a way this will help with accelerated pygame graphics?
(last I tried, all blits were in software)
At some point we'll have to migrate to new terms for "in hardware" for offloaded operations since we are no longer using fixed function hardware :)
Note, the CPUs on the Pi are faster than the gfx hardware, and gfx is usually memory bandwidth limited.
Whenever you say you want more powerful the answer is the current way it's primary goal is to be affordable and its primary target audience are schools etc.
E.g. The standard version of the Pi 400 with 4 GB covers most (consumer / school children / students) application purposes. 8 GB are rather needed in the area of video editing / prosumer / server, and would bring the price significantly above the „magic“ 100 € limit.[1]
The vendor just doesn't want to acknowledge the real role of Raspberry Pi is not limited to being a cheap tinkerer board anymore, it has became a standard (for an ARM PC and a hackable set-top-box/console in particular) and a vibrant ecosystem has grown around it - there are plenty reasons to still want a Raspberry Pi original (rather than something the competitors offer) when you don't need it to be so cheap (or even so small) but actually need more power, faster IO, more ports, more GPIO pins etc.
[1] https://pi3g.com/2020/11/04/will-the-raspberry-pi-400-be-ava...
The vendor is a charity with a mission that they have chosen [1]. They can target the Pi however they want to meet that mission. The fact that it doesn't happen to do something that you want it for is your problem not theirs.
There has been a virtuous cycle that something originally aimed at education has been of use to so many hackers, resulting in high volumes and all the benefits that brings. But that doesn't mean that they also need to focus on other sectors.
https://en.wikipedia.org/wiki/Raspberry_Pi_Foundation
They are not doing this for profit, although they are self-financing at this point (from what I've read).
Compared to that, what would make you go for a Pi at that price point?
It isn't as sexy or prone to looking cool, but technically it is possible. I'm actually planning on trying to tinker a traditionally networked cluster that I?m going to evolve to an attempt at an SSI'd cluster.
That's really all what most Integrated Circuits are going to mowadays. Just take a few ALU's, clock circuits, register files, Memory, some caches, a few MMU's, connect it all with buses, fab x gang bustahs and you've got a new system. The toughest part seems to be getting someone to be frank with you and just giving you an accurate datasheet/not screwing you with locked down firmware and rent extractiom arramgements.
oh wait just buy a khadas vim3 or the new tinkerboard etc etc