Skip to content

feat(boards): Add Seeed Studio reComputer RK3576/RK3588 DevKit support#9719

Open
baorepo wants to merge 45 commits into
armbian:mainfrom
Seeed-Studio:main
Open

feat(boards): Add Seeed Studio reComputer RK3576/RK3588 DevKit support#9719
baorepo wants to merge 45 commits into
armbian:mainfrom
Seeed-Studio:main

Conversation

@baorepo
Copy link
Copy Markdown

@baorepo baorepo commented Apr 24, 2026

Summary

Add board support for Seeed Studio's reComputer RK3576 DevKit and reComputer RK3588 DevKit to the Armbian build framework. These are industrial-grade single-board computers based on Rockchip RK3576 (octa-core A72/A53) and RK3588 (octa-core A76/A55) SoCs, targeting edge AI and IoT applications.

Board Support

  • reComputer RK3576 DevKit (config/boards/recomputer-rk3576-devkit.conf): RK3576 SoC, BOARDFAMILY=rk35xx, vendor kernel, custom bootscript, PCA953X GPIO expander, AD5398 DAC for fan control, X11 KMS on card0, ES8311 audio codec
  • reComputer RK3588 DevKit (config/boards/recomputer-rk3588-devkit.conf): RK3588 SoC, BOARDFAMILY=rockchip-rk3588, vendor kernel, custom bootscript, Mali-G610 GPU (libmali), Realtek r8125 Ethernet DKMS, multi-display audio naming (HDMI0/HDMI1/HDMI-In/DP0/ES8311)
  • Shared configuration (config/boards/recomputer-rk35xx-common.inc): Extracted ~300 lines of common hooks covering wireless, Bluetooth, USB gadget, security hardening, PATH, and OTA support. BT UART selection uses ${BOOT_SOC} case branching (rk3576→ttyS4, rk3588→ttyS6)

Hardware Support

  • Wireless: AIC8800 SDIO WiFi/BT with custom modprobe options and module loading; Morse FGH100M WiFi (HaLow) firmware and tools via GitHub releases
  • Bluetooth: Custom bluez package for FCS960K headset support; AIC8800 BT UART service with SoC-specific serial port selection
  • USB Gadget: Dual-mode ACM serial + RNDIS network gadget on usb0 (192.168.42.1/24) with dnsmasq DHCP, NetworkManager static IP, and serial console on ttyGS0 with proper systemd dependency handling
  • Security: SSH hardening, fail2ban, DHCP privacy (MAC randomization), Terrapin mitigation via security-hardening/recomputer-security.sh
  • USB Auto-mount: udev-based auto-mounting of USB storage under /media/seeed/LABEL
  • OTA: Recovery OTA and A/B dual-partition OTA with rollback support (via seeed_armbian_extension)
  • Encrypted Disk: LUKS root with OP-TEE auto-unlock (RK_AUTO_DECRYP=yes)
  • Camera: RKAIQ camera engine packages for both SoCs

Boot & Firmware

  • Custom U-Boot boot scripts (boot-seeed-rk3576.cmd, boot-seeed-rk35xx.cmd) with SPI flash boot support
  • U-Boot defconfigs for both boards (EEPROM boot, I2C config, HDMI voltage swing patches)
  • Device trees: rk3576-recomputer-rk3576-devkit.dts, rk3588-recomputer-rk3588-devkit.dts
  • Kernel config additions: AD5398 DAC, PCA953X GPIO, fan control for RK3576

Build Framework Integration

  • lib/functions/compilation/patch/drivers_network.sh: Driver harness integration for Morse wireless FGH100M kernel module
  • lib/functions/compilation/patch/drivers-harness.sh: Hook for Morse driver build
  • External extension system: ENABLE_SEEED_RK_EXTENSION=yes clones seeed_armbian_extension from GitHub for OTA, encryption, and secure boot features

Changed Files

File Description
config/boards/recomputer-rk3576-devkit.conf RK3576 board config (113 lines)
config/boards/recomputer-rk3588-devkit.conf RK3588 board config (107 lines)
config/boards/recomputer-rk35xx-common.inc Shared hooks for both boards (305 lines)
config/bootscripts/boot-seeed-rk3576.cmd RK3576 U-Boot boot script
config/bootscripts/boot-seeed-rk35xx.cmd RK3588 U-Boot boot script
config/kernel/linux-rk35xx-vendor.config Kernel config: AD5398, PCA953X, fan
patch/kernel/rockchip-rk35xx-legacy/ RK3576 DTS, fan curve, camera engine
patch/kernel/rockchip-rk3588-legacy/ RK3588 DTS, HDMI voltage, camera engine
patch/kernel/rockchip64-7.0/ Upstream kernel patch refresh
patch/misc/wireless-fgh100m.patch Morse FGH100M HaLow WiFi driver
patch/u-boot/* U-Boot defconfigs, EEPROM boot, flash patches
lib/functions/compilation/patch/ Morse driver build integration

How to Test

# RK3576  build
 ./compile.sh \                                                                                        
      BOARD=recomputer-rk3576-devkit \                                  
      BRANCH=vendor \                                                                                   
      RELEASE=bookworm \                                                                                
      BUILD_MINIMAL=no \                                                                                
      BUILD_DESKTOP=yes \                                                                               
      KERNEL_CONFIGURE=no \                                                                             
      ENABLE_SEEED_RK_EXTENSION=yes \                                                                   
      OTA_ENABLE=no \                                                                                   
      DESKTOP_ENVIRONMENT=gnome \                                      
      DESKTOP_ENVIRONMENT_CONFIG_NAME=config_base \                                                     
      DESKTOP_APPGROUPS_SELECTED=browsers

Serial console: minicom -b 1500000 -D /dev/ttyUSB0

Summary by CodeRabbit

  • New Features

    • Added support for Seeed reComputer RK3576 and RK3588 Devkits
    • Boot scripts improved for automatic board detection and overlay handling
    • Mali GPU userspace enabled and camera engine packages installed
    • USB gadget networking and USB auto-mount behavior added
    • MorseMicro FG-H100M WiFi and AIC8800 wireless/Bluetooth integration
  • Improvements

    • HDMI voltage-swing adjustment for RK3588 to improve display behavior
    • Various bootloader and device-tree updates for board peripherals and power rails

Review Change Stack

ackPeng and others added 17 commits April 14, 2026 10:43
Extract duplicated hooks from rk3576 and rk3588 board configs into
recomputer-rk35xx-common.inc. Both configs source the shared file and
keep only SoC-specific hooks.

Common hooks: bluez (FCS960K), USB gadget, Morse FGH100M tools,
AIC8800 wireless, security hardening, PATH config, USB auto-mount.

Key fixes included:
- USB gadget: NM managed via ExecStartPost in usbdevice.service drop-in
  (not via broken keyfile unmanaged-devices exception)
- dnsmasq: After=usbdevice + Restart=on-failure for reliable boot
- serial-getty@ttyGS0: ordering via drop-in, not custom service
- USB auto-mount: udev SYSTEMD_WANTS triggers usb-automount@.service,
  mounts under /media/seeed/ with proper ownership
- SSH: MaxAuthTries 6 (OpenSSH default) to support multi-key clients

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
When usbdevice fails on first attempt, serial-getty@ttyGS0 tries to
start before ttyGS0 exists and stays dead. Add Restart=on-failure
so it retries after usbdevice eventually succeeds.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
bind-interfaces fails if usb0 doesn't exist at startup, requiring
After=usbdevice + Restart=on-failure workarounds. bind-dynamic
tolerates missing interfaces and serves DHCP when usb0 appears,
removing the need for the dnsmasq systemd drop-in entirely.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Clear BindsTo=dev-ttyGS0.device from the base unit via drop-in override.
ttyGS0 is a USB gadget device not present at boot, so the base unit's
BindsTo causes a dependency failure. Also drop Restart=on-failure override
to preserve the base unit's Restart=always, preventing the getty from
staying dead after a normal logout.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 24, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a23fbaa9-7ccb-487e-9385-e233d152338a

📥 Commits

Reviewing files that changed from the base of the PR and between 9f7d7f5 and 39592ec.

📒 Files selected for processing (1)
  • config/sources/vendors/seeed-studio/recomputer-rk35xx-common.inc
🚧 Files skipped from review as they are similar to previous changes (1)
  • config/sources/vendors/seeed-studio/recomputer-rk35xx-common.inc

📝 Walkthrough

Walkthrough

Adds Seeed reComputer RK3576 and RK3588 Armbian support: shared Seeed vendor image customization (APT/source, packages, firmware, USB gadget/automount, kernel tweaks), board-specific hooks for Mali/camera/udev/systemd tweaks, and U-Boot device trees and defconfigs for both boards.

Changes

Seeed reComputer RK35xx Board Integration

Layer / File(s) Summary
Shared RK35xx vendor infrastructure
config/sources/vendors/seeed-studio/recomputer-rk35xx-common.inc
Seeed APT repo/key management, chroot_sdcard helper, Seeed package install sequence (including fcs960k-aic-bluez reinstall handling), AIC8800 wireless/Bluetooth config, pinned MorseMicro firmware install, USB gadget + dnsmasq + NetworkManager static usb0, systemd drop-ins and services, DE-agnostic USB automount helper and usb-automount@.service, PATH prepending script, GDM auto-login disable, shared RK35xx kernel .config tweaks, staging Seeed kernel patches, and optional seeed_armbian_extension clone/enable.
RK3576 board config, hooks and U-Boot DTS
config/boards/recomputer-rk3576-devkit.conf, config/bootscripts/boot-seeed-rk3576.cmd, config/bootscripts/boot-seeed-rk35xx.cmd, patch/u-boot/.../dt/rk3576-recomputer-rk3576-devkit.dts
Board variables and bootscript mapping, pre-install hooks to install libmali-g52 and camera-engine-rkaiq-rk3576, post-family tweaks for audio udev naming, DMA heap permissions, X11 KMS config, systemd sleep disable, Mali EGL/libmali-hook overrides and restoration, plus U-Boot DTS enabling regulators, I2C EEPROM, PCIe, SPI flash, SD/MMC, USB DRD, spi_nor, and pinctrl definitions.
RK3588 board config, hooks and U-Boot DTS
config/boards/recomputer-rk3588-devkit.conf, patch/u-boot/.../dt/rk3588-recomputer-rk3588-devkit.dts
Board variables and bootscript mapping, pre-install hooks for libmali-valhall G610 (with ldconfig), Realtek r8125 DKMS and modules-load config, camera-engine-rkaiq-rk3588, post-install audio udev renames, and removal of armbian-hardware-optimize.service; U-Boot DTS adds ADC key, fixed regulators, combphy/PCIe links with reset GPIOs, USB PHY/controllers, and relevant pinctrl entries.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Suggested reviewers

  • EvilOlaf
  • igorpecovnik
  • ColorfulRhino
  • JohnTheCoolingFan
  • TheSnowfield
  • SuperKali
  • paolosabatino
  • prahal
  • brentr
  • chainsx
  • catalinii
  • pyavitz
  • HeyMeco
  • amazingfate
  • lanefu

Poem

🐰 I hopped through build and tree,

Saw Mali, DTs, and apt keys,
Two boards ready, scripts aligned,
USB mounts and firmware signed,
Recomputed joy for all to see.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding board support for two Seeed Studio reComputer DevKit models (RK3576 and RK3588) to Armbian.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added size/large PR with 250 lines or more 05 Milestone: Second quarter release Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... Framework Framework components Patches Patches related to kernel, U-Boot, ... labels Apr 24, 2026
Pillar1989 and others added 2 commits April 24, 2026 15:08
The BT UART assignment is per-board, not per-SoC.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Move BT UART selection from BOOT_SOC-based case logic in common.inc to
per-board BT_UART variables. RK3576 DevKit uses ttyS4, RK3588 DevKit
uses ttyS6. Remove redundant pre_umount_final_image BT UART hook from
RK3576 config since common.inc BSP hook now handles it.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Comment thread config/boards/recomputer-rk3576-devkit.conf Outdated
@armbian armbian deleted a comment from github-actions Bot Apr 24, 2026
@baorepo baorepo marked this pull request as ready for review May 18, 2026 06:27
@baorepo baorepo changed the title WIP: Add Seeed Studio reComputer RK3576/RK3588 DevKit support feat(boards): Add Seeed Studio reComputer RK3576/RK3588 DevKit support May 18, 2026
@github-actions github-actions Bot added the Documentation Documentation changes or additions label May 18, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

♻️ Duplicate comments (1)
config/sources/vendors/seeed-studio/recomputer-rk35xx-common.inc (1)

352-401: ⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

These kernel config mutations still bypass the kernel cache key.

Moving the kernel_config_set_* calls into a shared file sourced by both board configs doesn't fix the underlying problem: this still mutates .config imperatively after the kernel artifact inputs are chosen. A cached rk35xx build can still be reused with or without the Seeed-only options depending on build order. Please move these into hash-tracked config inputs (opts_*, a fragment, or an extension/family-owned kernel path).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@config/sources/vendors/seeed-studio/recomputer-rk35xx-common.inc` around
lines 352 - 401, custom_kernel_config__recomputer_rk35xx_customizations
currently mutates .config imperatively via kernel_config_set_y/_m/_n/_val which
bypasses the kernel cache key; move these Seeed-specific mutations into inputs
tracked by the build hash instead (e.g. add opts_recomputer_rk35xx or a board
fragment/extension under the kernel family that is sourced before kernel
artifact selection) and replace the runtime kernel_config_set_* calls with
inclusion of that hash-tracked config fragment or use opts_* variables that the
kernel build system reads so the rk35xx cache key changes when the Seeed options
are present (update references to kernel_config_set_y, kernel_config_set_m,
kernel_config_set_n, kernel_config_set_val and
custom_kernel_config__recomputer_rk35xx_customizations accordingly).
🧹 Nitpick comments (2)
config/boards/recomputer-rk3588-devkit.conf (1)

1-1: ⚡ Quick win

Expand the board description comment with the actual hardware features.

This header only captures SoC and RAM. Please add the board's key features too so the interactive board picker is actually informative.

Based on learnings: Enforce that the first line comment in Armbian board configuration files contains a dedicated hardware feature description specifying SoC model, core count, RAM options, and key features.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@config/boards/recomputer-rk3588-devkit.conf` at line 1, Update the first-line
comment in recomputer-rk3588-devkit.conf to a single dedicated hardware feature
description that lists SoC model (RK3588), core count (octa-core), supported RAM
options (4/8/16GB), and key features (e.g., eMMC/SD storage, Gigabit Ethernet,
Wi‑Fi/BT, HDMI/DP outputs, PCIe/NVMe, USB ports, GPIO headers, power input).
Replace the generic header line with that concise feature string so the board
picker shows SOC/cores/RAM and main peripherals, and ensure the comment follows
the required first-line format for Armbian board configs.
config/boards/recomputer-rk3576-devkit.conf (1)

1-1: ⚡ Quick win

Expand the board description comment with the actual hardware features.

This header only captures SoC and RAM. Please add the board's key features too so the interactive board picker is actually informative.

Based on learnings: Enforce that the first line comment in Armbian board configuration files contains a dedicated hardware feature description specifying SoC model, core count, RAM options, and key features.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@config/boards/recomputer-rk3576-devkit.conf` at line 1, Update the first-line
header comment in the Armbian board config (the board description comment in
recomputer-rk3576-devkit.conf) so it includes the SoC model, core count, RAM
options and key hardware features (e.g., eMMC/SD support, onboard Wi‑Fi/BT, USB
ports, PCIe/M.2, Gigabit Ethernet, display interfaces, power features). Edit the
top comment to be a single concise sentence that lists "Rockchip RK3576,
octa‑core, 4/8/16GB RAM options" plus the board's key features so the
interactive board picker can show a meaningful summary.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@config/boards/recomputer-rk3576-devkit.conf`:
- Around line 62-69: The udev rule in
post_family_tweaks__recomputer_rk3576_dma_heap_permissions makes /dev/dma_heap/*
world-writable (MODE="0666"); change it to a group-restricted rule and ensure
the target group (e.g., render or video) is used with 0660 permissions: update
the echo that writes 50-mali-dma-heap.rules to set SUBSYSTEM=="dma_heap",
GROUP=="render" (or "video"), MODE="0660" (or use a seat/group ACL approach),
and ensure any required group creation/assignment for Mali userspace is handled
elsewhere so only the intended group can access dma_heap devices.

In `@config/boards/recomputer-rk3588-devkit.conf`:
- Around line 76-80: The removal of armbian-hardware-optimize.service in
post_family_tweaks__recomputer_rk3588_disable_armbian_hardware_optimize leaves
dangling .wants/ symlinks; first disable the unit inside the target root before
deleting the file (e.g. invoke systemctl --root="${SDCARD}" disable
armbian-hardware-optimize.service or otherwise remove any
${SDCARD}/etc/systemd/system/*.wants/* symlinks pointing to that unit), then
delete the ${SDCARD}/lib/systemd/system/armbian-hardware-optimize.service file
to avoid boot-time systemd warnings.

In `@config/sources/vendors/seeed-studio/recomputer-rk35xx-common.inc`:
- Around line 163-166: The guard that decides whether to enable
aic-bluetooth.service misses /usr/lib/systemd/system, so chroot_sdcard systemctl
--no-reload enable aic-bluetooth.service is skipped; update the condition in the
block that calls chroot_sdcard and display_alert to also test -f
/usr/lib/systemd/system/aic-bluetooth.service (alongside /lib and /etc) so the
existence check for aic-bluetooth.service correctly finds the unit installed by
the previous hook and proceeds to enable it.
- Around line 115-118: The reinstall step currently uses the raw removed_pkgs
which can include "bluez" and undo your replacement; filter out the literal
package name "bluez" before showing the alert and calling
chroot_sdcard_apt_get_install. Specifically, compute a filtered list (e.g.
remove the token "bluez" from removed_pkgs), check that the filtered list is
non-empty, call display_alert with the filtered list, and pass the filtered list
to chroot_sdcard_apt_get_install instead of removed_pkgs; keep the original
variables display_alert, removed_pkgs, and chroot_sdcard_apt_get_install names
so the change is localized.
- Around line 281-283: The mount attempts currently try plain "mount -o noatime"
before the user-owned option, causing VFAT/exFAT/NTFS to succeed as root and
never hit the uid/gid fallback; change the order so the script first attempts
mount -o noatime,uid=1000,gid=1000,umask=002 "$DEV" "$MPOINT" and only if that
fails try mount -o noatime "$DEV" "$MPOINT"; keep the chown
"${FIRST_USER}:${FIRST_USER}" "$MPOINT" call (or conditionally run it only when
the user-mount was not used) so ownership is correct for cases where the
filesystem doesn't support uid/gid mount options.

---

Duplicate comments:
In `@config/sources/vendors/seeed-studio/recomputer-rk35xx-common.inc`:
- Around line 352-401: custom_kernel_config__recomputer_rk35xx_customizations
currently mutates .config imperatively via kernel_config_set_y/_m/_n/_val which
bypasses the kernel cache key; move these Seeed-specific mutations into inputs
tracked by the build hash instead (e.g. add opts_recomputer_rk35xx or a board
fragment/extension under the kernel family that is sourced before kernel
artifact selection) and replace the runtime kernel_config_set_* calls with
inclusion of that hash-tracked config fragment or use opts_* variables that the
kernel build system reads so the rk35xx cache key changes when the Seeed options
are present (update references to kernel_config_set_y, kernel_config_set_m,
kernel_config_set_n, kernel_config_set_val and
custom_kernel_config__recomputer_rk35xx_customizations accordingly).

---

Nitpick comments:
In `@config/boards/recomputer-rk3576-devkit.conf`:
- Line 1: Update the first-line header comment in the Armbian board config (the
board description comment in recomputer-rk3576-devkit.conf) so it includes the
SoC model, core count, RAM options and key hardware features (e.g., eMMC/SD
support, onboard Wi‑Fi/BT, USB ports, PCIe/M.2, Gigabit Ethernet, display
interfaces, power features). Edit the top comment to be a single concise
sentence that lists "Rockchip RK3576, octa‑core, 4/8/16GB RAM options" plus the
board's key features so the interactive board picker can show a meaningful
summary.

In `@config/boards/recomputer-rk3588-devkit.conf`:
- Line 1: Update the first-line comment in recomputer-rk3588-devkit.conf to a
single dedicated hardware feature description that lists SoC model (RK3588),
core count (octa-core), supported RAM options (4/8/16GB), and key features
(e.g., eMMC/SD storage, Gigabit Ethernet, Wi‑Fi/BT, HDMI/DP outputs, PCIe/NVMe,
USB ports, GPIO headers, power input). Replace the generic header line with that
concise feature string so the board picker shows SOC/cores/RAM and main
peripherals, and ensure the comment follows the required first-line format for
Armbian board configs.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 01583ea1-74ac-4fdf-a34d-638426a98e6a

📥 Commits

Reviewing files that changed from the base of the PR and between 612f524 and 9f7d7f5.

📒 Files selected for processing (5)
  • config/boards/recomputer-rk3576-devkit.conf
  • config/boards/recomputer-rk3588-devkit.conf
  • config/sources/vendors/seeed-studio/recomputer-rk35xx-common.inc
  • patch/u-boot/legacy/u-boot-radxa-rk35xx/dt/rk3576-recomputer-rk3576-devkit.dts
  • patch/u-boot/legacy/u-boot-radxa-rk35xx/dt/rk3588-recomputer-rk3588-devkit.dts
🚧 Files skipped from review as they are similar to previous changes (2)
  • patch/u-boot/legacy/u-boot-radxa-rk35xx/dt/rk3576-recomputer-rk3576-devkit.dts
  • patch/u-boot/legacy/u-boot-radxa-rk35xx/dt/rk3588-recomputer-rk3588-devkit.dts

Comment on lines +62 to +69
# DMA heap permissions — Mali GBM needs access to /dev/dma_heap/* devices.
# Without this, Mali gbm_create_device fails with ENOENT for non-root users.
function post_family_tweaks__recomputer_rk3576_dma_heap_permissions() {
display_alert "$BOARD" "Setting DMA heap permissions for Mali GPU" "info"

mkdir -p "${SDCARD}/etc/udev/rules.d/"
echo 'SUBSYSTEM=="dma_heap", MODE="0666"' > "${SDCARD}/etc/udev/rules.d/50-mali-dma-heap.rules"
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Avoid making DMA heaps world-writable.

MODE="0666" gives every local process access to /dev/dma_heap/*. That's much broader than needed for Mali userspace and weakens least-privilege on multi-user images. Prefer a group-based rule (render/video + 0660) or seat ACLs instead.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@config/boards/recomputer-rk3576-devkit.conf` around lines 62 - 69, The udev
rule in post_family_tweaks__recomputer_rk3576_dma_heap_permissions makes
/dev/dma_heap/* world-writable (MODE="0666"); change it to a group-restricted
rule and ensure the target group (e.g., render or video) is used with 0660
permissions: update the echo that writes 50-mali-dma-heap.rules to set
SUBSYSTEM=="dma_heap", GROUP=="render" (or "video"), MODE="0660" (or use a
seat/group ACL approach), and ensure any required group creation/assignment for
Mali userspace is handled elsewhere so only the intended group can access
dma_heap devices.

Comment on lines +76 to +80
# Remove armbian-hardware-optimize (RK3588 variant)
function post_family_tweaks__recomputer_rk3588_disable_armbian_hardware_optimize() {
display_alert "$BOARD" "Removing armbian-hardware-optimize.service" "info"

rm -f "${SDCARD}"/lib/systemd/system/armbian-hardware-optimize.service
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Disable the unit before deleting its service file.

If armbian-hardware-optimize.service was already enabled by the package, removing only the unit file leaves a dangling *.wants/ symlink behind. That turns into a boot-time systemd warning instead of a clean disable.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@config/boards/recomputer-rk3588-devkit.conf` around lines 76 - 80, The
removal of armbian-hardware-optimize.service in
post_family_tweaks__recomputer_rk3588_disable_armbian_hardware_optimize leaves
dangling .wants/ symlinks; first disable the unit inside the target root before
deleting the file (e.g. invoke systemctl --root="${SDCARD}" disable
armbian-hardware-optimize.service or otherwise remove any
${SDCARD}/etc/systemd/system/*.wants/* symlinks pointing to that unit), then
delete the ${SDCARD}/lib/systemd/system/armbian-hardware-optimize.service file
to avoid boot-time systemd warnings.

Comment on lines +115 to +118
if [[ -n "${removed_pkgs}" ]]; then
display_alert "Reinstalling packages removed by bluez conflict" "${removed_pkgs}" "warn"
chroot_sdcard_apt_get_install ${removed_pkgs}
fi
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Exclude bluez from the reinstall diff.

This diff also captures bluez itself when fcs960k-aic-bluez replaces it. Reinstalling the raw removed_pkgs list can immediately undo the replacement or make the final Bluetooth stack depend on apt's conflict resolver instead of your intended state.

Suggested fix
 	local removed_pkgs
 	removed_pkgs=$(comm -23 "${snapshot_before}" "${snapshot_after}")
+	removed_pkgs=$(printf '%s\n' "${removed_pkgs}" | grep -vxE 'bluez|fcs960k-aic-bluez' || true)
 	rm -f "${snapshot_before}" "${snapshot_after}"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@config/sources/vendors/seeed-studio/recomputer-rk35xx-common.inc` around
lines 115 - 118, The reinstall step currently uses the raw removed_pkgs which
can include "bluez" and undo your replacement; filter out the literal package
name "bluez" before showing the alert and calling chroot_sdcard_apt_get_install.
Specifically, compute a filtered list (e.g. remove the token "bluez" from
removed_pkgs), check that the filtered list is non-empty, call display_alert
with the filtered list, and pass the filtered list to
chroot_sdcard_apt_get_install instead of removed_pkgs; keep the original
variables display_alert, removed_pkgs, and chroot_sdcard_apt_get_install names
so the change is localized.

Comment on lines +163 to +166
if chroot_sdcard test -f /lib/systemd/system/aic-bluetooth.service || chroot_sdcard test -f /etc/systemd/system/aic-bluetooth.service; then
chroot_sdcard systemctl --no-reload enable aic-bluetooth.service
else
display_alert "$BOARD" "aic-bluetooth.service not found in image; skipping enable" "warn"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Check /usr/lib/systemd/system before enabling the BT service.

The previous hook installs aic-bluetooth.service into /usr/lib/systemd/system, but this guard only checks /lib and /etc, so the enable step is skipped on the normal path.

Suggested fix
-	if chroot_sdcard test -f /lib/systemd/system/aic-bluetooth.service || chroot_sdcard test -f /etc/systemd/system/aic-bluetooth.service; then
+	if chroot_sdcard test -f /usr/lib/systemd/system/aic-bluetooth.service || \
+	   chroot_sdcard test -f /lib/systemd/system/aic-bluetooth.service || \
+	   chroot_sdcard test -f /etc/systemd/system/aic-bluetooth.service; then
 		chroot_sdcard systemctl --no-reload enable aic-bluetooth.service
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@config/sources/vendors/seeed-studio/recomputer-rk35xx-common.inc` around
lines 163 - 166, The guard that decides whether to enable aic-bluetooth.service
misses /usr/lib/systemd/system, so chroot_sdcard systemctl --no-reload enable
aic-bluetooth.service is skipped; update the condition in the block that calls
chroot_sdcard and display_alert to also test -f
/usr/lib/systemd/system/aic-bluetooth.service (alongside /lib and /etc) so the
existence check for aic-bluetooth.service correctly finds the unit installed by
the previous hook and proceeds to enable it.

Comment on lines +281 to +283
if mount -o noatime "$DEV" "$MPOINT" 2>/dev/null || \
mount -o noatime,uid=1000,gid=1000,umask=002 "$DEV" "$MPOINT" 2>/dev/null; then
chown "${FIRST_USER}:${FIRST_USER}" "$MPOINT" 2>/dev/null
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Try the user-owned mount options first.

mount -o noatime succeeds on VFAT/exFAT/NTFS too, so the uid=1000,gid=1000 fallback never runs and the mounted files stay root-owned. That breaks the advertised per-user USB automount on the most common thumb-drive filesystems.

Suggested fix
-		        if mount -o noatime "$DEV" "$MPOINT" 2>/dev/null || \
-		           mount -o noatime,uid=1000,gid=1000,umask=002 "$DEV" "$MPOINT" 2>/dev/null; then
+		        if mount -o noatime,uid=1000,gid=1000,umask=002 "$DEV" "$MPOINT" 2>/dev/null || \
+		           mount -o noatime "$DEV" "$MPOINT" 2>/dev/null; then
 		            chown "${FIRST_USER}:${FIRST_USER}" "$MPOINT" 2>/dev/null
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if mount -o noatime "$DEV" "$MPOINT" 2>/dev/null || \
mount -o noatime,uid=1000,gid=1000,umask=002 "$DEV" "$MPOINT" 2>/dev/null; then
chown "${FIRST_USER}:${FIRST_USER}" "$MPOINT" 2>/dev/null
if mount -o noatime,uid=1000,gid=1000,umask=002 "$DEV" "$MPOINT" 2>/dev/null || \
mount -o noatime "$DEV" "$MPOINT" 2>/dev/null; then
chown "${FIRST_USER}:${FIRST_USER}" "$MPOINT" 2>/dev/null
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@config/sources/vendors/seeed-studio/recomputer-rk35xx-common.inc` around
lines 281 - 283, The mount attempts currently try plain "mount -o noatime"
before the user-owned option, causing VFAT/exFAT/NTFS to succeed as root and
never hit the uid/gid fallback; change the order so the script first attempts
mount -o noatime,uid=1000,gid=1000,umask=002 "$DEV" "$MPOINT" and only if that
fails try mount -o noatime "$DEV" "$MPOINT"; keep the chown
"${FIRST_USER}:${FIRST_USER}" "$MPOINT" call (or conditionally run it only when
the user-mount was not used) so ownership is correct for cases where the
filesystem doesn't support uid/gid mount options.

@mingzhangqun mingzhangqun force-pushed the main branch 2 times, most recently from 9f7d7f5 to 04c0250 Compare May 18, 2026 11:03
…cope

enable_extension() cannot be called after initialize_extension_manager
locks the counter, so the post_family_config hook approach from 6c5b7da
was broken. Move the clone+enable logic back to top-level board config
code which executes before the extension manager initializes.
@HeyMeco
Copy link
Copy Markdown
Collaborator

HeyMeco commented May 18, 2026

The custom seeed apt repo seems very overengineered and not future or even current proof (only targeting bookworm and noble which are both outdated by trixie and oracular).

  • What we as Armbian need to do is a rk-mali-umd extension using armbian-config (that can be utilised by armbian/build) that depending on the kernel version (6.1.115 = g24) installs the correct driver for the right SoC/GPU which we in theory host on https://github.com/armbian/libmali-rockchip (state of this repo needs to be revalidated).

  • rkaiq should also be done via armbian-config and then utilised by armbian/build.

  • r8125-dkms is not needed and can be replaced by the kernel driver that is already there.
    @baorepo any specific reason for which you need the realtek dkms?

  • config/sources/vendors/seeed-studio/recomputer-rk35xx-common.inc is a big deviation from the main benefit of armbian that is one streamlined process and place to achieve the best compatibility and maintainability for all boards. With that many changes it might make more sense to just create a new family seeed-rk3576 and seeed-rk3588 that would fit better into the whole ecosystem but separate it from affecting other boards. That way the actual needed patches can be maintained inside armbian/build too but the two that are in https://github.com/Seeed-Studio/seeed_armbian_extension/tree/main/patches/kernel should probably end up in https://github.com/armbian/linux-rockchip anyways. Especially with me adapting all RK35xx boards to rockchip 6.1-rkr7 as well as upcoming rockchip 6.12.

As is there is a lot of duplicate work / overhead that can be avoided so Seeed boards in 1-2 years can still benefit from all the userspace and kernel work we do without needing to do any extra work every time.

@Pillar1989
Copy link
Copy Markdown

@HeyMeco I agree with your point. We are making revisions and hope you can review it again later.

fi
fi
fi
fi
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No valid EEPROM information detected, using default DTB: rockchip/rk3576-recomputer-rk3576-devkit.dtb

@igorpecovnik
Copy link
Copy Markdown
Member

@igorpecovnik
Copy link
Copy Markdown
Member

  DESKTOP_ENVIRONMENT=gnome \                                      
  DESKTOP_ENVIRONMENT_CONFIG_NAME=config_base \                                                     
  DESKTOP_APPGROUPS_SELECTED=browsers

This has been changed https://docs.armbian.com/Developer-Guide_Desktops/ APPGROUPS_SELECTED but if nothing is declared, mid tier is default and browser is enabled.

DESKTOP_ENVIRONMENT=gnome \
DESKTOP_TIER: "mid" 

is enough.

@EvilOlaf
Copy link
Copy Markdown
Member

--> (55) COMMAND: env -u http_proxy -u https_proxy DEBIAN_FRONTEND=noninteractive apt-get -y -qq -o Dpkg::Use-Pty=0 --no-install-recommends install libmali-valhall-g610-g24p0-x11-wayland-gbm

Missing whitespace?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

05 Milestone: Second quarter release Documentation Documentation changes or additions Framework Framework components Hardware Hardware related like kernel, U-Boot, ... Needs review Seeking for review Patches Patches related to kernel, U-Boot, ... size/large PR with 250 lines or more

Development

Successfully merging this pull request may close these issues.