Commit Graph

52 Commits

Author SHA1 Message Date
3433a666b2 fix(wireguard): sudo-route wgctl/wg (root needed for wg show dump) so webui lists interfaces+peers; fix(mochabin): clean netplan — WAN=eth2 DHCP metric100, drop stray lan3 IP (boot-wedge) 2026-07-10 06:53:38 +02:00
a52af3b50a feat(netplan): standardize SecuBox LAN to 192.168.10.0/24; bump 1.10.0 (ref #760)
Default br-lan 192.168.1.1/24 collided with common ISP-router LANs
(Freebox/Livebox 192.168.1.0/24) when the appliance sits behind one:
WAN(DHCP)+LAN land on the same subnet -> duplicate route, ARP ambiguity,
unreachable mgmt IP. Observed live on c3box behind a Freebox.

- All board netplans (mochabin, espressobin-v7/ultra, x64-vm, x64-live)
  + VM LANs (vm-x64, vm-arm64) -> br-lan/LAN 192.168.10.1/24
- Generators: secubox-netmodes (inline + router.yaml.j2 template),
  secubox-hub preview, secubox-net-detect
- dnsmasq (espressobin-v7.conf): dhcp-range + option:router + dns-server
- live-usb build scripts + self-signed cert SANs -> IP:192.168.10.1
- Out of scope (untouched): 192.168.255.1 mgmt/trusted-proxy whitelist,
  WAN-probe GATEWAYS lists, remote-ui/round + tests
- Minor "medium" bump 1.9.0 -> 1.10.0 (core build scripts; mochabin-live
  stays on its 2.0.0 track)

Live: c3box br-lan already 192.168.10.1/24 + netmodes template aligned;
gk2 WAN moved to eth2 DHCP @ .200 (Freebox reservation on eth2 MAC).
2026-06-27 17:11:23 +02:00
47076b24d3 fix(netplan): mochabin — copper eth2 as 2nd DHCP WAN candidate, out of br-lan
Some checks are pending
License Headers / check (push) Waiting to run
The image labelled eth0 (SFP+) as the only WAN; the single copper RJ45
(eth2/mvpp2-2) was trapped in br-lan, so an operator/uplink arriving on
copper got no lease. Make both eth0 (SFP+) and eth2 (copper) DHCP WAN
candidates (whichever is cabled gets the lease); br-lan keeps the switch
LAN ports. Verified live on the c3box reference install.
2026-06-27 16:27:05 +02:00
78a1bfbde7 fix(kernel): drop signed-regdb requirement (FR enforced userspace, unblocks cross-arm64 build)
CONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y + CONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=y
pull libssl-dev:arm64 as build-dep at dpkg-checkbuilddeps time. The CI
runner only has libssl-dev (amd64), so cross-arm64 kernel .deb build
fails.

FR regulatory lock is already enforced at userspace by secubox-mesh
postinst (`iw reg set FR`) per CM-MESH-MPCIE-2026-06 §6 — kernel-side
signed regdb is redundant for the initial mesh integration. Revisit
later with proper multi-arch libssl-dev install in build-kernel.yml
if signed regdb becomes a CSPN requirement.

Unblocks kernel build run 26815902206 (failed on libssl-dev:arm64).
2026-06-02 13:13:57 +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
9cc31a839c fix(boot): MOCHAbin extlinux auto-boots mpcie-fix kernel after 3s instead of waiting forever
After the 2026-05-23 reboot the board sat at the extlinux prompt
waiting for an operator key press on the serial console and only came
back online once someone reached the headless unit physically. Two
issues with the template:

1. DEFAULT pointed at `secubox-led`, a stale label the live config no
   longer carries (board has been renamed to `nftables` / `mpcie-fix`
   entries since the kernel rebuild). When extlinux can't find the
   named DEFAULT it falls back to interactive selection — which is
   indistinguishable on the serial console from a "wait forever" hang.
2. TIMEOUT 50 (5 s) was reasonable but still felt long; dropping to
   30 (3 s) makes reboots one-shot from a service-restart standpoint
   while still giving an operator at the console a window to pick the
   legacy kernel if needed.

Aligns the template with the live config (labels nftables + mpcie-fix)
so a board reinstall reproduces the working menu. DEFAULT is mpcie-fix
because that's the only kernel that supports EP06 mPCIe USB PHY +
RTL-SDR (Sentinelle GSM v0.4.0 needs both); the legacy nftables kernel
remains available as a manual fallback in the menu.
2026-05-23 21:38:17 +02:00
CyberMind
264e23e43f
feat(netplan): x64-vm + x64-live static IP fallback when DHCP fails (closes #370) (#371)
Both x64 profiles were DHCP-only; on a network without DHCP the appliance
had no IP at all and was unreachable.

Both interfaces now declare DHCP4 + static 192.168.1.55/24 +
gw 192.168.1.254 + DNS 1.1.1.1, 8.8.8.8. systemd-networkd accepts both:
DHCP routes get the configured low metric (100/200), the static fallback
gets metric 1000, so DHCP wins when available and the static keeps the
appliance reachable on 192.168.1.55 when DHCP times out.

Applied to all WAN candidate interfaces:
  x64-vm: enp0s3 (VBox NAT), enp1s0 (KVM), ens192 (VMware)
  x64-live: "en*" match, "eth*" match

LAN-side interfaces (enp0s8 host-only, enp2s0, ens224, br-lan) unchanged.

Co-authored-by: CyberMind-FR <gandalf@Gk2.net>
2026-05-23 08:41:03 +02:00
CyberMind
8157761843
fix(kernel-build): purge 'is not set' prose from ZRAM fragment comments (#325)
merge_config.sh greps every line for kconfig-shaped patterns including
the negative form `# CONFIG_X is not set`. The fragment's prose
comment quoted that literal string, which the merger mistook for a
directive and concatenated with the next real directive, producing
a poisoned merge that left CONFIG_ZRAM_DEF_COMP_ZSTD unset.

Rewording the prose so 'is not set' never appears in a comment line
unblocks the cross-arm64 kernel build.

Co-authored-by: CyberMind-FR <gandalf@Gk2.net>
2026-05-21 17:58:37 +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
8d9b012c6e
feat(kernel-build): add CONFIG_ZRAM=m with zstd default (closes #295) (#296)
gk2 board runs 15+ LXCs on 8 GiB without swap; the stock kernel ships
`# CONFIG_ZRAM is not set` so zram-tools can't activate. Adding zram
as a module with zstd as the default compressor lets userspace create
/dev/zram0, mkswap, and swapon at ~25% of RAM for safe compressed
RAM-backed swap (no plaintext on disk — CSPN-friendly).

* board/mochabin/kernel/config-6.12.85-secubox-zram.fragment (new):
  CONFIG_ZRAM=m, CONFIG_ZRAM_DEF_COMP_ZSTD=y, CONFIG_ZSMALLOC=y +
  zstd/lz4/lzo crypto for runtime swap of compressor.
* kernel-build/build-kernel.sh: merge the zram fragment into the
  kernel config alongside the OpenWrt-merged base.

Follow-up (separate issue): ship a minimal /usr/lib/systemd/system/
zramswap.service that does `modprobe zram; mkswap /dev/zram0;
swapon -p 100 /dev/zram0` so we don't need apt outbound for
zram-tools.

Co-authored-by: CyberMind-FR <gandalf@Gk2.net>
2026-05-21 08:37:09 +02:00
29d88e20d8 feat(secubox): add gen command for manifest generation
- Load board and profile configurations
- Resolve profile inheritance chain
- Apply board-specific tweaks
- Support --enable/--disable package flags
- Generate manifest.yaml and Makefile
- Fix board.yaml tier reference to match profile naming

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-10 21:14:03 +02:00
7501ce80fd feat(secubox): add board configuration loader
- Define Board struct with hardware, boot, interfaces
- Define Tweaks struct for board-specific overrides
- Add LoadBoard and LoadTweaks functions
- Add MOCHAbin board.yaml and tweaks.yaml
- Support missing tweaks.yaml (optional)
- Add tests for TestLoadBoard and TestLoadTweaks

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-10 20:41:15 +02:00
00766234d2 feat(kernel): Add complete nftables support + busybox rescue docs
Kernel nftables fix (issue #64):
- Added CONFIG_NF_TABLES_INET, CONFIG_NF_TABLES_IPV4/IPV6
- Added NFT_CT, NFT_LOG, NFT_LIMIT, NFT_REJECT, NFT_COUNTER
- CrowdSec firewall bouncer now works correctly

Build script safety:
- Added deploy_to_device() with safe module extraction
- Prevents /lib symlink overwrite disaster

Documentation:
- FAQ-BUSYBOX-RESCUE.md: Emergency recovery when libc inaccessible
- PROMPT-BUSYBOX-TECHTIP.md: Gemini prompt for visual tech tip
- QUICKSHEET: Added emergency recovery section

Sidebar v2.32.0:
- Per-LED tooltips (Hardware/Services/Security)
- Fixed tooltip positioning for sidebar elements

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-08 18:27:30 +02:00
2d46c7d733 feat(image): Add u-boot-tools and fw_env.config for MOCHAbin
- Add u-boot-tools and libubootenv-tool to image packages
  (includes mkimage, fw_printenv, fw_setenv)
- Create fw_env.config for MOCHAbin SPI NOR environment access
  - Environment at offset 0x3F0000, size 64KB
  - Standard Marvell U-Boot layout

This allows reading/modifying U-Boot environment from Linux:
  fw_printenv bootcmd
  fw_setenv bootargs "root=/dev/mmcblk0p2 ..."

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-08 10:25:20 +02:00
adf3398548 fix(kernel): Change LED driver to module for I2C recovery
Session 120 findings:
- Rapid I2C writes can hang the mv64xxx controller on both 6.6.x and 6.12.x
- Kernel 6.12.x is worse (fails even with delays)
- Kernel 6.6.x works with proper delays (30-50ms between writes)

Changed CONFIG_LEDS_IS31FL319X from =y (built-in) to =m (module):
- Allows I2C bus recovery without reboot: rmmod/modprobe
- Matches Debian kernel defaults
- Module can be loaded by systemd after boot

Also added Session 120 documentation with:
- Root cause analysis using systematic debugging
- Kernel comparison (6.6.x vs 6.12.x)
- initcall_blacklist=leds_pca955x_init (OpenWrt workaround)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-08 10:06:30 +02:00
288b3e7cd6 feat(led): Add HealthBump 3-tier LED status system
LED health indicator system for MOCHAbin:
- LED1 (Bottom): Hardware layer (net, cpu, memory)
- LED2 (Middle): Services layer (vhosts, certs, haproxy)
- LED3 (Top): Security layer (crowdsec, alerts, attacks)

Colors: green=ok, yellow=warn, red=error, blue=message

Files on MOCHAbin:
- /usr/local/bin/secubox-led (manual control)
- /usr/local/bin/secubox-healthbump (auto checker)
- systemd timer runs every 30 seconds

Documentation: docs/LED-HEALTHBUMP.md
Kernel config: board/mochabin/kernel/config-6.12-openwrt-merged.fragment

Ref #39

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-08 07:08:37 +02:00
58c302cc8b docs: Session 118 - LED driver working, kernel documentation
- Kernel 6.12.85-openwrt-led deployed with IS31FL319X driver
- 9 LEDs working: blue/green/red × led1/led2/led3
- Heartbeat trigger active on green:led1
- USB network drivers added for Eye Remote (cdc_ether, usbnet)
- Config fragment updated with LED and USB options
- GitHub issues #60, #45, #39 updated

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-08 06:59:59 +02:00
c537908d77 feat(kernel): Complete MOCHAbin kernel config for 6.12.85
Add missing built-in dependencies for boot-critical subsystems:

- MMC: Full chain (MMC, MMC_BLOCK, SDHCI, SDHCI_PLTFM, XENON)
- Filesystems: EXT4, VFAT, OverlayFS (required for boot)
- DSA Switch: Bridge deps (LLC, STP, BRIDGE), MV88E6XXX
- USB: XHCI, USB_STORAGE for USB boot/devices
- SATA: AHCI for SSD support
- PCIe: PCIE_ARMADA_8K

LED IS31FL319X driver tested working on MOCHAbin with kernel 6.12.85.
I2C errors occur but LED commands still function.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-07 19:39:25 +02:00
87886a9710 feat(kernel): Add Debian base config and SecuBox LED fragment for MOCHAbin
- config-6.12.85-debian-base: Full Debian arm64 kernel config (13K options)
  extracted from working MOCHAbin system with MVPP2 network driver
- config-6.12.85-secubox-led-v2.fragment: Kconfig fragment enabling:
  - IS31FL319X/IS31FL32XX LED drivers (built-in)
  - MVPP2/MVNETA network drivers (built-in)
  - I2C MV64XXX for LED controller
  - GPIO/pinctrl for LED shutdown pin
  - /proc/config.gz for debugging

Build strategy: merge fragment on top of Debian base using
scripts/kconfig/merge_config.sh to preserve all working drivers
while adding LED support.

Fixes kernel panic from missing MVPP2 in previous custom builds.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-07 16:46:49 +02:00
c51b3a50bf fix(kernel): Build USB drivers as built-in for live USB boot (ref #39)
Change USB modules from =m to =y for live USB support:
- CONFIG_USB_XHCI_HCD=y (USB 3.0)
- CONFIG_USB_XHCI_PCI=y
- CONFIG_USB_XHCI_PLATFORM=y
- CONFIG_USB_EHCI_HCD=y (USB 2.0)
- CONFIG_USB_EHCI_PCI=y
- CONFIG_USB_OHCI_HCD=y (USB 1.1)
- CONFIG_USB_OHCI_HCD_PCI=y
- CONFIG_USB_STORAGE=y

Required for bootable USB without module dependencies.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-07 12:32:46 +02:00
a765a8e21b fix(kernel): Build network drivers as built-in for LED kernel (ref #39)
Change critical network modules from =m to =y to avoid module mismatch:
- CONFIG_MDIO=y (core MDIO bus)
- CONFIG_SFP=y (SFP+ support)
- CONFIG_MARVELL_PHY=y (Marvell PHY driver)
- CONFIG_MARVELL_10G_PHY=y (10G PHY)
- CONFIG_MDIO_I2C=y (MDIO over I2C)

These are required for MVPP2 network to work without loading modules
from a different kernel version.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-07 12:25:43 +02:00
7ab7fc736d feat(dashboard): Add GeoMap and country flags to CrowdSec WebUI
- Add GeoMap tab with country attack distribution
- Display country flags emoji in alerts list
- Show attack percentage by country
- Fix WAF addon to use X-Forwarded-For for real attacker IP
- Enable FAT/VFAT built-in and MVPP2 in LED kernel config

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-07 11:51:41 +02:00
627d521e8d fix(kernel): Enable ARCH_MVEBU and I2C_MV64XXX for LED support (ref #39)
Add kernel config for 6.12.85 with:
- CONFIG_ARCH_MVEBU=y (required for Marvell Armada)
- CONFIG_I2C_MV64XXX=y (I2C controller for IS31FL3199)
- CONFIG_LEDS_IS31FL319X=y (LED driver)

This fixes the "Driver 'mv64xxx_i2c' is already registered" conflict
by building the I2C driver into the kernel instead of as a module.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-07 08:13:42 +02:00
26f5fb945c fix(boot): Use correct initrd for LED kernel entry (ref #39)
- extlinux.conf: secubox-led entry now uses initrd.img-6.12.85
  (matches kernel 6.12.85, not the +deb12-arm64 variant)
- This fixes "Driver 'mv64xxx_i2c' is already registered" error
  caused by kernel/initrd module mismatch
- Add secubox-led-k2000 script for rainbow LED effect

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-07 07:38:53 +02:00
fab3e93c70 fix(dts): Correct IS31FL3199 LED GPIO polarity on MOCHAbin (ref #54)
The shutdown-gpios property was incorrectly set to GPIO_ACTIVE_LOW,
causing the LED controller to stay in shutdown mode.

Changed to GPIO_ACTIVE_HIGH to match OpenWrt's working configuration.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-07 06:44:55 +02:00
eab3688561 fix(eye-remote): Prevent duplicate IP on USB composite gadget
Pi Zero composite gadget creates both RNDIS (usb0) and CDC-ECM (usb1)
interfaces with same MAC prefix. This caused duplicate routes for
10.55.0.0/24 network, breaking connectivity to Eye Remote.

Fix:
- RNDIS (usb0): Configure with IP 10.55.0.1/24, bring up
- CDC-ECM (usb1): Disable (ip link down) to prevent route conflict
- Add serial console symlink /dev/eye-remote-console

Ref #52

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-07 04:54:38 +02:00
33f9390ee7 feat(eye-remote): Complete Eye Remote integration with Tow-Boot
Session 95 changes:

Eye Remote (Pi Zero USB Gadget):
- Fix API main.py: use usb0 interface, ARP check instead of ping
- Fix nginx config: preserve full API path for FastAPI routing
- Add udev rules for USB gadget auto-detection
- Add network config script for interface setup
- Redirect /eye-remote/ to /remote-ui/

Tow-Boot:
- Add flash-tow-boot.cmd for MOCHAbin U-Boot update
- Add manual flash instructions

Socket Conflict Resolution:
- Document fix: services use RuntimeDirectory= override
- secubox-core.service manages /run/secubox/ exclusively

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-05 09:32:10 +02:00
de2f3659a4 fix(mochabin): Increase image size to 8G for full install
The 4G image size was insufficient for the full SecuBox install with
slipstream packages (~5.5GB rootfs needed). Updated to 8G which fits
on SATA or larger SD cards.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-04 10:49:24 +02:00
0d7a21486b feat(tow-boot): Add Tow-Boot with eMMC boot support for MOCHAbin
- Add Tow-Boot source to tools/ with eMMC boot partition support
- Enable CONFIG_SUPPORT_EMMC_BOOT via mmcBootIndex for MOCHAbin variants
- Document boot mode jumpers J17-J22 (SPI 0x32, eMMC 0x2B)
- Document Tow-Boot build and flashing procedures
- Add known hardware issues (SPI intermittent, eMMC BootROM failure)
- Remove incorrect microSD slot reference from MOCHAbin docs
- Fix systemd service path (/lib → /usr/lib) in mitmproxy package

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-03 16:58:25 +02:00
106fd61af3 fix(network): Fix x64-live netplan for real AMD64 hardware
Problem: IP assignment failures on bare metal AMD64 due to broken
netplan wildcard syntax - using wan0: with match: name: "e*" but
no set-name: directive caused conflicts on multi-interface systems.

Solution:
- Split single e* pattern into separate en* and eth* matches
- Different route metrics (100/200) for deterministic routing
- Added br-lan bridge pre-definition for router mode
- Enhanced secubox-net-detect with better logging and patterns
- New secubox-net-reset utility for forcing re-detection

Changes:
- board/x64-live/netplan/00-secubox.yaml: Fixed bootstrap config
- image/build-live-usb.sh: Updated embedded netplan with same fix
- image/sbin/secubox-net-detect: Enhanced interface detection
- image/sbin/secubox-net-reset: New utility script
- CLAUDE.md: Added Debian shell scripting guidelines

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-01 06:44:08 +02:00
1b7669124d feat(eye-remote): Implement OTG features 3-5 (gadget control, storage sync, setup wizard)
Complete Eye Remote OTG features implementation:

Feature 3 - Gadget Mode Control:
- Add gadget_config.py for TOML-based USB gadget configuration
- Add gadget_switcher.py for mode switching via configfs
- Add gadget_gesture.py for touch-based mode selection
- Add eye-gadget-switch.sh shell script for actual mode changes
- Add gadget.toml default configuration

Feature 4 - Storage Sync:
- Add storage_manager.py for USB mass storage partition management
- Add backup_manager.py with AES-256 encrypted backups
- Add config_sync.py for bidirectional SecuBox config sync
- Add storage.py API routes for backup/restore/sync operations

Feature 5 - Self-Setup Portal:
- Add setup.py wizard controller with 7-step state machine
- Add setup_wizard.py display renderer for HyperPixel round screen
- Add setup.py API routes for wizard navigation and configuration
- Steps: Welcome, Network, Security, Services, Mesh, Verify, Complete

API endpoints added:
- /gadget: status, mode, modes, config
- /storage: info, mount, files, backup, export, import
- /setup: status, start, next, back, detect, verify, complete

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-29 06:41:23 +02:00
dd384da66a feat(eye-remote): Add display state machine with splash and fallback modes
Display system for Pi Zero Eye Remote (HyperPixel 2.1 Round 480x480):

Splash Screen (splash.py):
- Animated phoenix logo for boot/halt/start/reboot states
- Pulsing glow effects with fire colors
- Progress indicator ring with rotating dots
- Fallback phoenix symbol if logo image missing

Fallback Display Manager (fallback_manager.py):
- Connection state detection (OTG 10.55.0.1, WiFi secubox.local)
- Four modes: OFFLINE, CONNECTING, ONLINE, COMMUNICATING
- Local metrics radar with 6 concentric rings
- 3D rotating cube with module icons when connected
- Rainbow sweep line animation

Touch Analysis Tools:
- touch_analyzer.py: Noise pattern analysis (Y-axis oscillation at stable X)
- touch_calibrate.py: Corner target display for manual calibration
- touch_filter.py: X-stable noise filtering

Radar Variants:
- radar_flashy.py: Vibrant colors with 3D cube
- radar_concentric.py: Balanced metric arcs centered at 12 o'clock
- radar_rainbow.py: Rainbow colorization with sweep
- radar_full.py: Complete feature set

Also includes:
- Hardware Smart-Strip module specs (SBX-STR-01)
- Host configuration for USB OTG network
- Systemd service for USB auto-mode

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-28 14:48:00 +02:00
b115e966b1 fix(network): Remove dummy0 interface causing routing issues
The dummy0 interface was creating unwanted default routes that
interfered with proper network connectivity.

Removed from:
- board/espressobin-v7/netplan/00-secubox.yaml
- board/espressobin-ultra/netplan/00-secubox.yaml
- board/mochabin/netplan/00-secubox.yaml
- image/build-image.sh (systemd-networkd config)
- image/build-live-usb.sh (systemd-networkd config)
- image/profiles/x64-live.conf (kiosk dummy network)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-27 16:45:31 +02:00
942196b937 fix(boot): Add mv88e6085 and initcall_blacklist to boot scripts
Extended mv88e6xxx blacklist to include mv88e6085 subdriver and added
initcall_blacklist for built-in driver scenarios. Fixes detection loop
on ESPRESSObin v7 during USB boot via Eye Remote.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-27 00:21:43 +02:00
3240e441c7 fix(ebin): EspressoBin eMMC boot fixes
- secubox-haproxy: Remove ReadWritePaths sandboxing causing NAMESPACE errors
- secubox-net-fallback: Skip lan* interfaces (DSA downstream ports)
- netplan: Add dummy0 with 10.55.255.1/24 to all board configs
- flash-emmc: Fix eMMC detection using boot0 partition
- flash-emmc.cmd: Support multiple image filenames

Fixes issues encountered when booting SecuBox from EspressoBin V7 eMMC.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-20 07:59:42 +02:00
4165d6d66c feat(network): Smart auto-IP with ARP collision detection (v1.7.0.2)
- Add ARP-based IP collision detection for multi-device environments
- MAC-based pseudo-random IP offset to spread devices across range
- Gratuitous ARP announcement to prevent IP conflicts
- Fix EspressoBin DSA network: target wan interface, not eth0 CPU port
- Static IP fallback 192.168.255.250 when DHCP unavailable
- Sync all build scripts to version 1.7.0
- Add screenshot script with 90+ module URLs
- Add mock HTML screenshots for documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-14 16:28:02 +02:00
5dcc0619ed fix(boot): Improve GRUB install and netplan DHCP
secubox-flash-disk:
- Add efibootmgr verification after GRUB EFI install
- Show manual fix instructions if EFI entry not created
- Mount /dev/pts for chroot compatibility
- Pass target device to grub-install
- Better error handling and summary

netplan (x64-live):
- Remove invalid routes (via: 0.0.0.0)
- Add dhcp4-overrides for proper DNS/routes
- Rename wan to wan0 to avoid conflicts

Fixes Error 1962 on Lenovo ThinkCentre M710q

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-12 08:02:57 +02:00
38988163de fix(live): Plymouth cube theme, auth, flash-disk, netplan
- Plymouth: Integrate secubox-cube theme with 3D rotating module icons
- Auth: Create users.json for portal login (admin/secubox)
- flash-disk: Fix 'local' outside function error on line 236
- netplan: Add br-lan/wan structure for x64-live mode

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-11 17:48:41 +02:00
13c69a4a44 fix(ebin): Use /dev/sda2 for USB Live boot root device
EspressoBin V7 device mapping:
- USB drive -> /dev/sda (Live USB source)
- SD card -> /dev/mmcblk0
- eMMC -> /dev/mmcblk1 (flash target)

Fixes boot failure: "/dev/mmcblk1p2 does not exist"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-11 12:35:05 +02:00
be03d8d8db fix(build): Add UTF-8 console font and U-Boot flash script
- Add fonts-terminus and kbd packages for UTF-8 box-drawing chars
- Configure console-setup with Terminus font (FONTFACE/FONTSIZE)
- Add vconsole.conf with ter-v16n font for systemd
- Include flash-emmc.scr on boot partition for U-Boot flashing
- Copy embedded eMMC image to boot partition for U-Boot access
- Update README with Live USB Quick Flash instructions
- Bump version to 1.6.1

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-11 12:29:54 +02:00
c8aa8b8e34 fix(ebin): Use correct root device /dev/mmcblk0p2 for SD card boot
EspressoBin V7 device mapping:
- SD card: /dev/mmcblk0
- eMMC: /dev/mmcblk1
- USB: /dev/sda

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-11 11:28:05 +02:00
6c7e6051bd feat(ci): Add unified multi-platform live USB workflow
- Add build-all-live-usb.yml with matrix for x64, EspressoBin V7, and RPi 400
- Update release.yml to include live USB builds in release pipeline
- Add RPi 400 netplan configuration for Ethernet and WiFi
- Deprecate build-live-usb.yml (now wrapper to unified workflow)

Platforms supported:
- x64 (amd64) - GRUB UEFI/BIOS boot
- EspressoBin V7 (arm64) - U-Boot distroboot with embedded eMMC image
- Raspberry Pi 400 (arm64) - Native Pi firmware boot

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-11 11:20:46 +02:00
087e94467c feat(ebin): Add live USB flasher for EspressoBin V7 eMMC
New components for bootable live USB with eMMC flashing capability:

- image/build-ebin-live-usb.sh: Build script for ARM64 live USB
  - SquashFS-based live filesystem
  - Cross-compilation support via QEMU
  - Optional embedded eMMC image for flashing
  - Distroboot configuration for U-Boot

- image/sbin/secubox-flash-emmc: Interactive eMMC flasher
  - Safety checks (won't flash if running from eMMC)
  - Progress display and checksum verification
  - Auto mode for unattended installation
  - Dry-run option for testing

- board/espressobin-v7/boot-live-usb.cmd: U-Boot boot script
  - USB boot priority configuration
  - Live-boot kernel parameters

- board/espressobin-v7/extlinux/extlinux.conf: Distroboot menu
  - Live, To-RAM, Flash, and Rescue boot options

- Updated secubox-console-tui with "Flash to eMMC" menu option

Usage:
  # Build eMMC image first
  sudo bash image/build-image.sh --board espressobin-v7

  # Build live USB with embedded image
  sudo bash image/build-ebin-live-usb.sh \
    --embed-image output/secubox-espressobin-v7-bookworm.img.gz

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-11 10:24:40 +02:00
e4f65d21b1 docs: Add USB boot scripts documentation for ESPRESSObin
- Updated board/espressobin-v7/README.md with boot scripts section
- Added "U-Boot Boot Scripts" section to wiki/ESPRESSObin.md
- Documented boot-usb.scr, flash-emmc.scr usage

Simplifies ESPRESSObin installation with automated scripts.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-10 11:36:54 +02:00
9f4eae6058 feat: Add U-Boot USB boot and flash scripts for ESPRESSObin v7
New scripts for USB boot workflow:
- boot-usb.cmd/scr: Boot live system from USB
- flash-emmc.cmd/scr: Flash compressed image to eMMC

Usage:
1. Copy image.gz + boot.scr to FAT32 USB
2. On U-Boot: usb start && load usb 0:1 $loadaddr boot.scr && source $loadaddr
3. For eMMC flash: load usb 0:1 $loadaddr flash-emmc.scr && source $loadaddr

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-10 11:34:22 +02:00
c7bf0b9447 feat: Add Raspberry Pi 400 support with boot menu
- Add rpi400 to default CI builds in build-image.yml
- Create board/rpi400/config.mk with Pi 400 settings
- Add build-image.sh redirect to build-rpi-usb.sh for RPi boards
- Add boot menu system to build-rpi-usb.sh:
  - Normal, Kiosk, Console, Bridge, Minimal modes
  - VT100/DEC PDP-style menu interface
  - Persistent mode selection across reboots
  - systemd integration for early boot
- Fix slipstream in build-rpi-usb.sh:
  - Use dpkg --force-depends (pip provides Python deps)
  - Skip failing apt-get -f install
  - Add more Python dependencies to pip install

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-07 06:32:56 +02:00
39667e41bc fix: ESPRESSObin v7 eMMC boot - DTB, root device, mv88e6xxx blacklist
- Use armada-3720-espressobin-v7-emmc.dtb to enable both SDHCI controllers
- Fix root device: /dev/mmcblk1p2 (eMMC is mmc1 with dual controller DTB)
- Add modprobe.blacklist=mv88e6xxx,dsa_core to prevent DSA probe loop
- Add sdhci.debug_quirks2=0x40 to fix xenon-sdhci DDR timing issues
- Add initramfs hooks for sdhci-xenon and mv88e6xxx blacklist
- Add systemd service to load mv88e6xxx after rootfs mount
- Fix fstab tmpfs mount (remove non-existent user reference)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-06 18:07:30 +02:00
4772fc2b0f fix: Use board-specific image sizes for eMMC compatibility
Board configs now define IMG_SIZE:
- ESPRESSObin v7: 3584M (fits 4GB eMMC)
- ESPRESSObin Ultra: 4G (8GB eMMC)
- MOCHAbin: 4G (8GB eMMC + SATA)

CI workflow updated to use board defaults instead of hardcoded 8G.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-05 15:20:24 +02:00
41011c57d7 docs: Add eMMC size limits for ESPRESSObin/MOCHAbin
Document storage constraints for ARM boards:
- ESPRESSObin 4GB eMMC: max 3.5GB image
- ESPRESSObin 8GB/MOCHAbin: 4GB default, 6GB max
- MOCHAbin SATA/NVMe alternative for larger installs
- Added MOCHAbin README.md with U-Boot flash guide

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-05 15:17:49 +02:00
81fa1d77b6 docs: Add ESPRESSObin v7 installation guide
Document U-Boot flash procedure for installing SecuBox to eMMC
from USB drive. Includes:
- USB to eMMC flash via gzwrite
- SD card alternative method
- Network interface mapping
- Troubleshooting tips

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-05 09:31:11 +02:00