diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5d1b194..dcc0a30 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,6 +9,7 @@ on: jobs: stage1: name: Stage 1 + if: ${{ !contains(github.event.head_commit.message, '[no stage1]') }} runs-on: ubuntu-latest steps: - name: Checkout the Git repository @@ -25,6 +26,7 @@ jobs: run: ./scripts/build -p -g -s toolchain stage2: name: Stage 2 + if: ${{ !contains(github.event.head_commit.message, '[no stage2]') && !failure() && !cancelled() }} runs-on: ubuntu-latest needs: stage1 steps: @@ -42,6 +44,7 @@ jobs: run: ./scripts/build -p -g -s base stage3: name: Stage 3 + if: ${{ !contains(github.event.head_commit.message, '[no stage3]') && !failure() && !cancelled() }} runs-on: ubuntu-latest needs: stage2 strategy: diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index d62326c..826caed 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -10,6 +10,8 @@ jobs: stage1: name: Stage 1 runs-on: ubuntu-latest + outputs: + UUID: ${{ steps.export_container_uuid.outputs.UUID }} steps: - name: Checkout the Git repository uses: actions/checkout@v3 @@ -23,11 +25,34 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Build and push toolchain run: ./scripts/build -g -s toolchain + - name: Export the container + id: export_container_uuid + run: | + export DEBIAN_FRONTEND=noninteractive + sudo apt-get update -y + sudo apt-get install uuid-runtime + export UUID=$(uuidgen) + echo "UUID=$UUID" >> "$GITHUB_ENV" + echo "UUID=$UUID" >> "$GITHUB_OUTPUT" + docker image save ghcr.io/toltec-dev/toolchain | gzip > ${{ runner.temp }}/$UUID-toolchain.tar.gz + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: ${{ env.UUID }}-toolchain + path: ${{ runner.temp }}/${{ env.UUID }}-toolchain.tar.gz + retention-days: 1 stage2: name: Stage 2 runs-on: ubuntu-latest + outputs: + UUID: ${{ steps.export_uuid_for_stage3.outputs.UUID }} needs: stage1 steps: + - name: Download artifact + uses: actions/download-artifact@v4 + with: + name: ${{ needs.stage1.outputs.UUID }}-toolchain + path: ${{ runner.temp }} - name: Checkout the Git repository uses: actions/checkout@v3 - name: Login to GitHub Container Registry @@ -38,8 +63,25 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: Set UUID for stage3 + id: export_uuid_for_stage3 + run: echo "UUID=${{ needs.stage1.outputs.UUID }}" >> "$GITHUB_OUTPUT" + - name: Import container + run: | + pushd ${{ runner.temp }} + tar xf ${{ needs.stage1.outputs.UUID }}-toolchain.tar.gz + popd + rm ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-toolchain.tar.gz - name: Build and push toolchain - run: ./scripts/build -g -s base + run: ./scripts/build -g -s base -c ghcr.io/toltec-dev/toolchain=oci-layout://${{ runner.temp }} + - name: Export the container + run: docker image save ghcr.io/toltec-dev/base | gzip > ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-base.tar.gz + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: ${{ needs.stage1.outputs.UUID }}-base + path: ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-base.tar.gz + retention-days: 1 stage3: name: Stage 3 runs-on: ubuntu-latest @@ -48,6 +90,11 @@ jobs: matrix: target: [golang, python, qt, rust, dotnet6] steps: + - name: Download artifact + uses: actions/download-artifact@v4 + with: + name: ${{ needs.stage2.outputs.UUID }}-base + path: ${{ runner.temp }} - name: Checkout the Git repository uses: actions/checkout@v3 - name: Login to GitHub Container Registry @@ -58,5 +105,11 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: Import container + run: | + pushd ${{ runner.temp }} + tar xf ${{ needs.stage2.outputs.UUID }}-base.tar.gz + popd + rm ${{ runner.temp }}/${{ needs.stage2.outputs.UUID }}-base.tar.gz - name: Build and push toolchain - run: ./scripts/build -g -s ${{ matrix.target }} + run: ./scripts/build -g -s ${{ matrix.target }} -c ghcr.io/toltec-dev/base=oci-layout://${{ runner.temp }} diff --git a/README.md b/README.md index a5e9e41..1a29e65 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ ## Toltec Build Toolchain -This branch contains the Docker image definitions for the `3.x` releases.\ +This branch contains the Docker image definitions for the `4.x` releases.\ [See the main README file for more information →](https://github.com/toltec-dev/toolchain#readme) diff --git a/base/Dockerfile b/base/Dockerfile index 7f5ebf0..d3e13c3 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -2,7 +2,7 @@ ARG FROM FROM $FROM -# Build libcap 2.32 targeting armhf +# Build libcap 2.66 targeting armhf RUN export DEBIAN_FRONTEND=noninteractive \ # Install build dependencies && apt-get update -y \ @@ -10,17 +10,16 @@ RUN export DEBIAN_FRONTEND=noninteractive \ git \ # Build libcap && cd /root \ - && git clone git://git.kernel.org/pub/scm/libs/libcap/libcap.git \ + && git clone --depth 1 --branch libcap-2.66 git://git.kernel.org/pub/scm/libs/libcap/libcap.git \ && cd libcap \ - && git checkout 13227f9b2f2b2f222e8022e19bd46db6f6f898c6 \ - && sed -i "s/^BUILD_GPERF/#\0/" Make.Rules \ # Compile binaries that run on the build machine using normal GCC - && sed -i "s/^\(BUILD_CC\) := \$(CC)/\1 := gcc/" Make.Rules \ + && sed -i "s/^\(BUILD_CC\) ?= \$(CC)/\1 := gcc/" Make.Rules \ && make \ AR="${CROSS_COMPILE}ar" \ CC="${CROSS_COMPILE}gcc" \ RANLIB="${CROSS_COMPILE}ranlib" \ lib=lib \ + -j$(nproc) \ && make install \ RAISE_SETFCAP=no \ lib=lib \ @@ -33,7 +32,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt -# Build util-linux 2.36.1 targeting armhf +# Build util-linux 2.37.4 targeting armhf RUN export DEBIAN_FRONTEND=noninteractive \ # Install build dependencies && apt-get update -y \ @@ -46,17 +45,16 @@ RUN export DEBIAN_FRONTEND=noninteractive \ libtool \ # Build util-linux && cd /root \ - && git clone https://github.com/karelzak/util-linux.git \ + && git clone --depth 1 --branch v2.37.4 https://github.com/karelzak/util-linux.git \ && cd util-linux \ - && git checkout 35c07c82be1ddc3b1c40f061b59008cac6405499 \ && ./autogen.sh \ && ./configure --host="$CHOST" \ - && make LDFLAGS="-Wl,-rpath-link,.libs" \ + && make LDFLAGS="-Wl,-rpath-link,.libs" -j$(nproc) \ && make install DESTDIR="$SYSROOT" \ && cd .. \ # Clean up && rm -rf util-linux \ - && find "$SYSROOT" -type l,f -name "*.la" | xargs --no-run-if-empty rm \ + && find "$SYSROOT" -type l,f -name "*.la" -delete \ && apt-get autoremove -y \ automake \ autopoint \ @@ -67,8 +65,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt -# Build systemd 244 targeting armhf -COPY patch/*.patch / +# Build systemd 250 targeting armhf RUN export DEBIAN_FRONTEND=noninteractive \ # Install build dependencies && apt-get update -y \ @@ -78,18 +75,12 @@ RUN export DEBIAN_FRONTEND=noninteractive \ gperf \ m4 \ rsync \ + python3-pip \ + && pip3 install --no-cache-dir --break-system-packages jinja2 \ # Build systemd && cd /root \ - && git clone https://github.com/systemd/systemd.git \ + && git clone --depth 1 --branch v250.5 https://github.com/systemd/systemd.git \ && cd systemd \ - && git checkout db9c5ae73e23d816e2df2a3e10a9a2a60b5b3ed7 \ - # Fix build errors with GCC 10 and -O3 - # (see ) - && git apply /systemd-244-15762.patch \ - # Fix Meson syntax and semantic changes in recent versions - # (see ) - && git apply /systemd-244-20633.patch \ - && rm /systemd-244-*.patch \ && ./configure \ --buildtype=release \ --cross-file="$CHOST" \ @@ -103,16 +94,18 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && cd .. \ # Clean up && rm -rf systemd \ + # TODO: remove pip packages as well && apt-get autoremove -y \ gettext \ git \ gperf \ m4 \ rsync \ + python3-pip \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt -# Build zlib 1.2.11 and libpng 1.6.37 targeting armhf +# Build zlib 1.2.11 and libpng 1.6.39 targeting armhf RUN export DEBIAN_FRONTEND=noninteractive \ # Install build dependencies && apt-get update -y \ @@ -122,26 +115,24 @@ RUN export DEBIAN_FRONTEND=noninteractive \ libtool \ # Build static zlib && cd /root \ - && git clone https://github.com/madler/zlib \ + && git clone --depth 1 --branch v1.2.11 https://github.com/madler/zlib \ && cd zlib \ - && git checkout cacf7f1d4e3d44d871b605da3b647f07d718623f \ && CC="${CROSS_COMPILE}gcc" CFLAGS=-fPIC ./configure \ --static \ --prefix=/usr \ - && make \ + && make -j$(nproc) \ && DESTDIR="$SYSROOT" make install \ && cd .. \ # Build dynamic libpng - && git clone git://git.code.sf.net/p/libpng/code libpng \ + && git clone --depth 1 --branch v1.6.39 git://git.code.sf.net/p/libpng/code libpng \ && cd libpng \ - && git checkout a40189cf881e9f0db80511c382292a5604c3c3d1 \ && ./configure --prefix=/usr --host="$CHOST" \ - && make \ + && make -j$(nproc) \ && DESTDIR="$SYSROOT" make install \ && cd .. \ # Clean up && rm -rf zlib libpng \ - && find "$SYSROOT" -type l,f -name "*.la" | xargs --no-run-if-empty rm \ + && find "$SYSROOT" -type l,f -name "*.la" -delete \ && apt-get autoremove -y \ automake \ git \ @@ -149,63 +140,60 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt -# Build libevdev 1.9.1 targeting armhf +# Build libevdev 1.12.1 targeting armhf RUN export DEBIAN_FRONTEND=noninteractive \ # Build libevdev && cd /root \ && mkdir libevdev \ && cd libevdev \ - && curl https://www.freedesktop.org/software/libevdev/libevdev-1.9.1.tar.xz -o libevdev.tar.xz \ - && echo "f5603c48c5afd76b14df7a5124e0a94a102f8da0d45826192325069d1bbc7acb libevdev.tar.xz" > sha256sums \ - && sha256sum -c sha256sums \ + && curl https://www.freedesktop.org/software/libevdev/libevdev-1.12.1.tar.xz -o libevdev.tar.xz \ + && echo "1dbba41bc516d3ca7abc0da5b862efe3ea8a7018fa6e9b97ce9d39401b22426c libevdev.tar.xz" | sha256sum -c \ && tar --strip-components=1 -xf libevdev.tar.xz \ - && rm libevdev.tar.xz sha256sums \ + && rm libevdev.tar.xz \ && ./configure --prefix=/usr --host="$CHOST" \ - && make \ + && make -j$(nproc) \ && DESTDIR="$SYSROOT" make install \ && cd .. \ # Clean up && rm -rf libevdev \ - && find "$SYSROOT" -type l,f -name "*.la" | xargs --no-run-if-empty rm + && find "$SYSROOT" -type l,f -name "*.la" -delete -# Build OpenSSL 1.1.1g targeting armhf +# Build OpenSSL 3.0.15 targeting armhf RUN export DEBIAN_FRONTEND=noninteractive \ # Build OpenSSL && cd /root \ && mkdir openssl \ && cd openssl \ - && curl https://www.openssl.org/source/openssl-1.1.1g.tar.gz -Lo openssl.tar.gz \ - && echo "ddb04774f1e32f0c49751e21b67216ac87852ceb056b75209af2443400636d46 openssl.tar.gz" > sha256sums \ - && sha256sum -c sha256sums \ + && curl https://www.openssl.org/source/openssl-3.0.15.tar.gz -Lo openssl.tar.gz \ + && echo "23c666d0edf20f14249b3d8f0368acaee9ab585b09e1de82107c66e1f3ec9533 openssl.tar.gz" | sha256sum -c \ && tar --strip-components=1 -xf openssl.tar.gz \ - && rm openssl.tar.gz sha256sums \ + && rm openssl.tar.gz \ && ./Configure --prefix=/usr --cross-compile-prefix="$CROSS_COMPILE" linux-armv4 \ - && make \ + && make -j$(nproc) \ && make DESTDIR="$SYSROOT" install_sw \ && cd .. \ # Clean up && rm -rf openssl -# Build libcurl 7.69.1 targeting armhf +# Build libcurl 7.82.0 targeting armhf RUN export DEBIAN_FRONTEND=noninteractive \ # Build libcurl && cd /root \ && mkdir libcurl \ && cd libcurl \ - && curl https://curl.se/download/curl-7.69.1.tar.xz -o curl.tar.xz \ - && echo "03c7d5e6697f7b7e40ada1b2256e565a555657398e6c1fcfa4cb251ccd819d4f curl.tar.xz" > sha256sums \ - && sha256sum -c sha256sums \ + && curl https://curl.se/download/curl-7.82.0.tar.xz -o curl.tar.xz \ + && echo "0aaa12d7bd04b0966254f2703ce80dd5c38dbbd76af0297d3d690cdce58a583c curl.tar.xz" | sha256sum -c \ && tar --strip-components=1 -xf curl.tar.xz \ - && rm curl.tar.xz sha256sums \ + && rm curl.tar.xz \ && ./configure --prefix=/usr --host="$CHOST" --with-openssl \ - && make \ + && make -j$(nproc) \ && DESTDIR="$SYSROOT" make install \ && cd .. \ # Clean up && rm -rf libcurl \ - && find "$SYSROOT" -type l,f -name "*.la" | xargs --no-run-if-empty rm + && find "$SYSROOT" -type l,f -name "*.la" -delete -# Build breakpad 0.1 (db1cda2653) targeting armhf +# Build breakpad 0.1 (f88a1aa2af) targeting armhf RUN export DEBIAN_FRONTEND=noninteractive \ # Install build dependencies && apt-get update -y \ @@ -214,25 +202,26 @@ RUN export DEBIAN_FRONTEND=noninteractive \ zlib1g-dev \ libssl-dev \ # breakpad's build tools require python2 to be available as python on the path - && git clone https://github.com/pyenv/pyenv.git .pyenv \ + && cd /root \ + && git clone --depth 1 https://github.com/pyenv/pyenv.git .pyenv \ && export PYENV_ROOT="$(pwd)/.pyenv" \ && export PATH="$PYENV_ROOT/bin:$PATH" \ && eval "$(pyenv init --path)" \ && pyenv install 2.7 \ && pyenv global 2.7 \ # Fetch and activate depot_tools - && cd /root \ && git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git \ && export PATH=$PATH:/root/depot_tools \ # Build static breakpad - && cd /root \ && mkdir breakpad \ && cd breakpad \ && fetch breakpad \ && cd src \ - && git checkout -f db1cda26539c711c3da7ed4d410dfe8190e89b8f \ + # fetch updates default.xml with seemingly useless diffs that break checkout later + && git checkout HEAD -- default.xml \ + && git checkout f88a1aa2af1d1fd795716365245761b89041139d \ && ./configure --prefix=/usr --host="$CHOST" \ - && make \ + && make -j$(nproc) \ && DESTDIR="$SYSROOT" make install \ && cd ../.. \ # Clean up @@ -249,3 +238,269 @@ RUN export DEBIAN_FRONTEND=noninteractive \ libssl-dev \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt + +# Build libcap 2.66 targeting aarch64 +RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive \ + && source /opt/x-tools/switch-aarch64.sh \ + # Install build dependencies + && apt-get update -y \ + && apt-get install -y --no-install-recommends \ + git \ + # Build libcap + && cd /root \ + && git clone --depth 1 --branch libcap-2.66 git://git.kernel.org/pub/scm/libs/libcap/libcap.git \ + && cd libcap \ + # Compile binaries that run on the build machine using normal GCC + && sed -i "s/^\(BUILD_CC\) ?= \$(CC)/\1 := gcc/" Make.Rules \ + && make \ + AR="${CROSS_COMPILE}ar" \ + CC="${CROSS_COMPILE}gcc" \ + RANLIB="${CROSS_COMPILE}ranlib" \ + lib=lib \ + -j$(nproc) \ + && make install \ + RAISE_SETFCAP=no \ + lib=lib \ + DESTDIR="$SYSROOT" \ + && cd .. \ + # Clean up + && rm -rf libcap \ + && apt-get autoremove -y \ + git \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt' + +# Build util-linux 2.37.4 targeting aarch64 +RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive \ + && source /opt/x-tools/switch-aarch64.sh \ + # Install build dependencies + && apt-get update -y \ + && apt-get install -y --no-install-recommends \ + automake \ + autopoint \ + bison \ + gettext \ + git \ + libtool \ + # Build util-linux + && cd /root \ + && git clone --depth 1 --branch v2.37.4 https://github.com/karelzak/util-linux.git \ + && cd util-linux \ + && ./autogen.sh \ + && ./configure --host="$CHOST" \ + && make LDFLAGS="-Wl,-rpath-link,.libs" -j$(nproc) \ + && make install DESTDIR="$SYSROOT" \ + && cd .. \ + # Clean up + && rm -rf util-linux \ + && find "$SYSROOT" -type l,f -name "*.la" -delete \ + && apt-get autoremove -y \ + automake \ + autopoint \ + bison \ + gettext \ + git \ + libtool \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt' + +# Build systemd 250 targeting aarch64 +RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive \ + && source /opt/x-tools/switch-aarch64.sh \ + # Install build dependencies + && apt-get update -y \ + && apt-get install -y --no-install-recommends \ + gettext \ + git \ + gperf \ + m4 \ + rsync \ + python3-pip \ + && pip3 install --no-cache-dir --break-system-packages jinja2 \ + # Build systemd + && cd /root \ + && git clone --depth 1 --branch v250.5 https://github.com/systemd/systemd.git \ + && cd systemd \ + && ./configure \ + --buildtype=release \ + --cross-file="$CHOST" \ + --prefix=/ \ + -Drootprefix=/ \ + --datadir=usr/share \ + --includedir=usr/include \ + --libdir=lib \ + && ninja -C build \ + && DESTDIR="$SYSROOT" ninja -C build install \ + && cd .. \ + # Clean up + && rm -rf systemd \ + # TODO: remove pip packages as well + && apt-get autoremove -y \ + gettext \ + git \ + gperf \ + m4 \ + rsync \ + python3-pip \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt' + +# Build zlib 1.2.11 and libpng 1.6.39 targeting aarch64 +RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive \ + && source /opt/x-tools/switch-aarch64.sh \ + # Install build dependencies + && apt-get update -y \ + && apt-get install -y --no-install-recommends \ + automake \ + git \ + libtool \ + # Build static zlib + && cd /root \ + && git clone --depth 1 --branch v1.2.11 https://github.com/madler/zlib \ + && cd zlib \ + && CC="${CROSS_COMPILE}gcc" CFLAGS=-fPIC ./configure \ + --static \ + --prefix=/usr \ + && make -j$(nproc) \ + && DESTDIR="$SYSROOT" make install \ + && cd .. \ + # Build dynamic libpng + && git clone --depth 1 --branch v1.6.39 git://git.code.sf.net/p/libpng/code libpng \ + && cd libpng \ + && ./configure --prefix=/usr --host="$CHOST" \ + && make -j$(nproc) \ + && DESTDIR="$SYSROOT" make install \ + && cd .. \ + # Clean up + && rm -rf zlib libpng \ + && find "$SYSROOT" -type l,f -name "*.la" -delete \ + && apt-get autoremove -y \ + automake \ + git \ + libtool \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt' + +# Build libevdev 1.12.1 targeting aarch64 +RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive \ + && source /opt/x-tools/switch-aarch64.sh \ + # Build libevdev + && cd /root \ + && mkdir libevdev \ + && cd libevdev \ + && curl https://www.freedesktop.org/software/libevdev/libevdev-1.12.1.tar.xz -o libevdev.tar.xz \ + && echo "1dbba41bc516d3ca7abc0da5b862efe3ea8a7018fa6e9b97ce9d39401b22426c libevdev.tar.xz" | sha256sum -c \ + && tar --strip-components=1 -xf libevdev.tar.xz \ + && rm libevdev.tar.xz \ + && ./configure --prefix=/usr --host="$CHOST" \ + && make -j$(nproc) \ + && DESTDIR="$SYSROOT" make install \ + && cd .. \ + # Clean up + && rm -rf libevdev \ + && find "$SYSROOT" -type l,f -name "*.la" -delete' + +# Build OpenSSL 3.0.15 targeting aarch64 +RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive \ + && source /opt/x-tools/switch-aarch64.sh \ + # Build OpenSSL + && cd /root \ + && mkdir openssl \ + && cd openssl \ + && curl https://www.openssl.org/source/openssl-3.0.15.tar.gz -Lo openssl.tar.gz \ + && echo "23c666d0edf20f14249b3d8f0368acaee9ab585b09e1de82107c66e1f3ec9533 openssl.tar.gz" | sha256sum -c \ + && tar --strip-components=1 -xf openssl.tar.gz \ + && rm openssl.tar.gz \ + && ./Configure --prefix=/usr --cross-compile-prefix="$CROSS_COMPILE" linux-aarch64 \ + && make -j$(nproc) \ + && make DESTDIR="$SYSROOT" install_sw \ + && cd .. \ + # Clean up + && rm -rf openssl' + +# Build libcurl 7.82.0 targeting aarch64 +RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive \ + && source /opt/x-tools/switch-aarch64.sh \ + # Build libcurl + && cd /root \ + && mkdir libcurl \ + && cd libcurl \ + && curl https://curl.se/download/curl-7.82.0.tar.xz -o curl.tar.xz \ + && echo "0aaa12d7bd04b0966254f2703ce80dd5c38dbbd76af0297d3d690cdce58a583c curl.tar.xz" | sha256sum -c \ + && tar --strip-components=1 -xf curl.tar.xz \ + && rm curl.tar.xz \ + && ./configure --prefix=/usr --host="$CHOST" --with-openssl \ + && make -j$(nproc) \ + && DESTDIR="$SYSROOT" make install \ + && cd .. \ + # Clean up + && rm -rf libcurl \ + && find "$SYSROOT" -type l,f -name "*.la" -delete' + +# Build libdrm (imx fork) 2.4.109 targeting aarch64 +RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive \ + && source /opt/x-tools/switch-aarch64.sh \ + # Install build dependencies + && apt-get update -y \ + && apt-get install -y --no-install-recommends \ + git \ + && cd /root \ + && git clone --depth 1 --branch libdrm-imx-2.4.109 https://github.com/nxp-imx/libdrm-imx \ + && cd libdrm-imx \ + && meson -Dvivante=true -Dprefix=/usr --cross-file /usr/share/meson/cross/aarch64-remarkable-linux-gnu builddir/ \ + && DESTDIR=$SYSROOT ninja -C builddir/ install \ + && cd .. \ + # Clean up + && rm -rf libdrm-imx \ + && apt-get autoremove -y \ + git \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt' + +# Build breakpad 0.1 (f88a1aa2af) targeting aarch64 +RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive \ + && source /opt/x-tools/switch-aarch64.sh \ + # Install build dependencies + && apt-get update -y \ + && apt-get install -y --no-install-recommends \ + git \ + zlib1g-dev \ + libssl-dev \ + # breakpad's build tools require python2 to be available as python on the path + && cd /root \ + && git clone --depth 1 https://github.com/pyenv/pyenv.git .pyenv \ + && export PYENV_ROOT="$(pwd)/.pyenv" \ + && export PATH="$PYENV_ROOT/bin:$PATH" \ + && eval "$(pyenv init --path)" \ + && pyenv install 2.7 \ + && pyenv global 2.7 \ + # Fetch and activate depot_tools + && git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git \ + && export PATH=$PATH:/root/depot_tools \ + # Build static breakpad + && mkdir breakpad \ + && cd breakpad \ + && fetch breakpad \ + && cd src \ + # fetch updates default.xml with seemingly useless diffs that break checkout later + && git checkout HEAD -- default.xml \ + && git checkout f88a1aa2af1d1fd795716365245761b89041139d \ + && ./configure --prefix=/usr --host="$CHOST" \ + && make -j$(nproc) \ + && DESTDIR="$SYSROOT" make install \ + && cd ../.. \ + # Clean up + && rm -rf \ + .vpython-root \ + .vpython_cipd_cache \ + /tmp/* \ + breakpad \ + depot_tools \ + .pyenv \ + && apt-get autoremove -y \ + git \ + zlib1g-dev \ + libssl-dev \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt' + diff --git a/base/patch/systemd-244-15762.patch b/base/patch/systemd-244-15762.patch deleted file mode 100644 index 5e4226a..0000000 --- a/base/patch/systemd-244-15762.patch +++ /dev/null @@ -1,69 +0,0 @@ -diff --git a/meson.build b/meson.build -index 4c997ab6f7e..580d5126fae 100644 ---- a/meson.build -+++ b/meson.build -@@ -411,6 +411,9 @@ add_project_arguments(cc.get_supported_arguments(basic_disabled_warnings), langu - add_project_arguments(cc.get_supported_arguments(possible_cc_flags), language : 'c') - add_project_link_arguments(cc.get_supported_link_arguments(possible_link_flags), language : 'c') - -+have = cc.has_argument('-Wzero-length-bounds') -+conf.set10('HAVE_ZERO_LENGTH_BOUNDS', have) -+ - if cc.compiles(''' - #include - #include -diff --git a/src/core/path.c b/src/core/path.c -index c7907ce4bf6..1bbf27c5c57 100644 ---- a/src/core/path.c -+++ b/src/core/path.c -@@ -223,11 +223,10 @@ static void path_spec_mkdir(PathSpec *s, mode_t mode) { - } - - static void path_spec_dump(PathSpec *s, FILE *f, const char *prefix) { -- fprintf(f, -- "%s%s: %s\n", -- prefix, -- path_type_to_string(s->type), -- s->path); -+ const char *type; -+ -+ assert_se(type = path_type_to_string(s->type)); -+ fprintf(f, "%s%s: %s\n", prefix, type, s->path); - } - - void path_spec_done(PathSpec *s) { -@@ -607,14 +606,16 @@ static int path_serialize(Unit *u, FILE *f, FDSet *fds) { - (void) serialize_item(f, "result", path_result_to_string(p->result)); - - LIST_FOREACH(spec, s, p->specs) { -+ const char *type; - _cleanup_free_ char *escaped = NULL; - - escaped = cescape(s->path); - if (!escaped) - return log_oom(); - -+ assert_se(type = path_type_to_string(s->type)); - (void) serialize_item_format(f, "path-spec", "%s %i %s", -- path_type_to_string(s->type), -+ type, - s->previous_exists, - s->path); - } -diff --git a/src/shared/ethtool-util.c b/src/shared/ethtool-util.c -index 0cde87f5ac3..25bc79eeea1 100644 ---- a/src/shared/ethtool-util.c -+++ b/src/shared/ethtool-util.c -@@ -434,7 +434,12 @@ static int get_stringset(int fd, struct ifreq *ifr, int stringset_id, struct eth - if (!buffer.info.sset_mask) - return -EINVAL; - -+#pragma GCC diagnostic push -+#if HAVE_ZERO_LENGTH_BOUNDS -+# pragma GCC diagnostic ignored "-Wzero-length-bounds" -+#endif - len = buffer.info.data[0]; -+#pragma GCC diagnostic pop - - strings = malloc0(sizeof(struct ethtool_gstrings) + len * ETH_GSTRING_LEN); - if (!strings) diff --git a/base/patch/systemd-244-20633.patch b/base/patch/systemd-244-20633.patch deleted file mode 100644 index 6c60b1f..0000000 --- a/base/patch/systemd-244-20633.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/meson.build b/meson.build -index f263b6e944..6099ed2643 100644 ---- a/meson.build -+++ b/meson.build -@@ -38,7 +38,7 @@ conf.set_quoted('RELATIVE_SOURCE_PATH', relative_source_path) - want_ossfuzz = get_option('oss-fuzz') - want_libfuzzer = get_option('llvm-fuzz') - want_fuzzbuzz = get_option('fuzzbuzz') --if want_ossfuzz + want_libfuzzer + want_fuzzbuzz > 1 -+if want_ossfuzz and want_libfuzzer and want_fuzzbuzz - error('only one of oss-fuzz, llvm-fuzz or fuzzbuzz can be specified') - endif - diff --git a/dotnet6/Dockerfile b/dotnet6/Dockerfile index 8c08931..cd9ea1c 100644 --- a/dotnet6/Dockerfile +++ b/dotnet6/Dockerfile @@ -4,7 +4,7 @@ FROM $FROM # Install dotnet RUN export DEBIAN_FRONTEND=noninteractive \ - && curl https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -o packages-microsoft-prod.deb \ + && curl https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -o packages-microsoft-prod.deb \ && dpkg -i packages-microsoft-prod.deb \ && rm packages-microsoft-prod.deb \ && apt-get update -y \ diff --git a/golang/Dockerfile b/golang/Dockerfile index 7721ce1..1a96417 100644 --- a/golang/Dockerfile +++ b/golang/Dockerfile @@ -5,11 +5,11 @@ FROM $FROM # Install golang RUN cd /root \ && curl --proto '=https' --tlsv1.2 -sSf \ - https://dl.google.com/go/go1.20.7.linux-amd64.tar.gz \ - -o go1.20.7.linux-amd64.tar.gz \ - && tar -C /usr/local -xzf go1.20.7.linux-amd64.tar.gz \ + https://dl.google.com/go/go1.24.2.linux-amd64.tar.gz \ + -o go1.24.2.linux-amd64.tar.gz \ + && tar -C /usr/local -xzf go1.24.2.linux-amd64.tar.gz \ && mkdir go \ - && rm go1.20.7.linux-amd64.tar.gz + && rm go1.24.2.linux-amd64.tar.gz # Add go binaries to PATH ENV PATH="$PATH:/usr/local/go/bin" diff --git a/qt/Dockerfile b/qt/Dockerfile index a193143..81b7c1d 100644 --- a/qt/Dockerfile +++ b/qt/Dockerfile @@ -4,54 +4,89 @@ FROM $FROM # Build Qt 5.15.1 targeting armhf COPY linux-arm-remarkable-g++ /linux-arm-remarkable-g++ +COPY linux-aarch64-remarkable-g++ /linux-aarch64-remarkable-g++ RUN export DEBIAN_FRONTEND=noninteractive \ # Install build dependencies && apt-get update -y \ && apt-get install -y --no-install-recommends \ git \ + libudev-dev \ # Build Qt && cd /root \ && git clone https://code.qt.io/qt/qt5.git \ && cd qt5 \ - && git checkout 0f7f776d3915ef16a9c737141994284f035aa3b1 \ - && GIT_ASKPASS="/bin/echo" perl init-repository --module-subset=essential,-qtmultimedia,-qttools,qtgraphicaleffects,qtquickcontrols2,qtsvg,qtwebsockets --mirror=https://github.com/reMarkable/ \ + && git switch 6.7.3 \ + && GIT_ASKPASS="/bin/echo" perl init-repository --module-subset=qtbase,qtshadertools,qtdeclarative \ # Setup reMarkable mkspec && mv /linux-arm-remarkable-g++ qtbase/mkspecs/devices \ + && mv /linux-aarch64-remarkable-g++ qtbase/mkspecs/devices \ && cd .. \ + # Build for host machine (required from Qt6+) + && mkdir qt5-build \ + && cd qt5-build \ + && unset SYSROOT \ + && unset PKG_CONFIG_SYSROOT_DIR \ + && ../qt5/configure \ + -prefix /usr \ + -no-opengl \ + -no-widgets \ + -no-feature-sql \ + -- -DQT_BUILD_EXAMPLES=OFF \ + -DQT_BUILD_TESTS=OFF \ + && cmake --build . --parallel $(nproc) \ + && cmake --install . \ + && cd .. \ + # Clean up + && rm -rf qt5-build \ + # Build for armhf + && export SYSROOT=/opt/x-tools/arm-remarkable-linux-gnueabihf/arm-remarkable-linux-gnueabihf/sysroot \ + && export PKG_CONFIG_SYSROOT_DIR="$SYSROOT" \ && mkdir qt5-build \ && cd qt5-build \ && ../qt5/configure \ - -confirm-license \ - -opensource \ -prefix /usr \ - -sysroot "$SYSROOT" \ - -hostprefix /usr \ + -extprefix $SYSROOT/usr \ -device linux-arm-remarkable-g++ \ -device-option CROSS_COMPILE="$CROSS_COMPILE" \ - -nomake examples \ - -nomake tests \ - -no-rpath \ -no-opengl \ -no-widgets \ -no-feature-sql \ -reduce-exports \ - && make \ - && make install \ + -- -DQT_HOST_PATH=/usr \ + -DQT_BUILD_EXAMPLES=OFF \ + -DQT_BUILD_TESTS=OFF \ + -DCMAKE_TOOLCHAIN_FILE=/usr/share/cmake/arm-linux-gnueabihf.cmake \ + && cmake --build . --parallel $(nproc) \ + && cmake --install . \ && cd .. \ # Clean up - && rm -rf qt5 qt5-build \ + && rm -rf qt5-build \ && find "$SYSROOT" -type l,f -name "*.la" | xargs --no-run-if-empty rm \ + # Now Build AArch64 + && bash -c 'source /opt/x-tools/switch-aarch64.sh \ + && mkdir qt5-build \ + && cd qt5-build \ + && ../qt5/configure \ + -prefix /usr \ + -extprefix $SYSROOT/usr \ + -device linux-aarch64-remarkable-g++ \ + -device-option CROSS_COMPILE="$CROSS_COMPILE" \ + -no-rpath \ + -no-opengl \ + -no-widgets \ + -no-feature-sql \ + -reduce-exports \ + -- -DQT_HOST_PATH=/usr \ + -DQT_BUILD_EXAMPLES=OFF \ + -DQT_BUILD_TESTS=OFF \ + -DCMAKE_TOOLCHAIN_FILE=/usr/share/cmake/aarch64-remarkable-linux-gnu.cmake \ + && cmake --build . --parallel $(nproc) \ + && cmake --install . \ + && cd .. \ + && rm -rf qt5-build \ + && find "$SYSROOT" -type l,f -name "*.la" | xargs --no-run-if-empty rm' \ && apt-get autoremove -y \ git \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt -# Add the closed-source libqsgepaper library -RUN curl --proto '=https' --tlsv1.2 -sSf \ - https://toltec-dev.org/thirdparty/lib/libqsgepaper-5.15-v2.a \ - -o "$SYSROOT/usr/lib/libqsgepaper.a" \ - && echo "acd55568a81e7b67bf9c8bc9b55f918373554b236ca1da58bd8ac663e0a9ab47 $SYSROOT/usr/lib/libqsgepaper.a" | sha256sum -c \ - && curl --proto '=https' --tlsv1.2 -sSf \ - https://toltec-dev.org/thirdparty/include/epframebuffer.h \ - -o "$SYSROOT/usr/include/epframebuffer.h" \ - && echo "c28e9ff825f67766ae86b57859377aa0111622030a029cfc53c6926a7063aa7f $SYSROOT/usr/include/epframebuffer.h" | sha256sum -c diff --git a/qt/linux-aarch64-remarkable-g++/qmake.conf b/qt/linux-aarch64-remarkable-g++/qmake.conf new file mode 100644 index 0000000..2dc57b0 --- /dev/null +++ b/qt/linux-aarch64-remarkable-g++/qmake.conf @@ -0,0 +1,24 @@ +# +# qmake configuration for building with aarch64-linux-gnu-g++ +# + +MAKEFILE_GENERATOR = UNIX +CONFIG += incremental +QMAKE_INCREMENTAL_STYLE = sublib + +include(../common/linux.conf) +include(../common/gcc-base-unix.conf) +include(../common/g++-unix.conf) + +# modifications to g++.conf +QMAKE_CC = aarch64-linux-gnu-gcc +QMAKE_CXX = aarch64-linux-gnu-g++ +QMAKE_LINK = aarch64-linux-gnu-g++ +QMAKE_LINK_SHLIB = aarch64-linux-gnu-g++ + +# modifications to linux.conf +QMAKE_AR = aarch64-linux-gnu-ar cqs +QMAKE_OBJCOPY = aarch64-linux-gnu-objcopy +QMAKE_NM = aarch64-linux-gnu-nm -P +QMAKE_STRIP = aarch64-linux-gnu-strip +load(qt_config) diff --git a/qt/linux-aarch64-remarkable-g++/qplatformdefs.h b/qt/linux-aarch64-remarkable-g++/qplatformdefs.h new file mode 100644 index 0000000..5c69998 --- /dev/null +++ b/qt/linux-aarch64-remarkable-g++/qplatformdefs.h @@ -0,0 +1,4 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#include "../../linux-g++/qplatformdefs.h" diff --git a/rust/Dockerfile b/rust/Dockerfile index 6ca6e00..a7f396b 100644 --- a/rust/Dockerfile +++ b/rust/Dockerfile @@ -1,13 +1,13 @@ -# Rust nightly targeting the armv7-hf architecture +# Rust nightly targeting the armv7-hf and aarch64 architectures ARG FROM FROM $FROM -RUN echo "bumping on 2024-09-09" +RUN echo "bumping on 2025-04-28" # Install rustup RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y -q \ - --default-toolchain nightly \ - --target armv7-unknown-linux-gnueabihf \ - --profile minimal + --default-toolchain none \ + && /root/.cargo/bin/rustup toolchain install nightly --profile minimal --target armv7-unknown-linux-gnueabihf \ + && /root/.cargo/bin/rustup target add aarch64-unknown-linux-gnu # Add rust binaries to PATH ENV PATH="$PATH:/root/.cargo/bin" diff --git a/scripts/build b/scripts/build index 5c01751..0760982 100755 --- a/scripts/build +++ b/scripts/build @@ -35,6 +35,7 @@ parser.add_argument( parser.add_argument( "-v", help="Set version number", default="latest", metavar="VERSION" ) +parser.add_argument("-c", help="Set build context", default=None, metavar="CONTEXT") def run_cmd(line: list[str]) -> None: @@ -56,7 +57,12 @@ def run_cmd(line: list[str]) -> None: def build( - image: str, version: str, publish: bool, github: bool, _from: tp.Optional[str] = None + image: str, + version: str, + publish: bool, + github: bool, + _from: tp.Optional[str] = None, + context: tp.Optional[str] = None, ) -> None: cmd: list[str] = [ "docker", @@ -70,8 +76,12 @@ def build( if github: cmd.extend(["--cache-from", f"type=gha,scope={image}"]) cmd.extend(["--cache-to", f"type=gha,mode=max,scope={image}"]) + if context: + cmd.extend(["--build-context", context]) if publish: cmd.extend(["--push"]) + else: + cmd.extend(["--load"]) cmd.extend(["--tag", f"ghcr.io/toltec-dev/{image}:{version}", "."]) run_cmd(cmd) @@ -82,12 +92,12 @@ os.chdir(args.d) workdir = os.getcwd() if args.s: os.chdir(args.s) - build(args.s, args.v, args.p, args.g, requires[args.s]) + build(args.s, args.v, args.p, args.g, requires[args.s], args.c) os.chdir(workdir) else: for i in builds: print(f"Building {i}...") os.chdir(i) - build(i, args.v, args.p, args.g, requires[i]) + build(i, args.v, args.p, args.g, requires[i], args.c) os.chdir(workdir) os.chdir(curdir) diff --git a/toolchain/Dockerfile b/toolchain/Dockerfile index 5554f9b..4b6583f 100644 --- a/toolchain/Dockerfile +++ b/toolchain/Dockerfile @@ -1,7 +1,9 @@ # Essential cross-compiling build tools for the reMarkable -FROM debian:bullseye-slim +FROM debian:bookworm-slim ARG NGCONFIG="arm-remarkable-linux-gnueabihf" +ARG NGCONFIG_AARCH64="aarch64-remarkable-linux-gnu" ARG CHOST="arm-linux-gnueabihf" +ARG CHOST_AARCH64="aarch64-remarkable-linux-gnu" # Install common building tools RUN export DEBIAN_FRONTEND=noninteractive \ @@ -11,18 +13,18 @@ RUN export DEBIAN_FRONTEND=noninteractive \ ca-certificates \ cmake \ curl \ - gcc-10 \ - g++-10 \ + gcc-11 \ + g++-11 \ meson \ pkg-config \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt \ - # Force use of gcc and g++ 10 - && update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10 \ - --slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-10 \ - --slave /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-10 \ - --slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-10 \ - --slave /usr/bin/g++ g++ /usr/bin/g++-10 + # Force use of gcc and g++ 11 + && update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 11 \ + --slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-11 \ + --slave /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-11 \ + --slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-11 \ + --slave /usr/bin/g++ g++ /usr/bin/g++-11 # Build latest crosstool-ng and use it to build the toolchain COPY crosstool-ng "/$NGCONFIG" @@ -40,27 +42,53 @@ RUN export DEBIAN_FRONTEND=noninteractive \ help2man \ libncurses-dev \ libtool-bin \ + rsync \ texinfo \ unzip \ # Build crosstool-ng itself && cd /root \ && git clone https://github.com/crosstool-ng/crosstool-ng \ && cd crosstool-ng \ - && git checkout a21748bd5342b72ddf5bfef782e058c3245161f7 \ + && git checkout cf25b4edb096c9b815daa202968c15906b8047e5 \ && mv "/$NGCONFIG" samples \ + && cp "samples/$NGCONFIG/0004-fix-glibc-dso-link.patch" packages/glibc/2.35/ \ && ./bootstrap \ && ./configure --enable-local \ - && make \ + && make -j$(nproc) \ # Build the toolchain and install it in the following folder && export CT_PREFIX="/opt/x-tools" \ && ./ct-ng "$NGCONFIG" \ - && ./ct-ng build \ + && ./ct-ng build.$(nproc) \ && cd .. \ # Clean up && rm -rf crosstool-ng \ - && find "/opt/x-tools/$NGCONFIG/$NGCONFIG" -type l,f -name "*.la" \ - | xargs --no-run-if-empty rm \ + && find "/opt/x-tools/$NGCONFIG/$NGCONFIG" -type l,f -name "*.la" -delete \ && rm "/opt/x-tools/$NGCONFIG/build.log.bz2" \ + # Build the aarch64 toolchain + && cd /root \ + && git clone https://github.com/NiLuJe/crosstool-ng \ + && cd crosstool-ng \ + && git checkout 7396dbf0a0c0883b1ead50dd442b45a646c21618 \ + && echo "CT_ALLOW_BUILD_AS_ROOT=y" >> samples/$NGCONFIG_AARCH64/crosstool.config \ + && echo "CT_ALLOW_BUILD_AS_ROOT_SURE=y" >> samples/$NGCONFIG_AARCH64/crosstool.config \ + && echo "CT_GCC_V_11=y" >> samples/$NGCONFIG_AARCH64/crosstool.config \ + && echo "CT_LOG_PROGRESS_BAR=n" >> samples/$NGCONFIG_AARCH64/crosstool.config \ + && ./bootstrap \ + && ./configure --enable-local \ + && make -j$(nproc) \ + # Build the toolchain and install it in the following folder + && export CT_PREFIX="/opt/x-tools" \ + && ./ct-ng "$NGCONFIG_AARCH64" \ + && ./ct-ng oldconfig \ + && ./ct-ng upgradeconfig \ + # Disable because GNU Savannah is very unstable + # && ./ct-ng updatetools \ + && ./ct-ng build.$(nproc) \ + && cd .. \ + # Clean up + && rm -rf crosstool-ng \ + && find "/opt/x-tools/$NGCONFIG_AARCH64/$NGCONFIG_AARCH64" -type l,f -name "*.la" -delete \ + && rm "/opt/x-tools/$NGCONFIG_AARCH64/build.log.bz2" \ && apt-get autoremove -y \ autoconf \ automake \ @@ -72,6 +100,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ help2man \ libncurses-dev \ libtool-bin \ + rsync \ texinfo \ unzip \ && apt-get clean \ @@ -90,15 +119,14 @@ RUN export DEBIAN_FRONTEND=noninteractive \ libssl-dev \ libtool-bin \ && cd /root \ - && git clone https://git.yoctoproject.org/git/opkg \ + && git clone --depth 1 --branch v0.4.5 https://git.yoctoproject.org/git/opkg \ && cd opkg \ - && git checkout 532bdf544ae598aa68a8c6dfd05c280d2a04e837 \ && ./autogen.sh \ && ./configure \ --enable-sha256 \ --prefix=/ \ --exec-prefix=/usr \ - && make \ + && make -j$(nproc) \ && make install \ && cd .. \ # Clean up @@ -121,17 +149,45 @@ ENV ARCH=arm \ PKG_CONFIG_LIBDIR="/opt/x-tools/$NGCONFIG/$NGCONFIG/sysroot/usr/lib/pkgconfig:/opt/x-tools/$NGCONFIG/$NGCONFIG/sysroot/lib/pkgconfig:/opt/x-tools/$NGCONFIG/$NGCONFIG/sysroot/opt/lib/pkgconfig" \ PKG_CONFIG_SYSROOT_DIR="/opt/x-tools/$NGCONFIG/$NGCONFIG/sysroot" \ SYSROOT="/opt/x-tools/$NGCONFIG/$NGCONFIG/sysroot" \ + SYSROOT_AARCH64="/opt/x-tools/$NGCONFIG_AARCH64/$NGCONFIG_AARCH64/sysroot" \ NGCONFIG="$NGCONFIG" \ TARGET_PREFIX="$CHOST" + +RUN touch /opt/x-tools/switch-arm.sh && chmod +x /opt/x-tools/switch-arm.sh && cat < /opt/x-tools/switch-arm.sh +export ARCH=arm +export CHOST="$CHOST" +export CROSS_COMPILE="$CHOST-" +export PKG_CONFIG_LIBDIR="/opt/x-tools/$NGCONFIG/$NGCONFIG/sysroot/usr/lib/pkgconfig:/opt/x-tools/$NGCONFIG/$NGCONFIG/sysroot/lib/pkgconfig:/opt/x-tools/$NGCONFIG/$NGCONFIG/sysroot/opt/lib/pkgconfig" +export PKG_CONFIG_SYSROOT_DIR="/opt/x-tools/$NGCONFIG/$NGCONFIG/sysroot" +SYSROOT="/opt/x-tools/$NGCONFIG/$NGCONFIG/sysroot" +NGCONFIG="$NGCONFIG" +export TARGET_PREFIX="$CHOST" +EOF + +RUN touch /opt/x-tools/switch-aarch64.sh && chmod +x /opt/x-tools/switch-aarch64.sh && cat < /opt/x-tools/switch-aarch64.sh +export ARCH=aarch64 +export CHOST="$CHOST_AARCH64" +export CROSS_COMPILE="$CHOST_AARCH64-" +export PATH="$PATH:/opt/x-tools/$NGCONFIG_AARCH64/bin" +export PKG_CONFIG_LIBDIR="/opt/x-tools/$NGCONFIG_AARCH64/$NGCONFIG_AARCH64/sysroot/usr/lib/pkgconfig:/opt/x-tools/$NGCONFIG_AARCH64/$NGCONFIG_AARCH64/sysroot/lib/pkgconfig:/opt/x-tools/$NGCONFIG_AARCH64/$NGCONFIG_AARCH64/sysroot/opt/lib/pkgconfig" +export PKG_CONFIG_SYSROOT_DIR="/opt/x-tools/$NGCONFIG_AARCH64/$NGCONFIG_AARCH64/sysroot" +export SYSROOT="/opt/x-tools/$NGCONFIG_AARCH64/$NGCONFIG_AARCH64/sysroot" +export NGCONFIG="$NGCONFIG_AARCH64" +export TARGET_PREFIX="$CHOST_AARCH64" +EOF # Configure Opkg COPY opkg /opt/x-tools/$NGCONFIG/$NGCONFIG/sysroot/etc/opkg +COPY opkg-aarch64 /opt/x-tools/$NGCONFIG_AARCH64/$NGCONFIG_AARCH64/sysroot/etc/opkg RUN mv /usr/bin/opkg /usr/bin/opkg-bin \ && printf "#!/bin/bash\n/usr/bin/opkg-bin --offline-root \"$SYSROOT\" --host-cache-dir \"\$@\"\n" > /usr/bin/opkg \ + && printf "#!/bin/bash\n/usr/bin/opkg-bin --offline-root \"$SYSROOT_AARCH64\" --host-cache-dir \"\$@\"\n" > /usr/bin/opkg-aarch64 \ && chmod +x /usr/bin/opkg \ && mkdir /repo \ && touch /repo/Packages.gz # Add cross-compiling configuration for common build systems COPY "meson/$CHOST" "/usr/share/meson/cross/$CHOST" +COPY "meson/$CHOST_AARCH64" "/usr/share/meson/cross/$CHOST_AARCH64" COPY "cmake/$CHOST.cmake" "/usr/share/cmake/$CHOST.cmake" +COPY "cmake/$CHOST_AARCH64.cmake" "/usr/share/cmake/$CHOST_AARCH64.cmake" diff --git a/toolchain/cmake/aarch64-remarkable-linux-gnu.cmake b/toolchain/cmake/aarch64-remarkable-linux-gnu.cmake new file mode 100644 index 0000000..2b0eb79 --- /dev/null +++ b/toolchain/cmake/aarch64-remarkable-linux-gnu.cmake @@ -0,0 +1,12 @@ +set(CMAKE_SYSTEM_NAME Linux) +set(CMAKE_SYSTEM_PROCESSOR aarch64) + +set(CMAKE_SYSROOT $ENV{SYSROOT}) + +set(CMAKE_C_COMPILER aarch64-remarkable-linux-gnu-gcc) +set(CMAKE_CXX_COMPILER aarch64-remarkable-linux-gnu-g++) + +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) diff --git a/toolchain/crosstool-ng/0004-fix-glibc-dso-link.patch b/toolchain/crosstool-ng/0004-fix-glibc-dso-link.patch new file mode 100644 index 0000000..f9e2a13 --- /dev/null +++ b/toolchain/crosstool-ng/0004-fix-glibc-dso-link.patch @@ -0,0 +1,24 @@ +This change ported from 2.31 patch adding support for ARC architecture: +https://github.com/crosstool-ng/crosstool-ng/blob/cf25b4edb096c9b815daa202968c15906b8047e5/packages/glibc/2.31/0001-Add-ARC-architecture.patch#L368-L382 + +The patch is not included in glibc >2.31, and on gcc 10 the build fails with something among these lines: + +/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/10/libstdc++.so: undefined reference to `arc4random@GLIBC_2.36' + +Skipping C++ DSO linking in support tests seems to fix the issue. + +--- a/support/Makefile ++++ b/support/Makefile +@@ -235,12 +235,7 @@ CFLAGS-support_paths.c = \ + CFLAGS-timespec.c += -fexcess-precision=standard + CFLAGS-timespec-time64.c += -fexcess-precision=standard + +-ifeq (,$(CXX)) + LINKS_DSO_PROGRAM = links-dso-program-c +-else +-LINKS_DSO_PROGRAM = links-dso-program +-LDLIBS-links-dso-program = -lstdc++ -lgcc -lgcc_s $(libunwind) +-endif + + ifeq (yes,$(have-selinux)) + LDLIBS-$(LINKS_DSO_PROGRAM) += -lselinux diff --git a/toolchain/crosstool-ng/crosstool.config b/toolchain/crosstool-ng/crosstool.config index b4976ce..cbb303c 100644 --- a/toolchain/crosstool-ng/crosstool.config +++ b/toolchain/crosstool-ng/crosstool.config @@ -1,11 +1,9 @@ # # Automatically generated file; DO NOT EDIT. -# crosstool-NG 1.24.0.535_74d6f26 Configuration +# crosstool-NG 1.26.0_rc1.2_cf25b4e Configuration # CT_CONFIGURE_has_static_link=y CT_CONFIGURE_has_cxx11=y -CT_CONFIGURE_has_lzip=y -CT_CONFIGURE_has_wget=y CT_CONFIGURE_has_curl=y CT_CONFIGURE_has_meson=y CT_CONFIGURE_has_ninja=y @@ -20,16 +18,15 @@ CT_CONFIGURE_has_automake_1_15_or_newer=y CT_CONFIGURE_has_gnu_m4_1_4_12_or_newer=y CT_CONFIGURE_has_python_3_4_or_newer=y CT_CONFIGURE_has_bison_2_7_or_newer=y +CT_CONFIGURE_has_bison_3_0_4_or_newer=y CT_CONFIGURE_has_python=y -CT_CONFIGURE_has_dtc=y -CT_CONFIGURE_has_svn=y CT_CONFIGURE_has_git=y CT_CONFIGURE_has_md5sum=y CT_CONFIGURE_has_sha1sum=y CT_CONFIGURE_has_sha256sum=y CT_CONFIGURE_has_sha512sum=y CT_CONFIGURE_has_install_with_strip_program=y -CT_VERSION="1.24.0.535_74d6f26" +CT_VERSION="1.26.0_rc1.2_cf25b4e" CT_VCHECK="" CT_CONFIG_VERSION_ENV="4" CT_CONFIG_VERSION_CURRENT="4" @@ -47,6 +44,7 @@ CT_MODULES=y CT_EXPERIMENTAL=y CT_ALLOW_BUILD_AS_ROOT=y CT_ALLOW_BUILD_AS_ROOT_SURE=y +# CT_ENABLE_EXPERIMENTAL_BUNDLED_PATCHES is not set # CT_DEBUG_CT is not set # @@ -65,17 +63,17 @@ CT_INSTALL_LICENSES=y CT_PREFIX_DIR_RO=y CT_STRIP_HOST_TOOLCHAIN_EXECUTABLES=y # CT_STRIP_TARGET_TOOLCHAIN_EXECUTABLES is not set +# CT_TARBALL_RESULT is not set # # Downloading # -CT_DOWNLOAD_AGENT_WGET=y -# CT_DOWNLOAD_AGENT_CURL is not set +CT_DOWNLOAD_AGENT_CURL=y # CT_DOWNLOAD_AGENT_NONE is not set # CT_FORBID_DOWNLOAD is not set # CT_FORCE_DOWNLOAD is not set CT_CONNECT_TIMEOUT=10 -CT_DOWNLOAD_WGET_OPTIONS="--passive-ftp --tries=3 -nc --progress=dot:binary" +CT_DOWNLOAD_CURL_OPTIONS="--location --ftp-pasv --retry 3 --fail --silent" # CT_ONLY_DOWNLOAD is not set # CT_USE_MIRROR is not set CT_VERIFY_DOWNLOAD_DIGEST=y @@ -139,7 +137,9 @@ CT_LOG_FILE_COMPRESS=y # CT_ARCH_ARC is not set CT_ARCH_ARM=y # CT_ARCH_AVR is not set +# CT_ARCH_BPF is not set # CT_ARCH_C6X is not set +# CT_ARCH_LOONGARCH is not set # CT_ARCH_M68K is not set # CT_ARCH_MICROBLAZE is not set # CT_ARCH_MIPS is not set @@ -170,7 +170,7 @@ CT_ARCH_ARM_MODE_ARM=y CT_ARCH_ARM_EABI_FORCE=y CT_ARCH_ARM_EABI=y CT_ARCH_ARM_TUPLE_USE_EABIHF=y -CT_ALL_ARCH_CHOICES="ALPHA ARC ARM AVR C6X M68K MICROBLAZE MIPS MOXIE MSP430 NIOS2 POWERPC PRU RISCV S390 SH SPARC X86 XTENSA" +CT_ALL_ARCH_CHOICES="ALPHA ARC ARM AVR BPF C6X LOONGARCH M68K MICROBLAZE MIPS MOXIE MSP430 NIOS2 POWERPC PRU RISCV S390 SH SPARC X86 XTENSA" CT_ARCH_SUFFIX="" # CT_OMIT_TARGET_VENDOR is not set @@ -183,6 +183,7 @@ CT_ARCH_SUPPORTS_BOTH_MMU=y CT_ARCH_DEFAULT_HAS_MMU=y CT_ARCH_USE_MMU=y CT_ARCH_SUPPORTS_FLAT_FORMAT=y +CT_ARCH_SUPPORTS_LIBSANITIZER=y CT_ARCH_SUPPORTS_EITHER_ENDIAN=y CT_ARCH_DEFAULT_LE=y # CT_ARCH_BE is not set @@ -291,6 +292,14 @@ CT_LINUX_PATCH_GLOBAL=y # CT_LINUX_PATCH_LOCAL_BUNDLED is not set # CT_LINUX_PATCH_NONE is not set CT_LINUX_PATCH_ORDER="global" +# CT_LINUX_V_6_4 is not set +# CT_LINUX_V_6_3 is not set +# CT_LINUX_V_6_2 is not set +# CT_LINUX_V_6_1 is not set +# CT_LINUX_V_6_0 is not set +# CT_LINUX_V_5_19 is not set +# CT_LINUX_V_5_18 is not set +# CT_LINUX_V_5_17 is not set # CT_LINUX_V_5_16 is not set # CT_LINUX_V_5_15 is not set # CT_LINUX_V_5_14 is not set @@ -326,16 +335,20 @@ CT_LINUX_V_5_4=y # CT_LINUX_V_3_10 is not set # CT_LINUX_V_3_4 is not set # CT_LINUX_V_3_2 is not set -CT_LINUX_VERSION="5.4.70" +CT_LINUX_VERSION="5.4.248" CT_LINUX_MIRRORS="$(CT_Mirrors kernel.org linux ${CT_LINUX_VERSION})" CT_LINUX_ARCHIVE_FILENAME="@{pkg_name}-@{version}" CT_LINUX_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" CT_LINUX_ARCHIVE_FORMATS=".tar.xz .tar.gz" CT_LINUX_SIGNATURE_FORMAT="unpacked/.sign" +CT_LINUX_5_19_or_older=y +CT_LINUX_older_than_5_19=y CT_LINUX_5_12_or_older=y CT_LINUX_older_than_5_12=y -CT_LINUX_5_4_or_older=y -CT_LINUX_older_than_5_4=y +CT_LINUX_5_5_or_older=y +CT_LINUX_older_than_5_5=y +CT_LINUX_later_than_5_3=y +CT_LINUX_5_3_or_later=y CT_LINUX_later_than_4_8=y CT_LINUX_4_8_or_later=y CT_LINUX_later_than_3_7=y @@ -386,6 +399,8 @@ CT_BINUTILS_PATCH_GLOBAL=y # CT_BINUTILS_PATCH_LOCAL_BUNDLED is not set # CT_BINUTILS_PATCH_NONE is not set CT_BINUTILS_PATCH_ORDER="global" +# CT_BINUTILS_V_2_40 is not set +# CT_BINUTILS_V_2_39 is not set # CT_BINUTILS_V_2_38 is not set # CT_BINUTILS_V_2_37 is not set CT_BINUTILS_V_2_36=y @@ -405,6 +420,8 @@ CT_BINUTILS_ARCHIVE_FILENAME="@{pkg_name}-@{version}" CT_BINUTILS_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" CT_BINUTILS_ARCHIVE_FORMATS=".tar.xz .tar.bz2 .tar.gz" CT_BINUTILS_SIGNATURE_FORMAT="packed/.sig" +CT_BINUTILS_2_39_or_older=y +CT_BINUTILS_older_than_2_39=y CT_BINUTILS_later_than_2_30=y CT_BINUTILS_2_30_or_later=y CT_BINUTILS_later_than_2_27=y @@ -437,13 +454,11 @@ CT_ALL_BINUTILS_CHOICES="BINUTILS" # # C-library # -# CT_LIBC_BIONIC is not set CT_LIBC_GLIBC=y # CT_LIBC_MUSL is not set # CT_LIBC_UCLIBC_NG is not set CT_LIBC="glibc" CT_LIBC_CHOICE_KSYM="GLIBC" -CT_THREADS="nptl" CT_LIBC_GLIBC_SHOW=y # @@ -465,11 +480,14 @@ CT_GLIBC_PATCH_GLOBAL=y # CT_GLIBC_PATCH_LOCAL_BUNDLED is not set # CT_GLIBC_PATCH_NONE is not set CT_GLIBC_PATCH_ORDER="global" -# CT_GLIBC_V_2_35 is not set +# CT_GLIBC_V_2_38 is not set +# CT_GLIBC_V_2_37 is not set +# CT_GLIBC_V_2_36 is not set +CT_GLIBC_V_2_35=y # CT_GLIBC_V_2_34 is not set # CT_GLIBC_V_2_33 is not set # CT_GLIBC_V_2_32 is not set -CT_GLIBC_V_2_31=y +# CT_GLIBC_V_2_31 is not set # CT_GLIBC_V_2_30 is not set # CT_GLIBC_V_2_29 is not set # CT_GLIBC_V_2_28 is not set @@ -480,15 +498,24 @@ CT_GLIBC_V_2_31=y # CT_GLIBC_V_2_23 is not set # CT_GLIBC_V_2_19 is not set # CT_GLIBC_V_2_17 is not set -# CT_GLIBC_V_2_12_1 is not set -CT_GLIBC_VERSION="2.31" +CT_GLIBC_VERSION="2.35" CT_GLIBC_MIRRORS="$(CT_Mirrors GNU glibc)" CT_GLIBC_ARCHIVE_FILENAME="@{pkg_name}-@{version}" CT_GLIBC_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" CT_GLIBC_ARCHIVE_FORMATS=".tar.xz .tar.bz2 .tar.gz" CT_GLIBC_SIGNATURE_FORMAT="packed/.sig" -CT_GLIBC_2_32_or_older=y -CT_GLIBC_older_than_2_32=y +CT_GLIBC_2_38_or_older=y +CT_GLIBC_older_than_2_38=y +CT_GLIBC_2_37_or_older=y +CT_GLIBC_older_than_2_37=y +CT_GLIBC_2_36_or_older=y +CT_GLIBC_older_than_2_36=y +CT_GLIBC_later_than_2_34=y +CT_GLIBC_2_34_or_later=y +CT_GLIBC_later_than_2_32=y +CT_GLIBC_2_32_or_later=y +CT_GLIBC_later_than_2_31=y +CT_GLIBC_2_31_or_later=y CT_GLIBC_later_than_2_30=y CT_GLIBC_2_30_or_later=y CT_GLIBC_later_than_2_29=y @@ -515,15 +542,15 @@ CT_GLIBC_DEP_KERNEL_HEADERS_VERSION=y CT_GLIBC_DEP_BINUTILS=y CT_GLIBC_DEP_GCC=y CT_GLIBC_DEP_PYTHON=y +CT_THREADS="nptl" CT_GLIBC_BUILD_SSP=y CT_GLIBC_HAS_LIBIDN_ADDON=y CT_GLIBC_USE_LIBIDN_ADDON=y CT_GLIBC_NO_SPARC_V8=y -CT_GLIBC_HAS_OBSOLETE_RPC=y CT_GLIBC_EXTRA_CONFIG_ARRAY="" CT_GLIBC_CONFIGPARMS="" +# CT_GLIBC_ENABLE_DEBUG is not set CT_GLIBC_EXTRA_CFLAGS="" -CT_GLIBC_ENABLE_OBSOLETE_RPC=y # CT_GLIBC_ENABLE_FORTIFIED_BUILD is not set # CT_GLIBC_DISABLE_VERSIONING is not set CT_GLIBC_OLDEST_ABI="" @@ -531,39 +558,39 @@ CT_GLIBC_FORCE_UNWIND=y CT_GLIBC_LOCALES=y # -# WARNING! +# WARNING! # # -# | The built locales will be usable if and only if the build +# | The built locales will be usable if and only if the build # # -# | machine and the target: +# | machine and the target: # # -# | - have the same endianness, +# | - have the same endianness, # # -# | - and have the same alignment requirements for uint32_t. +# | - and have the same alignment requirements for uint32_t. # # -# | You will have to check by yourself (for now). +# | You will have to check by yourself (for now). # # -# WARNING! +# WARNING! # # -# | Building GLIBC locales requires that GLIBC supports +# | Building GLIBC locales requires that GLIBC supports # # -# | the build machine as the target. +# | the build machine as the target. # CT_GLIBC_KERNEL_VERSION_NONE=y # CT_GLIBC_KERNEL_VERSION_AS_HEADERS is not set @@ -576,7 +603,7 @@ CT_GLIBC_SSP_DEFAULT=y # CT_GLIBC_SSP_STRONG is not set CT_GLIBC_ENABLE_WERROR=y # CT_GLIBC_ENABLE_COMMON_FLAG is not set -CT_ALL_LIBC_CHOICES="AVR_LIBC BIONIC GLIBC MINGW_W64 MOXIEBOX MUSL NEWLIB NONE UCLIBC_NG" +CT_ALL_LIBC_CHOICES="AVR_LIBC GLIBC MINGW_W64 MOXIEBOX MUSL NEWLIB NONE PICOLIBC UCLIBC_NG" CT_LIBC_SUPPORT_THREADS_ANY=y CT_LIBC_SUPPORT_THREADS_NATIVE=y @@ -595,6 +622,8 @@ CT_CC_CORE_NEEDED=y CT_CC_SUPPORT_CXX=y CT_CC_SUPPORT_FORTRAN=y CT_CC_SUPPORT_ADA=y +CT_CC_SUPPORT_D=y +CT_CC_SUPPORT_JIT=y CT_CC_SUPPORT_OBJC=y CT_CC_SUPPORT_OBJCXX=y CT_CC_SUPPORT_GOLANG=y @@ -610,6 +639,7 @@ CT_CC_GCC_PKG_KSYM="GCC" CT_GCC_DIR_NAME="gcc" CT_GCC_USE_GNU=y # CT_GCC_USE_LINARO is not set +# CT_GCC_USE_ORACLE is not set CT_GCC_USE="GCC" CT_GCC_PKG_NAME="gcc" CT_GCC_SRC_RELEASE=y @@ -622,18 +652,24 @@ CT_GCC_PATCH_GLOBAL=y # CT_GCC_PATCH_LOCAL_BUNDLED is not set # CT_GCC_PATCH_NONE is not set CT_GCC_PATCH_ORDER="global" +# CT_GCC_V_13 is not set +# CT_GCC_V_12 is not set # CT_GCC_V_11 is not set -CT_GCC_V_10=y +CT_GCC_V_11=y # CT_GCC_V_9 is not set # CT_GCC_V_8 is not set # CT_GCC_V_7 is not set # CT_GCC_V_6 is not set -CT_GCC_VERSION="10.3.0" +CT_GCC_VERSION="10.5.0" CT_GCC_MIRRORS="$(CT_Mirrors GNU gcc/gcc-${CT_GCC_VERSION}) $(CT_Mirrors sourceware gcc/releases/gcc-${CT_GCC_VERSION})" CT_GCC_ARCHIVE_FILENAME="@{pkg_name}-@{version}" CT_GCC_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" CT_GCC_ARCHIVE_FORMATS=".tar.xz .tar.gz" CT_GCC_SIGNATURE_FORMAT="" +CT_GCC_13_or_older=y +CT_GCC_older_than_13=y +CT_GCC_12_or_older=y +CT_GCC_older_than_12=y CT_GCC_11_or_older=y CT_GCC_older_than_11=y CT_GCC_later_than_10=y @@ -673,12 +709,14 @@ CT_CC_GCC_LTO_ZSTD=m # # Settings for libraries running on target # +# CT_CC_GCC_ENABLE_DEFAULT_PIE is not set # CT_CC_GCC_ENABLE_TARGET_OPTSPACE is not set # CT_CC_GCC_LIBMUDFLAP is not set # CT_CC_GCC_LIBGOMP is not set # CT_CC_GCC_LIBSSP is not set # CT_CC_GCC_LIBQUADMATH is not set # CT_CC_GCC_LIBSANITIZER is not set +CT_CC_GCC_LIBSTDCXX_VERBOSE=m # # Misc. obscure options. @@ -706,7 +744,9 @@ CT_ALL_CC_CHOICES="GCC" # CT_CC_LANG_CXX=y # CT_CC_LANG_FORTRAN is not set +# CT_CC_LANG_JIT is not set # CT_CC_LANG_ADA is not set +# CT_CC_LANG_D is not set # CT_CC_LANG_OBJC is not set # CT_CC_LANG_OBJCXX is not set # CT_CC_LANG_GOLANG is not set @@ -731,6 +771,8 @@ CT_GDB_PATCH_GLOBAL=y # CT_GDB_PATCH_LOCAL_BUNDLED is not set # CT_GDB_PATCH_NONE is not set CT_GDB_PATCH_ORDER="global" +# CT_GDB_V_13 is not set +# CT_GDB_V_12 is not set CT_GDB_V_11=y # CT_GDB_V_10 is not set # CT_GDB_V_9 is not set @@ -741,18 +783,16 @@ CT_GDB_ARCHIVE_FILENAME="@{pkg_name}-@{version}" CT_GDB_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" CT_GDB_ARCHIVE_FORMATS=".tar.xz .tar.gz" CT_GDB_SIGNATURE_FORMAT="" +CT_GDB_13_or_older=y +CT_GDB_older_than_13=y +CT_GDB_12_or_older=y +CT_GDB_older_than_12=y CT_GDB_later_than_11=y CT_GDB_11_or_later=y CT_GDB_later_than_10=y CT_GDB_10_or_later=y CT_GDB_later_than_8_3=y CT_GDB_8_3_or_later=y -CT_GDB_later_than_8_0=y -CT_GDB_8_0_or_later=y -CT_GDB_later_than_7_12=y -CT_GDB_7_12_or_later=y -CT_GDB_later_than_7_11=y -CT_GDB_7_11_or_later=y CT_GDB_CROSS=y # CT_GDB_CROSS_STATIC is not set # CT_GDB_CROSS_SIM is not set @@ -786,8 +826,8 @@ CT_EXPAT_PATCH_GLOBAL=y # CT_EXPAT_PATCH_LOCAL_BUNDLED is not set # CT_EXPAT_PATCH_NONE is not set CT_EXPAT_PATCH_ORDER="global" -CT_EXPAT_V_2_4=y -CT_EXPAT_VERSION="2.4.1" +CT_EXPAT_V_2_5=y +CT_EXPAT_VERSION="2.5.0" CT_EXPAT_MIRRORS="http://downloads.sourceforge.net/project/expat/expat/${CT_EXPAT_VERSION} https://github.com/libexpat/libexpat/releases/download/R_${CT_EXPAT_VERSION//./_}" CT_EXPAT_ARCHIVE_FILENAME="@{pkg_name}-@{version}" CT_EXPAT_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" @@ -854,7 +894,10 @@ CT_ISL_PATCH_GLOBAL=y # CT_ISL_PATCH_LOCAL_BUNDLED is not set # CT_ISL_PATCH_NONE is not set CT_ISL_PATCH_ORDER="global" +# CT_ISL_V_0_26 is not set +# CT_ISL_V_0_25 is not set # CT_ISL_V_0_24 is not set +# CT_ISL_V_0_23 is not set CT_ISL_V_0_22=y # CT_ISL_V_0_21 is not set # CT_ISL_V_0_20 is not set @@ -863,7 +906,7 @@ CT_ISL_V_0_22=y # CT_ISL_V_0_17 is not set # CT_ISL_V_0_16 is not set # CT_ISL_V_0_15 is not set -CT_ISL_VERSION="0.22" +CT_ISL_VERSION="0.22.1" CT_ISL_MIRRORS="https://libisl.sourceforge.io" CT_ISL_ARCHIVE_FILENAME="@{pkg_name}-@{version}" CT_ISL_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" @@ -913,7 +956,7 @@ CT_MPC_PATCH_ORDER="global" CT_MPC_V_1_2=y # CT_MPC_V_1_1 is not set # CT_MPC_V_1_0 is not set -CT_MPC_VERSION="1.2.0" +CT_MPC_VERSION="1.2.1" CT_MPC_MIRRORS="http://www.multiprecision.org/downloads $(CT_Mirrors GNU mpc)" CT_MPC_ARCHIVE_FILENAME="@{pkg_name}-@{version}" CT_MPC_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" @@ -960,6 +1003,7 @@ CT_NCURSES_PATCH_GLOBAL=y # CT_NCURSES_PATCH_LOCAL_BUNDLED is not set # CT_NCURSES_PATCH_NONE is not set CT_NCURSES_PATCH_ORDER="global" +# CT_NCURSES_V_6_4 is not set CT_NCURSES_V_6_2=y # CT_NCURSES_V_6_1 is not set # CT_NCURSES_V_6_0 is not set @@ -990,14 +1034,36 @@ CT_ZLIB_PATCH_GLOBAL=y # CT_ZLIB_PATCH_LOCAL_BUNDLED is not set # CT_ZLIB_PATCH_NONE is not set CT_ZLIB_PATCH_ORDER="global" -CT_ZLIB_V_1_2_11=y -CT_ZLIB_VERSION="1.2.11" -CT_ZLIB_MIRRORS="http://downloads.sourceforge.net/project/libpng/zlib/${CT_ZLIB_VERSION} https://www.zlib.net/" +CT_ZLIB_V_1_2_13=y +CT_ZLIB_VERSION="1.2.13" +CT_ZLIB_MIRRORS="https://github.com/madler/zlib/releases/download/v${CT_ZLIB_VERSION} https://www.zlib.net/" CT_ZLIB_ARCHIVE_FILENAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_FORMATS=".tar.xz .tar.gz" CT_ZLIB_SIGNATURE_FORMAT="packed/.asc" -CT_ALL_COMP_LIBS_CHOICES="CLOOG EXPAT GETTEXT GMP GNUPRUMCU ISL LIBELF LIBICONV MPC MPFR NCURSES NEWLIB_NANO PICOLIBC ZLIB" +CT_COMP_LIBS_ZSTD=y +CT_COMP_LIBS_ZSTD_PKG_KSYM="ZSTD" +CT_ZSTD_DIR_NAME="zstd" +CT_ZSTD_PKG_NAME="zstd" +CT_ZSTD_SRC_RELEASE=y +# CT_ZSTD_SRC_DEVEL is not set +# CT_ZSTD_SRC_CUSTOM is not set +CT_ZSTD_PATCH_GLOBAL=y +# CT_ZSTD_PATCH_BUNDLED is not set +# CT_ZSTD_PATCH_LOCAL is not set +# CT_ZSTD_PATCH_BUNDLED_LOCAL is not set +# CT_ZSTD_PATCH_LOCAL_BUNDLED is not set +# CT_ZSTD_PATCH_NONE is not set +CT_ZSTD_PATCH_ORDER="global" +CT_ZSTD_V_1_5_5=y +# CT_ZSTD_V_1_5_2 is not set +CT_ZSTD_VERSION="1.5.5" +CT_ZSTD_MIRRORS="https://github.com/facebook/zstd/releases/download/v${CT_ZSTD_VERSION} https://www.zstd.net/" +CT_ZSTD_ARCHIVE_FILENAME="@{pkg_name}-@{version}" +CT_ZSTD_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" +CT_ZSTD_ARCHIVE_FORMATS=".tar.gz" +CT_ZSTD_SIGNATURE_FORMAT="packed/.sig" +CT_ALL_COMP_LIBS_CHOICES="CLOOG EXPAT GETTEXT GMP GNUPRUMCU ISL LIBELF LIBICONV MPC MPFR NCURSES NEWLIB_NANO PICOLIBC ZLIB ZSTD" CT_LIBICONV_NEEDED=y CT_GETTEXT_NEEDED=y CT_GMP_NEEDED=y @@ -1010,6 +1076,7 @@ CT_EXPAT_TARGET=y CT_NCURSES_NEEDED=y CT_NCURSES_TARGET=y CT_ZLIB_NEEDED=y +CT_ZSTD_NEEDED=y CT_LIBICONV=y CT_GETTEXT=y CT_GMP=y @@ -1019,6 +1086,7 @@ CT_MPC=y CT_EXPAT=y CT_NCURSES=y CT_ZLIB=y +CT_ZSTD=y # end of Companion libraries # diff --git a/toolchain/meson/aarch64-remarkable-linux-gnu b/toolchain/meson/aarch64-remarkable-linux-gnu new file mode 100644 index 0000000..68ffa77 --- /dev/null +++ b/toolchain/meson/aarch64-remarkable-linux-gnu @@ -0,0 +1,15 @@ +[properties] +sys_root = '/opt/x-tools/aarch64-remarkable-linux-gnu/aarch64-remarkable-linux-gnu/sysroot' + +[host_machine] +system = 'linux' +cpu_family = 'aarch64' +cpu = 'armv8' +endian = 'little' + +[binaries] +c = 'aarch64-remarkable-linux-gnu-gcc' +cpp = 'aarch64-remarkable-linux-gnu-g++' +ar = 'aarch64-remarkable-linux-gnu-ar' +strip = 'aarch64-remarkable-linux-gnu-strip' +pkgconfig = 'pkg-config' diff --git a/toolchain/opkg-aarch64/opkg.conf b/toolchain/opkg-aarch64/opkg.conf new file mode 100644 index 0000000..d3756d3 --- /dev/null +++ b/toolchain/opkg-aarch64/opkg.conf @@ -0,0 +1,5 @@ +src/gz entware https://bin.entware.net/aarch64-k3.10 +src/gz local file:///repo +dest root / +arch all 100 +arch aarch64-3.10 160