wiki:projects/synapse/raspberry

Version 3 (modified by Edwin Eefting, 12 years ago) (diff)

--

Cross-compiling Synapse for raspberry (ARM) and other architectures

This is a quick howto on how i cross compiled synapse for the raspberrypi, using qemu to emulate the arm cpu architecture. This is the least tricky methode to cross compile, but also the slowest.

I used arch linux on my host system and debian on the rasp.

Install qemu-arm-static on the host system

1. Steal a statically compiled qemu-arm from some distro:

its a shame archlinux doesnt have a static qemu :(

[root@lab1 tmp]# cd /tmp
[root@lab1 tmp]# mkdir qemu
[root@lab1 tmp]# cd qemu
[root@lab1 qemu]# dpkg -x /home/psy/Downloads/qemu-user-static_1.1.2+dfsg-2_amd64.deb  .
[root@lab1 qemu]# cp usr/bin/qemu-*-static /usr/bin

2. learn your kernel how to handle arm binaries

[root@lab1 binfmts]# cat /usr/share/binfmts/qemu-arm          
package qemu
interpreter /usr/bin/qemu-arm-static
magic \x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00
mask \xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff

[root@lab1 binfmts]# update-binfmts --import