My Unholy Battle with a Rock64
artemis.sh
artemis.sh
Software ecosystem support is THE killer feature for this class of device. And the RPI has, despite its fundamental shortcomings (needing the proprietary GPU to manage bootup, etc.), the best story in that particular department by so much that it's not even a contest.
Exactly!
On the RPI if I want to watch HBO Max without stuttering, all I do is apt install Chromium in Raspbian Buster, fuck around with a dozen or so startup flags, give up, try Kodi, notice that there's no official plugin, install a conceivably legal plugin from "http://k.slyguy.xyz", unzip it, twiddle some quality settings, and put up with intermittent stuttering that's slightly better than when I started the whole process.
I'm just guessing at the Kodi part[1] since I've only made it to the "give up on Chromium" part so far. Anyway, it's probably less work than what the author describes.
Probably.
Same here.
You might get away with higher resolution x265 with passive cooling (a really good heatsink), especially if the device is in a reliably cool environment, but around the time I started using such encoded media the Pi4 was readily available which does 265 in hardware so no similar heat problem (the Pi3 is now used for other experiments). Unfortunately current supply issues might preclude you using that upgrade option!
A couple of years ago, I could happily use a Pi400 as a streaming box for my TV. Today, it's only good for playing videos off of an external drive with stock Raspbian. This was one big reason why I cancelled my Netflix subscription.
In fairness though, I seriously doubt that other SBCs have better streaming support. Is there a project like OpenWRT for HDMI sticks like Roku, Fire TV, etc?
Then you're probably not in the "embedded" space. You're in the "I want a cheap desktop/laptop" space.
You don't need video to run a gateway. You don't need video to drive a piece of machinery. etc.
Only to be incredibly disappointed once they don't deliver what they're expected by specs alone
Sure.
But if you get almost all the way through watching an entire episode of Barry on your gateway and then it stutters, trust me-- you're going to loudly ask why the hell this gateway won't do the goddamned thing it's supposed to.
Interestingly x86 ChromeOS machines with low memory (4GB) didn't have issues with HW accelerated videos, I wonder whether the ARM ChromeOS machines of that era had issues?
This is really a sad state of things and a signal something is fundamentally broken in this class of devices.
And that's how I use all of my SBCs (I just counted I have 7 different SoCs on my various boards and mobile devices). I put on a regular whatever distro on all of them (Arch Linux ARM in my case, but it can be anything. That's the point. The distro doesn't need to "support" my board.) it and I only figure out my own kernel and bootloader builds. Bootloader can be figured out once and forgotten about. Kernel just needs a quick update now and then, if I care. Nothing much harder than a make && make install with some env vars set and a corss-compiler installed on my workstation.
I don't need any special board specific software ecosystem provided by some foundation for normal desktop or server uses. It's already there (any GNU/Linux on ARM distribution must work), and it's generic. If the SoC is so bizarre that it can't just run U-Boot/TF-A/Linux/any distro in rootfs in that order, and requires something custom, including non-standard tools in userspace to control basic things like display output, etc., that may not be worth bothering with, but that's only really a domain of Raspberry Pi, and not common anywhere else.
Some distros provide generic kernel builds and a proper bootloader/device tree already, for many boards. So if someone is not interested in building their own, they don't need to. That may limit the choice of the distro though. But it's just an artificial limit.
My memories are of Indiana Jones-esque gymnastics after stepping on functionality that should have been solid... but turned out to have either been not implemented or implemented in a known-broken way.
It makes me appreciate how good enterprise, desktop, and server software actually is.
And understand why Apple and Google both put in the approval speed bumps they did for apps.
The minimum quality floor is far lower than you would expect...
I think the only sane use of most niche embedded stuff is if you're building a product for a single use case and have a team. Aiming for general purpose & everything works? Hell no!
If you can find them for a good price on eBay or the likes, it's well worth the convenience over any ARM board if all you want is to run a server - I find it preferable to the Raspberry Pi, and especially other ARM SBC hardware.
Reality: a RPI 4 costing as much as a whole Intel NUC, but slower, without upgradable RAM, without native ports to mass storage (SATA/M.2), and not as reliable.
Didn't even have to think that far to see that SBC computers are a joke^W^W not there yet. Considered buying a NanoPi or a Raspberry CM + some board to build a router, with at least 2 physical Gigabit ports. Tallying up all components (sbc, case, power supply, heat sink, etc.) made the NUC with 4 gigabit ports look a bargain.
I really wanted to go the !x86 route, but...
far from being a fundamental shortcoming, that's entirely inconsequential.
A Raspberry Pi's is by far the easiest way to go, but I've found they have become way too expensive. If anyone is looking at cheap SBC's I suggest you pick one with Linux kernel mainline support. Here is a good place to start: https://linux-sunxi.org/Linux_mainlining_effort
A lot of the newer SBC's aren't supported yet. This means that you will be stuck using the vendor's Linux distribution until support lands in the mainline kernel (which could be never). If you get an older SBC with mainline support, you can run 3rd party distros like Armbian. https://www.armbian.com/
Why isn’t there a market for standalone ARM chips and motherboards like there is for x86?
Even if there is some constraint that prohibits scaling up ARM CPUs (e.g., fab capacity shortage) and thus we need to stick with mobile components, what's stopping someone from selling mobos for mobile chips? If the answer is "mobile chips have to be industrially attached to a board" then why aren't there SBCs that are a drop-in replacement for a PC mobo+x86-chip (or if these exist, why are they so niche)?
You could in theory, yes, do a PC-mobo form factor SBC. But no PCI, no SATA, no external DRAM: it doesn't look very much like a PC even if you've stuck it in a PC case...
> But no PCI, no SATA, no external DRAM
Why not? Do mobile ARM chips not support those things? I know the RPI compute modules have PCIe.
Windows' biggest drawback in this regard is that hobbyist/enthusiasts generally can't add support for any-old-board. You've got to be a vendor who is willing to get in touch with Microsoft to make it happen.
Demand exists, supply does not. Why? Idk. Maybe it’s a consequence of bad business decisions at ARM.
Apple has recently shown that ARM chips can be competitive with x86. However, I don’t see why we couldn’t have had that a decade ago. Why did we have to wait for a licensee to take this matter into their own hands? It’s like the business execs at ARM are asleep at the wheel. If I were a shareholder, I’d be wanting some different leadership.
Arm, Linux support, native sata interface, gbe for about 40 Euro.
And its a good, reliable company.
Outside of rpi's which have boatloads of community support, about the only boards that aren't this way are the systemready ES/SR certified ones. There is a IR level too, but its still using DT, meaning that the linux kernel devs will break the machine at random times requiring firmware/DT updates when newer kernels are loaded. The ES/SR bands use UEFI+ACPI and provide a standardized platform that is the same as what one expects of a random pc.
I experimented with a RockPro64 a few years ago before learning this lesson. The hardware sounded wonderful. Unfortunately, there was some kind of conflict between the PCIe slot and the GPU. It was possible to get hardware-accelerated video, or use the PCIe slot for additional SATA slots, but not both at the same time. I spent a fair amount of time trying to dig into it, but never did establish whether the problem was in hardware, the device tree, or the drivers.
The Rock64 runs mainline Linux these days with pretty much everything working except the video decoder.
Even the successor Rockchip SoC, the rk3566, has great mainline support despite only being released last year.
I typically use Arch Linux because it's very barebones, and Arch Linux ARM has a working setup [0] for the Rock64. You do need to write various parts like U-Boot bootloader onto the SD card manually, but everything has been pre-compiled. If you prefer an image that you can directly flash onto an SD card like Raspbian, then maybe you can try Armbian [1].
These should get you a working Linux install rather quickly, bringing you to up to the "sixth circle" as written by the author.
[0] https://archlinuxarm.org/platforms/armv8/rockchip/rock64#ins...
That's fine for the OP! They probably wanted to experiment and tinker, no problems there. But it seems to have given a lot of people in this thread the wrong idea about how well supported these devices are for normal users.
A lot of this will be upstreamed and people will use the info from ops article then fill in a bunch of the gaps.
I'm currently debugging the lima DRM driver for NetBSD.
(Asking for my next home server!)
* Vendor integrates a bunch of IP (Cortex, codecs, GPU), tapes out SoC design.
* Vendor has challenges hiring or retaining excellent software engineering team, because VLSI and hardware are the core competencies that make money, not software.
* Vendor's struggling software engineering team hacks copy-pasted code together until they can produce a board support package against a single Linux kernel version, with no care to upstream. Once the device boots in a single configuration, they ship it.
* Vendor's also struggling documentation team attempt to use sketchy descriptions from engineers to produce documentation. Often, internal interfaces are ignored or not documented since "it works" - only the external interfaces needed to make the chip run are documented.
Now, an OEM buys the SoC and BSP. Sometimes they do some extra work to get the BSP to work with a newer kernel, and sometimes they don't. And if they do, they hack on top of the hacks, so the divergence increases and now there are multiple devicetree versions floating around (as happened with this Rock64 board).
You'd imagine at some point the maintenance costs for the chipmakers themselves as well as the increased interest / adoption rates from customers would tip the economics of all of this firmly towards standardization of this mess. Then again, I may not fully understand the economics here, or how much cheaper the current hacky approach is.
[1]: Looking at you, Rockchip, Amlogic, Mediatek, Unisoc, Allwinner, Broadcom and the list goes on. I hope the Raspberry Pi Foundation + Broadcom can take the opportunity with the Raspberry Pi 5 or something to lead the way, but I'm not optimistic at all.
The big problems are when:
* The DeviceTree is incorrect but works anyway because the peripheral drivers are ignoring it.
* The DeviceTree is correct but the peripheral drivers had to be patched to work.
UEFI doesn't seem to do much here, no?
And even moving to ACPI doesn't really change anything - DeviceTree is just a simplified ACPI really, if the ACPI descriptors and what the peripheral drivers do don't match up, it still doesn't work.
> And even moving to ACPI doesn't really change anything - DeviceTree is just a simplified ACPI really, if the ACPI descriptors and what the peripheral drivers do don't match up, it still doesn't work.
I'm getting to the edges of my understanding of these things here, but wouldn't ACPI make it easier to support newer / mainline kernel versions without the vendor needing to supply a device tree specific to a kernel version they maintain?
It would be nice if there was enough of a standard one could download a Debian ARM64 image from Debian's main website, and it would just boot and work on an ARM SBC. Even brand new x86 hardware can usually at least _boot_ and provide basic and useful I/O on Debian stable, and work pretty well on Debian sid.
NetBSD has one image that will boot on all supported ARM64 systems, it just uses the device tree or ACPI table supplied by the firmware to configure the hardware, there is nothing stopping Linux from doing the same.
In the sense of "supported" where the peripheral drivers are upstreamed _and_ the Device Tree matches the code that was upstreamed, this is exactly how Linux works. It's just that as the article documents with Rock64, this is sometimes not an easy combination to find. I'd imagine that NetBSD actually has the same issue with respect to needing a "supported" Device Tree for a given "supported" hardware version - there are probably interim Device Trees that will not work at all.
The issue is that the Device Tree and kernel are both moving targets which often don't match, because fundamentally the Device Tree is just a configuration file for the peripheral drivers and the details of the interface contract between the Device Tree and peripheral driver can change at any time.
The same issue would exist for ACPI too - as several posters have pointed out, the issue is mostly cultural.
x86 has a "plug n play" culture - hardware is sold mix and match and has to work with generic CPU/motherboard/firmware combinations, so the platform needs to be able to enumerate devices and allocate resources on the fly. Drivers are written from the ground up to work with what bus enumeration gives them and not to make naive assumptions about the configuration of system memory. Plus, PCI devices all have a standards-constrained communication mechanism with the host, as opposed to ARM peripherals, which can be any given combination of register-mapped, memory-mapped, interrupt-mapped, or multiplexed through other hardware.
ARM systems culturally have never had this constraint, so many drivers rely on hardcoded assumptions that break when they are introduced to another SoC. And for ARM, this is only getting worse as instead of making peripheral drivers more generic, vendors are instead building blob-HALs. I'm not sure what the solution here is unless the buy side (OEM server integrators, phone vendors, set top box manufacturers, SBC vendors, etc.) start demanding improvement. In the case of the Pi, the Pi folks instead have been slowly chipping away at making this migration themselves (i.e. slowly replacing DispmanX FKMS with native KMS), which is An Approach but maybe not A Great Approach.
The device tree describes the hardware, you write the driver to match that.
DeviceTree is just a simplified ACPI really
Yes, and no. DT's as used by these arm boards are basically reflections of how the linux kernel works on a given platform. A device driver developer needs to make a decision, say about how fast to program a clock divisor, so they then need a clock driver, and a device specific set of attributes that match 1:1 with the code paths in the Linux kernel which are making platform dependent decisions. When another OS comes along the attributes change because the driver model is different. This is visible in linux as its own model evolves. The systemready/ACPI specs tend to require more self describing buses (pci/usb/etc) where the devices are more fully encapsulated behind the bus, and things like power/clock management are either standardized by the bus interface, or via the standardized ACPI methods. AKA, putting an ACPI device into a low power sleep state is the same across every single device/platform because ACPI can notify some other firmware/management entity to perform the work rather than trying to fine grain manage the process.So, your right, DT is a subset of ACPI, but its only really capable of HW description. So all these platforms (like the rpi) end up with proprietary ways of getting their management (the GPU in the case of the rpi) engine to perform platform actions. And that's needed because all these arm SoCs now have processors/etc that aren't visible to Linux because the model is no longer just about a central CPU doing all the work.
But the booting is just a small part of the mess. For the rest I guess the answer is similar - the default state of things is "not working" and a lot of things have to go right to make things run well.
(How long did it take for RPi to get working hw video decoding OOTB with a distribution other than the board specific one from the SBC provider? Or does it even now?)
The water in this case is Linux.
All I want is a handful of risc CPU cores, a few gb of ram, and a framebuffer device with a good blitter. Something well-documented so I can play with the metal.
I did finally get everything working, and I wrote some documentation to capture it.
https://nixos.wiki/wiki/NixOS_on_ARM/NanoPC-T4
What I learned in the process is that Nix is a great resource to see how to get lots of Arm chipsets to bootstrap with Linux. Specifically, the uboot config file.
https://github.com/NixOS/nixpkgs/blob/master/pkgs/misc/uboot...
By reading that, you can get a good view into what proprietary blobs and tools are necessary to get various boards working. As an added bonus, since Nix is declarative and versioned, weird boards should continue to work for the long haul.
Ironically, once I got the board up and running, I completely lost interest. Turns out the challenge of getting it to work was scratching a particular itch, not actually using it in practice.
I'm happily using it on my RockPro64, although I did need to disable USB initialization to get it to boot on mine[2].
[1]: https://tow-boot.org/devices/index.html [2]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=973323
I can count platforms with lacking SW support on all my fingers, easily, but RK3399 is not it.
DeviceTree is just a file format, it's not really an alternative to the guarantees that UEFI/ACPI provide.
https://github.com/ARM-software/u-boot/blob/master/doc/READM...
Rockchip SoCs builtin "maskrom" can read u-boot (or whatever other bootloader you use, Quartz64 with its RK3566 actually has a Tianocore EDKII port for full UEFI) from either SPI flash, eMMC or SD. The boot mediums after that are entirely up to said bootloader.
This is not somehow special to ARM, your x86_64 PC motherboard just comes with an SPI flash chip that has firmware like this flashed to it from the factory. Some SBC vendors are doing this as well now, e.g. ODROID is shipping u-boot+Petitboot (which seems like a bad idea, kexec is fragile from what I know) right on a flash chip included on the board.
The difference with RK3328 as found on the ROCK64 and RK3399 as found on the ROCKPro64 or Pinebook Pro is that you are not at the mercy of your vendor to provide you with firmware updates. Everything (TF-A, u-boot, and kernel) is included in the main repository for those particular projects and will be maintained going forward, and you can build it from source and hack on it at any time. It's not a u-boot fork from 2017 languishing in some dumping ground of a GitHub repository.
No binary blobs available for the graphic card (actually there was a triple graphic chip boosted from Vivante) and Xorg in newer versions couldn't detect it. If you were running an apt-get upgrade on the official image, the very next boot could made the UI experience broken.
I still have the board but I use it headless for pihole and wireguard, but the whole ARM experience becomes awful when it comes to graphic acceleration and the drivers aren't open source and not maintained anymore.
> On 2017-12-14 Debian Buster (currently 'testing') was tested and running GNOME on Wandboard almost worked right out of the box. (In Buster the GNOME session uses Wayland by default instead of Xorg.) The only change needed was reserving contiguous memory, see the 'cma' section above.
Then there is the piece of flaming crap that is the ASMedia PCI-E SATA card that they sell along with the board on their store. That thing cannot handle 2 SSDs and its not a problem with power delivery. Replacing it with some marvel based cards.
People were saying "it's only this first generation, things are getting better fast" since before arm64.
Just as it did with Itanium.
Just as it did with PowerPC.
Just as it did with MIPS.
Just as it did with Transmeta.
Just as it did with ARM last time ( https://en.wikipedia.org/wiki/Acorn_Archimedes )
The year of replacing the x86 architecture never arrives ...
Frankly, I would probably give Itanium the best odds (Intel + Microsoft behind it), then Alpha (Microsoft behind it).
Certainly I would never want to use an M1-family machine with the stock software shipped with it.
PCs (partially) solve these problems because the BIOS plays the role of secure firmware and first stage boot loader. Hardware enumeration is solved by having most things be PCI-attached and the bios providing ACPI to enumerate the rest.
RISC-V also doesn't solve SoC documentation access. Most of Arm's CPU documentation is freely available, its all the other stuff SoC vendors bolt on that's hard to get access to. I don't see RISC-V changing that.
Firmware interface is a solved problem (opensbi), so is enumeration (dtb).
USB, WiFi, Bluetooth, GPU, memory/gpu interface, hardware media decoders, .... Most of which is proprietary IP and heavily patent encumbered.
An open RISC chip won't help with that.
I miss the days of standardized I/O ports, BIOS interrupts and memory-mapped devices at published addresses. Now, with ACPI, you practically need to run an entire VM in kernel to figure out what’s connected, and the complexity of drivers makes it very difficult for the hobbyist to interact directly with hardware.
I had a RockPro64 for a while that I had tons of trouble getting to work for almost these exact reasons (largely thanks to uboot). Got rid of my Pinebook Pro for similar reasons.
Pine64 makes tons of interesting devices then relies almost 100% on unpaid post-consumer-hobbyist interest for any usability outside of a hacked together barebones ecosystem. Even their unique PineTime, which has been out for some time, is at a barely functioning level and I have zero hope for the PineNote at this point.
I really wish they cared about more than spinning out flashy hardware and patting themselves on the back.
Doing it yourself is a lot of "fun" and a good learning experience.
On the Rockchip SoC in question, boot security is disabled by default, so you can compile it yourself from source and run your own modified version if you want to.
[1] www.trustedfirmware.org
You can like it or not but they're pretty open about the business model.
The patch to the (already mainlined ages ago) device tree is not "on the manufacturer's website" because it is already on the Linux kernel's website. To which I linked. And it will be in Linux kernel 5.19.
Unlike Broadcom's fruit-themed tax evasion scheme, we strive to mainline support for the devices, so that you do not need manufacturer specific patches and mainline Linux just works out of the box.
The berries wrinkle their nose at this approach, as they'd rather use a proprietary boot chain with their own kernel fork and pre-made SD card images containing forks of Debian for maximum handholding.
Meanwhile, I'll be content booting fully open and auditable firmware with mainline bootloaders, kernels and userlands. We all have our own priorities.
This is exactly why I am not on the hype of ARM for personal computing. It's like every computer with ARM SoC is completely different beast.
There's no support in ffmpeg for v4l2-requests API, and nobody forward ported old Bootlin vaapi wrapper driver around v4l2-requests API to the stabilized public version of the API, yet. So app relying on these programs/interfaces don't get the acceleration, atm.