Whonix for arm64 / Raspberry Pi (RPi)

Am i right, to build image for RPi3B i need to do next steps:

sudo apt install git time curl apt-cacher-ng lsb-release fakeroot dpkg-dev fasttrack-archive-keyring
wget https://whonix.org/derivative.asc
gpg --import derivative.asc
git clone --depth=1 --branch --jobs=4 --recurse-submodules --shallow-submodules https://gitlab.com/whonix/Whonix.git
cd Whonix
git verify-tag
git checkout --recurse-submodules -b
git status
sudo ./whonix_build --target raw --flavor whonix-gateway-rpi --build --arch arm64 --kernel linux-image-arm64 --headers linux-headers-arm64 --vmsize 14G

And then i burn that raw in my sd card?

That might work.

It’s still:

Okay, I’ve written the image to the SD card using: dd if=Whonix.raw of=/dev/sdX
The problem is that I still get a black screen

Raspbian runs stably under the same conditions. My 16GB SD card has the following sections:

  • unnalocated 2.00MiB
  • /dev/sda1 14GiB (used 2.10 GiB), flags: boot
  • unnalocated 875.00MiB

Something is wrong, where is the FAT32 first-stage bootloader?

Only option:
Generic Bug Reproduction
i.e. how would one debug a black screen issue on Debian?

The system assembled using your own instructions does not contain the necessary to run first-stage bootloader. As you know, the initialization process of a regular ARM64 processor is different from the RPi… Nothing needs to be debugged, it’s just that at the moment your instructions for assembling the system are out of date and require serious improvement in terms of /boot
P.S. I see this issue was already discussed with Algernon in August 2018, and there did the file go? https://github.com/Whonix/Whonix/blob/master/build-steps.d/2375_build_rpi_fs

It turns out that you stopped supporting RPi due to the lack of maintainers?


That’s why I posted this link:

RPI support would need to be added here:

It will either be contributed or won’t be happening. I guess chances of this being contributed are slim as there’s no progress for a long time.

Maybe I can combine 2375_build-arm64-fs with the old 2375_build_rpi_fs…

1 Like

@raspi I was able to build with zero errors. Yay.

But It can’t boot…
I mounted the sd card and noticed in fstab that there is only /proc and /dev/cdrom, is that normal?? No boot or root mountpoint? also in /boot/firmware/cmdline, root=/dev/mapper/loop0p1?? Should I change that?



Edit to my last post:
my mistake, actually, fstab shows dev by uuid for / (root).

grml-debootstrap now merged arm64 build support.

grml-debootstrap bug "VM build failing if combining --vmefi with --arch arm64 which maybe can be worked around in derivative-maker.

related grml-debootstrap arm64 issues:

VM --arch arm64 builds might now be functional.

It might now even be possible to cross-build arm64 images while the build machine is running Intel / amd64.

I am writing “might” because I only superficially tested that is booting using QEMU and I am not using any ARM64 hardware myself. Since there is no dedicated ARM64 maintainer, this might break in the future. This is because the amount of architectures, platforms I can support is limited by being only 1 person.

While I added a (Kicksecure) CI test for arm64 builds, which will hopefully prevent the build process from breaking again and going unnoticed for a long time, the boot process might break in the future because we don’t have CI testing yet that does not only building but actual booting and testing.

related: Continuous Integration (CI) Whonix Testing - Automated Test Suite