8

has anyone had success running Alpine Linux on the Raspberry Pi 4? I have copied the contents of the Alpine release for rpi 64bit from here to an SD Card formatted with FAT32, but I only get to the coloured square.

I tried copying the firmware files and the linux kernel from the raspbian distribution, but still haven't had gotten past the coloured square screen.

I have seen references saying that the Armhf release of Alpine is recommended, perhaps that would work. http://markbucciarelli.com/posts/2019-05-05_install-alpine-on-raspberry-pi-using-macos.html

Edit: When I run lscpu on raspbian it looks like a 32 bit build of linux, so I'll have to try the 32 version of Alpine.

$ lscpu
Architecture:        armv7l
Byte Order:          Little Endian
CPU(s):              4
On-line CPU(s) list: 0-3
Thread(s) per core:  1
Core(s) per socket:  4
Socket(s):           1
Vendor ID:           ARM
Model:               3
Model name:          Cortex-A72
Stepping:            r0p3
CPU max MHz:         1500.0000
CPU min MHz:         600.0000
BogoMIPS:            270.00
Flags:               half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
kristianp
  • 218
  • 2
  • 7

3 Answers3

6

You can get the Raspberry Pi 4 to boot with Alpine Linux 3.10.2 by adding the following two files into the FAT32 (boot) partition: start4.elf and fixup4.dat.

They can be obtained from the official repository: https://github.com/raspberrypi/firmware/tree/master/boot

bootcode.bin is ignored by the Raspberry Pi 4.

The alpine linux config.txt is also old, need to use arm64_bit=1 instead of arm_control=0x200 plus a couple of other options to get everything working right (see the Manjaro config.txt).

However, as stated by another poster, no usb devices work. This is because the driver for the USB controller is not compiled into the alpine linux kernel. You can see this by looking at the config-rpi in the boot folder of the alpine linux install. I think the options needed for this are

CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_PCI=y

I was going to try and rebuild the kernel, but the alpine build system has a really strange way of compiling the kernel with multiple patches from different places instead of using the official sources, and does not use a single linux config. Plus abuild is a real pain to setup.

You probably just want to use the officially compiled kernel, and install the alpine userland into another partition. Edit the cmdline.txt file for root=/dev/sdxN for wherever the userland is located.

jdonald
  • 2,972
  • 14
  • 39
simplus
  • 61
  • 2
3

I managed to get Alpine 3.10.2 to boot to the command prompt with HDMI after I copied from a Manjaro Arm for RPI4 install image the following files: bootcode.bin *.dat *.elf then edited config.txt

No USB keyboard - working on it...

Jeff Smith
  • 31
  • 2
1

As you can see at the Release notes on date: 2019-06-20 that this is supporting Buster. Versions before will not do it. You can try to "copy" modules, driver and firmware from that version to the Alpine Linux distribution as you already tried, but I don't believe that you will have much access. We have seen similar with Ubuntu on upgrade to RPi 3B+. I'm afraid you have to wait until Alpine Linux will provide a compatible image. You should file a bug report there.

Ingo
  • 42,961
  • 20
  • 87
  • 207