Skip to content

Mujina v5.0.4 – Hardened Permissions, Immediate BLE/LCD Onboarding & Flash Wear Protection

Choose a tag to compare

@IxTechCrypto IxTechCrypto released this 09 Nov 22:55
· 2 commits to v6 since this release

Mujina v5.0.4 – Hardened Permissions, Static Binary Architecture & Flash Longevity

This release provides critical hardening for the Canaan Avalon Nano 3S across boot execution permissions, self-contained static binaries (+crt-static), instant out-of-the-box Bluetooth LE onboarding, flash longevity, autonomous watchdog protection, clean release packaging, and responsive dashboard pool configuration.


Key Fixes & Improvements

  1. Fully Static Binary Architecture (+crt-static):

    • Root Cause: Earlier builds dynamically linked against host Ubuntu 24.04 GLIBC (GLIBC_2.39, /lib/ld-linux-riscv64-lp64d.so.1), causing mujina-minerd to fail with sh: /data/mujina-minerd: not found on K230 rootfs (T-Head libc 2.33).
    • Fix: Both mujina-minerd and ble_setup are compiled with -C target-feature=+crt-static, creating self-contained static ELF executables that run reliably across any K230 rootfs.
  2. Instant Pool Apply & Reboot Execution:

    • Root Cause: In the web dashboard, clicking pool "Save" triggered a 6-second tuning settle cooldown (lockWrites), disabling the "Reboot now" button in the DOM and causing powerAction to silently drop reboot clicks until multiple attempts passed. In the daemon, bare reboot lacked /sbin/reboot -f and /sharefs/reboot_request watchdog signaling.
    • Fix: Decoupled pool credential saving from hardware tuning lockouts; "Reboot now" is immediately active upon saving. Daemon reboots now sync filesystems, trigger /sharefs/reboot_request, and force immediate reboot (/sbin/reboot -f).
  3. Restored App Partition Execute Permissions (0o750 / 0o755):

    • Root Cause: App partition files were mode 644 in earlier rebuilt images, causing volt_bringup.sh, gpio34_high_bringup.sh, backlight_bringup.sh, and wdt_disable_hold to fail silently with permission denied on first boot after a fresh USB flash.
    • Fix: Automated permission enforcement asserts 0o750 on all bringup scripts and 0o755 on all binaries prior to mkfs.ubifs. The ASIC power rail (GPIO34), voltage DAC, and backlight now initialize immediately on first boot.
  4. Instant LCD Display UI & BLE Setup Onboarding:

    • Root Cause: Display and BLE supervisors were blocked behind a 60s wlan0 address wait loop in mujina_display_startup.sh. Unprovisioned units appeared frozen on the Canaan U-Boot boot logo for over 65 seconds with Bluetooth advertising dark.
    • Fix: Decoupled nano3s_ui, fb_button, and ble_setup to spawn immediately upon boot. Bluetooth LE GATT advertising (nan3s_XXXX) and the LCD UI appear instantly. Only mujina-minerd waits for network configuration.
  5. Flash Longevity (RAM-based Logs):

    • Root Cause: Process supervisors piped rotating logs (ble_setup.log, nano3s_ui.log, fb_button.log, harness.log) directly into /sharefs (UBIFS on SPI NAND), generating continuous flash wear cycles every 3 seconds during connection attempts.
    • Fix: Redirected supervisor logs to /tmp/*.log (RAM tmpfs).
  6. Guarded Autonomous Watchdog:

    • Root Cause: The reboot watchdog loop in mujina_display_startup.sh lacked checks for active BLE configuration sessions and had an aggressive 60s timeout, causing premature reboots during initial Bluetooth provisioning.
    • Fix: Guarded watchdog to suppress reboot triggers while ble_setup is actively advertising or during unprovisioned setup, and relaxed IPC connection timeout to 120s with clean backoff.
  7. Sanitized Donor Factory Artifacts & Placeholder Pool:

    • Root Cause: Previous releases inadvertently carried donor test configs and factory files.
    • Fix: Stripped hashrate_cali.ini, efuse_info.txt, board_id_cache, and activation.ini. Replaced test pool credentials in pool.conf and cgminer.conf with clean YOUR_WALLET.YOUR_WORKER defaults.
  8. OTA Firmware Bundle (nano-mujina-v5.0.4-bundle.bin):

    • Packaged official OTA firmware bundle with header framing for seamless 1-click network updates via Torii.

Release Artifacts & SHA-256 Hashes

Asset Name SHA-256 Hash Size (Bytes) Description
nano-mujina-v5.0.4-release.kdimg 3a0b7bd054ae56abc66c2b2ed3e230a546b355bd0710e20f1d71ca217ecbe1a6 129,232,128 Full flash image (flashes all partitions via Torii)
nano-mujina-v5.0.4-bundle.bin 43f81346576c0b55d9710ba83199d6dfc4edc552278472edbd735226cdd687f8 19,556,608 OTA firmware bundle (for network update in Torii)
v5.0.4_app_release.img da28c7fa601e45fedad9233317a656b8a9fc62cd424276967195d68cca09fab2 12,582,912 UBI Partition 9 (app_ubi): Core 1 RTOS & watchdog
v5.0.4_data_release.img 6c94f0b753e020cca09b30794a049d4481006fb422822e949cdd4e7246bc8791 58,720,256 UBI Partition 10 (data): Core 0 Linux miner & configs
nano-mujina-v5-release.kdimg 3a0b7bd054ae56abc66c2b2ed3e230a546b355bd0710e20f1d71ca217ecbe1a6 129,232,128 Alias for backward compatibility with tooling
nano-mujina-v5-bundle.bin 43f81346576c0b55d9710ba83199d6dfc4edc552278472edbd735226cdd687f8 19,556,608 Alias for backward compatibility
v5_app_release.img da28c7fa601e45fedad9233317a656b8a9fc62cd424276967195d68cca09fab2 12,582,912 Alias for backward compatibility
v5_data_release.img 6c94f0b753e020cca09b30794a049d4481006fb422822e949cdd4e7246bc8791 58,720,256 Alias for backward compatibility
rtos_core.elf 2e88ff5f2b58acbe3761a1ab083ad3c46b89b296f7491f05ca1e0970717299d1 530,720 Core 1 RT-Smart ASIC chain driver
mujina-minerd 677d06bd77c3a9ca8b7067578dae9fd9acaefac00a5acd9d3f095a913cdfcccd 19,556,592 Core 0 Linux mining daemon (static binary)
mujina_display_startup.sh f3ee91e98bbcfbeea20cbff3e390c50bba5e905ec1d4410134e7bb46c4f028b1 4,610 Display & autonomous watchdog supervisor

Installation / Upgrade Instructions

  1. Network OTA Update (Recommended for existing nano-mujina units):

    • In Torii, select Avalon Nano 3S -> Network OTA Update (.bin).
    • Enter your device IP, select nano-mujina-v5.0.4-bundle.bin, toggle authorization, and click Upload bundle.
    • Torii will stream the bundle and monitor the reboot until live telemetry is verified.
  2. Torii USB Flash (For factory Canaan units or full restore):

    • Connect the Avalon Nano 3S via USB to your PC while holding the recessed recovery button to enter K230 burn mode.
    • Open Torii, select Avalon Nano 3S, choose nano-mujina-v5.0.4-release.kdimg, toggle authorization, and click Burn Firmware.