Rule everything from one file. Still in progress, but will do the job for you.
Idea behind this script is to do next (step by step):
- Create tmpfs.
- Use created tmpfs.
- Get Qt 5.12.2 sources, init repository.
- Do total clean to remove possible leftovers from previous configurations and/or builds.
- Copy Sunxi mkspecs to respective folder in Qt sources tree.
- Check if there is cross-compiler available (GCC Linaro 7.4.1).
- Sync sysroot of NPi with respective local host folder.
- Config Qt for the build.
- Make Qt & install it to separate folder.
- Sync newly created files on host with NPi.
For each mentioned step there is respective option. Run ./build_control -h
to get help about all available options.
Here we have all steps described.
cd
to dir with script before running it.
Use command ./build_control -t
-- this will create tmpfs
folder.
For next script runs use -a
option, already created tmpfs
.
Recommended toolchain (right now) is gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf
.
Refer to file gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf
for instructions.
Replace this file by respective folder with toolchain.
By the next script run it will detect if you have installed compiller, otherwise it will unpack it into respective folder.
Use ./build_control -a -g
to get Qt. Hope everything will be fine.
Use ./build_control -a -c
to do clean.
Use ./build_control -a -s
to copy Sunxi mkspecs to Qt tree. Do not forget to use this option with -c
,
otherwise previously copied mkspecs could be removed.
Use ./build_control -a --npi2host
to sync NPi's sysroot with host.
This option expects that you have:
- your NPi at
nano.pi
. Edit your/etc/hosts
to make it work. - your NPi has
root
account, since it will try to use it. - able to provide
root
password as it will be required.
Note, that this script will use sysroot-relativelinks.py
to "normilize" all relative links in synced files.
Use ./build_control -a -q
to configure Qt.
Use ./build_control -a -m
to make and install Qt. Please, refer to logs. Hope everything will be fine.
Use ./build_control --host2pi
to sync your updated sysroot with Pi, so you'll have consistent environment.
This option expects that you have:
- your NPi at
nano.pi
. Edit your/etc/hosts
to make it work. - your NPi has
root
account, since it will try to use it. - able to provide
root
password as it will be required.
Note, that your Qt distribution will be available at /opt/qt512
on NPi. Good luck!
In perfect world you'll use this script with next arguments and all will work like a charm:
./build_control -t -g -c -s -q -m --npi2host --host2pi
And everything will be done and anyone will be happy.
In real world you need to use this script several times with different options to get what you need. Good luck!