brew install nanomsg --HEAD brew install python3 rsync cmake curl https://sh.rustup.rs -sSf | sh
VirtualBox is the preferred virtualizer, although any other virtualizer that can provided shared folders and port forwarding will also work.
Debian 9 Stretch is the distro of choice.
Set up port forwarding
22 → 2222 (SSH forward)
SSH keys are recommended
Set up shared folders
Folder name: 9001d
Path: <absolute path to 9001d>
Enable symlinks in shared folders
VBoxManage setextradata <vm-name> VBoxInternal2/SharedFoldersEnableSymlinksCreate/<share-name> 1
Restart VirtualBox to apply this change.
Insert guest additions CD
Install guest additions
# Dependencies sudo apt-get install curl build-essential module-assistant dkms pkg-config # Prepare system to build kernel modules sudo m-a prepare # Mount Guest additions CD and build sudo mount /dev/sr0 /mnt cd /mnt sudo ./VBoxLinuxAdditions.run # Allow current user to access shared folders sudo adduser "$USER" vboxsf # Reboot sudo reboot
Setup cross-compile environment
makecommands can now be issued on the host machine if port forwarding was set up properly,
make build (on host) to generate foreign binaries and
make transfer (on host) to copy them over to the target.
Address of machine that the compiled binary should be deployed on.
Target location of the deployed binary.
Username on target system.
SSH port of cross-compile VM.
Shared project folder location.
Username on cross-compile VM.
debug, set to
releasefor optimized builds.
armv7, set to
armfor ARMv6 builds.
make env (on host) to generate a
.envrc containing all required environment variables.
Use something like direnv to automatically run this file.