Skip to content

Instantly share code, notes, and snippets.

@mitchcurtis
Last active March 22, 2024 03:33
Show Gist options
  • Save mitchcurtis/d09ee1506481541d3266f6cf86a122a3 to your computer and use it in GitHub Desktop.
Save mitchcurtis/d09ee1506481541d3266f6cf86a122a3 to your computer and use it in GitHub Desktop.
Qt QEMU armv7 Ubuntu CI build setup script
if [ ! -d "/home/qt/work/qt-dev" ]; then
cd /home/qt/work
git clone https://code.qt.io/qt/qt5.git qt-dev
cd qt-dev
perl init-repository --module-subset=qtbase
fi
mkdir /home/qt/work/qt-dev-release/
mkdir /home/qt/work/qt-dev-release/qtbase
mkdir /home/qt/work/qt-dev-release/qtbase/build
mkdir /home/qt/work/qt-dev-release/qtbase/build/target
mkdir /home/qt/work/qt-dev-release/qtbase/installed_examples
cd /home/qt/work/qt-dev-release/qtbase
set TARGET_CONFIGURE_ARGS=-release -force-debug-info -developer-build -no-warnings-are-errors -make examples -qt-harfbuzz -device linux-imx7-g++ -device-option "CROSS_COMPILE=/opt/b2qt/3.2/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-" -device-option "DISTRO_OPTS=hard-float boot2qt" -no-feature-forkfd_pidfd
set TARGET_CMAKE_ARGS=-DCMAKE_TOOLCHAIN_FILE=/opt/b2qt/3.2/sysroots/x86_64-pokysdk-linux/usr/share/cmake/OEToolchainConfig.cmake -DQT_FORCE_BUILD_TOOLS=ON
set QT_YOCTO_ENVSETUP=/opt/b2qt/3.2/environment-setup-armv7vet2hf-neon-poky-linux-gnueabi
set QT_CMAKE_DIR=/opt/cmake-3.27.7/bin
set QT_SYSROOT_FOR_RUNNING_TESTS=/opt/b2qt/3.2/sysroots/armv7vet2hf-neon-poky-linux-gnueabi
set GST_PLUGIN_SCANNER=/opt/b2qt/3.2/sysroots/armv7vet2hf-neon-poky-linux-gnueabi/usr/libexec/gstreamer-1.0/gst-plugin-scanner
set QT_QUICK_BACKEND=software
set CMAKE_GENERATOR=Ninja
set CI_PATH_SEP=/
set COMMON_CMAKE_ARGS=-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++
unset ENV_PREFIX
set TARGET_ENV_PREFIX=/home/qt/prefix.sh
sudo update-binfmts --enable
set COMMON_CMAKE_ARGS=-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DQT_BUILD_TESTS=OFF -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS
set COMMON_NON_QTBASE_CMAKE_ARGS= -DQT_BUILD_TESTS=OFF -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS
set COMMON_TEST_CMAKE_ARGS= -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS
set COMMON_EXAMPLES_CMAKE_ARGS= -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS
set COMMON_TARGET_CMAKE_ARGS= -DQT_BUILD_TESTS=OFF -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS
set COMMON_NON_QTBASE_TARGET_CMAKE_ARGS= -DQT_BUILD_TESTS=OFF -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS
set COMMON_TARGET_TEST_CMAKE_ARGS= -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS
set COMMON_TARGET_EXAMPLES_CMAKE_ARGS= -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS
set COMMON_CMAKE_ARGS=-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DQT_BUILD_TESTS=OFF -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
set COMMON_NON_QTBASE_CMAKE_ARGS= -DQT_BUILD_TESTS=OFF -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
set COMMON_TEST_CMAKE_ARGS= -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
set COMMON_EXAMPLES_CMAKE_ARGS= -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
set COMMON_TARGET_CMAKE_ARGS= -DQT_BUILD_TESTS=OFF -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
set COMMON_NON_QTBASE_TARGET_CMAKE_ARGS= -DQT_BUILD_TESTS=OFF -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
set COMMON_TARGET_TEST_CMAKE_ARGS= -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
set COMMON_TARGET_EXAMPLES_CMAKE_ARGS= -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
set COMMON_CMAKE_ARGS=-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DQT_BUILD_TESTS=OFF -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DQT_INTERNAL_EXAMPLES_INSTALL_PREFIX=/home/qt/work/qt-dev-release/qtbase/installed_examples
set COMMON_TARGET_CMAKE_ARGS= -DQT_BUILD_TESTS=OFF -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DQT_INTERNAL_EXAMPLES_INSTALL_PREFIX=/home/qt/work/qt-dev-release/qtbase/installed_examples
set HOST_INSTALL_DIR=/home/qt/work/install
set LIBEXEC_INSTALL_DIR=/home/qt/work/install/libexec/
set COIN_COMMAND_OUTPUT_TIMEOUT=900
unset DESTDIR
cd /home/qt/work/qt-dev-release/qtbase/build/target
set TARGET_CMAKE_ARGS=-DCMAKE_TOOLCHAIN_FILE=/opt/b2qt/3.2/sysroots/x86_64-pokysdk-linux/usr/share/cmake/OEToolchainConfig.cmake -DQT_FORCE_BUILD_TOOLS=ON -DQT_HOST_PATH=/home/qt/work/install
set COIN_CONFIGURE_ARGS=-release -force-debug-info -developer-build -no-warnings-are-errors -make examples -qt-harfbuzz -device linux-imx7-g++ -device-option "CROSS_COMPILE=/opt/b2qt/3.2/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-" -device-option "DISTRO_OPTS=hard-float boot2qt" -no-feature-forkfd_pidfd
set COIN_CMAKE_ARGS=-DCMAKE_TOOLCHAIN_FILE=/opt/b2qt/3.2/sysroots/x86_64-pokysdk-linux/usr/share/cmake/OEToolchainConfig.cmake -DQT_FORCE_BUILD_TOOLS=ON -DQT_HOST_PATH=/home/qt/work/install -DQT_BUILD_TESTS=OFF -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DQT_INTERNAL_EXAMPLES_INSTALL_PREFIX=/home/qt/work/qt-dev-release/qtbase/installed_examples -DCMAKE_STAGING_PREFIX:PATH=/home/qt/work/install/target
set CONFIGURE_ENV_PREFIX=/home/qt/prefix.sh
set CONFIGURE_EXECUTABLE=/home/qt/work/qt-dev/qtbase/configure
/home/qt/prefix.sh /home/qt/work/qt-dev/qtbase/configure -release -force-debug-info -developer-build -no-warnings-are-errors -make examples -qt-harfbuzz -device linux-imx7-g++ -device-option CROSS_COMPILE=/opt/b2qt/3.2/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi- -device-option "DISTRO_OPTS=hard-float boot2qt" -no-feature-forkfd_pidfd -- -DCMAKE_TOOLCHAIN_FILE=/opt/b2qt/3.2/sysroots/x86_64-pokysdk-linux/usr/share/cmake/OEToolchainConfig.cmake -DQT_FORCE_BUILD_TOOLS=ON -DQT_HOST_PATH=/home/qt/work/install -DQT_BUILD_TESTS=OFF -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DQT_INTERNAL_EXAMPLES_INSTALL_PREFIX=/home/qt/work/qt-dev-release/qtbase/installed_examples -DCMAKE_STAGING_PREFIX:PATH=/home/qt/work/install/target
cd /home/qt/work/qt-dev-release/qtbase/build/target
/opt/b2qt/3.2/sysroots/x86_64-pokysdk-linux/usr/bin/ninja -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment