diff --git a/.github/workflows/kuiperbuild.yml b/.github/workflows/appimage-armhf.yml similarity index 68% rename from .github/workflows/kuiperbuild.yml rename to .github/workflows/appimage-armhf.yml index 761178e9c7..d6881cba0c 100644 --- a/.github/workflows/kuiperbuild.yml +++ b/.github/workflows/appimage-armhf.yml @@ -1,4 +1,4 @@ -name: Kuiper Scopy Build +name: Scopy armhf Build on: [push, pull_request] @@ -8,7 +8,7 @@ env: jobs: - build_scopy_for_kuiper: + build_scopy_for_armhf: runs-on: ubuntu-20.04 steps: @@ -17,24 +17,24 @@ jobs: set-safe-directory: 'true' - name: Pull the Docker Image - run: docker pull cristianbindea/scopy2-kuiper:latest + run: docker pull cristianbindea/scopy2-armhf-appimage:latest - name: Create Scopy AppImage shell: bash run: | cd $GITHUB_WORKSPACE sudo apt update - ./ci/kuiper/create_sysroot.sh install_packages install_qemu - ./ci/kuiper/kuiper_build_process.sh generate_ci_envs + ./ci/armhf/create_sysroot.sh install_packages install_qemu + ./ci/armhf/armhf_build_process.sh generate_ci_envs docker run \ --mount type=bind,source="$GITHUB_WORKSPACE",target=/home/runner/scopy \ --env-file $GITHUB_WORKSPACE/ci/general/gh-actions.envs \ - cristianbindea/scopy2-kuiper:latest \ + cristianbindea/scopy2-armhf-appimage:latest \ /bin/bash -c 'cd $HOME && \ sudo chown -R runner:runner scopy && \ cd $HOME/scopy && \ - ./ci/kuiper/kuiper_build_process.sh install_packages download_cmake download_crosscompiler move_sysroot build_scopy build_iio-emu create_appdir create_appimage move_appimage + ./ci/armhf/armhf_build_process.sh install_packages download_cmake download_crosscompiler move_sysroot build_scopy build_iio-emu create_appdir create_appimage move_appimage ' - name: Set short git commit SHA shell: bash diff --git a/.gitignore b/.gitignore index e0dda138fd..3d9d2fa46a 100644 --- a/.gitignore +++ b/.gitignore @@ -36,9 +36,12 @@ build/* .vscode/* ci/ubuntu/staging ci/macOS/staging -ci/kuiper/staging -ci/kuiper/docker/sysroot* -ci/kuiper/scopy.AppDir +ci/armhf/staging +ci/armhf/docker/sysroot* +ci/armhf/scopy.AppDir +ci/armhf/staging +ci/armhf/scopy.AppDir +ci/armhf/scopy.squashfs windows/* core/include/scopy-core_config.h core/include/scopy-core_export.h diff --git a/ci/kuiper/AppRun b/ci/armhf/AppRun similarity index 100% rename from ci/kuiper/AppRun rename to ci/armhf/AppRun diff --git a/ci/kuiper/kuiper_build_config.sh b/ci/armhf/armhf_build_config.sh similarity index 81% rename from ci/kuiper/kuiper_build_config.sh rename to ci/armhf/armhf_build_config.sh index d139bf77eb..dde7086dff 100644 --- a/ci/kuiper/kuiper_build_config.sh +++ b/ci/armhf/armhf_build_config.sh @@ -14,26 +14,26 @@ QWT_BRANCH=qwt-multiaxes-updated LIBTINYIIOD_BRANCH=master IIOEMU_BRANCH=main -STAGING_AREA=$SRC_DIR/ci/kuiper/staging +STAGING_AREA=$SRC_DIR/ci/armhf/staging SYSROOT=$STAGING_AREA/sysroot SYSROOT_TAR=$STAGING_AREA/sysroot.tar.gz -SYSROOT_DOCKER=$SRC_DIR/ci/kuiper/docker/sysroot.tar.gz +SYSROOT_DOCKER=$SRC_DIR/ci/armhf/docker/sysroot.tar.gz TOOLCHAIN=$STAGING_AREA/cross-pi-gcc TOOLCHAIN_BIN=$TOOLCHAIN/bin TOOLCHAIN_HOST="arm-linux-gnueabihf" -TOOLCHAIN_FILE=$SRC_DIR/ci/kuiper/cmake_toolchain.cmake +TOOLCHAIN_FILE=$SRC_DIR/ci/armhf/cmake_toolchain.cmake QT_LOCATION=$SYSROOT/usr/local/qt5.15 CMAKE_BIN=$STAGING_AREA/cmake/bin/cmake QMAKE_BIN=$QT_LOCATION/bin/qmake JOBS=-j14 -APP_DIR=$SRC_DIR/ci/kuiper/scopy.AppDir -APP_IMAGE=$SRC_DIR/ci/kuiper/Scopy.AppImage -APP_RUN=$SRC_DIR/ci/kuiper/AppRun -APP_DESKTOP=$SRC_DIR/ci/kuiper/scopy.desktop -APP_SQUASHFS=$SRC_DIR/ci/kuiper/scopy.squashfs -RUNTIME_ARMHF=$SRC_DIR/ci/kuiper/runtime-armhf +APP_DIR=$SRC_DIR/ci/armhf/scopy.AppDir +APP_IMAGE=$SRC_DIR/ci/armhf/Scopy.AppImage +APP_RUN=$SRC_DIR/ci/armhf/AppRun +APP_DESKTOP=$SRC_DIR/ci/armhf/scopy.desktop +APP_SQUASHFS=$SRC_DIR/ci/armhf/scopy.squashfs +RUNTIME_ARMHF=$SRC_DIR/ci/armhf/runtime-armhf CMAKE_OPTS=(\ -DCMAKE_SYSROOT="$SYSROOT" \ diff --git a/ci/kuiper/kuiper_build_process.sh b/ci/armhf/armhf_build_process.sh similarity index 99% rename from ci/kuiper/kuiper_build_process.sh rename to ci/armhf/armhf_build_process.sh index b79c8bc48a..a96fe5cca2 100755 --- a/ci/kuiper/kuiper_build_process.sh +++ b/ci/armhf/armhf_build_process.sh @@ -3,7 +3,7 @@ set -ex git config --global --add safe.directory $HOME/scopy SRC_DIR=$(git rev-parse --show-toplevel) -source $SRC_DIR/ci/kuiper/kuiper_build_config.sh +source $SRC_DIR/ci/armhf/armhf_build_config.sh echo -- USING CMAKE COMMAND: echo $CMAKE @@ -285,7 +285,7 @@ create_appdir(){ PLUGINS=$BUILD_FOLDER/plugins/plugins REGMAP_XMLS=$BUILD_FOLDER/plugins/regmap/xmls TRANSLATIONS_QM=$(find $BUILD_FOLDER/translations -type f -name "*.qm") - COPY_DEPS=$SRC_DIR/ci/kuiper/copy-deps.sh + COPY_DEPS=$SRC_DIR/ci/armhf/copy-deps.sh rm -rf $APP_DIR mkdir $APP_DIR diff --git a/ci/kuiper/build_qt.sh b/ci/armhf/build_qt.sh similarity index 100% rename from ci/kuiper/build_qt.sh rename to ci/armhf/build_qt.sh diff --git a/ci/kuiper/cmake_toolchain.cmake b/ci/armhf/cmake_toolchain.cmake similarity index 100% rename from ci/kuiper/cmake_toolchain.cmake rename to ci/armhf/cmake_toolchain.cmake diff --git a/ci/kuiper/copy-deps.sh b/ci/armhf/copy-deps.sh similarity index 77% rename from ci/kuiper/copy-deps.sh rename to ci/armhf/copy-deps.sh index dfdd0e22e3..51515aff39 100755 --- a/ci/kuiper/copy-deps.sh +++ b/ci/armhf/copy-deps.sh @@ -2,21 +2,21 @@ set -e SRC_DIR=$(git rev-parse --show-toplevel) -source $SRC_DIR/ci/kuiper/kuiper_build_config.sh +source $SRC_DIR/ci/armhf/armhf_build_config.sh BINARY=$1 LOCATION=$2 -if [ ! -f "${SRC_DIR}"/ci/kuiper/ldd-mod ]; then - sed 's|.*RTLDLIST=.*|RTLDLIST="/usr/arm-linux-gnueabihf/lib/ld-2.31.so /usr/arm-linux-gnueabihf/lib/ld-linux-armhf.so.3"|' /usr/bin/ldd | tee "${SRC_DIR}"/ci/kuiper/ldd-mod - chmod +x "${SRC_DIR}"/ci/kuiper/ldd-mod +if [ ! -f "${SRC_DIR}"/ci/armhf/ldd-mod ]; then + sed 's|.*RTLDLIST=.*|RTLDLIST="/usr/arm-linux-gnueabihf/lib/ld-2.31.so /usr/arm-linux-gnueabihf/lib/ld-linux-armhf.so.3"|' /usr/bin/ldd | tee "${SRC_DIR}"/ci/armhf/ldd-mod + chmod +x "${SRC_DIR}"/ci/armhf/ldd-mod fi export LD_LIBRARY_PATH="${APP_DIR}/usr/lib:${SYSROOT}/lib:${SYSROOT}/lib/arm-linux-gnueabihf:${SYSROOT}/usr/arm-linux-gnueabihf/lib:${SYSROOT}/usr/local/qt5.15/lib:${SYSROOT}/usr/local/lib:${SRC_DIR}/build" LIBS_ARRAY=() run_ldd(){ - for library in $("${SRC_DIR}"/ci/kuiper/ldd-mod "$1" | cut -d '>' -f 2 | awk '{print $1}') + for library in $("${SRC_DIR}"/ci/armhf/ldd-mod "$1" | cut -d '>' -f 2 | awk '{print $1}') do # check if the library exists at that path and if it was processed already if [ -f "${library}" ] && ! [[ "${LIBS_ARRAY[*]}" =~ "${library}" ]]; then diff --git a/ci/kuiper/create_docker_image.sh b/ci/armhf/create_docker_image.sh similarity index 80% rename from ci/kuiper/create_docker_image.sh rename to ci/armhf/create_docker_image.sh index 76a387492e..a6c2e8bd59 100755 --- a/ci/kuiper/create_docker_image.sh +++ b/ci/armhf/create_docker_image.sh @@ -2,7 +2,7 @@ set -ex SRC_DIR=$(git rev-parse --show-toplevel) -source $SRC_DIR/ci/kuiper/kuiper_build_config.sh +source $SRC_DIR/ci/armhf/armhf_build_config.sh # install docker install_packages(){ @@ -15,7 +15,7 @@ install_packages(){ } create_sysroot(){ - $SRC_DIR/ci/kuiper/create_sysroot.sh \ + $SRC_DIR/ci/armhf/create_sysroot.sh \ install_packages \ download_kuiper \ install_qemu \ @@ -32,9 +32,9 @@ tar_and_move_sysroot(){ } create_image(){ - pushd ${SRC_DIR}/ci/kuiper/docker - sudo docker build --load --tag cristianbindea/scopy2-kuiper . - # sudo DOCKER_BUILDKIT=0 docker build --tag cristianbindea/scopy2-kuiper . # build the image using old backend + pushd ${SRC_DIR}/ci/armhf/docker + sudo docker build --load --tag cristianbindea/scopy2-armhf-appimage . + # sudo DOCKER_BUILDKIT=0 docker build --tag cristianbindea/scopy2-armhf-appimage . # build the image using old backend popd } diff --git a/ci/kuiper/create_sysroot.sh b/ci/armhf/create_sysroot.sh similarity index 93% rename from ci/kuiper/create_sysroot.sh rename to ci/armhf/create_sysroot.sh index 98f2d9331b..12defaa667 100755 --- a/ci/kuiper/create_sysroot.sh +++ b/ci/armhf/create_sysroot.sh @@ -2,7 +2,7 @@ set -ex SRC_DIR=$(git rev-parse --show-toplevel) -source $SRC_DIR/ci/kuiper/kuiper_build_config.sh +source $SRC_DIR/ci/armhf/armhf_build_config.sh IMAGE_FILE=2023-12-13-ADI-Kuiper-full.img @@ -44,7 +44,7 @@ extract_sysroot(){ # execute chroot inside the sysroot folder and install/remove packages using apt configure_sysroot(){ - cat $SRC_DIR/ci/kuiper/inside_chroot.sh | sudo chroot ${SYSROOT} + cat $SRC_DIR/ci/armhf/inside_chroot.sh | sudo chroot ${SYSROOT} } move_and_extract_sysroot(){ diff --git a/ci/kuiper/docker/Dockerfile b/ci/armhf/docker/Dockerfile similarity index 71% rename from ci/kuiper/docker/Dockerfile rename to ci/armhf/docker/Dockerfile index 748bbed5d9..6d88c76fbe 100644 --- a/ci/kuiper/docker/Dockerfile +++ b/ci/armhf/docker/Dockerfile @@ -27,18 +27,18 @@ FROM start AS sysroot_builder ARG USER=runner ENV DEBIAN_FRONTEND=noninteractive COPY sysroot.tar.gz /home/${USER} -RUN git clone https://github.com/analogdevicesinc/scopy -b kuiper-worflow +RUN git clone https://github.com/analogdevicesinc/scopy -b dev WORKDIR /home/${USER}/scopy -RUN ./ci/kuiper/create_sysroot.sh \ +RUN ./ci/armhf/create_sysroot.sh \ install_packages \ move_and_extract_sysroot \ fix_relativelinks -RUN ./ci/kuiper/build_qt.sh \ +RUN ./ci/armhf/build_qt.sh \ install_packages \ download_qt \ download_crosscompiler \ build_qt5.15.2 -RUN ./ci/kuiper/kuiper_build_process.sh \ +RUN ./ci/armhf/armhf_build_process.sh \ install_packages \ download_cmake \ download_crosscompiler \ @@ -51,9 +51,9 @@ FROM start ARG USER=runner ENV DEBIAN_FRONTEND=noninteractive RUN mkdir -p /home/${USER}/sysroot -COPY --from=sysroot_builder /home/${USER}/scopy/ci/kuiper/staging/sysroot/usr /home/${USER}/sysroot/usr -COPY --from=sysroot_builder /home/${USER}/scopy/ci/kuiper/staging/sysroot/share /home/${USER}/sysroot/share -COPY --from=sysroot_builder /home/${USER}/scopy/ci/kuiper/staging/sysroot/include /home/${USER}/sysroot/include +COPY --from=sysroot_builder /home/${USER}/scopy/ci/armhf/staging/sysroot/usr /home/${USER}/sysroot/usr +COPY --from=sysroot_builder /home/${USER}/scopy/ci/armhf/staging/sysroot/share /home/${USER}/sysroot/share +COPY --from=sysroot_builder /home/${USER}/scopy/ci/armhf/staging/sysroot/include /home/${USER}/sysroot/include WORKDIR /home/${USER}/sysroot RUN ln -s usr/bin bin && ln -s usr/lib lib && ln -s usr/sbin sbin WORKDIR /home/${USER} \ No newline at end of file diff --git a/ci/kuiper/inside_chroot.sh b/ci/armhf/inside_chroot.sh similarity index 100% rename from ci/kuiper/inside_chroot.sh rename to ci/armhf/inside_chroot.sh diff --git a/ci/kuiper/build_scopy_kuiper.sh b/ci/armhf/local_build_scopy_for_kuiper.sh similarity index 100% rename from ci/kuiper/build_scopy_kuiper.sh rename to ci/armhf/local_build_scopy_for_kuiper.sh diff --git a/ci/kuiper/qt_patch.patch b/ci/armhf/qt_patch.patch similarity index 100% rename from ci/kuiper/qt_patch.patch rename to ci/armhf/qt_patch.patch diff --git a/ci/kuiper/runtime-armhf b/ci/armhf/runtime-armhf similarity index 100% rename from ci/kuiper/runtime-armhf rename to ci/armhf/runtime-armhf diff --git a/ci/kuiper/scopy.desktop b/ci/armhf/scopy.desktop similarity index 100% rename from ci/kuiper/scopy.desktop rename to ci/armhf/scopy.desktop