On 2026-01-21, Denis Carikli wrote:
> On Tue, 20 Jan 2026 13:48:18 +0100
> "Tanguy Le Carrour" <[email protected]> wrote:
>> It would make sense to me to have 1 small image per board. You
>> download the one you need and **BOOM** you’re good to go.
>
> Having an image that works on multiple boards is possible (the
> am335x-evm is an example of that), but doing that requires the same
> u-boot image to work on multiple computers.
>
> However in the case of the lime1-a20, lime2, lime2-emmc, there are 3
> distinct u-boot images so we need 3 distinct Guix images as well, so
> here I was not talking about having a single image because that would
> require work in u-boot first, and that's not done yet.
...
> Though in the long run we also have an issue. Right now we have 11
> images. If we want to add all the ARM computers supported by u-boot, we
> would end up with thousands of images, and that is probably not
> sustainable for the substitute builders.
>
> So in the longer run, it could also make sense to look if it is possible
> to somehow work with upstream u-boot to find ways to support all the
> lime2 with the exact same u-boot image to then get rid of all 3 images
> and have only one.

Getting u-boot to support multiple boards is definitely one approach! A
pretty good talk describing how to do that in very long term:

  https://archive.fosdem.org/2019/schedule/event/one_image_to_rule_them_all/

Which inspired me to do a less ambitious project of a single image that
supports both the pinebook and pinebook-pro (with two u-boots on the
same boot media chosen at particular offsets):

  https://debconf21.debconf.org/talks/88-two-pinebooks-walk-into-a-bar/

But that only works with very particular combinations of boards
(e.g. allwinner A64 and rockchip rk3399, in this case).


To solve this problem, Debian has a fairly pragmatic solution of
building essentially a single image that you prepend the bootloader
parts to, which works for fairly wide variety of images:

  
https://deb.debian.org/debian/dists/trixie/main/installer-arm64/current/images/netboot/SD-card-images/README.concatenateable_images

There's even a "none" image that does not include u-boot, where you can
create the image and then add your own u-boot bits to it.

Though I would even go so far as to suggest something even simpler;
build a single image without a specific u-boot installed (but with the
u-boot hooks, such as exlinux.conf generated and/or grub.cfg) and
install the appropriate u-boot to that image.

That may require a bit of a shotgun approach to what modules to include
in the initramfs, to work around the lack of module autodetection in the
initramfs:

  https://issues.guix.gnu.org/48266

The aarch64 installer image about to be shipped with the
soon-to-be-released guix 1.5 basically supports UEFI, and recent
versions of u-boot provide a UEFI implementation, so as long as there is
sufficient empty space on the image to install u-boot (~16MB at the
beginning of the disk), this should work for a fairly large number of
platforms... (although may require additional initrd modules to really
support a wide variety of systems).


live well,
  vagrant

Attachment: signature.asc
Description: PGP signature

Reply via email to