300 Commits

Author SHA1 Message Date
Mecid
e7252f6a03
radxa-aic8800: Use gcc-14 for Noble release (#9707)
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
Fixes: `gcc: error: unrecognized command-line option '-fmin-function-alignment=8';`
2026-04-22 11:16:59 +02:00
Igor Velkov
b15593b9d9 extension: fix importlib_resources detection for U-Boot v2024.x-v2025.04
U-Boot v2024.x through v2025.04 has "import importlib_resources" inside
a try/except fallback block. The previous check ('importlib_resources' in
content) treated that string as a proper alias and skipped adding the import,
leaving importlib_resources undefined at runtime.

Fix: use a regex anchored to the start of line to detect only a real
top-level alias import.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 06:35:20 +02:00
Igor Velkov
5d3b719d95 extension: fix binman pkg_resources removal in setuptools >= 82
setuptools 82.0.1 removed the deprecated pkg_resources module.
U-Boot's binman (tools/binman/control.py) uses `import pkg_resources`
for reading package resources in versions prior to v2025.10.

Add extension that patches binman at build time via pre_config_uboot_target
hook, migrating from pkg_resources to importlib.resources:

- Old U-Boot (<=v2023.x): adds try/except importlib_resources import block
- Intermediate U-Boot (v2024.01+): aliases existing importlib.resources import
- New U-Boot (>=v2025.10): no-op (pkg_resources already removed upstream)

Replaces:
- pkg_resources.resource_string() -> importlib_resources.files().joinpath().read_bytes()
- pkg_resources.resource_listdir() -> [r.name for r in ...files().joinpath().iterdir()]

Using an extension rather than patch files because BOOTPATCHDIR varies
across ~15 families, and control.py differs between U-Boot versions.
A single idempotent extension covers all versions.

Can be removed once all BOOTBRANCH versions in Armbian are >= v2025.10.

Tested:
- tritium-h5 (sunxi, U-Boot v2024.01): patch applied, build OK
- odroidc4 (meson-sm1, U-Boot v2022.07): patch applied, build OK
- odroidm2 (rk3588, U-Boot v2025.10): no-op as expected, build OK

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 23:55:51 +02:00
Tomaz Zaman
17360faba0 gateway-dk-ask: bump ASK pin to a211ea8
cdx: refuse to load without ASK-capable FMAN microcode.
2026-04-16 23:49:42 +02:00
Tomaz Zaman
a7cd2dbae4 gateway-dk-ask: distro-aware patch resolution and packaging fixes
Patched library rebuilds now pick the correct ASK patch by parsing the
upstream version from debian/changelog after apt-get source. Patches are
staged under /tmp/ask-patches/<pkg>/<version>/<file>, letting one ASK
repo cover distros whose source versions differ (Trixie/Noble 1.1.0 vs
Resolute 1.1.1). Missing-patch case fails loudly instead of patching
the wrong tree.

Other changes in this bundle:
- Switch .deb install in chroot from dpkg -i to apt-get install so
  runtime deps resolve automatically.
- Add libxml2 | libxml2-16 alternative dep for Trixie/Noble compat.
- Declare /etc/fmc/config/{cfgdata.xsd,hxs_pdl_v3.xml,netpcd.xsd} as
  conffiles so local edits survive OTA upgrades.
- Bump pinned ASK commit to 9f5a37e.
- Update package maintainer to Tomaz Zaman <tomaz@mono.si>.
- leds-lp5812: mutex_destroy in probe err_out and remove paths to
  pair the mutex_init in probe.
2026-04-16 23:49:42 +02:00
Tomaz Zaman
efa6a22cde gateway-dk-ask: pin ASK with libxml2 2.12+ compat fix for fmc
Update ASK to a commit that adds a libxml2 compatibility patch for
fmc. Newer libxml2 (2.12+) changed the xmlStructuredErrorFunc
callback signature to take a const error pointer. Without the patch,
fmc fails to compile against libxml2 2.12+ headers (Ubuntu Resolute
and other distros with newer libxml2).
2026-04-16 23:49:42 +02:00
Igor Pecovnik
3e9a2bb058 grub: GRUB_GFXPAYLOAD_LINUX=text — actually disable vt.handoff injection
The previous commit set GRUB_DISABLE_VT_HANDOFF=true expecting
Ubuntu's grub2 to honour it. It does not — that variable is
upstream grub2 only. Ubuntu carries a build-time patch
(debian/patches/vt-handoff.patch) that hardwires the behaviour
behind ./configure --enable-vt-handoff and gives no
/etc/default/grub knob to disable it. Verified against
ubuntu/noble grub2 2.12-1ubuntu7 source.

The runtime gate that DOES exist is in the gfxmode function
emitted into /boot/grub/grub.cfg:

  if [ "${1}" = "keep" ]; then
      set vt_handoff=vt.handoff=7
  else
      set vt_handoff=
  fi

So vt.handoff=7 only expands when the gfxpayload arg is exactly
'keep'. Setting GRUB_GFXPAYLOAD_LINUX=text makes the runtime
check fail and the framebuffer console stays bound to fbcon for
the entire userspace lifetime.

While I was here I also discovered the previous line
'GRUB_GFXPAYLOAD=keep' was silently ignored — the correct
variable name is GRUB_GFXPAYLOAD_LINUX, not GRUB_GFXPAYLOAD.
That bug has been in extensions/grub.sh and grub-riscv64.sh
since the file was written. The previous typo did no harm
because grub2's default for the missing variable happens to be
'keep' — but it does mean we never had the gfxpayload knob
under our control, which is part of why this bug took so long
to track down.

Drop the dead GRUB_DISABLE_VT_HANDOFF=true line that the
previous commit added, and replace the old GRUB_GFXPAYLOAD=keep
typo with GRUB_GFXPAYLOAD_LINUX=text. After this, /proc/cmdline
on a freshly built UEFI image will be:

  splash plymouth.ignore-serial-consoles i915.force_probe=*

with no vt.handoff=7, regardless of whether a desktop is
installed. The framebuffer console remains visible across
install/remove cycles, Plymouth still draws its splash on top.

References:
  https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/grub2/2.12-1ubuntu7/grub2_2.12-1ubuntu7.debian.tar.xz
  debian/patches/vt-handoff.patch in that source tree
2026-04-16 23:49:23 +02:00
Igor Pecovnik
814e03e9ae grub: disable Ubuntu's vt.handoff=7 auto-injection
Ubuntu ships a /etc/grub.d/10_linux snippet that, whenever
'splash' appears in GRUB_CMDLINE_LINUX_DEFAULT, automatically
appends 'vt.handoff=7' to the generated kernel cmdline:

  if [ x$GRUB_DISABLE_VT_HANDOFF != xtrue ]; then
      case "$GRUB_CMDLINE_LINUX $GRUB_CMDLINE_LINUX_DEFAULT" in
          *splash*) vt_handoff=vt.handoff=7 ;;
      esac
  fi

vt.handoff=7 tells the kernel to hand the framebuffer console
over to whatever userspace eventually claims VT7 — i.e. the X
server started by the display manager. On a stock Ubuntu desktop
install that's fine: gdm starts, claims VT7, the screen is
graphical from boot to login.

On Armbian:
  - CLI installs have no display manager, nothing ever claims
    VT7, and after Plymouth quits the kernel never restores the
    framebuffer to fbcon. Result: a blank local console even
    though getty@tty1 is alive and accepting writes — direct
    'echo TEST > /dev/tty1' silently succeeds but renders no
    pixels.
  - Desktop installs that the user later removes via
    armbian-config end up in the same state: gdm/lightdm gets
    purged, VT7 becomes orphaned, and even after we
    'systemctl set-default multi-user.target' and isolate, the
    framebuffer stays blank. (This is what motivated finding
    this bug — the symptom on a virtio-gpu QEMU test box was
    "screen never lights up after desktop remove".)

The fix is GRUB_DISABLE_VT_HANDOFF=true, which is the
upstream-supported escape hatch that the same 10_linux snippet
honours: it skips the vt_handoff injection entirely. The
framebuffer console then stays bound to fbcon across the entire
boot, regardless of whether a DM is installed, and tty1 remains
visible and writable for the entire userspace lifetime.

Apply to both extensions/grub.sh (UEFI x86) and
extensions/grub-riscv64.sh.

Together with the previous commits in this PR, the UEFI cmdline
on a freshly built Armbian image is now:

  splash plymouth.ignore-serial-consoles i915.force_probe=*

(no quiet, no loglevel=3, no vt.handoff=7) — Plymouth shows the
Armbian theme on top of visible kernel boot messages, and the
local console keeps working through every install/remove cycle.
2026-04-16 23:49:23 +02:00
Igor Pecovnik
2a29a4b5e8 grub: drop 'quiet' / 'loglevel=3' so kernel boot messages stay visible
Follow-up to the previous two commits in this PR. They left the
graphical Plymouth flags in place but also kept 'quiet' and
'loglevel=3', which suppress kernel boot messages entirely. The
result is a clean boot splash but a user complaint: "I don't see
anything during boot anymore."

Drop both. Plymouth still renders the splash on top of the
kernel boot messages — the messages just remain visible
underneath so you can see what the system is doing. The user
can still press Esc during boot to drop the splash and read the
messages directly, which is the upstream-standard interaction.

Applies to extensions/grub.sh (UEFI x86) and
extensions/grub-riscv64.sh (UEFI riscv64). U-Boot SBC scripts
are unaffected — they already have no 'quiet' or 'loglevel=3'
in the bootlogo=true branch and the bootlogo=false branch (the
default) is now empty after the previous commit, so SBC users
already see kernel messages.
2026-04-16 23:49:23 +02:00
Igor Pecovnik
71b260c604 grub: stop emitting splash=verbose, always pass quiet splash plymouth.ignore-serial-consoles
extensions/grub.sh and extensions/grub-riscv64.sh both had this
conditional in configure_grub():

  [[ "$BOOT_LOGO" == "yes" || "$BOOT_LOGO" == "desktop" && "$BUILD_DESKTOP" == "yes" ]] &&
      GRUB_CMDLINE_LINUX_DEFAULT+=" quiet splash plymouth.ignore-serial-consoles ..." ||
      GRUB_CMDLINE_LINUX_DEFAULT+=" splash=verbose ..."

Two problems with the false branch:

1. 'splash=verbose' is not a valid kernel argument. The kernel
   logs it explicitly:
     Unknown kernel command line parameters "splash=verbose",
     will be passed to user space.
   It is also not a documented Plymouth flag (Plymouth uses bare
   'splash' as a boolean), and Plymouth interprets the literal
   value 'verbose' as a request to render the verbose/text
   theme. So a CLI image gets baked with this useless string.

2. The condition only fires the graphical branch when the image
   is being built as a desktop image AT IMAGE BUILD TIME. Users
   routinely build a CLI image, then add a desktop later via
   armbian-config. /etc/default/grub.d/98-armbian.cfg was
   already baked with the bad cmdline at image-build time, so
   no amount of desktop-install postinst work could ever make
   Plymouth render its graphical theme — the user always saw
   either text/blank because the cmdline still said
   'splash=verbose'.

Drop the conditional. Always emit
  quiet splash plymouth.ignore-serial-consoles
on UEFI x86 and riscv64. Plymouth handles "no theme installed"
and "no DRM" gracefully — these flags are harmless on a CLI
install — and they are correct for any subsequent desktop
install whether done at image-build time or later.

Also drop 'i915.force_probe=*' from the riscv64 cmdline. i915
is the x86 Intel graphics driver and the knob is meaningless
on riscv64 hardware.

Reproducer:
  build any uefi-x86 image with BUILD_DESKTOP=no, install gnome
  via armbian-config later, reboot. /proc/cmdline shows
  'splash=verbose', dmesg complains about the unknown arg, and
  Plymouth renders its text/details theme instead of the
  Armbian splash on every subsequent boot.
2026-04-16 23:49:23 +02:00
Tomaz Zaman
c177b30a19 gateway-dk-ask: fix Ubuntu build, pin ASK with GCC 14 fixes
- Fix deb-src enablement to handle both Debian (.sources in
  /etc/apt/sources.list.d/) and Ubuntu (ubuntu.sources) by iterating
  all *.sources files instead of checking only debian.sources
- Pin ASK to commit with -Waddress-of-packed-member fixes for GCC 14
  (Ubuntu Noble) and xtables __attribute__((constructor)) init
2026-04-14 07:49:18 +02:00
Tomaz Zaman
3645693873 gateway-dk-ask: use constructor attribute for xtables init, drop -D_INIT
The xtables.h _init/_INIT macro chain proved unreliable — the _init
macro wasn't being applied despite _INIT being defined. The ASK repo
now uses __attribute__((constructor)) directly in the extension source,
which is the modern pattern and doesn't need any -D flags.

Pin ASK to commit with the constructor fix.
2026-04-14 07:49:18 +02:00
Tomaz Zaman
e256544a95 gateway-dk-ask: fix xtables extension init — use -D_INIT (uppercase)
The xtables header (xtables.h) has:
  #ifdef _INIT
  #  define _init __attribute__((constructor)) _INIT
  #endif

When -D_INIT=libxt_<name>_init (uppercase) is defined, the header
chains _init → __attribute__((constructor)) _INIT → libxt_<name>_init.
The constructor attribute makes dlopen() automatically call the init
function, which registers the target with xtables_register_target().

Our build was using -D_init (lowercase) which directly renamed the
symbol but bypassed the header's #ifdef _INIT block, so the constructor
attribute was never applied. The extension loaded but _init was never
called, leaving options unregistered.

This matches how iptables itself builds extensions (Makefile.am uses
-D_INIT=lib$*_init).
2026-04-14 07:49:18 +02:00
Tomaz Zaman
0b693fa6b8 gateway-dk-ask: pin ASK to x6 xtables API migration
Update ASK commit to include the modernized iptables extensions that
use the x6 xtables API (.x6_parse, .x6_options, .x6_fcheck) instead
of the legacy API (.parse, .extra_opts). The legacy API doesn't work
with iptables 1.8.11 on Debian Trixie.
2026-04-14 07:49:18 +02:00
Tomaz Zaman
78650b5acb gateway-dk-ask: use explicit xtables module list in build and packaging
Replace the libxt_*.c glob in the build step and libxt_qos*/libxt_QOS*
glob in the packaging step with a single explicit list of module names.
Both steps now reference the same ask_xtables_modules array, so adding
or removing a module requires updating only one place per function.

The packaging step now errors out if any expected .so is missing instead
of silently skipping it.

Also document why we don't use pkg-config for libxtables: these are
dlopen()-loaded extensions that don't link against libxtables.so and
use our local UAPI headers (xt_QOSMARK.h etc.) which aren't in
libxtables-dev.
2026-04-14 07:49:18 +02:00
Tomaz Zaman
881f982849 gateway-dk-ask: declare iptables as a runtime dependency
xtables extensions (QOSMARK/QOSCONNMARK) shipped in this package are
loaded by iptables at runtime. Add iptables to dpkg Depends so OTA
installs pull it in automatically.
2026-04-14 07:49:18 +02:00
Tomaz Zaman
c303cffda1 gateway-dk-ask: decouple QOSMARK extensions from iptables package
The iptables patch only added new xtables extension files (libxt_*.c)
and UAPI headers — it didn't modify any existing iptables source. Since
iptables loads extensions dynamically from /usr/lib/<triplet>/xtables/
at runtime, we can ship these as standalone .so files without patching
or holding the iptables package.

Changes:
- Compile the 4 xtables extensions in chroot against libxtables-dev
- Install .so files to /usr/lib/<triplet>/xtables/
- Bundle .so files into the gateway-dk-ask .deb
- Remove iptables from rebuild_patched_deb calls
- Remove iptables from apt-mark hold (postinst, build-time, postrm)
- Remove iptables from patch_dirs in prepare_ask_patches
- Remove iptables from apt-get build-dep
- Pin ASK repo to commit with new iptables-extensions/ dir

Users can now freely upgrade iptables without breaking ASK offloading.
The libnetfilter-conntrack and libnfnetlink patches remain — those
modify library internals and cannot be decoupled.
2026-04-14 07:49:18 +02:00
Tomaz Zaman
fdef4074a4 gateway-dk-ask: build kernel modules in-tree for CI compatibility
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
On Armbian CI, kernel builds and image assembly run on different runners.
The ASK extension's post_install_kernel_debs module build assumed the
kernel source worktree was available, which fails on the image runner.

Fix: build all ASK kernel modules (CDX, FCI, auto-bridge, sfp-led,
lp5812) in-tree during kernel compilation. Module sources are copied into
the kernel tree during custom_kernel_config (after patching, before
olddefconfig), following the pattern used by existing Armbian drivers.
Modules ship inside linux-image .deb automatically.

Changes:
- Add custom_kernel_config hook to copy module sources and enable configs
- Kbuild files for CDX/FCI/auto-bridge come from the ASK repo
- Board-specific modules (sfp-led, lp5812) use Kbuild files from BSP dir
- Remove post_install_kernel_debs module build (no longer needed)
- gateway-dk-ask .deb becomes userspace-only (tools, configs, services)
- Pin ASK repo to commit with Kbuild files
2026-04-11 10:55:16 +02:00
Igor Pecovnik
6e9d75ae43 extensions: skip git fetches during config-dump-json
The image-output-arduino and gateway-dk-ask extensions call
fetch_from_repo from post_family_config__* hooks. Those hooks run
during config-dump-json, where $HOME is unset, so the underlying
git_ensure_safe_directory call fails with:

  fatal: $HOME not set
  git config --global --add safe.directory /armbian/cache/sources/qcombin

This made config-dump-json error out for arduino-uno-q and gateway-dk.
Guard the affected hooks with CONFIG_DEFS_ONLY (the same pattern used
in extensions/ufs.sh) so they no-op during config dumps.
2026-04-10 09:10:31 +02:00
Tomaz Zaman
1836f80239 gateway-dk-ask: use KERNELPATCHDIR for patch staging, improve comments
- Use ${KERNELPATCHDIR} instead of hardcoded path for userpatches staging
- Expand comment on >= kernel dependency to explain rationale clearly
2026-04-09 19:53:51 +02:00
Tomaz Zaman
7860baed8e gateway-dk-ask: guard ASK_HOST_TRIPLET against unset KERNEL_COMPILER
Fail early with a clear error if KERNEL_COMPILER is not set
when deriving the multiarch triplet.
2026-04-09 19:53:51 +02:00
Tomaz Zaman
5e49feb484 gateway-dk-ask: use separate LINUXFAMILY to avoid kernel .deb collision
When ASK is enabled, the extension applies an extra kernel patch, producing
a different kernel binary. Override LINUXFAMILY to ls1046a-ask so the kernel
.deb gets a distinct name (linux-image-current-ls1046a-ask) that won't
collide with non-ASK builds in the apt repo.

- Add post_family_config hook to override LINUXFAMILY and LINUXCONFIG
- Symlink kernel config (same config, different name)
- Use dynamic ${BRANCH}-${LINUXFAMILY} in ASK .deb Depends
- Fix cleanup handler to not fail under set -e
2026-04-09 19:53:51 +02:00
Tomaz Zaman
de640c9ff3 gateway-dk-ask: defer ASK_HOST_TRIPLET derivation to post-config hook
KERNEL_COMPILER is not set when extension files are sourced.
Move ASK_HOST_TRIPLET derivation into extension_finish_config
where arch config has already run.
2026-04-09 19:53:51 +02:00
Tomaz Zaman
1f51e25e9b gateway-dk: address PR review feedback
- Place FMAN firmware in /lib/firmware/updates/ (correct override convention)
- Enable cmm.service in postinst for OTA installs
- Delete stale /etc/fancontrol before regenerating (hwmon numbers may change)
- Remove SRC indirection in sfp-led.mk (use M=$(PWD) directly, matches lp5812.mk)
- Document why patched libs are separate debs (system package overrides)
- Document userpatches/ as standard Armbian extension patch staging
2026-04-09 19:53:51 +02:00
Tomaz Zaman
2b33570301 gateway-dk-ask: pin ASK repo to tag mt-6.12.49-2.2.0
Lock ASK source to a release tag instead of tracking a branch
for reproducible builds.
2026-04-09 19:53:51 +02:00
Tomaz Zaman
c4b99b47d4 gateway-dk: production readiness fixes for upstream PR
Board/family separation:
- Move boot chain URLs (U-Boot, ATF, RCW) from family to board config
- Family config now requires board to set all platform-specific variables
- Split bootenv into family-generic ls1046a.txt and board-specific gateway-dk.txt
- Move fancontrol/lm-sensors install and IP forwarding to board config
- Delete unused family-level BSP files (packages/bsp/ls1046a/)

Extension hardening:
- Replace bare git clone with fetch_from_repo (fmlib, fmc, libcli, FMAN ucode)
- Replace trap EXIT with Armbian add_cleanup_handler API
- Add exit_with_error to all chroot build commands and depmod
- Add prerm/postrm scripts to ASK .deb package
- Remove unnecessary host build deps (chroot-only libraries)
- Compute kernel version once (ASK_KERNEL_VER), remove 3x duplication
- Quote variables in chroot command strings
- Use GIT_CONFIG_COUNT env vars instead of git config --global
- Move conntrack sysctl to packages/bsp/ (no inline heredocs)
- Fix DEBIAN/control comment (dpkg-deb rejects # comments)
- Make ASK extension optional (ENABLE_ASK=yes by default)
- Use BOOTENV_FILE for mkenvimage (was hardcoded to ls1046a.txt)

Kernel config:
- Enable KASLR, FORTIFY_SOURCE, HARDENED_USERCOPY
- Disable SLUB_TINY (switch to standard SLUB)
- Enable NF_REJECT_IPV4, IP_NF_TARGET_REJECT, NFT_REJECT, NET_SCH_INGRESS
- Enable NET_ACT_POLICE, NET_ACT_GACT, NF_FLOW_TABLE, NFT_LIMIT, NFT_REDIR
- Enable PSTORE + MTD_PSTORE with pstore.backend=mtdoops boot args
- Enable SOFTLOCKUP_DETECTOR, DEBUG_FS_DISALLOW_MOUNT
- Disable PM_DEBUG, UIO drivers, MLX4/MLX5, HFSPLUS, UFS
- Switch NO_HZ_FULL to NO_HZ_IDLE (matches NXP reference)

Driver fixes:
- sfp-led: move debug_count into per-port struct
- sfp-led: replace rtnl_lock with rtnl_trylock to prevent deadlock
- sfp-led: consistent pushd/make pattern (matches lp5812)

Patches:
- DTS: fix typo "genenerator", remove redundant status="okay"
- DTS: update header comment, remove unused PWM include
- DTS: update patch hunk line counts
- INA234: remove Yocto Upstream-Status header
2026-04-09 19:53:51 +02:00
Tomaz Zaman
279b1d7cb7 gateway-dk-ask: date-based versioning and relaxed kernel dependency
Use kernel_ver+YYYYMMDD version scheme so bugfix-only ASK rebuilds
produce a newer package even when the kernel hasn't changed. Relax
the kernel dependency from exact match (=) to minimum version (>=)
so the updated ASK package installs without requiring a new kernel.
2026-04-09 19:53:51 +02:00
Tomaz Zaman
68980214ea gateway-dk-ask: package ASK as single .deb for OTA upgrades
Combine all ASK components (kernel modules + userspace tools + configs)
into a single gateway-dk-ask .deb, version-locked to the kernel. This
enables apt-based upgrades without reflashing.

- Modules cross-compiled on host, staged for later packaging
- Userspace built in chroot, snapshotted into package tree
- Patched library .debs saved to output/debs for distribution
- Single postinst handles depmod, ldconfig, daemon-reload, apt-mark hold
- Remove autotools dependency (libfci/cmm now use plain Makefiles)
- CMM extra CFLAGS passed as env var to avoid overriding Makefile defaults
2026-04-09 19:53:51 +02:00
Tomaz Zaman
9d39097338 gateway-dk: harden board/family config for upstream PR
- Remove vim from family_tweaks (user preference, not board dep)
- Move board-specific BSP (fan control) from family to board config
- Consolidate LED module-load into single gateway-dk-leds.conf
- Make BOOTSOURCE/ATFSOURCE/RCW_SOURCE overridable via ${VAR:-default}
- Replace echo-return pattern with declare -g in ensure_fman_ucode_cached
- Replace custom ask_ensure_cached with fetch_from_repo in post_family_config
- Use mktemp -d instead of /tmp/ask-build-$$
- Add proper git-format headers and Signed-off-by to DTS patch
- Fix DTS Makefile alphabetical ordering (after fsl-ls1046a, not fsl-ls1012a)
- Fix copyright year to 2026
- Document board-specific ethact/ethprime in bootenv
- Document apt-mark hold rationale for patched ASK libraries
- Add comment explaining NXP LS1043A platform ID for DPAA1 SoCs
- Remove iproute2 from CLAUDE.md (no patches exist in ASK repo)
2026-04-09 19:53:51 +02:00
Tomaz Zaman
58b06d48ee gateway-dk: code quality fixes before PR
- Remove stale duplicate extension ls1046a-ask.sh
- Board config: drop redundant SERIALCON, add HAS_VIDEO_OUTPUT=no
  and KERNEL_TEST_TARGET=current
- Family config: replace hardcoded gateway_dk with LS1046A_PLAT
  variable in ATF/RCW build commands
- BSP scripts: add set -e, validate LED sysfs paths before writing
- BSP: fix generate-fancontrol-conf execute permission
- Systemd services: replace fragile hwmon0 and DefaultDependencies=no
  with systemd-udev-settle.service dependency
- Extension: add EXIT trap for module builddir cleanup on failure
2026-04-09 19:53:51 +02:00
Tomaz Zaman
ac4948f911 ls1046a: pin kernel to tag, update ASK branch, clean up extension
- Pin kernel to tag:lf-6.12.49-2.2.0 instead of rolling branch:lf-6.12.y
- Lower CPUMAX to 1600000 to match actual hardware limit
- Switch ASK branch from master to mt-6.12.y
- Remove iproute2 from patched libraries (no longer needed)
- Remove fmc source CR/LF fixup (fixed upstream)
- Clean up module build dir path handling
- Consolidate U-Boot/ATF/RCW comments
2026-04-09 19:53:51 +02:00
Tomaz Zaman
117e52fc76 Board: Add Mono Gateway Development Kit (NXP LS1046A)
Add support for the Mono Gateway Development Kit, a networking gateway
based on the NXP LS1046A SoC (quad Cortex-A72) with 3x 1GbE SGMII,
2x 10GbE SFP+, eMMC, QSPI NOR, and extensive I2C peripherals.

New family: ls1046a
- NXP QorIQ kernel (lf-6.12.y) with DPAA/FMAN networking
- Custom boot chain: RCW + ATF + U-Boot (Mono forks, commit-pinned)
- FMAN microcode at 4MB eMMC offset for network initialization
- Extlinux boot via U-Boot distroboot
- Fan control (EMC2305 + cluster_thermal) with dynamic hwmon discovery

New extension: gateway-dk-ask
- NXP ASK (Application Solutions Kit) hardware offloading
- Kernel modules: CDX, FCI, auto-bridge (cross-compiled from ASK repo)
- Board-specific modules: SFP-LED, TI LP5812 LED matrix controller
- Userspace: fmlib, fmc, libfci, libcli, dpa-app, cmm
- Patched system libraries: libnetfilter-conntrack, libnfnetlink,
  iptables (QOSMARK), iproute2 (EtherIP/4RD)
- CMM daemon with systemd service (guarded by /dev/cdx_ctrl)
- All ASK sources and patches fetched from we-are-mono/ASK repo

Kernel patches:
- INA234 power sensor driver (accepted upstream, pending release)
- Mono Gateway DK device tree

Signed-off-by: Tomaz Zaman <tomaz@mono.si>
2026-04-09 19:53:51 +02:00
Tomaz Zaman
6a436fbe16 Board: Add Mono Gateway Development Kit (NXP LS1046A)
Add support for the Mono Gateway Development Kit, a networking gateway
based on the NXP LS1046A SoC (quad Cortex-A72) with 3x 1GbE SGMII,
2x 10GbE SFP+, eMMC, QSPI NOR, and extensive I2C peripherals.

New family: ls1046a
- NXP QorIQ kernel (lf-6.12.y) with DPAA/FMAN networking
- Custom boot chain: RCW + ATF + U-Boot (Mono forks, commit-pinned)
- FMAN microcode at 4MB eMMC offset for network initialization
- Extlinux boot via U-Boot distroboot
- Fan control (EMC2305 + cluster_thermal) with dynamic hwmon discovery

New extension: ls1046a-ask
- NXP ASK (Application Solutions Kit) hardware offloading
- Kernel modules: CDX, FCI, auto-bridge (cross-compiled from ASK repo)
- Userspace: fmlib, fmc, libfci, libcli, dpa-app, cmm
- Patched system libraries: libnetfilter-conntrack, libnfnetlink,
  iptables (QOSMARK), iproute2 (EtherIP/4RD)
- CMM daemon with systemd service (guarded by /dev/cdx_ctrl)
- All ASK sources and patches fetched from we-are-mono/ASK repo

Kernel patches:
- INA234 power sensor driver (backport, accepted upstream)
- Mono Gateway DK device tree

Signed-off-by: Tomaz Zaman <tomaz@mono.si>
2026-04-09 19:53:51 +02:00
SuperKali
08d63b9ea0 arduino-uno-q: fix CI build by fetching qcombin at image creation time
The qcombin extension used fetch_sources_tools hook which only runs
during u-boot compilation. When artifacts are cached (CI), the fetch
is skipped and image-output-arduino fails because flash binaries
are missing.

Move qcombin fetch into image-output-arduino.sh using post_family_config
hook which always runs. Remove the standalone qcombin.sh extension.

Also improve the image-output extension:
- Use sfdisk JSON output for reliable partition parsing
- Use run_host_command_logged for proper build logging
- Add cleanup handler for loop device on failure
- Quote all variables properly
2026-04-09 19:51:25 +02:00
SuperKali
31f8803b18
Add support for Arduino UNO Q (Qualcomm QRB2210) (#9623)
Some checks failed
Data: Sync board list / Send dispatch (push) Has been cancelled
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 support for arduino-uno-q

* arduino-uno-q: fix boot with boot.scr and correct memory addresses

ABL overwrites kernel_addr_r/fdt_addr_r/ramdisk_addr_r at runtime,
causing memory overlap that corrupts the kernel Image header.

Switch from extlinux to boot.scr which sets correct addresses in the
0xC0000000 RAM bank before loading kernel, initrd and dtb.
U-Boot env loads boot.scr from partition 0x43 (GPT 67 "efi") with
sysboot as fallback.

* arduino-uno-q: update board and family config

- Use boot.scr instead of extlinux (BOOTSCRIPT/BOOTENV_FILE in family)
- Add SERIALCON=ttyMSM0 for serial console
- BOOTSIZE=512 to fit kernel + initrd
- Remove BOARD_FIRMWARE_INSTALL="-full", copy only needed firmware
- Add WiFi ath10k firmware copy
- Add ADB daemon with Armbian branding
- Add first-boot rootfs resize service
- Update kernel to 6.19.0 from qcom-v6.19.0-unoq branch

* arduino-uno-q: fix image-output extension

Use dd with sector offsets instead of loop device partitions to extract
boot and rootfs images. The previous approach failed because the build
framework releases the loop device before the extension runs.

* arduino-uno-q: add first-boot rootfs resize for eMMC

Add systemd service that expands the rootfs partition to fill the entire
eMMC on first boot using sgdisk. Removes the empty userdata partition
and recreates rootfs with all remaining space.

* arduino-uno-q: update ath10k WiFi firmware to upstream

Update board-2.bin from linux-firmware (ath-20260204) with support for
additional board IDs.

* arduino-uno-q: update kernel config for 6.19

* arduino-uno-q: revert board-2.bin to original version

Restore the ath10k board-2.bin firmware to the version provided in the
original board bring-up, as the upstream version has not been validated
on this hardware.

* arduino-uno-q: move flash binaries to armbian/qcombin

Move EDL flash binaries (ABL, XBL, TrustZone, GPT tables, etc.) from
packages/blobs/arduino/flash/ to the external armbian/qcombin repository
under the Agatti folder, following the same pattern as rkbin for
Rockchip and mtkbin for MediaTek.

Add qcombin.sh extension to fetch binaries during build. Update
image-output-arduino.sh to source flash files from qcombin cache and
derive U-Boot package path from BRANCH/BOARD variables.

* arduino-uno-q: add BOARD_VENDOR

* arduino-uno-q: update qcombin path to Agatti/arduino-uno-q

* arduino-uno-q: move firmware to armbian/firmware, rename boot script

Move firmware blobs to armbian/firmware repository (armbian/firmware#123)
and remove manual firmware copies from post_family_tweaks. Firmware is
now installed via the armbian-firmware package.

Rename boot-qcom to boot-qrb2210 to be family-specific.

* arduino-uno-q: include prog_firehose_ddr.elf from Agatti root

* arduino-uno-q: add qbootctl to prevent fastboot fallback

---------

Co-authored-by: Hsun Lai <i@chainsx.cn>
2026-04-08 10:44:14 +02:00
Tong
6c87c66153
Add Ariaboard Photonicat 2 support for rockchip64-6.18 (#9535)
* Add Ariaboard Photonicat 2 support for rockchip64-6.18

Board configuration:
- config/boards/photonicat2.csc

Kernel config:
- config/kernel/linux-rockchip64-current.config

Device tree:
- patch/kernel/archive/rockchip64-6.18/dt/rk3576-photonicat2.dts

RK3576 SoC patches (rockchip64-6.18):

  0001 gpio: rockchip: set input direction when request irq
    Author: Ye Zhang <ye.zhang@rock-chips.com>
    Source: [PATCH v5 4/4] gpio: rockchip: Update the GPIO driver
    https://lore.kernel.org/r/20241112015408.3139996-5-ye.zhang@rock-chips.com
    Series: https://lore.kernel.org/r/20241112015408.3139996-1-ye.zhang@rock-chips.com

  0002 mmc: dw_mmc-rockchip: add v2 tuning support
    Author: Shawn Lin <shawn.lin@rock-chips.com>
    Posted-by: Detlev Casanova <detlev.casanova@collabora.com>
    Source: [PATCH v3 2/3] Add dw_mmc support for rk3576
    https://lore.kernel.org/r/20240814223555.3695-3-detlev.casanova@collabora.com
    Series: https://lore.kernel.org/r/20240814223555.3695-1-detlev.casanova@collabora.com

  0003 pmdomain: rockchip: Add always on configuration
    Author: Finley Xiao <finley.xiao@rock-chips.com>
    Source: Rockchip BSP (not posted to lore.kernel.org)

  0004 dt-bindings: pwm: Add a new binding for rockchip,rk3576-pwm
  0005 mfd: Add Rockchip mfpwm driver
  0006 pwm: Add rockchip PWMv4 driver
  0007 counter: Add rockchip-pwm-capture driver
  0008 arm64: dts: rockchip: add PWM nodes to RK3576 SoC dtsi
    Author: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
    Source: [PATCH v3 0/5] Add Rockchip RK3576 PWM Support Through MFPWM
    https://lore.kernel.org/r/20251027-rk3576-pwm-v3-0-654a5cb1e3f8@collabora.com

  0009 arm64: dts: rockchip: add dma-coherent for pcie and gmac of RK3576
    Author: Shawn Lin <shawn.lin@rock-chips.com>
    Source: https://lore.kernel.org/r/1764313762-78063-1-git-send-email-shawn.lin@rock-chips.com

U-Boot:
- patch/u-boot/v2026.01/board_photonicat2/

BSP:
- extensions/photonicat-pm.sh

* Rebase patch against v6.18.19

* photonicat-pm: replace wget with curl for DKMS package download
2026-03-23 11:08:45 +01:00
Jürgen Herrmann
65dfde9e17
aic8800-dkms extension (#9578) 2026-03-23 11:03:29 +01:00
Igor Velkov
8fc2cfb9f4 ccache-remote: fix Docker host-gateway for hostnames resolving to loopback
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
When avahi-browse discovers a ccache service on the local machine, it
returns 127.0.0.1 as the address. The code used this IP directly in
--add-host, making the hostname resolve to the container's own loopback
inside Docker instead of the host machine, causing all remote cache
lookups to fail (err=N in ccache stats).

Fix: after resolving the hostname (from avahi discovery or getent),
check if the resulting IP is a loopback address and use host-gateway
instead, consistent with the existing handling for literal localhost/
127.0.0.1 in the storage URL.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-16 02:25:55 +01:00
tabris
622439b582 extensions/jethub-burn - use run_host_x86_binary_logged for $PACKER 2026-03-15 20:23:27 +01:00
Igor Pecovnik
1b38e53689 add Vulkan support and expand 3D package descriptions
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 vulkan-tools: Vulkan utilities (vulkaninfo) for testing and debugging
- Add mesa-vulkan-drivers: Vulkan drivers for Mesa GPUs (Panfrost, Lima, Radeon, Intel)
- Expand package definitions with individual inline comments describing each package:
  - libglx-mesa0: Mesa OpenGL extension library for X11
  - mesa-utils: Mesa utilities for OpenGL information and testing
  - mesa-utils-extra: Additional Mesa demonstration programs
  - glmark2 variants: OpenGL 2.0/3.0 and ES 2.0 benchmark suite with Wayland/X11 backends
- Improves code documentation and makes package purposes clear for maintainers

Signed-off-by: Igor Pecovnik <igor@armbian.com>
2026-03-06 07:45:51 +01:00
Igor Velkov
8cb897856f (#9400 P1a) extensions/gxlimg.sh: convert [ ] to [[ ]]
Replace POSIX `[ ]` with bash `[[ ]]` on two file existence checks.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 13:36:20 +01:00
Igor Velkov
1839857f8d (#9400 P1a) extensions/lowmem.sh: convert [ ] to [[ ]]
Replace POSIX `[ ]` with bash `[[ ]]` on two file existence checks.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 13:36:20 +01:00
Christian Wang
60002ddb6b Updated odin2-preset-firstrun.sh to include odin2-scripts installer 2026-03-04 19:57:23 +01:00
Christian Wang
234d650748 Added odin2-preset-firstrun.sh extension to set user accounts and also download helper script folder from github 2026-03-04 19:57:23 +01:00
Nikita Maslo
9c10f33525 unset QEMU_CPU for aml_image_packer
Some checks failed
Data: Sync board list / Send dispatch (push) Has been cancelled
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-02 13:12:07 +03: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
4222417736 extensions: add kernel-rust extension for Rust support in kernel builds
Add extension that enables CONFIG_RUST in kernel menuconfig and
configures the build environment (rustc, rustfmt, bindgen, rust-src)
using versioned APT packages from noble-security/noble-updates.

Handles env -i in run_kernel_make_internal by passing tool paths
via RUSTC, RUSTFMT, BINDGEN make params and RUST_LIB_SRC env var.

Includes optional RUST_KERNEL_SAMPLES=yes for building sample
Rust modules (rust_minimal, rust_print, rust_driver_faux) as a
toolchain smoke test.

Tested: kernel 6.19 build for rockchip64 on aarch64, both with
and without Docker.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 22:30:37 +01:00
Sven-Ola Tuecke
b9350e0133 OrangePi-RV2: wlan driver for edge
Added with new extension named bcmdhd-spacemit (hosted on Codeberg.org)

Signed-off-by: Sven-Ola Tuecke <sven-ola@gmx.de>
2026-02-19 22:10:34 -05:00
Tong
47db6e853e
extensions: radxa-aic8800: allow 6.19; skip DKMS only on >= 6.20 (#9397)
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-14 06:30:00 +01:00
Igor Pecovnik
208187f807 Race conditions: installing packages before adding a repo
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
2026-02-12 22:06:22 +01:00