Cross Compiling Monarch - nthallen/monarch GitHub Wiki
There are a couple example toolchain files in the root of the source tree. The build.sh
script will need to be modified to support a new architecture.
When first building for the the iMX7, I discovered that the linaro toolchain did not include ncurses, which we require, so I needed to build that from source. To do that, I
- Downloaded the source
- Translated the toolchain file into a setup shell script
- Wrote a build script that got everything going into the right places. In particular, installation was directed to:
- PREFIX=/usr
- DESTDIR=extinst
I did not want to install directly into the toolchain's sysroot, to avoid corrupting it, but it was necessary to combine the two when compiling. To do that, I used linux's overlay to map both into a single read-only sysroot at /mnt/sysroot.