2722 Commits

Author SHA1 Message Date
Sam Collinson
6b53921f24 Add missing default for COLUMNS env var in uboot and kernel patching scripts 2026-05-01 20:00:34 +02:00
Andreas Niedermair
73a3e49e0c
fixing to armbian-image-release (#9729)
Some checks failed
Infrastructure: Dispatch to fork / 📢 Run repository dispatch on fork (push) Has been cancelled
Infrastructure: Mirror to Codeberg / codeberg (push) Has been cancelled
Maintenance: Announce merge / announcepush (push) Has been cancelled
Maintenance: Security scan / Scorecards analysis (push) Has been cancelled
EXTENSIONS and VENDORPRETTYNAME were not contained in the file
2026-04-27 21:55:58 +02:00
Jianfeng Liu
c4e7a9d8ed kernel: add linux-initramfs-tool as dep of linux-image package for other alternatives like dracut 2026-04-27 17:39:16 +02:00
Jianfeng Liu
0676a241f9 kernel: add dependency of initramfs-tools for linux-image package 2026-04-26 19:26:26 +08:00
Ricardo Pardini
6e144e119a cli: kernel-dtb: pass -@ to normalized dtc invocation
- more comparable, but nothing too drastic
2026-04-24 12:55:32 +02:00
Ricardo Pardini
0459ebb6c5 armbian-kernel: btf: KPROBES + KPROBE_EVENTS
- only for KERNEL_BTF=yes case
2026-04-23 20:49:10 +02:00
Ricardo Pardini
0e73604d9d armbian-kernel: btf: DEBUG_INFO_REDUCED blocks DEBUG_INFO_BTF
- only for KERNEL_BTF=yes case
2026-04-23 20:49:10 +02:00
Igor Velkov
83ddc2204c artifact-uboot: add UBOOT_GIT_CACHE_TTL to control git ref memoization (fixes #7710)
Some checks failed
Infrastructure: Dispatch to fork / 📢 Run repository dispatch on fork (push) Has been cancelled
Infrastructure: Mirror to Codeberg / codeberg (push) Has been cancelled
Maintenance: Announce merge / announcepush (push) Has been cancelled
Maintenance: Security scan / Scorecards analysis (push) Has been cancelled
By default the git ref of BOOTSOURCE/BOOTBRANCH is memoized for 3600 seconds,
so pushing new commits to a tracked branch is not picked up until the cache
expires.  Add UBOOT_GIT_CACHE_TTL, mirroring KERNEL_GIT_CACHE_TTL in
artifact-kernel.sh, so users can override this timeout (set to a low value
or 0 to always re-resolve the upstream SHA1).

As suggested by rpardini in armbian/build#7710.
2026-04-20 17:30:02 +02:00
Igor Velkov
3814034624 partitioning: fix #9201 /etc/fstab entry (double comma)
Some checks failed
Infrastructure: Dispatch to fork / 📢 Run repository dispatch on fork (push) Has been cancelled
Infrastructure: Mirror to Codeberg / codeberg (push) Has been cancelled
Maintenance: Announce merge / announcepush (push) Has been cancelled
Maintenance: Security scan / Scorecards analysis (push) Has been cancelled
Data: Sync board list / Send dispatch (push) Has been cancelled
mountopts[] values start with a leading comma by convention (line 26),
but all call sites added an explicit comma before the expansion, producing
e.g. `defaults,,commit=120,errors=remount-ro` for ext4.

Also removed duplicate mountopts[btrfs] override (line 345 duplicated
line 85 and would silently clobber options set by hooks).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 21:17:01 +02:00
Igor Velkov
7c39bd93a9 config: enable uboot-binman-fix-pkg-resources extension
Some checks failed
Infrastructure: Dispatch to fork / 📢 Run repository dispatch on fork (push) Has been cancelled
Infrastructure: Mirror to Codeberg / codeberg (push) Has been cancelled
Maintenance: Announce merge / announcepush (push) Has been cancelled
Maintenance: Security scan / Scorecards analysis (push) Has been cancelled
Enable the binman pkg_resources fix for all builds.
The extension is a no-op for U-Boot >= v2025.10.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 23:55:51 +02:00
Igor Pecovnik
aee0fe91d9 cosmetic: suppress oras 404 noise on cache miss
Capture oras stderr via temp file; suppress if "not found"
(expected cache miss). Any other error still shown as warning.
2026-04-16 23:54:49 +02:00
Igor Pecovnik
e829772e5e fix: clean up chroot environment — locale, GPG, setfont, apt sandbox
1. LC_ALL="C" LANG="C" LANGUAGE="" SUDO_USER="" in chroot_sdcard/
   chroot_mount wrappers + direct chroot calls in distro-specific.sh
2. Temporary --homedir for gpg --dearmor call
3. setupcon --save --force 2>/dev/null (suppress setfont noise)
4. Pre-create /etc/apt/apt.conf.d/99-armbian-sandbox; removed in cleanup
2026-04-16 23:54:49 +02:00
Igor Pecovnik
75b74954e1 base-files: symlink upstream distro logos to Armbian's
Ubuntu hardcodes lookups for ubuntu-logo.svg, ubuntu-logo-text.png,
and ubuntu-logo-text-dark.png in GNOME Settings -> About and other
places. LOGO=armbian-logo in os-release only helps apps that use
the icon-spec lookup; the rest reference the filenames directly.

Since we repack base-files as our own, replace the upstream files
with relative symlinks pointing at the Armbian equivalents
(armbian-logo.svg, armbian-logo-text.png, armbian-logo-text-dark.png)
which are shipped by armbian-bsp-cli via packages/bsp/common/usr/
share/pixmaps/. Also handles debian-logo variants if present.

Result: every panel that references ubuntu-logo* by filename now
renders the Armbian logo without needing to know about the
LOGO= os-release field.
2026-04-16 23:53:25 +02:00
Igor Velkov
f41dcaf28a kernel: add version to linux-headers virtual package
The linux-headers-${BRANCH}-${LINUXFAMILY} package declared
"Provides: linux-headers" without a version. Per Debian Policy §7.5,
an unversioned virtual package cannot satisfy a versioned dependency.

DKMS packages (e.g. bcachefs-kernel-dkms) commonly depend on
"linux-headers (>= X.Y)" as the last alternative after distro-specific
headers. With the unversioned Provides, apt skipped this alternative
and pulled linux-headers-generic from the Ubuntu archive, installing
headers that do not match the running Armbian kernel.

Set "Provides: linux-headers (= ${kernel_version})" so that the upstream
kernel version (e.g. 7.0.0-rc7) satisfies such version constraints.

Versioned Provides have been supported since dpkg 1.17.11 (Debian 8,
Ubuntu 15.04).
2026-04-16 23:52:54 +02:00
Igor Velkov
338bfe90f0 fix(kernel-config): track kernel_config_set_* changes in hash array
kernel_config_modifying_hashes was declared locally in
artifact_kernel_prepare_version(), and the kernel_config_set_{y,n,m,string,val}
helpers never wrote to it. Hooks that used those helpers (e.g.
custom_kernel_config) would be applied to .config but invisible to
the kernel-artifact cache fingerprint, so a cached artifact built
without the hook could be reused for a later build that added one.

Declare the array globally, make every setter append its change, and
initialize the array in call_extensions_kernel_config as a safety net
for non-artifact call paths.

Refs: #9680
Co-authored-by: EvilOlaf <50047739+EvilOlaf@users.noreply.github.com>
2026-04-16 23:52:20 +02:00
Igor Velkov
6d7cd74018 fix(kernel-config): append missing newline to .config before edits
Kernel's ./scripts/config appends via `echo >>`; configs without a
trailing newline end up with the first new option glued to the last
line, silently dropping subsequent custom_kernel_config hooks.

Fixes: #9680
2026-04-16 23:52:20 +02:00
igorpecovnik
8fb6c51db2 tools: Bump SHELLFMT_VERSION from 3.13.0 to 3.13.1
Some checks failed
Infrastructure: Dispatch to fork / 📢 Run repository dispatch on fork (push) Has been cancelled
Infrastructure: Mirror to Codeberg / codeberg (push) Has been cancelled
Maintenance: Announce merge / announcepush (push) Has been cancelled
Maintenance: Security scan / Scorecards analysis (push) Has been cancelled
2026-04-16 08:51:17 +02:00
tabris
81f107d40a framework artifact-rootfs - remove the last vestige of LEGACY_DEBOOTSTRAP 2026-03-27 08:11:27 -04:00
tabris
1756542a9b pre-deploy qemu binary, if needed, before mmdebstrap runs
Some checks failed
Infrastructure: Dispatch to fork / 📢 Run repository dispatch on fork (push) Has been cancelled
Infrastructure: Mirror to Codeberg / codeberg (push) Has been cancelled
Maintenance: Announce merge / announcepush (push) Has been cancelled
Maintenance: Security scan / Scorecards analysis (push) Has been cancelled
2026-03-25 22:50:44 +01:00
tabris
733b3d24af framework rootfs-create: remove LEGACY_DEBOOTSTRAP, use only the upstream mmdebstrap 2026-03-25 22:50:44 +01:00
EvilOlaf
88ddcb4a00 sunxi: fix Unhandled Exception in EL3. and/causing secondary cpus not coming online 2026-03-25 22:45:27 +01:00
Igor Pecovnik
7ed64dff27 armbian-kernel: improve code documentation and formatting
- Add comprehensive function documentation for kernel config hooks
- Add inline comments for all kernel configuration options
- Align all inline comments to column 55 for consistency
- Remove excessive blank lines between options
- Split multi-option lines for better readability

Signed-off-by: Igor Pecovnik <igor@armbian.com>
2026-03-23 11:10:04 +01:00
igorpecovnik
3e6617cac9 tools: Bump ORAS_VERSION from 1.3.0 to 1.3.1 2026-03-16 07:20:28 +01:00
igorpecovnik
755e351488 tools: Bump SHELLFMT_VERSION from 3.12.0 to 3.13.0 2026-03-16 07:18:30 +01:00
tabris
8d6b1f73e2 framework run_host_x86_binary_logged - robustness improvements in automatic quoting 2026-03-15 20:23:27 +01:00
tabris
b16e8dcc83 framework run_host_x86_binary_logged - handle static vs dynamic binaries, vs when we pass in qemu_ld_prefix 2026-03-15 20:23:27 +01:00
tabris
03646bd3a0 framework run_host_x86_binary_logged - support 32bit-x86 also 2026-03-15 20:23:27 +01:00
x13.me
d61dfc39e9 Reword BTF memory check
This commit rewords the BTF memory check in lib/functions/compilation/armbian-kernel.sh to include the value checked against

Additionally, the unit is correctly set as MiB
2026-03-09 19:42:35 +01:00
Igor Velkov
ea547d6e0a (#9400 P1a) lib/functions/bsp/armbian-bsp-cli-deb.sh: convert [ ] to [[ ]]
Replace all 43 POSIX `[ ]` tests with bash `[[ ]]` across five board-side
package hook functions (preinst, postinst_base, postinst_finish,
postinst_update_uboot_bootscript, get_bootscript_info).

Normalise `=` to `==` in the `"$1" == "upgrade"` comparison.
Collapse paired `[ A ] && [ B ]` into a single `[[ A && B ]]` where possible.
Variables that were previously unquoted inside `[ ]` (e.g. ${BOOTSCRIPT_DST},
${BOOTSCRIPT_BACKUP_VERSION}) are now properly quoted.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 13:36:20 +01:00
Igor Velkov
73e69995d8 (#9400 P1a) lib/functions/compilation/kernel-debs.sh: convert [ ] to [[ ]]
Replace POSIX `[ ]` with bash `[[ ]]` on one numeric argument-count check.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 13:36:20 +01:00
Igor Velkov
234f39b6ca (#9400 P1a) lib/functions/bsp/utils-bsp.sh: convert [ ] to [[ ]]
Replace POSIX `[ ]` with bash `[[ ]]` on one directory existence check.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 13:36:20 +01:00
Igor Velkov
3e4de6c02b (#9400 P1a) lib/functions/image/fingerprint.sh: convert [ ] to [[ ]]
Replace POSIX `[ ]` with bash `[[ ]]` on one -n test.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 13:36:20 +01:00
Igor Velkov
b9bf4489a8 (#9400 P1a) lib/functions/image/initrd.sh: convert [ ] to [[ ]]
Replace POSIX `[ ]` with bash `[[ ]]` on one string comparison.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 13:36:20 +01:00
Igor Velkov
934575ee35 (#9400 P1a) lib/functions/rootfs/distro-agnostic.sh: convert [ ] to [[ ]]
Replace two chained POSIX `[ ]` with a single bash `[[ ]]` using `&&`
inside the double brackets.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 13:36:20 +01:00
Igor Velkov
956aa02bf7 (#9400 P1a) lib/functions/rootfs/distro-specific.sh: convert [ ] to [[ ]]
Replace POSIX `[ ]` with bash `[[ ]]` on four conditionals: file/path
existence checks and an array length comparison.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 13:36:20 +01:00
Igor Velkov
2d1784eff0 (#9400 P1a) lib/functions/configuration/main-config.sh: convert [ ] to [[ ]]
Replace POSIX `[ ]` with bash `[[ ]]` on six conditionals: file existence
checks, string comparisons, and -n tests. Also normalise `=` to `==` in
the string comparison.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 13:36:20 +01:00
Igor Velkov
7b137e0067 (#9400 P1a) lib/functions/main/config-prepare.sh: convert [ ] to [[ ]]
Replace POSIX `[ ]` with bash `[[ ]]` on one array expansion check.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 13:36:20 +01:00
Igor Velkov
1cafc27959 (#9400 P1a) lib/functions/host/prepare-host.sh: convert [ ] to [[ ]]
Replace POSIX `[ ]` with bash `[[ ]]` on one string comparison.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 13:36:20 +01:00
Igor Velkov
f0201782a4 (#9400 P1a) lib/functions/image/partitioning.sh: convert [ ] to [[ ]]
Replace POSIX `[ ]` with bash `[[ ]]` on three remaining single-bracket
conditionals: two numeric comparisons on sfdisk version (lines 251, 270)
and one -z test with unquoted variable (line 485, also adds quoting).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 13:36:20 +01:00
Igor Velkov
ae6735f470
patching: fix #9028 timestamp when multiple patches touch same file (#9489)
If patch B sorts after patch A but has an older mtime, it would
overwrite A's timestamp on the shared file, causing the kernel Makefile
to skip recompilation.

Fix: only call os.utime() when the new mtime is strictly greater than
the file's current mtime.
2026-03-05 10:13:40 +01:00
EvilOlaf
60475536b8 meson64: disable broken wifi driver
just like with rockchip64-7.0
2026-03-04 05:28:00 +01:00
Igor Velkov
1b74748622
Extension: ccache-remote — shared compilation cache via Redis/HTTP (#9369)
* add hook to allow customizing before kernel make env creation
* Hook runs in docker_cli_prepare_launch() just before DOCKER_EXTRA_ARGS
is processed, allowing extensions to add Docker arguments with a more
descriptive hook name than add_host_dependencies.
* Extension: ccache-remote

Enables ccache with remote Redis storage for sharing compilation cache across build hosts.

Features:
- Auto-discovery via Avahi/mDNS (ccache.local hostname)
- Explicit Redis server configuration via CCACHE_REMOTE_STORAGE
- Build statistics display at end of build (hit/miss/error rates)
- Support for both Docker and native builds
- Hooks for kernel and u-boot compilation environments

Documentation includes server setup instructions with security warnings,
client mDNS configuration, and cache sharing requirements.


* uboot: fix ccache environment and add extension hook

U-Boot build uses `env -i` which clears all environment variables.
CCACHE_DIR and CCACHE_TEMPDIR were not explicitly passed to make,
unlike kernel build (kernel-make.sh). This caused ccache to use
default directory instead of configured Armbian one, breaking
cache statistics and shared cache functionality.

Changes:
- Add CCACHE_DIR and CCACHE_TEMPDIR to uboot_make_envs
- Add uboot_make_config hook for extensions (similar to kernel_make_config),
  allowing modification of environment variables before compilation

* add long list of allowed ccache-related env vars
* set permissions to ccache files RW for everyone if cache not private
* ccache: add ccache_post_compilation hook for extensions
* ccache-remote: use ccache_post_compilation hook instead of cleanup handler

Show remote ccache stats after each compilation (kernel, uboot) via hook,
instead of once at the end via cleanup handler. Stats now shown even on
build failure.

* ccache: show stats with safe arithmetic
* ccache/uboot: improve code comments per review feedback

- uboot.sh: clarify ARMBIAN=foe workaround for dual-compiler scenario
- ccache-remote.sh: document that CCACHE_REDIS_CONNECT_TIMEOUT must be
  set before extension loads

* ccache-remote: mask storage URLs in logs

Mask CCACHE_REMOTE_STORAGE when emitting Docker env debug logs.

* ccache-remote: extract ccache_inject_envs() helper to deduplicate passthrough loops

Extract ccache_inject_envs() helper to deduplicate identical passthrough
loops in kernel and uboot make config hooks.

ccache-remote: rename functions to follow project naming conventions

Rename get_redis_stats and mask_storage_url to ccache_get_redis_stats
and ccache_mask_storage_url to follow project naming conventions.

ccache-remote: mask credentials in debug log output for passthrough loops

Mask CCACHE_REMOTE_STORAGE value through ccache_mask_storage_url() before
logging in both Docker env and make env passthrough loops to avoid leaking
credentials into build logs.

* ccache-remote: add HTTP/WebDAV backend and DNS discovery
* ccache-remote: move extension script into directory layout
* ccache-remote: add server setup docs and config files
* ccache-remote: validate Redis credentials in URLs
* ccache-remote: document Redis auth options and safe passwords

Add separate insecure config example for trusted networks.

Recommend URL-safe hex passwords and update setup docs.

* ccache-remote: improve Docker loopback handling and IPv6 host parsing
2026-03-01 01:18:35 +01:00
Igor Velkov
986f77495b drop deprecated KERNEL_UPGRADE_FREEZE feature
Was only used once (orangepi5pro.csc) and has been deprecated.
Remove the implementation, the board config, and the README entry.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 01:15:10 +01:00
Igor Velkov
ac9d08cc97 (#9400 P3c) armbian-bsp-cli-deb: safe array assignment from word splitting
Replace unquoted array assignment `arr=(${var})` with
`IFS=' ' read -ra arr <<< "${var}"` to prevent glob expansion.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 01:15:10 +01:00
Igor Velkov
cb3bedf527 (#9400 P3b) patching: add missing -r flag to read
Other read calls in the same file already use -r.
Without -r, backslashes in user input are interpreted as escape characters.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 01:15:10 +01:00
Igor Velkov
a0123f5d7a fix(kernel-headers): preserve build-time autoconf.h across postinst olddefconfig (#9425)
При упаковке linux-headers скомпилированные бинарники из scripts/ удаляются,
так как они собраны под хост сборки, а не под целевую машину (типичный случай
кросс-сборки). Поэтому postinst при установке пакета пересобирает их нативно,
предварительно запустив `make olddefconfig`.

Однако olddefconfig не только подготавливает окружение — он заново вычисляет
конфигурацию ядра, проверяя тулчейн, доступный на целевом хосте при установке.
Если инструменты, использовавшиеся при сборке ядра, на целевой машине отсутствуют
или имеют другую версию, olddefconfig молча отключает соответствующие CONFIG_*
опции (например, CONFIG_CC_IS_CLANG, CONFIG_LTO_CLANG, CONFIG_DEBUG_INFO_BTF).

В результате установленный пакет заголовков описывает не то ядро, которое
реально собрано и работает, а то, которое можно было бы собрать на данном хосте.

Это затрагивает:
- include/generated/autoconf.h (используется препроцессором C)
- include/config/auto.conf + маркер-файлы include/config/ (используются
  make-правилами kbuild)
- include/generated/rustc_cfg (используется Rust-сборками)

Все эти файлы — артефакты сборки и должны описывать скомпилированное ядро,
а не возможности хоста установки.

Исправление: при упаковке сохраняем сайдкар-тарбол с build-time версиями
include/config/ и include/generated/{autoconf.h,rustc_cfg}; восстанавливаем
его в postinst в самом конце, после всех make-шагов.

Fixes: https://github.com/armbian/build/issues/9425

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 22:29:08 +01:00
SuperKali
a8977dcd7d kernel: centralize netfilter legacy xtables config for all families
Some checks failed
Infrastructure: Dispatch to fork / 📢 Run repository dispatch on fork (push) Has been cancelled
Infrastructure: Mirror to Codeberg / codeberg (push) Has been cancelled
Maintenance: Announce merge / announcepush (push) Has been cancelled
Maintenance: Security scan / Scorecards analysis (push) Has been cancelled
Add version-gated NETFILTER_XTABLES_LEGACY and BRIDGE_NF_EBTABLES_LEGACY
support in armbian-kernel.sh for kernels >= 6.18. Also add missing
ebtables table modules (BRIDGE_EBT_BROUTE, BRIDGE_EBT_T_FILTER,
BRIDGE_EBT_T_NAT) unconditionally to the nftables config function.

This ensures all hardware families automatically get legacy xtables
support when building kernels 6.18+, fixing Docker and Proxmox
firewall breakage without requiring per-family config changes.
2026-02-24 04:46:50 +01:00
Timothy Parys
aaad48ef6b Properly handle git submodules when GIT_FIXED_WORKDIR is set
Some checks failed
Infrastructure: Dispatch to fork / 📢 Run repository dispatch on fork (push) Has been cancelled
Infrastructure: Mirror to Codeberg / codeberg (push) Has been cancelled
Maintenance: Announce merge / announcepush (push) Has been cancelled
Maintenance: Security scan / Scorecards analysis (push) Has been cancelled
2026-02-23 00:51:03 +01:00
Aurimas Niekis
e832bb3129 feat(drivers): add RTL8812EU/RTL8822EU wireless driver for EXTRA_WIFI
Integrate the libc0607/rtl88x2eu-20230815 out-of-tree driver into the build
system under EXTRA_WIFI for kernels >= 3.14 and < 6.19.

- Fetch pinned upstream commit ccb31f4ee346d5c2dd45475d276171b2f8de8350
- Install sources under drivers/net/wireless/rtl8822eu
- Enable AP and P2P modes in driver Makefile
- Hook into kernel Kconfig and Makefile via CONFIG_RTL8822EU

Tested working on `6.12.74-current-sunxi` and `6.6.75-legacy-sunxi`.
2026-02-22 16:59:49 +01:00
Sven-Ola Tuecke
e527a1783f OrangePi-RV2: add support for RISCV64 compile-to-binaries.
Required to compile BCM bluetooth firmware hacking tool.

Signed-off-by: Sven-Ola Tuecke <sven-ola@gmx.de>
2026-02-19 22:10:34 -05:00