1 to obtain basic bare ubuntu system
1.1 use debootstrap tool
Because I want to run cross-platform, it can not simply be native compilation, check online there is a special software to simulate different machine architectures qemu, and in its support in ubuntu good. So first install qemu emulator in the host PC ubuntu system:
sudo apt-get install -y qemu-user-static debootstrap
Then you can use the following command to get a basic ubuntu arm file system:
qemu-debootstrap --arch=armhf --verbose --include=fakeroot,build-essential,libx11-dev,libxext-dev,libxrandr-dev,libxrender-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype6-dev --resolve-deps trusty /opt/chroot || true
https://www.veryarm.com/28905.html