-
Notifications
You must be signed in to change notification settings - Fork 29.4k
Cross Compiling for Debian Based Linux
Daniel Imms edited this page Feb 13, 2017
·
8 revisions
To build for a target architecture different than the host (e.g. using x64 to build for ARM), you'll need to do the following:
One-Time Setup
- install prerequisites:
sudo apt-get install qemu qemu-user-static debootstrap gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
- create a chroot/rootfs for the target architecture:
sudo qemu-debootstrap --arch=armhf --variant=minbase xenial rootfs
- install libx11-dev on the chroot/rootfs:
sudo chroot rootfs apt-get install -y libx11-dev
Build
- point to the target toolchain on the build host:
export CC=$(which arm-linux-gnueabihf-gcc)
export CXX="$(which arm-linux-gnueabihf-g++) -L$(pwd)/rootfs/usr/lib/arm-linux-gnueabihf/"
note the -L linker argument pointing to the absolute path of libx11 on the chroot/rootfs
- install prerequisites for the target architecture:
scripts/npm.sh install --arch=armhf
- create a .deb file for easy installation on the target device:
gulp vscode-linux-arm-build-deb
Project Management
- Roadmap
- Iteration Plans
- Development Process
- Issue Tracking
- Build Champion
- Release Process
- Running the Endgame
- Related Projects
Contributing
- How to Contribute
- Submitting Bugs and Suggestions
- Feedback Channels
- Source Code Organization
- Coding Guidelines
- Testing
- Dealing with Test Flakiness
- Contributor License Agreement
- Extension API Guidelines
- Accessibility Guidelines
Documentation