Skip to content

Instantly share code, notes, and snippets.

@alepez
Created September 27, 2017 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alepez/639e0db6bc888e9732a968401126e0dd to your computer and use it in GitHub Desktop.
Save alepez/639e0db6bc888e9732a968401126e0dd to your computer and use it in GitHub Desktop.
gentoo arm chroot cross build

Install qemu in host

Add this to make.conf:

QEMU_SOFTMMU_TARGETS="arm"
QEMU_USER_TARGETS="arm"

Add this to package.use:

app-emulation/qemu static-user
emerge qemu --ask

binfmt

Register ARM:

echo ':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:' > /proc/sys/fs/binfmt_misc/register

systemctl restart systemd-binfmt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment