mirror of
https://github.com/armbian/build.git
synced 2026-09-08 23:59:54 +08:00
* docker: skip unavailable cross-compilers on riscv64 hosts When generating Dockerfiles on native riscv64 hosts, skip cross-compiler packages (gcc-x86-64-linux-gnu, gcc-aarch64-linux-gnu, gcc-arm-linux-*) that don't exist in riscv64 package repositories. This fixes generate-dockerfile failures on riscv64 hosts that tried to install non-existent cross-compilation toolchains. Signed-off-by: Igor Pecovnik <igor@armbian.com> * docker: detect host architecture for cross-compiler selection When generating Dockerfiles, detect the actual host architecture using dpkg --print-architecture and pass it to early_prepare_host_dependencies. This ensures that cross-compiler packages that don't exist on certain architectures (e.g., riscv64) are properly skipped during Dockerfile generation. Signed-off-by: Igor Pecovnik <igor@armbian.com> * docker/riscv64: fix cross-compiler availability checks Fix cross-compiler package selection for riscv64 hosts in both Docker generation and extensions: - docker.sh: Detect host architecture and pass it to dependency resolution functions - extensions: Check host_arch and skip cross-compilers unavailable on riscv64 (g++-aarch64-linux-gnu, gcc-arm-linux-gnueabi) This fixes generate-dockerfile failures on native riscv64 hosts where cross-compilation toolchains for other architectures don't exist in the package repositories. Signed-off-by: Igor Pecovnik <igor@armbian.com> * docker/riscv64: skip mvebu64 32-bit compiler on riscv64 hosts Same pattern as sunxi-tools.sh and arm64-compat-vdso.sh — the mvebu64 family unconditionally adds gcc-arm-linux-gnueabi via the add_host_dependencies__mvebu64_add_32_bit_c_compiler hook, which fails on riscv64 hosts (the 32-bit ARM cross-compiler is not available in Debian/Ubuntu RISC-V repositories). Guard the dependency addition with a host_arch check, emit a warn alert when skipping. mvebu64 boards (helios64, macchiatobin etc.) are still built normally on amd64/arm64 hosts. Assisted-by: Claude:claude-opus-4.7 * extensions/c++: fail fast if arm64 cross-compiler declared but missing Mirror arm64-compat-vdso.sh: add a host_dependencies_ready hook that, on hosts where the arm64 c++ cross-compiler is declared (i.e. not riscv64), asserts the g++-aarch64-linux-gnu binary (aarch64-linux-gnu-g++) is actually present after the dependency phase, and errors early otherwise. Signed-off-by: Igor Pecovnik <igor@armbian.com> * kernel: fail fast with clear message when (cross-)compiler is missing Per @iav's riscv64 testing on #9589: cross-building an arm64 target on a riscv64 host silently skips the unavailable gcc-aarch64-linux-gnu at the host-dependency phase, then dies deep in kernel_determine_toolchain with a cryptic "env: 'aarch64-linux-gnu-gcc': No such file or directory" (Error 127). Add a command -v pre-check before the -dumpversion probe so the missing toolchain surfaces as a readable, actionable error naming the compiler, the target ARCH and the host arch. It checks the actually-resolved compiler, so clang builds validate clang (not the gcc) and native builds are unaffected. Signed-off-by: Igor Pecovnik <igor@armbian.com> --------- Signed-off-by: Igor Pecovnik <igor@armbian.com> Co-authored-by: Igor Velkov <325961+iav@users.noreply.github.com>