Booting ARM Linux the standard way
11–20 of 34 posts
Re: Booting ARM Linux the standard way
#12Some disconnected thoughts: Title is misleading: Tow-Boot wants to become the standard way, but it isn't one today. There's going to be a lot of resistance to distros shipping a binary they didn't build from source. It might work if you could ship Tow-Boot on the hardware and make it optional for the OS to care, but unless I've missed something OS integration is needed (if nothing else, because it has to share storag…
That's kind of the point here -- distros would stop shipping the bootloader, and the bootloader would be independently managed, to be treated as a board firmware instead of os package.
Re: Booting ARM Linux the standard way
#13Some disconnected thoughts: Title is misleading: Tow-Boot wants to become the standard way, but it isn't one today. There's going to be a lot of resistance to distros shipping a binary they didn't build from source. It might work if you could ship Tow-Boot on the hardware and make it optional for the OS to care, but unless I've missed something OS integration is needed (if nothing else, because it has to share storag…
> There's going to be a lot of resistance to distros shipping a binary they didn't build from source. Tow-Boot appears to be MIT Licensed. There appears to be nothing stopping them from building Tow-Boot from source.
> One of the nice things about Tow-Boot is that it leverages the Nix build system to generate a nice reproducable build of the platform firmware. This should take away some of the doubts of having a prebuild platform firmware instead of every distribution figuring out how to do this from source. Also distributions not doing this from source would mean there's less chance of inconsistencies slipping in.
Re: Booting ARM Linux the standard way
#14Noble goal, but I want to point out that ARM recommends using UEFI as the standard way to boot. Then you can just boot whatever popular distro you want without weird tweaks. I’m not a fan of EFI but I think the downsides are less bad these days.
This implements EFI.
Re: Booting ARM Linux the standard way
#15Some disconnected thoughts: Title is misleading: Tow-Boot wants to become the standard way, but it isn't one today. There's going to be a lot of resistance to distros shipping a binary they didn't build from source. It might work if you could ship Tow-Boot on the hardware and make it optional for the OS to care, but unless I've missed something OS integration is needed (if nothing else, because it has to share storag…
Tow-Boot isn't the standard yet no, but it provides the standard EFI booting interface so it's at least somewhat true. Distro's is shipping binaries that aren't build from source all the time, it's called firmware. Which is why this should probably be managed by fwupd, not packaged by distributions.
Only because the sources aren't available.
Re: Booting ARM Linux the standard way
#16I can also say I'm happy to see this coming from Samuel Dionne-Riel, a fellow co-developer of NixOS. Always glad to see the stuff the community produces. :)
Re: Booting ARM Linux the standard way
#17Some disconnected thoughts: Title is misleading: Tow-Boot wants to become the standard way, but it isn't one today. There's going to be a lot of resistance to distros shipping a binary they didn't build from source. It might work if you could ship Tow-Boot on the hardware and make it optional for the OS to care, but unless I've missed something OS integration is needed (if nothing else, because it has to share storag…
Re: Booting ARM Linux the standard way
#18Some disconnected thoughts: Title is misleading: Tow-Boot wants to become the standard way, but it isn't one today. There's going to be a lot of resistance to distros shipping a binary they didn't build from source. It might work if you could ship Tow-Boot on the hardware and make it optional for the OS to care, but unless I've missed something OS integration is needed (if nothing else, because it has to share storag…
The way this whole thing is intended to work is something like this:
- You are going to ship a bootloader for a device.
- You choose Tow-Boot, because you want UEFI and you want to build on an established tool (U-Boot)
- You patch/tweak the Tow-Boot build to produce a firmware for your device. That would require, for example, shipping a device tree with it, and maybe a few patches to U-Boot if you needed it (sometimes unavoidable), and tweaking some build system parameters.
- Tow-Boot will also have its own specific integration you probably need, to follow its given conventions and UX guidelines (e.g. when to flash red LEDs)
- Presumably, they would also hopefully work to upstream that into Tow-Boot and, by association, U-Boot. Many vendors do this already.
- The developer can then flash the binary from the Tow-Boot build to their internal flash or whatever. They ship the devices.
- The user now only needs to load any UEFI-compatible Linux/Windows/Whatever distro and point Tow-Boot to it. All of these systems generally expect the UEFI environment to be managed independently of the host OS, already. This is precisely how x86 systems work today, so it really does mostly "Just work."
The point here is that the work around the firmware build, its user interface, and its quality control are all shared under a single umbrella. U-Boot by itself isn't enough; you typically also need the device trees, configuration, patches, etc. This is a unified project to collect all that.
That is why Tow-Boot needs its own reproducible build system, because the OS package manager isn't going to build it or ship it to users. It literally isn't the way it's treated on most modern systems.
> It might work if you could ship Tow-Boot on the hardware
That is how it works: the vendor ships Tow-Boot (or any other loader) onto the flash and ships the device. Users then load an OS onto it. Or the user could re-load a new version of Tow-Boot too. But the point is the OS and the OS packaging infrastructure is actually not handling this.
> OS integration is needed (if nothing else, because it has to share storage).
Yes, it needs to support UEFI.
> Like... I would expect the existing u-boot project to be very much in favor of supporting all possible hardware and standardizing ex. LED colors to always mean the same thing.
That's not a good solution. Things like LED colors are human interface decisions, not technical ones, trying to unify them in a place like U-Boot isn't the right layer; it just ships device trees and might enable these interfaces by writing to some configuration registers, but that's it. How the system blinks LEDs across different devices is largely a policy decision that isn't something that should be handled there.
[1] Though, in theory, there's nothing to stop tools like fwupd from shipping UEFI capsules or whatever and having Tow-Boot somehow apply those updates. This is how fwupd already works on Linux x86 systems, so it's not that far-fetched. But probably not an immediate goal, either. And it still treats the UEFI firmware as completely separate from the host packaging system; UEFI capsules can only be applied after the system reboots, and before control is handed back to the OS...
Re: Booting ARM Linux the standard way
#19Some disconnected thoughts: Title is misleading: Tow-Boot wants to become the standard way, but it isn't one today. There's going to be a lot of resistance to distros shipping a binary they didn't build from source. It might work if you could ship Tow-Boot on the hardware and make it optional for the OS to care, but unless I've missed something OS integration is needed (if nothing else, because it has to share storag…
Re: Booting ARM Linux the standard way
#20Earlier quoted context omitted.
Tow-Boot isn't the standard yet no, but it provides the standard EFI booting interface so it's at least somewhat true. Distro's is shipping binaries that aren't build from source all the time, it's called firmware. Which is why this should probably be managed by fwupd, not packaged by distributions.
> Distro's is shipping binaries that aren't build from source all the time Only because the sources aren't available.
The correct way to manage that firmware, in the best case scenario, is to let the vendor produce a (correct) binary that is source-available, reproducible down to the last bit, and then use a system fwupd to apply updates that firmware in a generic way, like using UEFI capsules. Which is exactly the kind of project Tow-Boot is aiming to be: a base upon which vendors can create reproducible UEFI-compatible firmware.
Naturally there are exceptions to all of this (such as the infamous linux-firmware package which is managed by your OS packager) but I think you catch the drift. It's not a binary decision on whether to ship something in this way, it's a spectrum.
[1] What I mean by this is, you don't install firmware updates using apt or yum or whatever, like you did in the past with grub. You apply firmware updates using fwupd, which is a third party tool that actually integrates with UEFI to apply patches directly.