Commit Graph

10 Commits

Author SHA1 Message Date
4341da96a0 fix(ci): collect+upload kernel .deb on failure (linux-image often built before headers fail)
The bindeb-pkg target builds linux-image-*.deb FIRST then attempts the
linux-headers-*.deb. The headers build can fail (silent in CI log) while
linux-image is already on disk and ready to deploy. The deployment-
critical artifact for the MochaBin mesh integration is linux-image —
headers/libc-dev are needed only for out-of-tree module builds against
this kernel (which we don't do today).

Add `if: always()` to both Collect and Upload steps so partial
artifacts survive a late bindeb-pkg failure. Downgrade if-no-files-found
from `error` to `warn` so a fully empty /tmp/artifacts/ doesn't mask
the real upstream failure with a misleading artifact error.
2026-06-02 14:17:22 +02:00
6eb399eade fix(ci): heredoc → loop for arm64 ports.list (YAML parser couldn't handle col-0 EOF)
Previous attempt used a heredoc with EOF marker at column 0, which
YAML parses as a new top-level key, breaking the workflow file.
Replace with the same loop pattern used elsewhere in the step
(echo | tee -a with iteration over codename suites).
2026-06-02 13:29:37 +02:00
c37368de7a fix(ci): point arm64 apt sources to ports.ubuntu.com (security/archive serve amd64 only)
Ubuntu's security.ubuntu.com and archive.ubuntu.com host amd64/i386
only. arm64 packages live on ports.ubuntu.com.

After `dpkg --add-architecture arm64` + `apt-get update`, the runner
404s on:
  https://security.ubuntu.com/ubuntu/dists/noble/main/binary-arm64/Packages

Fix: pin existing entries to [arch=amd64] and add [arch=arm64] entries
pointing to http://ports.ubuntu.com/ubuntu-ports/. Detected codename
via /etc/os-release so the workflow stays compatible across runner
updates (jammy/noble/numbat).

Unblocks libssl-dev:arm64 install for cross-arm64 kernel .deb build.
2026-06-02 13:26:23 +02:00
e17f757931 fix(ci): enable arm64 multi-arch + install libssl-dev:arm64 in build-kernel.yml
dpkg-buildpackage -aarm64 (cross-build) resolves Build-Depends to the
target arch. The kernel package's debian/control declares
`Build-Depends: libssl-dev` without arch suffix, so dpkg-checkbuilddeps
looks for libssl-dev:arm64 and fails when only libssl-dev (amd64) is
installed.

Add `dpkg --add-architecture arm64` before `apt-get update` so the
arm64 package index is available, then install libssl-dev:arm64
alongside the host libssl-dev.

This is a pre-existing CI gap, exposed by run 26816056566. Unrelated
to the secubox-mesh fragment (signed-regdb was a red herring).
2026-06-02 13:24:20 +02:00
67c54ee421 feat(kernel): add 802.11s mesh stack (mt76x2u/ath10k_pci/ath9k_htc) — CM-MESH-MPCIE-2026-06 v0.2.1
Append WIRELESS/WIFI block to OpenWrt-merged kernel fragment so the next
build-kernel.yml run ships:
  - mac80211 + 802.11s mesh + HWMP (=m)
  - ath10k_pci for QCA9880 / WLE900VX backhaul mesh
  - mt76x2u for MT7632U USB access client
  - ath9k_htc for AR9271 firmware-free audit dongle
  - signed regulatory DB (FR domain lock via secubox-mesh postinst)

Add four sanity-check greps in build-kernel.yml so a future fragment
regression fails the CI before producing a kernel .deb without WiFi.

Manual workflow_dispatch of build-kernel.yml required to materialise
the new linux-image-*.deb (artifact path not yet wired into
build-image.yml — see tracking issue).
2026-06-02 12:59:55 +02:00
CyberMind
97015bbb7f
fix(kernel-build): install build-essential so dpkg-checkbuilddeps passes (#336)
Build #5 cleared the ZRAM choice sed fix (#326) and reached the
bindeb-pkg step, then failed at:

  dpkg-checkbuilddeps: error: Unmet build dependencies:
    build-essential:native libssl-dev

bindeb-pkg auto-generates a debian/control that Build-Depends on
`build-essential:native`. The previous install list pulled in gcc /
make / libc-dev individually but never the meta-package, so
dpkg-checkbuilddeps failed even though all the underlying tools were
present.

libssl-dev is also in the same error line but it IS already installed
— it gets satisfied once build-essential lands because of the way
checkbuilddeps re-resolves the full Build-Depends graph in one pass.

Ref #319 #323 #325 #326.

Co-authored-by: CyberMind-FR <gandalf@Gk2.net>
2026-05-22 08:02:01 +02:00
CyberMind
f56ece69ca
fix(kernel-build): force ZRAM_DEF_COMP_ZSTD via sed POST-olddefconfig (#328)
After three rounds of failed attempts (#323, #325, #326), the root cause
is clear: kconfig `choice` blocks are re-resolved by olddefconfig from
their declared `default <member>` in Kconfig, regardless of what's in
.config. `scripts/config --enable ZRAM_DEF_COMP_ZSTD` applied BEFORE
olddefconfig is silently undone by olddefconfig's choice pass; merging
a fragment that sets `CONFIG_ZRAM_DEF_COMP_ZSTD=y` is overridden the
same way.

The only reliable approach is post-olddefconfig sed surgery on the
choice members. Choice members are leaf symbols with no downstream
build-time deps, so no further olddefconfig is needed after the
override.

Workflow change:
  - move scripts/config out of the choice (only set ZSMALLOC/CRYPTO_*)
  - run olddefconfig to resolve the rest of the tree
  - sed the choice into ZSTD (LZORLE off, ZSTD on)
  - log .config before/after the fixup for diagnostics
  - keep the final assertion `^CONFIG_ZRAM_DEF_COMP_ZSTD=y`

Ref #323 #325 #326.

Co-authored-by: CyberMind-FR <gandalf@Gk2.net>
2026-05-22 07:05:13 +02:00
CyberMind
8e5e08449f
fix(kernel-build): enforce ZRAM choice via scripts/config after merge (#326)
merge_config.sh + olddefconfig don't always honour choice-symbol
overrides set in a fragment (kconfig special-cases choices). Run
scripts/config after the merge to set ZRAM_DEF_COMP_ZSTD explicitly
and disable the upstream-default ZRAM_DEF_COMP_LZORLE.

Co-authored-by: CyberMind-FR <gandalf@Gk2.net>
2026-05-22 06:45:59 +02:00
CyberMind
c24ddcfed3
fix(kernel-build): assert CONFIG_ZRAM_DEF_COMP_ZSTD not the auto-derived string (#323)
CI run 26222437600 failed at the sanity-check: kconfig didn't emit
CONFIG_ZRAM_DEF_COMP="zstd" verbatim because that symbol is the
auto-derived output of the CONFIG_ZRAM_DEF_COMP_<X> choice family,
not a settable variable. Check the choice itself instead.

Co-authored-by: CyberMind-FR <gandalf@Gk2.net>
2026-05-21 17:16:15 +02:00
CyberMind
c23d3256e8
ci(kernel-build): GitHub Actions cross-arm64 workflow (closes #297) (#298)
Manual-dispatch workflow that produces a fresh linux-image-*.deb
artifact when source-side kernel config changes (e.g. #295 ZRAM).

* workflow_dispatch inputs: kernel_version (default 6.12.85),
  revision (default 2secubox).
* Steps: checkout, install cross toolchain + build deps, fetch
  upstream tarball, apply repo patches, merge OpenWrt-merged base
  fragment + ZRAM fragment, sanity-grep key configs, run
  `make bindeb-pkg` to cross-build .deb, upload all .debs as
  artifact with 30-day retention.
* Concurrency-grouped on ref so a re-dispatch cancels the old run.
* 90-minute timeout (typical run ~25-40 min).

Operator workflow:
  gh workflow run "Build SecuBox kernel (cross arm64)"
  gh run download <run-id>
  scp linux-image-*.deb root@gk2:/tmp/
  ssh root@gk2 dpkg -i /tmp/linux-image-*.deb
  ssh root@gk2 reboot

Co-authored-by: CyberMind-FR <gandalf@Gk2.net>
2026-05-21 08:47:57 +02:00