Commit Graph

2645 Commits

Author SHA1 Message Date
Ricardo Pardini
001c65df07 u-boot: run binwalk on all the produced u-boot bins (always)
- 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
2026-01-12 23:37:03 +01:00
Ricardo Pardini
1ab9073db2 patching: Makefile Autopatcher: only add entries for DTs in same target_dir
- when auto-patching more than one Makefile, only add the DTs added to the corresponding directory
2026-01-09 20:29:08 +01:00
Ricardo Pardini
a85a5aef67 patching: introduce add-only mode for DT Makefile AutoPatcher
- Autopatcher was commiting atrocities to the upstream DTs that are so
  carefully hand-crafted, by simply rewriting everything, or trying to be
  smart and failing at it (`incremental: true`)
- Instead, add `add-only: true` mode, where we simply only ever add to the
  end of the Makefile, adding each new .dts and optionally the `subdir-y`
  for overlays
2026-01-09 20:29:08 +01:00
Ricardo Pardini
6e7d2798e3 u-boot: allow custom LOGLEVEL with UBOOT_LOGLEVEL (default to 6) 2026-01-09 00:40:11 +01:00
Ricardo Pardini
7213d8e8c6 u-boot: better CONFIG_LOG/LOGLEVEL/LOG_MAX_LEVEL (=6) 2026-01-09 00:40:11 +01:00
Ricardo Pardini
287931ac6e armbian-kernel: more eBPF-oriented options for userspace tooling 2026-01-08 19:40:54 +01:00
Ricardo Pardini
574abb9cad host-release: allow to build on resolute 2026-01-08 19:28:26 +01:00
Igor Velkov
9922402de8 !fixup cleanup 2026-01-08 12:24:18 +01:00
Igor Velkov
e92c53a03f Include DEST_LANG in rootfs cache hash calculation
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.
2026-01-08 12:24:18 +01:00
Igor Velkov
3e71438048 Fix locale warnings during chroot operations
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`
2026-01-08 12:24:18 +01:00
Ricardo Pardini
0562e3a79f atf: once again no-warn-rwx-segment woes
- 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
2026-01-08 12:20:14 +01:00
tabris
4cc12701e7 framework - update comments around armbian_kernel_config__enable_various_filesystems to use extension_hook_opt_out 2026-01-08 12:07:56 +01:00
tabris
fc9c989904 framework - extension_hook_opt_out 2026-01-08 12:07:56 +01:00
Igor Velkov
74e8171074 Remove -Wno-error=unknown-warning-option from clang KCFLAGS.
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.
2026-01-08 12:04:39 +01:00
Paolo Sabatino
288b14defa apply rtl8723cs bluetooth only with kernels >= 6.1 2026-01-08 11:56:44 +01:00
Ricardo Pardini
d61b644ef5 framework & kernel options - simplify armbian_kernel_config_apply_opts_from_arrays, no more ambiguity opts_m vs opts_y (part 2) 2026-01-07 11:14:30 +01:00
tabris
0c21be1f67 framework & kernel options - simplify armbian_kernel_config_apply_opts_from_arrays, no more ambiguity opts_m vs opts_y 2026-01-07 11:14:30 +01:00
tabris
7ea0983321 framework and kernel config hooks - split FS modules into a separate hook function to allow customization 2026-01-07 11:14:30 +01:00
Paolo Sabatino
707025f422 rtl8723cs: stop including proprietary driver for kernel 6.19 onwards
* 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
2026-01-07 09:50:08 +01:00
cantalupo555
504ccc45d2 fix: replace comm with grep to support uutils coreutils
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.
2026-01-02 21:52:32 +01:00
Jianfeng Liu
f01745cfa9 allow build on forky host 2026-01-01 11:06:13 +01:00
tabris
eaac082190 kernel configs - enable EROFS as module, ditto overlayfs & F2FS 2025-12-29 09:16:28 +01:00
Nikita Maslo
1e7ef9d064
fix(rootfs): unset GIT_FIXED_WORKDIR after debootstrap/mmdebstrap clone (#9132)
* 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>
2025-12-27 08:15:36 +03:00
Igor Pecovnik
4d60ce08f2 chore: update copyright years to 2026
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)
2025-12-25 12:03:34 +01:00
Viacheslav Bocharov
492b96aeeb fix(apt-utils): add fallback for Ubuntu LTS releases without -updates suffix in JSON
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)
2025-12-22 21:26:37 +01:00
Ricardo Pardini
d4f7046c88
compress-checksum: introduce COMPRESS_OUTPUTIMAGE=zst (#9101) 2025-12-19 13:00:45 +01:00
github-actions[bot]
7828271e27
tools: Bump BATCAT_VERSION from 0.26.0 to 0.26.1 (#9083)
Co-authored-by: igorpecovnik <6281704+igorpecovnik@users.noreply.github.com>
2025-12-17 18:34:07 +02:00
Werner
3d46ef80e0
sunxi: bump edge to 6.18 (#9049)
* 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
2025-12-16 12:35:24 +01:00
Rolf Leggewie
9f08183a9f lib / rootfs-create: make rm command more robust
this fixes the issue raised in armbian/apa#32
2025-12-13 11:57:01 +08:00
SuperKali
9e1d62fbec
rtw88: Add kernel 6.18 support and clean up patch logic (#9041)
- 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.
2025-12-08 23:58:15 +01:00
Rolf Leggewie
f9cf9ae2ca lib / distro-agnostic.sh: drop chmod on /bin/ping
we are way past buster now (if ever this was needed to begin with)
2025-12-07 08:53:57 +01:00
Jesse R Codling
d1fc474d50 Typo fix from @tabrisnet
Co-authored-by: tabrisnet <96966042+tabrisnet@users.noreply.github.com>
2025-12-07 08:49:22 +01:00
Jesse R Codling
9f164a21ce Use docker --version for podman detection 2025-12-07 08:49:22 +01:00
Jesse R Codling
3fb2606d00 Conditionally add volume flags for building with Podman
Use $DOCKER_INFO to check for podman vs dockerd, and conditionally
`exec` and `dev` volume options, which are needed on podman but not
allowed on dockerd.
2025-12-07 08:49:22 +01:00
Jesse R Codling
3aea2de999 Add needed volume mount opts for Docker/Podman
It hasn't been an issue for Docker because their defaults didn't
conflict, but Podman mounts volumes with nodev (and formerly noexec) by
default, which would break the build. Adding `dev` and `exec` to the
volume mount options ensures the needed setting whatever the defaults.
2025-12-07 08:49:22 +01:00
tabris
f53eac4253 framework - enable NTSYNC as a module on most kernels 2025-12-05 19:38:00 +01:00
Igor Pecovnik
43addca1d4 Add compilation of resolve_btfids to the kernel headers postinst script 2025-12-05 19:36:05 +01:00
Igor Pecovnik
43e89b4313 Make pahole as hard dependency on kernel headers 2025-12-05 19:36:05 +01:00
Rolf Leggewie
ca73176bd9 lib / main-config.sh: enable APA extension for questing and resolute builds. Closes: #8966 2025-11-20 19:38:24 +01:00
Igor Pecovnik
b1ee4a5252 Fixing updating submodule 2025-11-18 13:08:18 +01:00
Igor Pecovnik
39d6bc8148 Powere management - make it conditional, enable on UEFI targets, else disabled 2025-11-18 12:01:25 +01:00
Ricardo Pardini
d66aaf8449 jsoninfo: introduce inventory-artifacts cli
- stops after artifacts-reduced and adds kernels.ndjson and uboots.njdson via jq
- if one runs `./compile.sh inventory-artifacts` we shall get:
  - `output/info/kernels.ndjson`: one line for each kernel build
  - `output/info/uboots.ndjson`: one line for each u-boot build
- this is meant as base for other tooling that acts "for each kernel" or "for each u-boot" such as patch/config rewrites, etc
- cli-jsoninfo: better kernels.ndjson; new kernels-duplicate-config.json
  - so we can detect mistakes ref LINUXCONFIG
  - maybe one day the "Rewrite Kernel Config" GHA can re-use kernels.ndjson
- previous commit introduced targets-all-kernels.yaml, so one can run
  - `./compile.sh inventory-artifacts TARGETS_TEMPLATE=targets-all-kernels.yaml`
2025-11-17 12:21:10 +01:00
Ricardo Pardini
f236d317a3 artifact-kernel: include LINUXCONFIG and ARMBIAN_KERNEL_DEB_NAME in artifact_input_variables 2025-11-17 12:21:10 +01:00
Tom Urlings
abcb6c947b Enable bootscript templating
- Enable bootscript templating using `envsubst`.
- Add generic bootscript.
- Fix: `test` does not support `==`, but deceptively returns `true` in case you use it.
- De-duplicate kernel commandline console options.
2025-11-17 10:15:23 +01:00
igorpecovnik
d30f8d02ce tools: Bump BATCAT_VERSION from 0.25.0 to 0.26.0 2025-11-16 10:04:35 +01:00
Igor Pecovnik
06dbd0074c Add Ubuntu 25.10 / 26.04 questing and resolute as csc build target, demote Bookworm to csc 2025-11-15 23:09:24 +01:00
Igor Pecovnik
758c57bafe Framework: copy user provided first boot config at build time 2025-11-12 17:38:51 +01:00
Igor Pecovnik
8b8b0263b2 Disable sleep functionality on systemd level
This should prevent boards going to sleep as resume mainly don't work
2025-11-10 11:47:00 +01:00
Ricardo Pardini
efdfb11328 kernel-config: don't leak grep stuff to stdout; mention Armbian and defconfig in rewritten .config comment 2025-11-08 13:13:38 +01:00
tabris
bb783640f4 framework kernel machinery - always save KERNEL_MAJOR_MINOR into generated config/kernel/foo.config 2025-11-08 11:35:37 +01:00