- Add docker_cleanup_old_images() to remove dangling images and keep only 2 most recent per tag
- Add docker_pull_with_marker() to pull images and update marker files tracking last pull time
- Add docker_setup_auto_pull_cronjob() to create/update system cronjob and wrapper script via hash-based detection
- Add docker_ensure_auto_pull_cronjob() to ensure cronjob is installed and up-to-date
- Create self-contained wrapper script at /usr/local/bin/armbian-docker-pull for cron execution
- Store configuration hash in /var/lib/armbian/docker-pull.hash for smart update detection
- Install cronjob at /etc/cron.d/armbian-docker-pull to pull images every 12 hours
- Move cronjob setup from docker_cli_prepare() to requirements command
- Cronjob is now only installed when users explicitly run ./compile.sh requirements
- Prevents "12 hours since last pull, pulling again" delay during builds
Signed-off-by: Igor Pecovnik <igor@armbian.com>
When building kernels with KERNEL_COMPILER=clang, compiler warnings
were displayed without color despite -fdiagnostics-color=always being
set in KCFLAGS. This GCC-native flag is not reliably honored by clang
when invoked through ccache and the kernel build system with LLVM=1.
Add -fcolor-diagnostics (clang's native flag) to the clang-specific
extra_warnings to ensure colored warning output.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
In Linux 6.19, net_device->dev_addr is const unsigned char *.
Clang with -Werror,-Wincompatible-pointer-types-discards-qualifiers
rejects passing dev_addr to non-const parameters and memcpy into it.
Fix by:
- Replacing memcpy(dev->dev_addr, ...) with dev_addr_set()
- Using local buffer + ether_addr_copy for sprdwl_set_mac_addr call
that needs mutable addr (the function modifies it in-place)
- Changing u8 *mac pointer to u8 mac[ETH_ALEN] array in cfg80211.c
where dev_addr was assigned to a non-const pointer
Relates to #9049
Add a new extension hook point in run_kernel_make_internal() that allows
extensions to modify kernel make parameters before compilation.
Extensions can now modify:
- common_make_params_quoted - parameters passed to make
- common_make_envs - environment variables for make
This enables features like CROSS_COMPILE_COMPAT for 32-bit compat vDSO
on arm64 builds without modifying core build scripts.
Refs: https://github.com/armbian/build/issues/9216
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add loong64 to the list of architectures prepared by prepare_host_binfmt_qemu_cross().
This allows automatic registration and use of qemu-user emulation for LoongArch64
guests, enabling rootfs bootstrap and CI workflows targeting loong64.
This aligns Armbian with Debian’s upcoming native loong64 support (Forky) and allows
testing already via debian-ports and qemu-system-loongarch64.
Signed-off-by: Igor Pecovnik <igor@armbian.com>
When the memoize cache lock is held by another process (e.g., a stale
Docker container from a previous interrupted build), the build would
hang indefinitely without any feedback to the user.
This change:
- First tries non-blocking flock, acquiring immediately if available
- If lock is busy, informs user and waits with periodic status messages
- Adds MEMOIZE_FLOCK_WAIT_INTERVAL (default 10s) for message frequency
- Adds MEMOIZE_FLOCK_MAX_WAIT (default 0=infinite) for optional timeout
- Allows user to interrupt with Ctrl+C
- Suggests checking for stale containers: docker ps -a | grep armbian
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- we've had SKIP_EXTERNAL_TOOLCHAINS=yes for ~5 years now
- drop all usages, mostly through `find_toolchains()`
- drop all manual PATH env injections (we've centralized if ever needed)
- optionally, if UBOOT_BINS_TO_OUTPUT=yes, copy them out to output/
- this might reveal differences in binwalk itself more than u-boot
- but better than nothing
The `DEST_LANG` variable affects rootfs cache content (locale is generated via
`locale-gen "${DEST_LANG}"` before cache is packaged), but it was not included in the
cache hash calculation.
This meant that changing `DEST_LANG` would not invalidate the existing cache,
potentially resulting in images with incorrect locale.
Include `DEST_LANG` in the `hash_hooks` calculation in `calculate_rootfs_cache_id()`.
Changes
- `lib/functions/rootfs/create-cache.sh`: Add `LANG=${DEST_LANG}` to the hash input
Result
Changing `DEST_LANG` now properly invalidates rootfs cache, ensuring the correct locale
is generated.
Build process generated numerous locale warnings like:
bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
perl: warning: Setting locale failed
This happened because the Docker container and host environment were
configured to use `en_US.UTF-8`, but the rootfs cache may not contain
this locale (only `C.utf8` and whatever `DEST_LANG` specifies,
e.g. `en_GB.utf8`).
When `chroot_sdcard` runs commands inside the rootfs, environment variables
are inherited from the host/Docker, causing locale lookup failures.
Then use `C.UTF-8` locale for the build environment instead of `en_US.UTF-8`.
This locale is always available in rootfs immediately after mmdebstrap,
requiring no generation.
Changes
`lib/functions/host/docker.sh`: Remove `en_US.UTF-8` locale generation,
set `LANG=C.UTF-8` in container environment
`lib/functions/host/prepare-host.sh`: Change locale exports
from `en_US.UTF-8` to `C.UTF-8`
- turns out everybody was wrong, including me
- some (older?) ATF sources won't work, ever; thus
- introduce ATF_SKIP_LDFLAGS=yes to skip it completely
- introduce ATF_SKIP_LDFLAGS_WL=yes to only skip the `-Wl,` prefix
- this is for ATF's that pass flag directly to linker, not gcc
- artifact-uboot: hash atf-building code into artifact version
This flag was breaking kernel's cc-option detection, causing GCC-specific
warnings (-Wpacked-not-aligned, -Wstringop-truncation, -Wmaybe-uninitialized)
to be incorrectly added to btrfs/drm/coresight builds when using clang.
* rtw88 mainline driver has good enough support for rtl8723cs
so stop patching the kernel with this ancient driver
* fixes rtl8703b (same chip as 8723cs) bluetooth firmware name file
Ubuntu 25.04+ replaced GNU coreutils with uutils coreutils, a Rust-based
reimplementation of Unix core utilities. These are different projects
with the same package name:
- GNU coreutils 9.x (C) - Ubuntu ≤24.04
- uutils coreutils 0.x (Rust) - Ubuntu ≥25.04
The uutils comm doesn't recognize sort output as sorted, causing
"comm: file is not in sorted order" errors.
Replace comm patterns with:
- grep -vxFf for set difference (lines in B but not in A)
- sort | uniq -d for finding duplicates
These alternatives don't depend on comm, ensuring compatibility
with both GNU and uutils coreutils.
* fix(rootfs): pass GIT_FIXED_WORKDIR inline to fetch_from_repo
Instead of using 'export GIT_FIXED_WORKDIR' and then 'unset' after,
pass the variable inline to the fetch_from_repo call. This ensures
the variable only exists in the context of that specific command
and doesn't leak into subsequent calls.
This follows the same pattern used in uboot-git.sh and kernel-git.sh.
---------
Co-authored-by: Viacheslav Bocharov <adeep@lexina.in>
Update all copyright notices in shell scripts from 2025 to 2026.
## Changes
- **Igor Pecovnik**: 2013-2025 → 2013-2026 (129 files)
- **Ricardo Pardini**: 2023-2025 → 2023-2026, 2020-2025 → 2020-2026 (5 files)
## Additional Improvements
Also updated the backtitle in `lib/functions/configuration/interactive.sh`:
- Changed title from "Armbian building script" to "Armbian Linux build framework"
- Removed docs link for cleaner display
- Uses dynamic year calculation with separate declaration (fixes shellcheck SC2155)
Problem: armbian-base-files artifact for jammy fails to build because
apt_find_upstream_package_version_and_download_url() looks for 'jammy-updates'
in https://github.armbian.com/base-files.json, but only 'jammy' key exists.
Root cause:
- For Ubuntu LTS (focal, jammy), code sets package_download_release to '${RELEASE}-updates'
- JSON file from github.armbian.com only has base release keys (jammy, noble, etc)
- jq query returns null for 'jammy-updates'
- Artifact excluded from build matrix after 10 retries
Solution: Add fallback logic
- First try with '-updates' suffix (jammy-updates)
- If not found and release ends with '-updates', retry with base release (jammy)
- This allows using base release data when -updates is not available
Impact:
- Fixes jammy base-files artifact build
- Allows jammy images to build (they depend on this artifact)
- Maintains preference for -updates when available
- No impact on other releases (Debian, non-LTS Ubuntu)
* sunxi-6.18: make the mess even worse
* fixing one of megis patches and add sunxi 32bit to the mess
* rewrite against 6.18
* fix media-ov5640-Don-t-powerup-the-sensor-during-driver-probe.patch
* fix media-sun6i-csi-implement-vidioc_enum_framesizes.patch
* fix misc-modem-power-Power-manager-for-modems.patch
* Fix usb-gadget-Fix-dangling-pointer-in-netdev-private-data.patch, include rewrite
* fix mmc-sunxi-mmc-Remove-runtime-PM.patch, two hunks no longer apply
* re-extract all of megis patches
* remove unneeded branch
* add note to disabled patch
* auto-generated, out of date
* drop megous drm patches in favor of Jernej's work. disable broken patches
* disable patch which breaks compilation for armhf
* disable breaking patch, rewrite everything
* remove patches unrelated to sunxi family
* fix spi dev compatible patch
* fix tsc2007 patch
* drop mainlined patch, adjust x96 mate T95 eth sd card hack
* remove upstreamed patch
* re-enable no longer broken
* another rewrite to align stuff properly
* adjust various comments in series.conf
* recover lost overlays
* uew5622: fix compilation against Linux 6.18
* fix Add-sunxi-addr-driver-Used-to-fix-uwe5622-bluetooth-MAC-address.patch
* adjust patch subject to make sense
* restore fixup creation
restore overlay prefix on opiz2
this needs to be properly sorted at some point
* bump to 6.18.1
sunxi and sunxi64 build just fine
* fix and re-enable drv-mfd-axp20x-add-sysfs-interface.patch
* rewrite patches
- Created patch/misc/rtw88/6.18/ directory with upstream driver patches
- Removed obsolete kernel 6.16 reference from patch conditions
- Updated comment to clarify that RF path detection fix is only needed
for kernel 6.1.x (upstreamed in 6.18+)
This fixes RTL8822CS WiFi initialization failures on kernel 6.18 where
the driver was not being properly patched due to missing version directory.
Fixes SDIO timeout errors during chip initialization.