Boot MUSL void on Raspberry Pi 3 b+


(A) #1

The raspberry-pi3-musl image got stuck on boot on the “undervoltage” screen with the yellow lightning bolt in the upper right corner of the screen. My Raspberry and its PSU are fine and boot the latest Raspbian build without problems. How can I include the latest firmware from https://github.com/raspberrypi/firmware and build a void image from my void desktop?


#2

The rpi3 image is aarch64. If you don’t need this explicitly you can also try the rpi2 version (armv7l). That’s what I do and it works like a charm! :slight_smile: However, I didn’t use the image but the platformfs tarball.

To create your own image check out void-mklive.


(Alberto Brealey-Guzman) #3

I’m trying to build an aarch64-musl image to use it with a rpi3, following the instructions here, but the build fails. At the beginning of the mkroot process, I get a few errors like these:

[*] Updating `http://repo.voidlinux.eu/current/aarch64-repodata' ...
ERROR: [reposync] failed to fetch file `http://repo.voidlinux.eu/current/aarch64-repodata': Not Found

…and after a while it fails with:

FATAL: qemu-aarch64-static binary is missing in your system, exiting.
make: *** [Makefile:54: void-aarch64-ROOTFS-20180613.tar.xz] Error 1

Am I missing something?


#4

The first error isn’t really an error: it just looks for aarch64-repodata in every repository specified and finds it in

http://repo.voidlinux.eu/current/aarch64/aarch64-repodata

It throws an error because the file isn’t in the repositories for other architectures, of course. :wink:

However, it seems that you tried to create an image for aarch64, but you wrote you want to create an aarch64-musl one. Forgot to add the -musl on the command line? :wink:

To resolve the other error you have to install qemu-user-static. It contains the qemu-aarch64-static binary.


(Alberto Brealey-Guzman) #5

Thank you for clarifying about the first error. As for the -musl, you are right, the error I pasted was from another try, for a glibc build, just in case it was a problem with musl.

I installed qemu-user-static and managed to build both the rootfs and the platformfs. Thank you!

Should I add something to the wiki page for Raspberry PI? Otherwise it is difficult to know that you have a dependency on that binary (but maybe not, since you can probably use xbps to find the package…)


#6

It’s already listed under “Dependencies” in the Readme.md. Just noticed this myself :wink:

But maybe it’s not that bad an idea to also add it to the wiki article, because if one just follows the steps there it might be a bit confusing (especially for someone new to Void).


(Alberto Brealey-Guzman) #7

Heh, I did scan the README file looking for clues and I didn’t see it either… sorry!

Unfortunately I can’t edit the wiki, as I haven’t been able to confirm my email, I don’t get the confirmation emails from the wiki.

Thank you again for your help, I’m now happily running a 64bit musl installation on my rpi3


#8

The wiki tells nothing about installing a boot loader.

What did you do? chroot and then some grub-install?


#9

Also that wiki tells to create two files:

$ sudo make void-aarch64-musl-ROOTFS-<YYYYMMDD>.tar.xz
$ sudo make void-rpi3-musl-PLATFORMFS-<YYYYMMDD>.tar.xz

but only one is decompressed afterwards? What happens to the other one?


(Alberto Brealey-Guzman) #10

From what I understand, the Raspberry Pi does not need a general purpose boot loader like grub, but instead relies on the partitioning of the SD card and the file names in the SD card to find the OS kernel and other necessary files.


#11

I proceeded as mentioned but RPi doesn’t boot.


#12

@liber1 You can check if the contents of the boot directory of the tarball really got copied/extracted to the SD card’s first vfat partition. A bootloader is not needed, just as @mamapitufo explained.