Last active
July 13, 2022 04:45
-
-
Save gdamjan/ce8ec24c69f62a2584bb to your computer and use it in GitHub Desktop.
binfmt conf file to run arm elf files on x86 (with qemu-user-static installed)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/binfmt.d/qemu-arm.conf | |
:arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-arm-static: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install a static build of qemu (user space emulation) | |
aurget -S qemu-user-static | |
# after setting the above binfmt file, reload the kernel settings (or reboot) | |
sudo systemctl restart systemd-binfmt | |
# run systemd nspawn with some injected (bind mounted) files | |
sudo systemd-nspawn -D $ARMROOT \ | |
--bind-ro=/usr/bin/qemu-arm-static \ | |
--bind-ro=/etc/resolv.conf:/run/systemd/resolve/resolv.conf |
- /etc/wpa_supplicant/wifi.conf
- /etc/systemd/system/wifi.service
- /etc/systemd/network/wifi.network
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
also, after unpacking and entering the nspawn: