Gaël Varoquaux

Sat 23 July 2016

←Home

Unison 2.48 binaries for ARM

I have built static binaries of Unison 2.48 for ARM Run on my NAS, the arm architecture is necessary to synchronize with the recent Ubuntu.

Warning

I will not support these binaries

I will not answer any questions or request on these binaries. I have built them for my personal use and put them online in case it might be useful for others.


Remark on backward compatibility

Why don’t the Unison devs ensure compatibility between minor version of Unison?

Breaking compatibility is bad practice, in particular between minor versions. It breaks the trust that users have in updating the software. Programmers complain that users always run old versions of OSs/libraries/programs, but this is explained by the fear of stuff breaking during upgrades.


Notes to build these binaries

I built this following instructions historically on http://www.crutzi.info/unison/binary/armel

I retrieved these instructions from the wayback machine, and adapted them to work on a more modern Debian system

To compile it, I used qemu and a Debian ARM image

1. Build a debian system under Qemu

Install the system (lasts a couple of hours, with some user input):

sudo apt install qemu-system-arm qemu-efi libguestfs-tools

wget -O installer-vmlinuz http://http.us.debian.org/debian/dists/jessie/main/installer-armhf/current/images/netboot/vmlinuz
wget -O installer-initrd.gz http://http.us.debian.org/debian/dists/jessie/main/installer-armhf/current/images/netboot/initrd.gz

# Create a drive
qemu-img create -f qcow2 hda.qcow2 5G

qemu-system-arm -M virt -m 1024 \
-kernel installer-vmlinuz \
-initrd installer-initrd.gz \
-drive if=none,file=hda.qcow2,format=qcow2,id=hd \
-device virtio-blk-device,drive=hd \
-netdev user,id=mynet \
-device virtio-net-device,netdev=mynet \
-nographic -no-reboot

Under Ubuntu:

sudo chmod 644 /boot/vmlinuz*

List the content on the /boot dir of the VM’s disk:

virt-ls -a hda.qcow2 /boot/

Copy the initrd and vmlinux:

virt-copy-out -a hda.qcow2 /boot/vmlinuz-3.16.0-6-armmp-lpae /boot/initrd.img-3.16.0-6-armmp-lpae .

Do symlinks:

ln -s initrd.img-3.16.0-6-armmp-lpae initrd.img
ln -s vmlinuz-3.16.0-6-armmp-lpae vmlinuz

The installed system is then booted with:

qemu-system-arm -M virt -m 1024 \
-kernel vmlinuz \
-initrd initrd.img \
-drive if=none,file=hda.qcow2,format=qcow2,id=hd \
-device virtio-blk-device,drive=hd \
-netdev user,id=mynet \
-device virtio-net-device,netdev=mynet \
-nographic -no-reboot -append "root=/dev/vda2"

2. Build unison under the debian system

Download the unison source package from

Then compile the files within the qemu ARM environment:

apt-get update
apt-get upgrade
apt-get build-dep unison
wget https://github.com/bcpierce00/unison/archive/v2.48.15v4.tar.gz
tar -xvzf v2.48.15v4.tar.gz
cd unison-2.48.15v4
make UISTYLE=text NATIVE=true STATIC=true

You might need to remove the ‘-unsafe-string’ option as detailed in https://github.com/bcpierce00/unison/issues/211

The binary will be in src/unison

Go Top