From 58b0b51b4d358c940c402c635c36848abd353267 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Mon, 28 Apr 2025 12:04:06 +0900 Subject: [PATCH 01/56] Initial support for >=3.6 firmwares, toolchain v4.x This updates all libraries in toolchain/base images according to 3.6.0.1865 firmware. Includes patches for glibc 2.35 (to be upstreamed) and for breakpad. Updated crosstool-ng to latest master and regerated crosstool.config using it. --- README.md | 2 +- base/Dockerfile | 89 +++++---- .../breakpad-216cea7bca-fix-int-type.patch | 18 ++ base/patch/systemd-244-15762.patch | 69 ------- base/patch/systemd-244-20633.patch | 13 -- toolchain/Dockerfile | 11 +- .../0004-fix-glibc-dso-link.patch | 24 +++ toolchain/crosstool-ng/crosstool.config | 170 ++++++++++++------ 8 files changed, 209 insertions(+), 187 deletions(-) create mode 100644 base/patch/breakpad-216cea7bca-fix-int-type.patch delete mode 100644 base/patch/systemd-244-15762.patch delete mode 100644 base/patch/systemd-244-20633.patch create mode 100644 toolchain/crosstool-ng/0004-fix-glibc-dso-link.patch 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..30719c9 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -2,7 +2,9 @@ ARG FROM FROM $FROM -# Build libcap 2.32 targeting armhf +COPY patch/* / + +# Build libcap 2.66 targeting armhf RUN export DEBIAN_FRONTEND=noninteractive \ # Install build dependencies && apt-get update -y \ @@ -10,12 +12,10 @@ 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" \ @@ -33,7 +33,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,9 +46,8 @@ 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" \ @@ -56,7 +55,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && 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 +66,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 +76,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 +95,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,9 +116,8 @@ 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 \ @@ -132,16 +125,15 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && 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 \ && 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,36 +141,34 @@ 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 \ && 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.7 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.7.tar.gz -o openssl.tar.gz \ + && echo "83049d042a260e696f62406ac5c08bf706fd84383f945cf21bd61e9ed95c396e 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 DESTDIR="$SYSROOT" install_sw \ @@ -186,26 +176,25 @@ RUN export DEBIAN_FRONTEND=noninteractive \ # 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 \ && 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 (216cea7bca) targeting armhf RUN export DEBIAN_FRONTEND=noninteractive \ # Install build dependencies && apt-get update -y \ @@ -214,23 +203,25 @@ 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 216cea7bca53fa441a3ee0d0f5fd339a3a894224 \ + && git apply < /breakpad-216cea7bca-fix-int-type.patch \ && ./configure --prefix=/usr --host="$CHOST" \ && make \ && DESTDIR="$SYSROOT" make install \ @@ -249,3 +240,5 @@ RUN export DEBIAN_FRONTEND=noninteractive \ libssl-dev \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt + +RUN rm /*.patch diff --git a/base/patch/breakpad-216cea7bca-fix-int-type.patch b/base/patch/breakpad-216cea7bca-fix-int-type.patch new file mode 100644 index 0000000..4489623 --- /dev/null +++ b/base/patch/breakpad-216cea7bca-fix-int-type.patch @@ -0,0 +1,18 @@ +This patch fixes the issue with gcc complainig about following: +error: no matching function for call to ‘max(int, long int)’ + +Ref: https://github.com/pytorch/pytorch/issues/70392#issuecomment-1003488196 + +diff --git a/src/client/linux/handler/exception_handler.cc b/src/client/linux/handler/exception_handler.cc +index b895f6d7..dc70527b 100644 +--- a/src/client/linux/handler/exception_handler.cc ++++ b/src/client/linux/handler/exception_handler.cc +@@ -138,7 +138,7 @@ void InstallAlternateStackLocked() { + // SIGSTKSZ may be too small to prevent the signal handlers from overrunning + // the alternative stack. Ensure that the size of the alternative stack is + // large enough. +- static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ); ++ static const unsigned kSigStackSize = std::max(16384L, SIGSTKSZ); + + // Only set an alternative stack if there isn't already one, or if the current + // one is too small. 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/toolchain/Dockerfile b/toolchain/Dockerfile index 5554f9b..5da56da 100644 --- a/toolchain/Dockerfile +++ b/toolchain/Dockerfile @@ -40,14 +40,16 @@ 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 \ @@ -58,8 +60,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && 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" \ && apt-get autoremove -y \ autoconf \ @@ -72,6 +73,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ help2man \ libncurses-dev \ libtool-bin \ + rsync \ texinfo \ unzip \ && apt-get clean \ @@ -90,9 +92,8 @@ 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 \ 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..708287b 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,10 +399,12 @@ 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 -# CT_BINUTILS_V_2_35 is not set +# CT_BINUTILS_V_2_36 is not set +CT_BINUTILS_V_2_35=y # CT_BINUTILS_V_2_34 is not set # CT_BINUTILS_V_2_33 is not set # CT_BINUTILS_V_2_32 is not set @@ -399,12 +414,14 @@ CT_BINUTILS_V_2_36=y # CT_BINUTILS_V_2_28 is not set # CT_BINUTILS_V_2_27 is not set # CT_BINUTILS_V_2_26 is not set -CT_BINUTILS_VERSION="2.36.1" +CT_BINUTILS_VERSION="2.35.1" CT_BINUTILS_MIRRORS="$(CT_Mirrors GNU binutils) $(CT_Mirrors sourceware binutils/releases)" 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_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 # From 5778fb891b4a85f5d70f234eaeb414a2e1c23cc2 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Mon, 28 Apr 2025 12:44:48 +0900 Subject: [PATCH 02/56] feat: library versions targeting firmware 3.18 --- base/Dockerfile | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/base/Dockerfile b/base/Dockerfile index 30719c9..3f46f30 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -2,8 +2,6 @@ ARG FROM FROM $FROM -COPY patch/* / - # Build libcap 2.66 targeting armhf RUN export DEBIAN_FRONTEND=noninteractive \ # Install build dependencies @@ -159,14 +157,14 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && rm -rf libevdev \ && find "$SYSROOT" -type l,f -name "*.la" -delete -# Build OpenSSL 3.0.7 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-3.0.7.tar.gz -o openssl.tar.gz \ - && echo "83049d042a260e696f62406ac5c08bf706fd84383f945cf21bd61e9ed95c396e openssl.tar.gz" | sha256sum -c \ + && 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-armv4 \ @@ -194,7 +192,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && rm -rf libcurl \ && find "$SYSROOT" -type l,f -name "*.la" -delete -# Build breakpad 0.1 (216cea7bca) targeting armhf +# Build breakpad 0.1 (f88a1aa2af) targeting armhf RUN export DEBIAN_FRONTEND=noninteractive \ # Install build dependencies && apt-get update -y \ @@ -220,8 +218,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && cd src \ # fetch updates default.xml with seemingly useless diffs that break checkout later && git checkout HEAD -- default.xml \ - && git checkout 216cea7bca53fa441a3ee0d0f5fd339a3a894224 \ - && git apply < /breakpad-216cea7bca-fix-int-type.patch \ + && git checkout f88a1aa2af1d1fd795716365245761b89041139d \ && ./configure --prefix=/usr --host="$CHOST" \ && make \ && DESTDIR="$SYSROOT" make install \ From a02d7626bfab25fa009c55921f967c8aaf214fdf Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Mon, 28 Apr 2025 15:07:42 +0900 Subject: [PATCH 03/56] feat/toolchain: initial aarch64 support --- toolchain/Dockerfile | 37 ++++++++++++++++++- .../cmake/aarch64-remarkable-linux-gnu.cmake | 12 ++++++ toolchain/meson/aarch64-remarkable-linux-gnu | 15 ++++++++ 3 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 toolchain/cmake/aarch64-remarkable-linux-gnu.cmake create mode 100644 toolchain/meson/aarch64-remarkable-linux-gnu diff --git a/toolchain/Dockerfile b/toolchain/Dockerfile index 5da56da..8d3af0d 100644 --- a/toolchain/Dockerfile +++ b/toolchain/Dockerfile @@ -1,7 +1,9 @@ # Essential cross-compiling build tools for the reMarkable FROM debian:bullseye-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 \ @@ -52,7 +54,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && cp "samples/$NGCONFIG/0004-fix-glibc-dso-link.patch" packages/glibc/2.35/ \ && ./bootstrap \ && ./configure --enable-local \ - && make \ + && make -j4 \ # Build the toolchain and install it in the following folder && export CT_PREFIX="/opt/x-tools" \ && ./ct-ng "$NGCONFIG" \ @@ -62,6 +64,23 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && rm -rf crosstool-ng \ && 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 \ + && ./bootstrap \ + && ./configure --enable-local \ + && make -j4 \ + # Build the toolchain and install it in the following folder + && export CT_PREFIX="/opt/x-tools" \ + && ./ct-ng "$NGCONFIG_AARCH64" \ + && ./ct-ng build \ + && 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 \ @@ -122,17 +141,33 @@ 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-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 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/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' From 203bf02ca25c630f372ac9298d6c80a4c7efd57d Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Mon, 28 Apr 2025 15:18:58 +0900 Subject: [PATCH 04/56] feat/base: initial aarch64 support --- base/Dockerfile | 245 +++++++++++++++++- .../breakpad-216cea7bca-fix-int-type.patch | 18 -- 2 files changed, 244 insertions(+), 19 deletions(-) delete mode 100644 base/patch/breakpad-216cea7bca-fix-int-type.patch diff --git a/base/Dockerfile b/base/Dockerfile index 3f46f30..896d278 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -238,4 +238,247 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt -RUN rm /*.patch +# Build libcap 2.66 targeting aarch64 +RUN export DEBIAN_FRONTEND=noninteractive \ + env /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 \ + && 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 export DEBIAN_FRONTEND=noninteractive \ + env /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" \ + && 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 export DEBIAN_FRONTEND=noninteractive \ + && env /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 export DEBIAN_FRONTEND=noninteractive \ + && env /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 \ + && 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 \ + && 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 export DEBIAN_FRONTEND=noninteractive \ + && env /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 \ + && 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 export DEBIAN_FRONTEND=noninteractive \ + && env /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 \ + && make DESTDIR="$SYSROOT" install_sw \ + && cd .. \ + # Clean up + && rm -rf openssl + +# Build libcurl 7.82.0 targeting aarch64 +RUN export DEBIAN_FRONTEND=noninteractive \ + && env /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 \ + && DESTDIR="$SYSROOT" make install \ + && cd .. \ + # Clean up + && rm -rf libcurl \ + && find "$SYSROOT" -type l,f -name "*.la" -delete + +# Build breakpad 0.1 (f88a1aa2af) targeting aarch64 +RUN export DEBIAN_FRONTEND=noninteractive \ + && env /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 \ + && 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/breakpad-216cea7bca-fix-int-type.patch b/base/patch/breakpad-216cea7bca-fix-int-type.patch deleted file mode 100644 index 4489623..0000000 --- a/base/patch/breakpad-216cea7bca-fix-int-type.patch +++ /dev/null @@ -1,18 +0,0 @@ -This patch fixes the issue with gcc complainig about following: -error: no matching function for call to ‘max(int, long int)’ - -Ref: https://github.com/pytorch/pytorch/issues/70392#issuecomment-1003488196 - -diff --git a/src/client/linux/handler/exception_handler.cc b/src/client/linux/handler/exception_handler.cc -index b895f6d7..dc70527b 100644 ---- a/src/client/linux/handler/exception_handler.cc -+++ b/src/client/linux/handler/exception_handler.cc -@@ -138,7 +138,7 @@ void InstallAlternateStackLocked() { - // SIGSTKSZ may be too small to prevent the signal handlers from overrunning - // the alternative stack. Ensure that the size of the alternative stack is - // large enough. -- static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ); -+ static const unsigned kSigStackSize = std::max(16384L, SIGSTKSZ); - - // Only set an alternative stack if there isn't already one, or if the current - // one is too small. From bf6294fa071ef1208cf6a198d75260aa1d8ace83 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Mon, 28 Apr 2025 15:19:31 +0900 Subject: [PATCH 05/56] temp: testing build --- scripts/build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/build b/scripts/build index 5c01751..37c949c 100755 --- a/scripts/build +++ b/scripts/build @@ -66,13 +66,13 @@ def build( "BUILDKIT_INLINE_CACHE=1", ] if _from: - cmd.extend(["--build-arg", f"FROM=ghcr.io/toltec-dev/{_from}:{version}"]) + cmd.extend(["--build-arg", f"FROM=ghcr.io/noahimesaka1873/{_from}:{version}"]) if github: cmd.extend(["--cache-from", f"type=gha,scope={image}"]) cmd.extend(["--cache-to", f"type=gha,mode=max,scope={image}"]) if publish: cmd.extend(["--push"]) - cmd.extend(["--tag", f"ghcr.io/toltec-dev/{image}:{version}", "."]) + cmd.extend(["--tag", f"ghcr.io/noahimesaka1873/{image}:{version}", "."]) run_cmd(cmd) From a7a6913390b8dd9f85240e81050a211e4c63863b Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Mon, 28 Apr 2025 16:09:25 +0900 Subject: [PATCH 06/56] fix/toolchain: allow aarch64 build as root --- toolchain/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/toolchain/Dockerfile b/toolchain/Dockerfile index 8d3af0d..e898348 100644 --- a/toolchain/Dockerfile +++ b/toolchain/Dockerfile @@ -69,6 +69,8 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && 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 \ && ./bootstrap \ && ./configure --enable-local \ && make -j4 \ From be7a206ce2fd8378616caacb7650c4c2555968a2 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Mon, 28 Apr 2025 17:06:51 +0900 Subject: [PATCH 07/56] fix/toolchain: some ct-ng build things --- toolchain/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/toolchain/Dockerfile b/toolchain/Dockerfile index e898348..86e0935 100644 --- a/toolchain/Dockerfile +++ b/toolchain/Dockerfile @@ -77,6 +77,9 @@ RUN export DEBIAN_FRONTEND=noninteractive \ # 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 \ + && ./ct-ng updatetools \ && ./ct-ng build \ && cd .. \ # Clean up From 9efc855fafefe7f9f9b936e4f97e673f917246ec Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Mon, 28 Apr 2025 19:38:46 +0900 Subject: [PATCH 08/56] fix/base: no --break-system-packages --- base/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/Dockerfile b/base/Dockerfile index 896d278..ecce2f9 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -75,7 +75,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ m4 \ rsync \ python3-pip \ - && pip3 install --no-cache-dir --break-system-packages jinja2 \ + && pip3 install --no-cache-dir jinja2 \ # Build systemd && cd /root \ && git clone --depth 1 --branch v250.5 https://github.com/systemd/systemd.git \ @@ -314,7 +314,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ m4 \ rsync \ python3-pip \ - && pip3 install --no-cache-dir --break-system-packages jinja2 \ + && pip3 install --no-cache-dir jinja2 \ # Build systemd && cd /root \ && git clone --depth 1 --branch v250.5 https://github.com/systemd/systemd.git \ From f8a1cc1ff444228aded27fa6812512f82e0eec46 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Mon, 28 Apr 2025 19:47:27 +0900 Subject: [PATCH 09/56] [no stage1] feat/workflow: option to skip stages --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5d1b194..2d2a85c 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]') }} 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]' }} runs-on: ubuntu-latest needs: stage2 strategy: From 4c1c5df2263d7f00911be4236b6d54235aa50949 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Mon, 28 Apr 2025 19:48:01 +0900 Subject: [PATCH 10/56] [no stage1] fix/workflow: typo --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2d2a85c..4fb8b0c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,7 +44,7 @@ jobs: run: ./scripts/build -p -g -s base stage3: name: Stage 3 - if: ${{ !contains(github.event.head_commit.message, '[no stage3]' }} + if: ${{ !contains(github.event.head_commit.message, '[no stage3]') }} runs-on: ubuntu-latest needs: stage2 strategy: From 2bf257d6250d14b4b74975e49face8fd4d96850f Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Mon, 28 Apr 2025 19:49:36 +0900 Subject: [PATCH 11/56] [no stage1] fix/workflow: run stages even if previous one was skipped --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4fb8b0c..dcc0a30 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,7 +26,7 @@ jobs: run: ./scripts/build -p -g -s toolchain stage2: name: Stage 2 - if: ${{ !contains(github.event.head_commit.message, '[no stage2]') }} + if: ${{ !contains(github.event.head_commit.message, '[no stage2]') && !failure() && !cancelled() }} runs-on: ubuntu-latest needs: stage1 steps: @@ -44,7 +44,7 @@ jobs: run: ./scripts/build -p -g -s base stage3: name: Stage 3 - if: ${{ !contains(github.event.head_commit.message, '[no stage3]') }} + if: ${{ !contains(github.event.head_commit.message, '[no stage3]') && !failure() && !cancelled() }} runs-on: ubuntu-latest needs: stage2 strategy: From 64ae6065381ab585b23443cad5bd98350a487ca0 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Mon, 28 Apr 2025 21:01:39 +0900 Subject: [PATCH 12/56] feat: build with all cores available --- base/Dockerfile | 46 +++++++++++++++++++++++--------------------- toolchain/Dockerfile | 10 +++++----- 2 files changed, 29 insertions(+), 27 deletions(-) diff --git a/base/Dockerfile b/base/Dockerfile index ecce2f9..d130961 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -19,6 +19,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ CC="${CROSS_COMPILE}gcc" \ RANLIB="${CROSS_COMPILE}ranlib" \ lib=lib \ + -j$(nproc) \ && make install \ RAISE_SETFCAP=no \ lib=lib \ @@ -48,7 +49,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && cd util-linux \ && ./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 @@ -119,14 +120,14 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && CC="${CROSS_COMPILE}gcc" CFLAGS=-fPIC ./configure \ --static \ --prefix=/usr \ - && make \ + && 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 \ + && make -j$(nproc) \ && DESTDIR="$SYSROOT" make install \ && cd .. \ # Clean up @@ -150,7 +151,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && tar --strip-components=1 -xf libevdev.tar.xz \ && rm libevdev.tar.xz \ && ./configure --prefix=/usr --host="$CHOST" \ - && make \ + && make -j$(nproc) \ && DESTDIR="$SYSROOT" make install \ && cd .. \ # Clean up @@ -168,7 +169,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && tar --strip-components=1 -xf openssl.tar.gz \ && 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 @@ -185,7 +186,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && tar --strip-components=1 -xf curl.tar.xz \ && rm curl.tar.xz \ && ./configure --prefix=/usr --host="$CHOST" --with-openssl \ - && make \ + && make -j$(nproc) \ && DESTDIR="$SYSROOT" make install \ && cd .. \ # Clean up @@ -220,7 +221,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && git checkout HEAD -- default.xml \ && git checkout f88a1aa2af1d1fd795716365245761b89041139d \ && ./configure --prefix=/usr --host="$CHOST" \ - && make \ + && make -j$(nproc) \ && DESTDIR="$SYSROOT" make install \ && cd ../.. \ # Clean up @@ -240,7 +241,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ # Build libcap 2.66 targeting aarch64 RUN export DEBIAN_FRONTEND=noninteractive \ - env /opt/x-tools/switch-aarch64.sh \ + . /opt/x-tools/switch-aarch64.sh \ # Install build dependencies && apt-get update -y \ && apt-get install -y --no-install-recommends \ @@ -256,6 +257,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ CC="${CROSS_COMPILE}gcc" \ RANLIB="${CROSS_COMPILE}ranlib" \ lib=lib \ + -j$(nproc) \ && make install \ RAISE_SETFCAP=no \ lib=lib \ @@ -270,7 +272,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ # Build util-linux 2.37.4 targeting aarch64 RUN export DEBIAN_FRONTEND=noninteractive \ - env /opt/x-tools/switch-aarch64.sh \ + . /opt/x-tools/switch-aarch64.sh \ # Install build dependencies && apt-get update -y \ && apt-get install -y --no-install-recommends \ @@ -286,7 +288,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && cd util-linux \ && ./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 @@ -304,7 +306,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ # Build systemd 250 targeting aarch64 RUN export DEBIAN_FRONTEND=noninteractive \ - && env /opt/x-tools/switch-aarch64.sh \ + && . /opt/x-tools/switch-aarch64.sh \ # Install build dependencies && apt-get update -y \ && apt-get install -y --no-install-recommends \ @@ -345,7 +347,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ # Build zlib 1.2.11 and libpng 1.6.39 targeting aarch64 RUN export DEBIAN_FRONTEND=noninteractive \ - && env /opt/x-tools/switch-aarch64.sh \ + && . /opt/x-tools/switch-aarch64.sh \ # Install build dependencies && apt-get update -y \ && apt-get install -y --no-install-recommends \ @@ -359,14 +361,14 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && CC="${CROSS_COMPILE}gcc" CFLAGS=-fPIC ./configure \ --static \ --prefix=/usr \ - && make \ + && 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 \ + && make -j$(nproc) \ && DESTDIR="$SYSROOT" make install \ && cd .. \ # Clean up @@ -381,7 +383,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ # Build libevdev 1.12.1 targeting aarch64 RUN export DEBIAN_FRONTEND=noninteractive \ - && env /opt/x-tools/switch-aarch64.sh \ + && . /opt/x-tools/switch-aarch64.sh \ # Build libevdev && cd /root \ && mkdir libevdev \ @@ -391,7 +393,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && tar --strip-components=1 -xf libevdev.tar.xz \ && rm libevdev.tar.xz \ && ./configure --prefix=/usr --host="$CHOST" \ - && make \ + && make -j$(nproc) \ && DESTDIR="$SYSROOT" make install \ && cd .. \ # Clean up @@ -400,7 +402,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ # Build OpenSSL 3.0.15 targeting aarch64 RUN export DEBIAN_FRONTEND=noninteractive \ - && env /opt/x-tools/switch-aarch64.sh \ + && . /opt/x-tools/switch-aarch64.sh \ # Build OpenSSL && cd /root \ && mkdir openssl \ @@ -410,7 +412,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && tar --strip-components=1 -xf openssl.tar.gz \ && rm openssl.tar.gz \ && ./Configure --prefix=/usr --cross-compile-prefix="$CROSS_COMPILE" linux-aarch64 \ - && make \ + && make -j$(nproc) \ && make DESTDIR="$SYSROOT" install_sw \ && cd .. \ # Clean up @@ -418,7 +420,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ # Build libcurl 7.82.0 targeting aarch64 RUN export DEBIAN_FRONTEND=noninteractive \ - && env /opt/x-tools/switch-aarch64.sh \ + && . /opt/x-tools/switch-aarch64.sh \ # Build libcurl && cd /root \ && mkdir libcurl \ @@ -428,7 +430,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && tar --strip-components=1 -xf curl.tar.xz \ && rm curl.tar.xz \ && ./configure --prefix=/usr --host="$CHOST" --with-openssl \ - && make \ + && make -j$(nproc) \ && DESTDIR="$SYSROOT" make install \ && cd .. \ # Clean up @@ -437,7 +439,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ # Build breakpad 0.1 (f88a1aa2af) targeting aarch64 RUN export DEBIAN_FRONTEND=noninteractive \ - && env /opt/x-tools/switch-aarch64.sh \ + && . /opt/x-tools/switch-aarch64.sh \ # Install build dependencies && apt-get update -y \ && apt-get install -y --no-install-recommends \ @@ -464,7 +466,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && git checkout HEAD -- default.xml \ && git checkout f88a1aa2af1d1fd795716365245761b89041139d \ && ./configure --prefix=/usr --host="$CHOST" \ - && make \ + && make -j$(nproc) \ && DESTDIR="$SYSROOT" make install \ && cd ../.. \ # Clean up diff --git a/toolchain/Dockerfile b/toolchain/Dockerfile index 86e0935..bf32621 100644 --- a/toolchain/Dockerfile +++ b/toolchain/Dockerfile @@ -54,11 +54,11 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && cp "samples/$NGCONFIG/0004-fix-glibc-dso-link.patch" packages/glibc/2.35/ \ && ./bootstrap \ && ./configure --enable-local \ - && make -j4 \ + && 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 \ @@ -73,14 +73,14 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && echo "CT_ALLOW_BUILD_AS_ROOT_SURE=y" >> samples/$NGCONFIG_AARCH64/crosstool.config \ && ./bootstrap \ && ./configure --enable-local \ - && make -j4 \ + && 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 \ && ./ct-ng updatetools \ - && ./ct-ng build \ + && ./ct-ng build.$(nproc) \ && cd .. \ # Clean up && rm -rf crosstool-ng \ @@ -123,7 +123,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ --enable-sha256 \ --prefix=/ \ --exec-prefix=/usr \ - && make \ + && make -j$(nproc) \ && make install \ && cd .. \ # Clean up From 6ff182de795b8d87da6e3e21da390d98f2ea463d Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Mon, 28 Apr 2025 21:02:47 +0900 Subject: [PATCH 13/56] feat/base: upgrade to Debian 12 --- toolchain/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolchain/Dockerfile b/toolchain/Dockerfile index bf32621..64986e2 100644 --- a/toolchain/Dockerfile +++ b/toolchain/Dockerfile @@ -1,5 +1,5 @@ # 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" From f6f7dfb805459cc535d513ca70b1578d0a552861 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Mon, 28 Apr 2025 21:05:36 +0900 Subject: [PATCH 14/56] feat/base: upgrade to GCC 12 --- toolchain/Dockerfile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/toolchain/Dockerfile b/toolchain/Dockerfile index 64986e2..9e4a81b 100644 --- a/toolchain/Dockerfile +++ b/toolchain/Dockerfile @@ -13,18 +13,18 @@ RUN export DEBIAN_FRONTEND=noninteractive \ ca-certificates \ cmake \ curl \ - gcc-10 \ - g++-10 \ + gcc-12 \ + g++-12 \ 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++ 12 + && update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12 \ + --slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-12 \ + --slave /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-12 \ + --slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-12 \ + --slave /usr/bin/g++ g++ /usr/bin/g++-12 # Build latest crosstool-ng and use it to build the toolchain COPY crosstool-ng "/$NGCONFIG" From 2583b178f6f0e28e951eb6eb2f8005eff5fcc7ff Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Mon, 28 Apr 2025 22:16:10 +0900 Subject: [PATCH 15/56] feat/base: upgrade to Debian 12, part 2 --- base/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/Dockerfile b/base/Dockerfile index d130961..889e70b 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -76,7 +76,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ m4 \ rsync \ python3-pip \ - && pip3 install --no-cache-dir jinja2 \ + && 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 \ @@ -316,7 +316,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ m4 \ rsync \ python3-pip \ - && pip3 install --no-cache-dir jinja2 \ + && 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 \ From 970569aada4c3d73a6e85632888d40906602c759 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Mon, 28 Apr 2025 22:22:17 +0900 Subject: [PATCH 16/56] fix/base: fix env --- base/Dockerfile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/base/Dockerfile b/base/Dockerfile index 889e70b..ff7d8d4 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -241,7 +241,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ # Build libcap 2.66 targeting aarch64 RUN export DEBIAN_FRONTEND=noninteractive \ - . /opt/x-tools/switch-aarch64.sh \ + source /opt/x-tools/switch-aarch64.sh \ # Install build dependencies && apt-get update -y \ && apt-get install -y --no-install-recommends \ @@ -272,7 +272,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ # Build util-linux 2.37.4 targeting aarch64 RUN export DEBIAN_FRONTEND=noninteractive \ - . /opt/x-tools/switch-aarch64.sh \ + source /opt/x-tools/switch-aarch64.sh \ # Install build dependencies && apt-get update -y \ && apt-get install -y --no-install-recommends \ @@ -306,7 +306,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ # Build systemd 250 targeting aarch64 RUN export DEBIAN_FRONTEND=noninteractive \ - && . /opt/x-tools/switch-aarch64.sh \ + && source /opt/x-tools/switch-aarch64.sh \ # Install build dependencies && apt-get update -y \ && apt-get install -y --no-install-recommends \ @@ -347,7 +347,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ # Build zlib 1.2.11 and libpng 1.6.39 targeting aarch64 RUN export DEBIAN_FRONTEND=noninteractive \ - && . /opt/x-tools/switch-aarch64.sh \ + && source /opt/x-tools/switch-aarch64.sh \ # Install build dependencies && apt-get update -y \ && apt-get install -y --no-install-recommends \ @@ -383,7 +383,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ # Build libevdev 1.12.1 targeting aarch64 RUN export DEBIAN_FRONTEND=noninteractive \ - && . /opt/x-tools/switch-aarch64.sh \ + && source /opt/x-tools/switch-aarch64.sh \ # Build libevdev && cd /root \ && mkdir libevdev \ @@ -402,7 +402,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ # Build OpenSSL 3.0.15 targeting aarch64 RUN export DEBIAN_FRONTEND=noninteractive \ - && . /opt/x-tools/switch-aarch64.sh \ + && source /opt/x-tools/switch-aarch64.sh \ # Build OpenSSL && cd /root \ && mkdir openssl \ @@ -420,7 +420,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ # Build libcurl 7.82.0 targeting aarch64 RUN export DEBIAN_FRONTEND=noninteractive \ - && . /opt/x-tools/switch-aarch64.sh \ + && source /opt/x-tools/switch-aarch64.sh \ # Build libcurl && cd /root \ && mkdir libcurl \ @@ -439,7 +439,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ # Build breakpad 0.1 (f88a1aa2af) targeting aarch64 RUN export DEBIAN_FRONTEND=noninteractive \ - && . /opt/x-tools/switch-aarch64.sh \ + && source /opt/x-tools/switch-aarch64.sh \ # Install build dependencies && apt-get update -y \ && apt-get install -y --no-install-recommends \ From 5094fad082c7c232c20a375bc45f5caa5778aa8b Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Mon, 28 Apr 2025 22:37:31 +0900 Subject: [PATCH 17/56] fix/base: actually fix build --- base/Dockerfile | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/base/Dockerfile b/base/Dockerfile index ff7d8d4..7b46687 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -240,8 +240,8 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt # Build libcap 2.66 targeting aarch64 -RUN export DEBIAN_FRONTEND=noninteractive \ - source /opt/x-tools/switch-aarch64.sh \ +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 \ @@ -268,11 +268,11 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && apt-get autoremove -y \ git \ && apt-get clean \ - && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt + && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt' # Build util-linux 2.37.4 targeting aarch64 -RUN export DEBIAN_FRONTEND=noninteractive \ - source /opt/x-tools/switch-aarch64.sh \ +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 \ @@ -302,10 +302,10 @@ RUN export DEBIAN_FRONTEND=noninteractive \ git \ libtool \ && apt-get clean \ - && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt + && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt' # Build systemd 250 targeting aarch64 -RUN export DEBIAN_FRONTEND=noninteractive \ +RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive \ && source /opt/x-tools/switch-aarch64.sh \ # Install build dependencies && apt-get update -y \ @@ -343,10 +343,10 @@ RUN export DEBIAN_FRONTEND=noninteractive \ rsync \ python3-pip \ && apt-get clean \ - && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt + && 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 export DEBIAN_FRONTEND=noninteractive \ +RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive \ && source /opt/x-tools/switch-aarch64.sh \ # Install build dependencies && apt-get update -y \ @@ -379,10 +379,10 @@ RUN export DEBIAN_FRONTEND=noninteractive \ git \ libtool \ && apt-get clean \ - && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt + && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt' # Build libevdev 1.12.1 targeting aarch64 -RUN export DEBIAN_FRONTEND=noninteractive \ +RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive \ && source /opt/x-tools/switch-aarch64.sh \ # Build libevdev && cd /root \ @@ -398,10 +398,10 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && cd .. \ # Clean up && rm -rf libevdev \ - && find "$SYSROOT" -type l,f -name "*.la" -delete + && find "$SYSROOT" -type l,f -name "*.la" -delete' # Build OpenSSL 3.0.15 targeting aarch64 -RUN export DEBIAN_FRONTEND=noninteractive \ +RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive \ && source /opt/x-tools/switch-aarch64.sh \ # Build OpenSSL && cd /root \ @@ -416,10 +416,10 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && make DESTDIR="$SYSROOT" install_sw \ && cd .. \ # Clean up - && rm -rf openssl + && rm -rf openssl' # Build libcurl 7.82.0 targeting aarch64 -RUN export DEBIAN_FRONTEND=noninteractive \ +RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive \ && source /opt/x-tools/switch-aarch64.sh \ # Build libcurl && cd /root \ @@ -435,10 +435,10 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && cd .. \ # Clean up && rm -rf libcurl \ - && find "$SYSROOT" -type l,f -name "*.la" -delete + && find "$SYSROOT" -type l,f -name "*.la" -delete' # Build breakpad 0.1 (f88a1aa2af) targeting aarch64 -RUN export DEBIAN_FRONTEND=noninteractive \ +RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive \ && source /opt/x-tools/switch-aarch64.sh \ # Install build dependencies && apt-get update -y \ @@ -482,5 +482,5 @@ RUN export DEBIAN_FRONTEND=noninteractive \ zlib1g-dev \ libssl-dev \ && apt-get clean \ - && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt + && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt' From c76916a6b668c180f7f4c23641d74fd918c664a3 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Mon, 28 Apr 2025 22:41:15 +0900 Subject: [PATCH 18/56] feat/dotnet6: Upgrade for Debian 12 --- dotnet6/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 \ From 9bfaf8af5cd711bddea26acc1b44e36ea3677da0 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Mon, 28 Apr 2025 22:43:23 +0900 Subject: [PATCH 19/56] feat/go: upgrade to 1.24.2 --- golang/Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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" From 0e42a2f7411d0d8476d8e4f465520433ff1f6d82 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Mon, 28 Apr 2025 22:57:28 +0900 Subject: [PATCH 20/56] feat/rust: aarch64 and version upgrade --- rust/Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rust/Dockerfile b/rust/Dockerfile index 6ca6e00..ccfc149 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 architecture 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 \ + && rustup toolchain install nightly --profile nightly --target armv7-unknown-linux-gnueabihf \ + && rustup target add aarch64-unknown-linux-gnu # Add rust binaries to PATH ENV PATH="$PATH:/root/.cargo/bin" From 98b00c5eecfd04f717892827acca5fbe100a6bd1 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Mon, 28 Apr 2025 23:01:48 +0900 Subject: [PATCH 21/56] fix/rust: fix build --- rust/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/Dockerfile b/rust/Dockerfile index ccfc149..2e3a283 100644 --- a/rust/Dockerfile +++ b/rust/Dockerfile @@ -6,8 +6,8 @@ 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 none \ - && rustup toolchain install nightly --profile nightly --target armv7-unknown-linux-gnueabihf \ - && rustup target add aarch64-unknown-linux-gnu + && /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" From a867a7580393c56b42df62d9040163517d00f2b8 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Mon, 28 Apr 2025 23:04:26 +0900 Subject: [PATCH 22/56] fix/script/build: go back to toltec-dev again --- scripts/build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/build b/scripts/build index 37c949c..5c01751 100755 --- a/scripts/build +++ b/scripts/build @@ -66,13 +66,13 @@ def build( "BUILDKIT_INLINE_CACHE=1", ] if _from: - cmd.extend(["--build-arg", f"FROM=ghcr.io/noahimesaka1873/{_from}:{version}"]) + cmd.extend(["--build-arg", f"FROM=ghcr.io/toltec-dev/{_from}:{version}"]) if github: cmd.extend(["--cache-from", f"type=gha,scope={image}"]) cmd.extend(["--cache-to", f"type=gha,mode=max,scope={image}"]) if publish: cmd.extend(["--push"]) - cmd.extend(["--tag", f"ghcr.io/noahimesaka1873/{image}:{version}", "."]) + cmd.extend(["--tag", f"ghcr.io/toltec-dev/{image}:{version}", "."]) run_cmd(cmd) From d88d88b5f54ecb40504c755f65c85b6138efcc22 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Mon, 28 Apr 2025 23:57:25 +0900 Subject: [PATCH 23/56] feat/qt: switch to Qt6 (no libqsgepaper for now) --- qt/Dockerfile | 51 ++++++++++++++----- qt/linux-aarch64-remarkable-g++/qmake.conf | 24 +++++++++ .../qplatformdefs.h | 4 ++ 3 files changed, 67 insertions(+), 12 deletions(-) create mode 100644 qt/linux-aarch64-remarkable-g++/qmake.conf create mode 100644 qt/linux-aarch64-remarkable-g++/qplatformdefs.h diff --git a/qt/Dockerfile b/qt/Dockerfile index a193143..c93884a 100644 --- a/qt/Dockerfile +++ b/qt/Dockerfile @@ -4,6 +4,7 @@ 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 \ @@ -13,10 +14,11 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && cd /root \ && git clone https://code.qt.io/qt/qt5.git \ && cd qt5 \ - && git checkout 0f7f776d3915ef16a9c737141994284f035aa3b1 \ + && git switch 6.7.3 \ && GIT_ASKPASS="/bin/echo" perl init-repository --module-subset=essential,-qtmultimedia,-qttools,qtgraphicaleffects,qtquickcontrols2,qtsvg,qtwebsockets --mirror=https://github.com/reMarkable/ \ # Setup reMarkable mkspec && mv /linux-arm-remarkable-g++ qtbase/mkspecs/devices \ + && mv /linux-aarch64-remarkable-g++ qtbase/mkspecs/devices \ && cd .. \ && mkdir qt5-build \ && cd qt5-build \ @@ -35,23 +37,48 @@ RUN export DEBIAN_FRONTEND=noninteractive \ -no-widgets \ -no-feature-sql \ -reduce-exports \ - && make \ - && make install \ + && 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 \ + -confirm-license \ + -opensource \ + -prefix /usr \ + -sysroot "$SYSROOT" \ + -hostprefix /usr \ + -device linux-aarch64-remarkable-g++ \ + -device-option CROSS_COMPILE="$CROSS_COMPILE" \ + -nomake examples \ + -nomake tests \ + -no-rpath \ + -no-opengl \ + -no-widgets \ + -no-feature-sql \ + -reduce-exports \ + && cmake --build . --parallel $(nproc) \ + && cmake --install . \ + && cd .. \ + # Clean up + && 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 +#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..39874ce --- /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" From a2d5aab96d829a6262cd4fcf6372cf5c7822e57f Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Tue, 29 Apr 2025 00:00:22 +0900 Subject: [PATCH 24/56] fix/qt: do not use remarkable modules and switch for qt6 --- qt/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt/Dockerfile b/qt/Dockerfile index c93884a..c016f07 100644 --- a/qt/Dockerfile +++ b/qt/Dockerfile @@ -15,7 +15,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && git clone https://code.qt.io/qt/qt5.git \ && cd qt5 \ && git switch 6.7.3 \ - && GIT_ASKPASS="/bin/echo" perl init-repository --module-subset=essential,-qtmultimedia,-qttools,qtgraphicaleffects,qtquickcontrols2,qtsvg,qtwebsockets --mirror=https://github.com/reMarkable/ \ + && 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 \ From 6f675a88e9e947694c495a01480307268c0adadf Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Tue, 29 Apr 2025 00:15:54 +0900 Subject: [PATCH 25/56] fix/qt: build thrice --- qt/Dockerfile | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/qt/Dockerfile b/qt/Dockerfile index c016f07..3e72200 100644 --- a/qt/Dockerfile +++ b/qt/Dockerfile @@ -20,6 +20,19 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && 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 \ + && ../qt5/configure \ + -prefix /usr \ + -- -DQT_BUILD_EXAMPLES=OFF \ + -DQT_BUILD_TESTS=OFF \ + && cmake --build . --parallel $(nproc) \ + && cmake --install . \ + && cd .. \ + # Clean up + && rm -rf qt5-build \ + # Build for armhf && mkdir qt5-build \ && cd qt5-build \ && ../qt5/configure \ @@ -27,7 +40,6 @@ RUN export DEBIAN_FRONTEND=noninteractive \ -opensource \ -prefix /usr \ -sysroot "$SYSROOT" \ - -hostprefix /usr \ -device linux-arm-remarkable-g++ \ -device-option CROSS_COMPILE="$CROSS_COMPILE" \ -nomake examples \ @@ -37,6 +49,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ -no-widgets \ -no-feature-sql \ -reduce-exports \ + -- -DQT_HOST_PATH=/usr \ && cmake --build . --parallel $(nproc) \ && cmake --install . \ && cd .. \ @@ -65,7 +78,6 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && cmake --build . --parallel $(nproc) \ && cmake --install . \ && cd .. \ - # Clean up && rm -rf qt5-build \ && find "$SYSROOT" -type l,f -name "*.la" | xargs --no-run-if-empty rm' \ && apt-get autoremove -y \ From 35d4fd64c2ef3f5ed2a7f6539fe9e0bf4f976020 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Tue, 29 Apr 2025 02:21:55 +0900 Subject: [PATCH 26/56] fix/qt: building now works --- qt/Dockerfile | 49 ++++++++++--------- .../qplatformdefs.h | 2 +- scripts/build | 4 +- 3 files changed, 30 insertions(+), 25 deletions(-) diff --git a/qt/Dockerfile b/qt/Dockerfile index 3e72200..b86fc34 100644 --- a/qt/Dockerfile +++ b/qt/Dockerfile @@ -10,6 +10,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && 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 \ @@ -21,35 +22,40 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && mv /linux-aarch64-remarkable-g++ qtbase/mkspecs/devices \ && cd .. \ # Build for host machine (required from Qt6+) - && mkdir qt5-build \ - && cd qt5-build \ - && ../qt5/configure \ - -prefix /usr \ - -- -DQT_BUILD_EXAMPLES=OFF \ - -DQT_BUILD_TESTS=OFF \ - && cmake --build . --parallel $(nproc) \ - && cmake --install . \ - && cd .. \ + && 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 \ + && 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" \ + -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 \ -- -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 .. \ @@ -61,20 +67,19 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && mkdir qt5-build \ && cd qt5-build \ && ../qt5/configure \ - -confirm-license \ - -opensource \ -prefix /usr \ - -sysroot "$SYSROOT" \ - -hostprefix /usr \ + -extprefix $SYSROOT/usr \ -device linux-aarch64-remarkable-g++ \ -device-option CROSS_COMPILE="$CROSS_COMPILE" \ - -nomake examples \ - -nomake tests \ -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 .. \ diff --git a/qt/linux-aarch64-remarkable-g++/qplatformdefs.h b/qt/linux-aarch64-remarkable-g++/qplatformdefs.h index 39874ce..5c69998 100644 --- a/qt/linux-aarch64-remarkable-g++/qplatformdefs.h +++ b/qt/linux-aarch64-remarkable-g++/qplatformdefs.h @@ -1,4 +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" +#include "../../linux-g++/qplatformdefs.h" diff --git a/scripts/build b/scripts/build index 5c01751..37c949c 100755 --- a/scripts/build +++ b/scripts/build @@ -66,13 +66,13 @@ def build( "BUILDKIT_INLINE_CACHE=1", ] if _from: - cmd.extend(["--build-arg", f"FROM=ghcr.io/toltec-dev/{_from}:{version}"]) + cmd.extend(["--build-arg", f"FROM=ghcr.io/noahimesaka1873/{_from}:{version}"]) if github: cmd.extend(["--cache-from", f"type=gha,scope={image}"]) cmd.extend(["--cache-to", f"type=gha,mode=max,scope={image}"]) if publish: cmd.extend(["--push"]) - cmd.extend(["--tag", f"ghcr.io/toltec-dev/{image}:{version}", "."]) + cmd.extend(["--tag", f"ghcr.io/noahimesaka1873/{image}:{version}", "."]) run_cmd(cmd) From 3c751419ae01c728aeb0cb04116bb1e3711c65d5 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Tue, 29 Apr 2025 02:22:19 +0900 Subject: [PATCH 27/56] fix/script/build: go back to toltec-dev again --- scripts/build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/build b/scripts/build index 37c949c..5c01751 100755 --- a/scripts/build +++ b/scripts/build @@ -66,13 +66,13 @@ def build( "BUILDKIT_INLINE_CACHE=1", ] if _from: - cmd.extend(["--build-arg", f"FROM=ghcr.io/noahimesaka1873/{_from}:{version}"]) + cmd.extend(["--build-arg", f"FROM=ghcr.io/toltec-dev/{_from}:{version}"]) if github: cmd.extend(["--cache-from", f"type=gha,scope={image}"]) cmd.extend(["--cache-to", f"type=gha,mode=max,scope={image}"]) if publish: cmd.extend(["--push"]) - cmd.extend(["--tag", f"ghcr.io/noahimesaka1873/{image}:{version}", "."]) + cmd.extend(["--tag", f"ghcr.io/toltec-dev/{image}:{version}", "."]) run_cmd(cmd) From 47a05a1890991fbc087789576d070116a764652a Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Tue, 29 Apr 2025 12:28:46 +0900 Subject: [PATCH 28/56] fix/ci/pr: pass containers between jobs --- .github/workflows/pr.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index d62326c..5de2b1e 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -23,11 +23,28 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Build and push toolchain run: ./scripts/build -g -s toolchain + - name: Export and upload the container + run: | + apt-get install uuid-runtime + 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 stage2: name: Stage 2 runs-on: ubuntu-latest 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 +55,19 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: Import container + run: | + docker load --input ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-toolchain.tar.gz + rm ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-toolchain.tar.gz - name: Build and push toolchain run: ./scripts/build -g -s base + - 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 stage3: name: Stage 3 runs-on: ubuntu-latest @@ -48,6 +76,11 @@ jobs: matrix: target: [golang, python, qt, rust, dotnet6] steps: + - name: Download artifact + uses: actions/download-artifact@v4 + with: + name: ${{ needs.stage1.outputs.UUID }}-base + path: ${{ runner.temp }} - name: Checkout the Git repository uses: actions/checkout@v3 - name: Login to GitHub Container Registry @@ -58,5 +91,9 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: Import container + run: | + docker load --input ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-base.tar.gz + rm ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-base.tar.gz - name: Build and push toolchain run: ./scripts/build -g -s ${{ matrix.target }} From 9d83e7da57f5d26b73ffdec1f65a3a87653e7851 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Tue, 29 Apr 2025 13:55:34 +0900 Subject: [PATCH 29/56] fix/ci/pr: fix install --- .github/workflows/pr.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 5de2b1e..b4ef221 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -25,7 +25,9 @@ jobs: run: ./scripts/build -g -s toolchain - name: Export and upload the container run: | - apt-get install uuid-runtime + export DEBIAN_FRONTEND=noninteractive + apt-get update -y + apt-get install -y uuid-runtime UUID = $(uuidgen) echo "UUID=$UUID" >> "$GITHUB_ENV" echo "UUID=$UUID" >> "$GITHUB_OUTPUT" From 5750ed8ddb4b9d56323688a0cf288bfc4ca14eb8 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Tue, 29 Apr 2025 13:57:36 +0900 Subject: [PATCH 30/56] fix/ci/pr: fix install part 2 --- .github/workflows/pr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index b4ef221..1f61332 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -26,8 +26,8 @@ jobs: - name: Export and upload the container run: | export DEBIAN_FRONTEND=noninteractive - apt-get update -y - apt-get install -y uuid-runtime + sudo apt-get update -y + sudo apt-get install -y uuid-runtime UUID = $(uuidgen) echo "UUID=$UUID" >> "$GITHUB_ENV" echo "UUID=$UUID" >> "$GITHUB_OUTPUT" From 8358a15dcd4b2d0929ef23d90e672fd602b5ed82 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Tue, 29 Apr 2025 15:24:32 +0900 Subject: [PATCH 31/56] fix/ci/pr: fix uuid gen --- .github/workflows/pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 1f61332..ccd0712 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -28,7 +28,7 @@ jobs: export DEBIAN_FRONTEND=noninteractive sudo apt-get update -y sudo apt-get install -y uuid-runtime - UUID = $(uuidgen) + 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 From 466121af2056b40ed4b3e954dabd8f4869aa5660 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Tue, 29 Apr 2025 16:01:05 +0900 Subject: [PATCH 32/56] fix/toolchain: disable ct-ng progress spam --- toolchain/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/toolchain/Dockerfile b/toolchain/Dockerfile index 9e4a81b..3193fac 100644 --- a/toolchain/Dockerfile +++ b/toolchain/Dockerfile @@ -71,6 +71,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && 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_LOG_PROGRESS_BAR=n" >> samples/$NGCONFIG_AARCH64/crosstool.config \ && ./bootstrap \ && ./configure --enable-local \ && make -j$(nproc) \ From 75d19310646f332a5f3c156f2834bda451504455 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Tue, 29 Apr 2025 16:11:07 +0900 Subject: [PATCH 33/56] fix/ci/pr: fix UUID passing --- .github/workflows/pr.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index ccd0712..818682d 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,7 +25,8 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Build and push toolchain run: ./scripts/build -g -s toolchain - - name: Export and upload the container + - name: Export the container + id: export_container_uuid run: | export DEBIAN_FRONTEND=noninteractive sudo apt-get update -y From 36486b88c28aeb6c7b9c0b10ad238713afa52329 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Tue, 29 Apr 2025 16:58:16 +0900 Subject: [PATCH 34/56] fix/ci/pr: remove UUID --- .github/workflows/pr.yml | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 818682d..0cfc4c4 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -10,8 +10,6 @@ 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 @@ -26,20 +24,14 @@ jobs: - 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 -y 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 + docker image save ghcr.io/toltec-dev/toolchain | gzip > ${{ runner.temp }}/toolchain.tar.gz - name: Upload artifact uses: actions/upload-artifact@v4 with: - name: ${{ env.UUID }}-toolchain - path: ${{ runner.temp }}/${{ env.UUID }}-toolchain.tar.gz + name: toolchain + path: ${{ runner.temp }}/toolchain.tar.gz + retention-days: 1 stage2: name: Stage 2 runs-on: ubuntu-latest @@ -48,7 +40,7 @@ jobs: - name: Download artifact uses: actions/download-artifact@v4 with: - name: ${{ needs.stage1.outputs.UUID }}-toolchain + name: toolchain path: ${{ runner.temp }} - name: Checkout the Git repository uses: actions/checkout@v3 @@ -62,8 +54,8 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Import container run: | - docker load --input ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-toolchain.tar.gz - rm ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-toolchain.tar.gz + docker load --input ${{ runner.temp }}/toolchain.tar.gz + rm ${{ runner.temp }}/toolchain.tar.gz - name: Build and push toolchain run: ./scripts/build -g -s base - name: Export the container @@ -71,8 +63,8 @@ jobs: - 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 + name: base + path: ${{ runner.temp }}/base.tar.gz stage3: name: Stage 3 runs-on: ubuntu-latest @@ -84,7 +76,7 @@ jobs: - name: Download artifact uses: actions/download-artifact@v4 with: - name: ${{ needs.stage1.outputs.UUID }}-base + name: base path: ${{ runner.temp }} - name: Checkout the Git repository uses: actions/checkout@v3 @@ -98,7 +90,7 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Import container run: | - docker load --input ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-base.tar.gz - rm ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-base.tar.gz + docker load --input ${{ runner.temp }}/base.tar.gz + rm ${{ runner.temp }}/base.tar.gz - name: Build and push toolchain run: ./scripts/build -g -s ${{ matrix.target }} From e9731009e21eba5fc670241764b64732bcb7d1b0 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Tue, 29 Apr 2025 17:08:33 +0900 Subject: [PATCH 35/56] Revert "fix/ci/pr: remove UUID" This reverts commit 36486b88c28aeb6c7b9c0b10ad238713afa52329. --- .github/workflows/pr.yml | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 0cfc4c4..818682d 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 @@ -24,14 +26,20 @@ jobs: - name: Build and push toolchain run: ./scripts/build -g -s toolchain - name: Export the container + id: export_container_uuid run: | - docker image save ghcr.io/toltec-dev/toolchain | gzip > ${{ runner.temp }}/toolchain.tar.gz + export DEBIAN_FRONTEND=noninteractive + sudo apt-get update -y + sudo apt-get install -y 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: toolchain - path: ${{ runner.temp }}/toolchain.tar.gz - retention-days: 1 + name: ${{ env.UUID }}-toolchain + path: ${{ runner.temp }}/${{ env.UUID }}-toolchain.tar.gz stage2: name: Stage 2 runs-on: ubuntu-latest @@ -40,7 +48,7 @@ jobs: - name: Download artifact uses: actions/download-artifact@v4 with: - name: toolchain + name: ${{ needs.stage1.outputs.UUID }}-toolchain path: ${{ runner.temp }} - name: Checkout the Git repository uses: actions/checkout@v3 @@ -54,8 +62,8 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Import container run: | - docker load --input ${{ runner.temp }}/toolchain.tar.gz - rm ${{ runner.temp }}/toolchain.tar.gz + docker load --input ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-toolchain.tar.gz + rm ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-toolchain.tar.gz - name: Build and push toolchain run: ./scripts/build -g -s base - name: Export the container @@ -63,8 +71,8 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v4 with: - name: base - path: ${{ runner.temp }}/base.tar.gz + name: ${{ needs.stage1.outputs.UUID }}-base + path: ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-base.tar.gz stage3: name: Stage 3 runs-on: ubuntu-latest @@ -76,7 +84,7 @@ jobs: - name: Download artifact uses: actions/download-artifact@v4 with: - name: base + name: ${{ needs.stage1.outputs.UUID }}-base path: ${{ runner.temp }} - name: Checkout the Git repository uses: actions/checkout@v3 @@ -90,7 +98,7 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Import container run: | - docker load --input ${{ runner.temp }}/base.tar.gz - rm ${{ runner.temp }}/base.tar.gz + docker load --input ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-base.tar.gz + rm ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-base.tar.gz - name: Build and push toolchain run: ./scripts/build -g -s ${{ matrix.target }} From 7b98153664f56cc1054a8f4cc85a848a24ea9d39 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Tue, 29 Apr 2025 17:09:48 +0900 Subject: [PATCH 36/56] fix/ci/pr: remove unnecessary packages --- .github/workflows/pr.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 818682d..8f7e44e 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -28,9 +28,6 @@ jobs: - name: Export the container id: export_container_uuid run: | - export DEBIAN_FRONTEND=noninteractive - sudo apt-get update -y - sudo apt-get install -y uuid-runtime export UUID=$(uuidgen) echo "UUID=$UUID" >> "$GITHUB_ENV" echo "UUID=$UUID" >> "$GITHUB_OUTPUT" From fb714689e50b05dc749dbac0aae4b2f3da6011b7 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Tue, 29 Apr 2025 17:10:57 +0900 Subject: [PATCH 37/56] fix/sscript/build: save build to local image --- scripts/build | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/build b/scripts/build index 5c01751..55dc472 100755 --- a/scripts/build +++ b/scripts/build @@ -72,6 +72,8 @@ def build( cmd.extend(["--cache-to", f"type=gha,mode=max,scope={image}"]) if publish: cmd.extend(["--push"]) + else: + cmd.extend(["--load"]) cmd.extend(["--tag", f"ghcr.io/toltec-dev/{image}:{version}", "."]) run_cmd(cmd) From af74495078805c317e1c104c1181439b7f1fb217 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Tue, 29 Apr 2025 17:15:13 +0900 Subject: [PATCH 38/56] fix/ci/pr: leave the package install --- .github/workflows/pr.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 8f7e44e..66e2065 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -28,6 +28,9 @@ jobs: - 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" From e52178696f999761e124913d748ebb6251f3a881 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Tue, 29 Apr 2025 17:21:01 +0900 Subject: [PATCH 39/56] fix/ci/pr: use local cache --- .github/workflows/pr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 66e2065..53d1e65 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -65,7 +65,7 @@ jobs: docker load --input ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-toolchain.tar.gz rm ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-toolchain.tar.gz - name: Build and push toolchain - run: ./scripts/build -g -s base + run: docker context use default && ./scripts/build -g -s base - 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 @@ -101,4 +101,4 @@ jobs: docker load --input ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-base.tar.gz rm ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-base.tar.gz - name: Build and push toolchain - run: ./scripts/build -g -s ${{ matrix.target }} + run: docker context use default && ./scripts/build -g -s ${{ matrix.target }} From aff73ac5681ee46c500a69f10e5e9325dbca6929 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Tue, 29 Apr 2025 17:32:46 +0900 Subject: [PATCH 40/56] fix/ci/pr: use local cache, take 2 --- .github/workflows/pr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 53d1e65..c159ba6 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -65,7 +65,7 @@ jobs: docker load --input ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-toolchain.tar.gz rm ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-toolchain.tar.gz - name: Build and push toolchain - run: docker context use default && ./scripts/build -g -s base + run: docker buildx use default && ./scripts/build -g -s base - 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 @@ -101,4 +101,4 @@ jobs: docker load --input ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-base.tar.gz rm ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-base.tar.gz - name: Build and push toolchain - run: docker context use default && ./scripts/build -g -s ${{ matrix.target }} + run: docker buildx use default && ./scripts/build -g -s ${{ matrix.target }} From 97cc5e347648745a359535348a269afb80b0f606 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Tue, 29 Apr 2025 18:40:23 +0900 Subject: [PATCH 41/56] fix: final build fix --- .github/workflows/pr.yml | 21 +++++++++++++++------ scripts/build | 14 +++++++++++--- 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index c159ba6..fbf3c23 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -43,6 +43,8 @@ jobs: stage2: name: Stage 2 runs-on: ubuntu-latest + outputs: + UUID: ${{ steps.export_uuid_for_stage3.outputs.UUID }} needs: stage1 steps: - name: Download artifact @@ -60,12 +62,17 @@ 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: | - docker load --input ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-toolchain.tar.gz + 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: docker buildx use default && ./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 @@ -84,7 +91,7 @@ jobs: - name: Download artifact uses: actions/download-artifact@v4 with: - name: ${{ needs.stage1.outputs.UUID }}-base + name: ${{ needs.stage2.outputs.UUID }}-base path: ${{ runner.temp }} - name: Checkout the Git repository uses: actions/checkout@v3 @@ -98,7 +105,9 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Import container run: | - docker load --input ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-base.tar.gz - rm ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-base.tar.gz + 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: docker buildx use default && ./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/scripts/build b/scripts/build index 55dc472..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,6 +76,8 @@ 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: @@ -84,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) From b9d9f7d34795e05dc94a242539829916e2684010 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Tue, 29 Apr 2025 23:38:06 +0900 Subject: [PATCH 42/56] fix/toolchain: disable ct-ng updatetools due to GNU Savannah stability issue --- toolchain/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/toolchain/Dockerfile b/toolchain/Dockerfile index 3193fac..ce1630f 100644 --- a/toolchain/Dockerfile +++ b/toolchain/Dockerfile @@ -80,7 +80,8 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && ./ct-ng "$NGCONFIG_AARCH64" \ && ./ct-ng oldconfig \ && ./ct-ng upgradeconfig \ - && ./ct-ng updatetools \ + # Disable because GNU Savannah is very unstable + # && ./ct-ng updatetools \ && ./ct-ng build.$(nproc) \ && cd .. \ # Clean up From 050ac0d416c1b4f6a407aadcf049f0dc0b091660 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Wed, 30 Apr 2025 13:25:24 +0900 Subject: [PATCH 43/56] fix/toolchain: rMPP GCC 11 --- toolchain/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/toolchain/Dockerfile b/toolchain/Dockerfile index ce1630f..e7f5c73 100644 --- a/toolchain/Dockerfile +++ b/toolchain/Dockerfile @@ -71,6 +71,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && 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 \ From a6f034df385a2d32775da53f00336f410f74ccc0 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Wed, 30 Apr 2025 13:28:10 +0900 Subject: [PATCH 44/56] fix/toolchain: GCC 11 for rM2 too --- toolchain/crosstool-ng/crosstool.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolchain/crosstool-ng/crosstool.config b/toolchain/crosstool-ng/crosstool.config index 708287b..f6239f7 100644 --- a/toolchain/crosstool-ng/crosstool.config +++ b/toolchain/crosstool-ng/crosstool.config @@ -655,7 +655,7 @@ 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 From 7e4670988ce62a84096ddeab5af3cb2ff07c3958 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Wed, 30 Apr 2025 13:41:02 +0900 Subject: [PATCH 45/56] feat/base: add libdrm for aarch64 --- base/Dockerfile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/base/Dockerfile b/base/Dockerfile index 7b46687..0fc99d2 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -437,6 +437,26 @@ RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive \ && 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 \ From 681661bbc5d644e504d1995058b8139ad17e00f0 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Wed, 30 Apr 2025 13:43:52 +0900 Subject: [PATCH 46/56] feat/toolchain: change to gcc 11 --- toolchain/Dockerfile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/toolchain/Dockerfile b/toolchain/Dockerfile index e7f5c73..f258387 100644 --- a/toolchain/Dockerfile +++ b/toolchain/Dockerfile @@ -13,18 +13,18 @@ RUN export DEBIAN_FRONTEND=noninteractive \ ca-certificates \ cmake \ curl \ - gcc-12 \ - g++-12 \ + 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++ 12 - && update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12 \ - --slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-12 \ - --slave /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-12 \ - --slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-12 \ - --slave /usr/bin/g++ g++ /usr/bin/g++-12 + # 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" From bcb6b6f13ba8328b5e353fc5cd1a59d6b8df5d16 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Thu, 1 May 2025 00:30:46 +0900 Subject: [PATCH 47/56] feat/qt: add libqsgepaper.so --- qt/Dockerfile | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/qt/Dockerfile b/qt/Dockerfile index b86fc34..3733c0e 100644 --- a/qt/Dockerfile +++ b/qt/Dockerfile @@ -91,11 +91,20 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && 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 +RUN curl --proto '=https' --tlsv1.2 -sSf \ + https://github.com/asivery/epfb-re/raw/e0e603b318a9b7da2d508eeb5d6acc4d0c48d931/epframebuffer.h \ + -o "$SYSROOT/usr/include/epframebuffer.h" \ + && echo "cbc8a4639940e7d5958b845037a109987d08ffd7576daa12e127784f13e2d600 $SYSROOT/usr/include/epframebuffer.h" | sha256sum -c \ + && cp "$SYSROOT/usr/include/epframebuffer.h" "$SYSROOT_AARCH64/usr/include/epframebuffer.h" \ + && curl --proto '=https' --tlsv1.2 -sSf \ + https://toltec-dev.org/thirdparty/lib/libqsgepaper-rm1-3.18.2.3.so \ + -o "$SYSROOT/usr/lib/libqsgepaper-rm1.so" \ + && echo "c101ec0dc807e4958766fe8955e46ac732df142ecf5c71f26ed1f52151d3c9e0 $SYSROOT/usr/lib/libqsgepaper-rm1.so" | sha256sum -c \ + && curl --proto '=https' --tlsv1.2 -sSf \ + https://toltec-dev.org/thirdparty/lib/libqsgepaper-rm2-3.18.2.3.so \ + -o "$SYSROOT/usr/lib/libqsgepaper-rm2.so" \ + && echo "881093ec2d9ece6dc762c619d7b16bc5738830be9bdc20dea9b8057f14b372c4 $SYSROOT/usr/lib/libqsgepaper-rm2.so" | sha256sum -c \ + && curl --proto '=https' --tlsv1.2 -sSf \ + https://toltec-dev.org/thirdparty/lib/libqsgepaper-rmpp-3.18.2.3.so \ + -o "$SYSROOT_AARCH64/usr/lib/libqsgepaper.so" \ + && echo "ca98d0048ed582540d8a71b8aa91b83f7cb6a5edce318d7a0f24f839cbe90b64 $SYSROOT_AARCH64/usr/lib/libqsgepaper.so" | sha256sum -c From 1614570415cb222b4edfc43d8834f89a55825d94 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Thu, 1 May 2025 00:45:03 +0900 Subject: [PATCH 48/56] fix: fix tab to double space --- base/Dockerfile | 34 +++++++-------- qt/Dockerfile | 102 +++++++++++++++++++++---------------------- rust/Dockerfile | 4 +- toolchain/Dockerfile | 46 +++++++++---------- 4 files changed, 93 insertions(+), 93 deletions(-) diff --git a/base/Dockerfile b/base/Dockerfile index 0fc99d2..d3e13c3 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -19,7 +19,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ CC="${CROSS_COMPILE}gcc" \ RANLIB="${CROSS_COMPILE}ranlib" \ lib=lib \ - -j$(nproc) \ + -j$(nproc) \ && make install \ RAISE_SETFCAP=no \ lib=lib \ @@ -257,7 +257,7 @@ RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive \ CC="${CROSS_COMPILE}gcc" \ RANLIB="${CROSS_COMPILE}ranlib" \ lib=lib \ - -j$(nproc) \ + -j$(nproc) \ && make install \ RAISE_SETFCAP=no \ lib=lib \ @@ -441,21 +441,21 @@ RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive \ 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' + && 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 \ diff --git a/qt/Dockerfile b/qt/Dockerfile index 3733c0e..5234770 100644 --- a/qt/Dockerfile +++ b/qt/Dockerfile @@ -10,7 +10,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && apt-get update -y \ && apt-get install -y --no-install-recommends \ git \ - libudev-dev \ + libudev-dev \ # Build Qt && cd /root \ && git clone https://code.qt.io/qt/qt5.git \ @@ -19,43 +19,43 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && 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 \ + && 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 .. \ - # 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 \ + && 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" \ + && 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 \ -prefix /usr \ - -extprefix $SYSROOT/usr \ + -extprefix $SYSROOT/usr \ -device linux-arm-remarkable-g++ \ -device-option CROSS_COMPILE="$CROSS_COMPILE" \ -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/arm-linux-gnueabihf.cmake \ + -- -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 .. \ @@ -63,12 +63,12 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && 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 \ + && bash -c 'source /opt/x-tools/switch-aarch64.sh \ + && mkdir qt5-build \ + && cd qt5-build \ + && ../qt5/configure \ -prefix /usr \ - -extprefix $SYSROOT/usr \ + -extprefix $SYSROOT/usr \ -device linux-aarch64-remarkable-g++ \ -device-option CROSS_COMPILE="$CROSS_COMPILE" \ -no-rpath \ @@ -76,15 +76,15 @@ RUN export DEBIAN_FRONTEND=noninteractive \ -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 .. \ + -- -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' \ + && find "$SYSROOT" -type l,f -name "*.la" | xargs --no-run-if-empty rm' \ && apt-get autoremove -y \ git \ && apt-get clean \ @@ -94,17 +94,17 @@ RUN export DEBIAN_FRONTEND=noninteractive \ RUN curl --proto '=https' --tlsv1.2 -sSf \ https://github.com/asivery/epfb-re/raw/e0e603b318a9b7da2d508eeb5d6acc4d0c48d931/epframebuffer.h \ -o "$SYSROOT/usr/include/epframebuffer.h" \ - && echo "cbc8a4639940e7d5958b845037a109987d08ffd7576daa12e127784f13e2d600 $SYSROOT/usr/include/epframebuffer.h" | sha256sum -c \ - && cp "$SYSROOT/usr/include/epframebuffer.h" "$SYSROOT_AARCH64/usr/include/epframebuffer.h" \ - && curl --proto '=https' --tlsv1.2 -sSf \ - https://toltec-dev.org/thirdparty/lib/libqsgepaper-rm1-3.18.2.3.so \ - -o "$SYSROOT/usr/lib/libqsgepaper-rm1.so" \ - && echo "c101ec0dc807e4958766fe8955e46ac732df142ecf5c71f26ed1f52151d3c9e0 $SYSROOT/usr/lib/libqsgepaper-rm1.so" | sha256sum -c \ - && curl --proto '=https' --tlsv1.2 -sSf \ - https://toltec-dev.org/thirdparty/lib/libqsgepaper-rm2-3.18.2.3.so \ - -o "$SYSROOT/usr/lib/libqsgepaper-rm2.so" \ - && echo "881093ec2d9ece6dc762c619d7b16bc5738830be9bdc20dea9b8057f14b372c4 $SYSROOT/usr/lib/libqsgepaper-rm2.so" | sha256sum -c \ - && curl --proto '=https' --tlsv1.2 -sSf \ - https://toltec-dev.org/thirdparty/lib/libqsgepaper-rmpp-3.18.2.3.so \ - -o "$SYSROOT_AARCH64/usr/lib/libqsgepaper.so" \ + && echo "cbc8a4639940e7d5958b845037a109987d08ffd7576daa12e127784f13e2d600 $SYSROOT/usr/include/epframebuffer.h" | sha256sum -c \ + && cp "$SYSROOT/usr/include/epframebuffer.h" "$SYSROOT_AARCH64/usr/include/epframebuffer.h" \ + && curl --proto '=https' --tlsv1.2 -sSf \ + https://toltec-dev.org/thirdparty/lib/libqsgepaper-rm1-3.18.2.3.so \ + -o "$SYSROOT/usr/lib/libqsgepaper-rm1.so" \ + && echo "c101ec0dc807e4958766fe8955e46ac732df142ecf5c71f26ed1f52151d3c9e0 $SYSROOT/usr/lib/libqsgepaper-rm1.so" | sha256sum -c \ + && curl --proto '=https' --tlsv1.2 -sSf \ + https://toltec-dev.org/thirdparty/lib/libqsgepaper-rm2-3.18.2.3.so \ + -o "$SYSROOT/usr/lib/libqsgepaper-rm2.so" \ + && echo "881093ec2d9ece6dc762c619d7b16bc5738830be9bdc20dea9b8057f14b372c4 $SYSROOT/usr/lib/libqsgepaper-rm2.so" | sha256sum -c \ + && curl --proto '=https' --tlsv1.2 -sSf \ + https://toltec-dev.org/thirdparty/lib/libqsgepaper-rmpp-3.18.2.3.so \ + -o "$SYSROOT_AARCH64/usr/lib/libqsgepaper.so" \ && echo "ca98d0048ed582540d8a71b8aa91b83f7cb6a5edce318d7a0f24f839cbe90b64 $SYSROOT_AARCH64/usr/lib/libqsgepaper.so" | sha256sum -c diff --git a/rust/Dockerfile b/rust/Dockerfile index 2e3a283..824179a 100644 --- a/rust/Dockerfile +++ b/rust/Dockerfile @@ -6,8 +6,8 @@ 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 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 + && /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/toolchain/Dockerfile b/toolchain/Dockerfile index f258387..df1adc6 100644 --- a/toolchain/Dockerfile +++ b/toolchain/Dockerfile @@ -65,30 +65,30 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && 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 \ + && 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 updatetools \ && ./ct-ng build.$(nproc) \ - && cd .. \ + && 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" \ + && 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 \ @@ -149,7 +149,7 @@ 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" \ + SYSROOT_AARCH64="/opt/x-tools/$NGCONFIG_AARCH64/$NGCONFIG_AARCH64/sysroot" \ NGCONFIG="$NGCONFIG" \ TARGET_PREFIX="$CHOST" @@ -169,7 +169,7 @@ EOF COPY opkg /opt/x-tools/$NGCONFIG/$NGCONFIG/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 \ + && 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 From 24590c65017a147cb3a85ddb7a9a634c4ef8f83f Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Thu, 1 May 2025 00:46:07 +0900 Subject: [PATCH 49/56] misc/qt: rename qsgepaper to qsgepaper-rmpp --- qt/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt/Dockerfile b/qt/Dockerfile index 5234770..5adbcaa 100644 --- a/qt/Dockerfile +++ b/qt/Dockerfile @@ -107,4 +107,4 @@ RUN curl --proto '=https' --tlsv1.2 -sSf \ && curl --proto '=https' --tlsv1.2 -sSf \ https://toltec-dev.org/thirdparty/lib/libqsgepaper-rmpp-3.18.2.3.so \ -o "$SYSROOT_AARCH64/usr/lib/libqsgepaper.so" \ - && echo "ca98d0048ed582540d8a71b8aa91b83f7cb6a5edce318d7a0f24f839cbe90b64 $SYSROOT_AARCH64/usr/lib/libqsgepaper.so" | sha256sum -c + && echo "ca98d0048ed582540d8a71b8aa91b83f7cb6a5edce318d7a0f24f839cbe90b64 $SYSROOT_AARCH64/usr/lib/libqsgepaper-rmpp.so" | sha256sum -c From 0ba202f80b10337dc213ea25648ac730e5dbf719 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Thu, 1 May 2025 12:23:06 +0900 Subject: [PATCH 50/56] fix/qt: make curl follow redirect --- qt/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt/Dockerfile b/qt/Dockerfile index 5adbcaa..6216021 100644 --- a/qt/Dockerfile +++ b/qt/Dockerfile @@ -91,7 +91,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && 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 \ +RUN curl --proto '=https' --tlsv1.2 -sSLf \ https://github.com/asivery/epfb-re/raw/e0e603b318a9b7da2d508eeb5d6acc4d0c48d931/epframebuffer.h \ -o "$SYSROOT/usr/include/epframebuffer.h" \ && echo "cbc8a4639940e7d5958b845037a109987d08ffd7576daa12e127784f13e2d600 $SYSROOT/usr/include/epframebuffer.h" | sha256sum -c \ From 6d1c6324ad8099d8348b5f61c8130545e2befa66 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Thu, 1 May 2025 15:37:19 +0900 Subject: [PATCH 51/56] fix/qt: fixed filename --- qt/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt/Dockerfile b/qt/Dockerfile index 6216021..9547acc 100644 --- a/qt/Dockerfile +++ b/qt/Dockerfile @@ -106,5 +106,5 @@ RUN curl --proto '=https' --tlsv1.2 -sSLf \ && echo "881093ec2d9ece6dc762c619d7b16bc5738830be9bdc20dea9b8057f14b372c4 $SYSROOT/usr/lib/libqsgepaper-rm2.so" | sha256sum -c \ && curl --proto '=https' --tlsv1.2 -sSf \ https://toltec-dev.org/thirdparty/lib/libqsgepaper-rmpp-3.18.2.3.so \ - -o "$SYSROOT_AARCH64/usr/lib/libqsgepaper.so" \ + -o "$SYSROOT_AARCH64/usr/lib/libqsgepaper-rmpp.so" \ && echo "ca98d0048ed582540d8a71b8aa91b83f7cb6a5edce318d7a0f24f839cbe90b64 $SYSROOT_AARCH64/usr/lib/libqsgepaper-rmpp.so" | sha256sum -c From 54aae1c4f67ebc1428b728e64da3eb5dc76f5332 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Thu, 1 May 2025 15:39:35 +0900 Subject: [PATCH 52/56] feat/ci: set retention to 1d --- .github/workflows/pr.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index fbf3c23..826caed 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -40,6 +40,7 @@ jobs: with: name: ${{ env.UUID }}-toolchain path: ${{ runner.temp }}/${{ env.UUID }}-toolchain.tar.gz + retention-days: 1 stage2: name: Stage 2 runs-on: ubuntu-latest @@ -80,6 +81,7 @@ jobs: 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 From 3705b55f8c1fd086b7099339025df2eccc095298 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Thu, 1 May 2025 16:50:22 +0900 Subject: [PATCH 53/56] feat: final touches --- toolchain/Dockerfile | 12 ++++++++++++ toolchain/opkg-aarch64/opkg.conf | 5 +++++ 2 files changed, 17 insertions(+) create mode 100644 toolchain/opkg-aarch64/opkg.conf diff --git a/toolchain/Dockerfile b/toolchain/Dockerfile index df1adc6..4b6583f 100644 --- a/toolchain/Dockerfile +++ b/toolchain/Dockerfile @@ -152,6 +152,17 @@ ENV ARCH=arm \ 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 @@ -167,6 +178,7 @@ 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 \ 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 From 79dc9aa555f9435ce1340d0e45e2fb73d3a073ad Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Mon, 9 Jun 2025 08:24:43 +0900 Subject: [PATCH 54/56] fix/rust: typo Co-authored-by: Nathaniel van Diepen --- rust/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/Dockerfile b/rust/Dockerfile index 824179a..a7f396b 100644 --- a/rust/Dockerfile +++ b/rust/Dockerfile @@ -1,4 +1,4 @@ -# Rust nightly targeting the armv7-hf and aarch64 architecture +# Rust nightly targeting the armv7-hf and aarch64 architectures ARG FROM FROM $FROM From 4734a36b8d3ab4ccb7126e2db24852d00826545b Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Mon, 9 Jun 2025 12:18:54 +0900 Subject: [PATCH 55/56] fix/toolchain: fix unintended version regression --- toolchain/crosstool-ng/crosstool.config | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/toolchain/crosstool-ng/crosstool.config b/toolchain/crosstool-ng/crosstool.config index f6239f7..cbb303c 100644 --- a/toolchain/crosstool-ng/crosstool.config +++ b/toolchain/crosstool-ng/crosstool.config @@ -403,8 +403,8 @@ CT_BINUTILS_PATCH_ORDER="global" # 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 is not set -CT_BINUTILS_V_2_35=y +CT_BINUTILS_V_2_36=y +# CT_BINUTILS_V_2_35 is not set # CT_BINUTILS_V_2_34 is not set # CT_BINUTILS_V_2_33 is not set # CT_BINUTILS_V_2_32 is not set @@ -414,7 +414,7 @@ CT_BINUTILS_V_2_35=y # CT_BINUTILS_V_2_28 is not set # CT_BINUTILS_V_2_27 is not set # CT_BINUTILS_V_2_26 is not set -CT_BINUTILS_VERSION="2.35.1" +CT_BINUTILS_VERSION="2.36.1" CT_BINUTILS_MIRRORS="$(CT_Mirrors GNU binutils) $(CT_Mirrors sourceware binutils/releases)" CT_BINUTILS_ARCHIVE_FILENAME="@{pkg_name}-@{version}" CT_BINUTILS_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" From 8b628999153c6917ad68000f6070586544f5a6a5 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Thu, 26 Jun 2025 23:58:58 +0900 Subject: [PATCH 56/56] misc/qt: remove libqsgepaper from toolchain --- qt/Dockerfile | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/qt/Dockerfile b/qt/Dockerfile index 9547acc..81b7c1d 100644 --- a/qt/Dockerfile +++ b/qt/Dockerfile @@ -90,21 +90,3 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && 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 -sSLf \ - https://github.com/asivery/epfb-re/raw/e0e603b318a9b7da2d508eeb5d6acc4d0c48d931/epframebuffer.h \ - -o "$SYSROOT/usr/include/epframebuffer.h" \ - && echo "cbc8a4639940e7d5958b845037a109987d08ffd7576daa12e127784f13e2d600 $SYSROOT/usr/include/epframebuffer.h" | sha256sum -c \ - && cp "$SYSROOT/usr/include/epframebuffer.h" "$SYSROOT_AARCH64/usr/include/epframebuffer.h" \ - && curl --proto '=https' --tlsv1.2 -sSf \ - https://toltec-dev.org/thirdparty/lib/libqsgepaper-rm1-3.18.2.3.so \ - -o "$SYSROOT/usr/lib/libqsgepaper-rm1.so" \ - && echo "c101ec0dc807e4958766fe8955e46ac732df142ecf5c71f26ed1f52151d3c9e0 $SYSROOT/usr/lib/libqsgepaper-rm1.so" | sha256sum -c \ - && curl --proto '=https' --tlsv1.2 -sSf \ - https://toltec-dev.org/thirdparty/lib/libqsgepaper-rm2-3.18.2.3.so \ - -o "$SYSROOT/usr/lib/libqsgepaper-rm2.so" \ - && echo "881093ec2d9ece6dc762c619d7b16bc5738830be9bdc20dea9b8057f14b372c4 $SYSROOT/usr/lib/libqsgepaper-rm2.so" | sha256sum -c \ - && curl --proto '=https' --tlsv1.2 -sSf \ - https://toltec-dev.org/thirdparty/lib/libqsgepaper-rmpp-3.18.2.3.so \ - -o "$SYSROOT_AARCH64/usr/lib/libqsgepaper-rmpp.so" \ - && echo "ca98d0048ed582540d8a71b8aa91b83f7cb6a5edce318d7a0f24f839cbe90b64 $SYSROOT_AARCH64/usr/lib/libqsgepaper-rmpp.so" | sha256sum -c