Include qemu-system-arm und qemu-user-static

Hi,

are there any plans to include the following two packages into some of the next EOS release:

  • qemu-system-arm
  • qemu-user-static
  • rofiles-fuse kernel module

Because EOS on ARM gets closer, more people probably would love to cross-compile their packages for ARM on EOS x86_64 instead of having to run a VM with e.g. Ubuntu to do so.

@andrunko recently had some success with:

sudo podman run --rm --privileged multiarch/qemu-user-static --reset -p yes

I believe rofiles-fuse is a purely userspace component, and it’s already in Endless.

Hi,

i had full success in cross-building a ARM flatpak with the following procedure - everything as root-User.

Create a Podman container

podman run --interactive --tty --name test --volume /tmp/.X11-unix:/tmp/.X11-unix \
--env DISPLAY --device /dev/dri --device /dev/snd --device /dev/input --volume \
 /etc/localtime:/etc/localtime:ro --volume /sysroot/home/test/tmp:/mnt \
--cap-add=ALL --security-opt seccomp=unconfined \--device /dev/fuse ubuntu:19.10 bash

(exit the container with exit

Load the necessary Kernel Module

modprobe fuse

Enter the Pod and install the necessary prerequisites

podman start --latest
podman -ilt --privileged bash

(Now you are inside the container)

apt-get update; apt-get -y dist-upgrade
apt-get install flatpak-builder qemu-system-arm qemu-user-static
flatpak remote-add flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install -y --arch=arm org.freedesktop.Sdk/arm/19.08
update-binfmts --enable

Build your package

(inside the Container)

flatpak-builder --arch=arm --repo=repo --force-clean --install-deps-from=flathub \
 build_arm com.github.joncampbell123.DOSBox-X.json
flatpak build-bundle --arch=arm repo dosbox-x.flatpak \
 com.github.joncampbell123.DOSBox-X 0.82.24
1 Like

I was able to do the same thing this way:

$ sudo podman run --rm --privileged multiarch/qemu-user-static --reset -p yes
[ exits immediately, having registered with binfmt_misc ]
$ flatpak-builder --install-deps-from=flathub --arch=aarch64 --install --user --force-clean _build/ org.pulseaudio.pavucontrol.yaml
[ fetches aarch64 runtimes, and then builds ]
1 Like

@wjt: Thanks for the hint, that’s way simpler than my solution :wink:

1 Like

I was really hoping I’d be able to run the aarch64 Flatpak via the same mechanism, but no dice – I think ldconfig for the wrong architecture was being run.