Proof of Concept: u-boot aarch64 image for SBC's

After the Proof of Cconcept for a image for the Raspberry PI explored the possibilities for a generic image for SBC’s too. Agian it is a replication of the work of the Fedora- (especially Peter Robinson) and the CentOS arm-sig (especially Pablo Greco) teams. Credits go there.

This still needs a lot of work, so much i hesitate to share the progression so far. Deiced to do it any way as after a bit tinkering it boots a RPI4, RPI3+ and a Odroid-c2 and have no more aarch64 boards to test on…

So here is my (buildpass0) repository with the initial builds of packages used to create a prematurely image: RockyLinux-Generic-aarch64-BUILDPASS0-img.raw.xz

To name a few open challenges:

  • 2 conflicting packages: besides the kernel the python3 wrappers of thee devicetree compiler (dtc) needed to build uboot-tools are not packaged in the upstream package
  • Missing a cross-compiler needed for arm trusted firmware (ATF). Did rebuild something a bit matching from FC29 but am on shaky ground here as it supersedes my knowledge
  • Even though uboot => 2021.04 should handle efivars better can not get it to find the grub2-efi stub in EFI/rocky. Still need to copy this to the fallback (removable media) location EFI/BOOT/BOOTAA64.EFI
  • Even though dracut creates a usable intiramfs it segfaults a few times doing so. To my understanding this is caused by some missing drivers and should be addressed in 049-127.git20210107 ( - install: string_hash_func should not be fed with NULL). For some reason aarch64 is still on dracut-network-049-95
  • SELinux: the newer kernel (5.10.x) and policies do not match on all acausions. SELinix is set to enforcing but it throws warnings about missing policies at boot.
  • A known issue : boot takes a long time, uboot is single threaded so things seed up a bit after the kernel takes over. Meaning decompression of initramfs and the quite large generic kernel takes a long long time…

Uboot binaries or the RPI3, 3+ and 4 are in place (fat efi partition), it should boot out of the box. (Note it is a completely different setup compered to the socialized Rapsberry image)

  • For other boards uboot need to be flashed to the SD-card.
  • Precompiled uboot binaries are installed on the image in /usr/share/uboot, these binaries carry a patch to let uboot look for dtb’s on other partitions then the efi partition.
  • If you use a pristine upstream uboot copy the dtb of the board to the root of the efi partition.
  • You may need to catenate these uboot binaries with some blobs from the vendor of the board (as with my Odroid-c2)

(ssh)root login is enabled:

user: root
password: rocky

As said: A Proof of Concept nothing more!!

1 Like

This is awesome!

I’m in the process of changing jobs and moving, but I’m looking forward to helping out once I’m settled a bit. I have quite a few SBCs to test out!

Hi, looking forward to your feedback!

Kind of stuck with which challenge to take on first. :thinking: