Board: Add Mekotronics R58S2#9610
Conversation
- Fix WiFi - Use upstream u-boot 2026.04
📝 WalkthroughWalkthroughIntroduces board support for the Mekotronics R58S2 Rockchip RK3588S-based system through a primary board configuration file and corresponding U-Boot build configurations and device tree files for multiple firmware versions. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
config/boards/mekotronics-r58s2.conf (2)
68-73: Fail when the boot-order rewrite stops matching.Line 71's
sed -istill exits successfully on a no-op. Ifinclude/configs/rockchip-common.hchanges upstream, the build will silently keep the default boot order. Add a post-check and abort when the replacement was not applied.🧪 Suggested hardening
sed -i -e "s/#define BOOT_TARGETS.*/#define BOOT_TARGETS \"${rockchip_uboot_targets[*]}\"/" include/configs/rockchip-common.h + grep -qxF "#define BOOT_TARGETS \"${rockchip_uboot_targets[*]}\"" include/configs/rockchip-common.h || \ + exit_with_error "Failed to patch BOOT_TARGETS in include/configs/rockchip-common.h" regular_git diff -u include/configs/rockchip-common.h || true }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@config/boards/mekotronics-r58s2.conf` around lines 68 - 73, The sed replacement in pre_config_uboot_target__meko_r58s2_patch_rockchip_common_boot_order can be a no-op and still exit zero, so add a post-check to verify the intended change was applied to include/configs/rockchip-common.h and abort the build if not; after running the existing sed -i ... command and regular_git diff, search the file for the expected `#define` BOOT_TARGETS line matching the value of rockchip_uboot_targets and call an error/exit path (e.g., display_alert + exit non-zero) from within pre_config_uboot_target__meko_r58s2_patch_rockchip_common_boot_order if the verification fails so upstream format changes won’t silently keep the default boot order.
60-64: Remove the privatewrite_uboot_platform()copy.
config/sources/families/include/rockchip64_common.inc:285-305already writesu-boot-rockchip.binwith the samebs=32k seek=1parameters. Keeping a board-local clone means family-side fixes to the Rockchip write path won't reach this board.♻️ Suggested cleanup
declare -g UBOOT_TARGET_MAP="BL31=bl31.elf ROCKCHIP_TPL=${RKBIN_DIR}/${DDR_BLOB};;u-boot-rockchip.bin" - unset uboot_custom_postprocess write_uboot_platform write_uboot_platform_mtd - - function write_uboot_platform() { - dd "if=$1/u-boot-rockchip.bin" "of=$2" bs=32k seek=1 conv=notrunc status=none - } + unset uboot_custom_postprocess }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@config/boards/mekotronics-r58s2.conf` around lines 60 - 64, Remove the board-local override of the Rockchip U-Boot write routine so the family implementation is used: delete the private write_boot_platform() function definition in this file (the function that calls dd "if=$1/u-boot-rockchip.bin" "of=$2" bs=32k seek=1 ...) and also remove the preceding unset line that re-declares/overrides write_uboot_platform, leaving the family-provided write_uboot_platform (from rockchip64_common.inc) to handle the write path.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@patch/u-boot/v2026.04/dt_upstream_rockchip/rk3588s-mekotronics-r58s2.dts`:
- Around line 29-33: The device tree node labeled green_led: green-led is
exposed only as "green-led" but the defconfig uses 'led STATUS ...', so add a
matching label/alias so the preboot blink can find it; update the green_led:
green-led node to include label = "STATUS"; or alternatively add an /aliases
entry (e.g., led-status = &green_led;) pointing to &green_led so the LED is
exposed as STATUS.
---
Nitpick comments:
In `@config/boards/mekotronics-r58s2.conf`:
- Around line 68-73: The sed replacement in
pre_config_uboot_target__meko_r58s2_patch_rockchip_common_boot_order can be a
no-op and still exit zero, so add a post-check to verify the intended change was
applied to include/configs/rockchip-common.h and abort the build if not; after
running the existing sed -i ... command and regular_git diff, search the file
for the expected `#define` BOOT_TARGETS line matching the value of
rockchip_uboot_targets and call an error/exit path (e.g., display_alert + exit
non-zero) from within
pre_config_uboot_target__meko_r58s2_patch_rockchip_common_boot_order if the
verification fails so upstream format changes won’t silently keep the default
boot order.
- Around line 60-64: Remove the board-local override of the Rockchip U-Boot
write routine so the family implementation is used: delete the private
write_boot_platform() function definition in this file (the function that calls
dd "if=$1/u-boot-rockchip.bin" "of=$2" bs=32k seek=1 ...) and also remove the
preceding unset line that re-declares/overrides write_uboot_platform, leaving
the family-provided write_uboot_platform (from rockchip64_common.inc) to handle
the write path.
🪄 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: 408f1850-7a33-496b-83d5-97bbcaf001e6
📒 Files selected for processing (5)
config/boards/mekotronics-r58s2.confpatch/u-boot/legacy/u-boot-radxa-rk35xx/defconfig/mekotronics_r58s2-rk3588_defconfigpatch/u-boot/legacy/u-boot-radxa-rk35xx/dt/rk3588s-blueberry-rp01a.dtspatch/u-boot/v2026.04/defconfig/mekotronics-r58s2-rk3588s_defconfigpatch/u-boot/v2026.04/dt_upstream_rockchip/rk3588s-mekotronics-r58s2.dts
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@config/boards/mekotronics-r58s2.conf`:
- Line 9: The BOOT_FDT_FILE variable is hardcoded to
"rockchip/rk3588s-blueberry-rp01a-v10.dtb" which can point builds at a DTB not
present in the downstream kernel; either wait until armbian/linux-rockchip#461
is merged/published before landing this board or change the board config to pin
it to a kernel ref that already contains that DTB (do this by updating the
BOOT_FDT_FILE assignment in the board config or by switching the board's kernel
ref to a commit/tag that ships the DTB), ensuring builds only reference DTBs
that exist in the targeted kernel tree.
In `@patch/u-boot/v2026.04/defconfig/mekotronics-r58s2-rk3588s_defconfig`:
- Line 27: CONFIG_PREBOOT currently uses the non-existent LED identifier
"STATUS"; update the preboot sequence to use the actual registered LED node name
"green-led" (or add a label property in the DTS and use that label) so the
U-Boot "led" command can find it — modify the CONFIG_PREBOOT value that
references "led STATUS" to reference "led green-led" (or ensure the DTS LED node
has label "STATUS" if you prefer the original name).
🪄 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: 9052a225-ae0a-4037-9424-e7094fe95ee6
📒 Files selected for processing (5)
config/boards/mekotronics-r58s2.confpatch/u-boot/legacy/u-boot-radxa-rk35xx/defconfig/mekotronics_r58s2-rk3588_defconfigpatch/u-boot/legacy/u-boot-radxa-rk35xx/dt/rk3588s-blueberry-rp01a.dtspatch/u-boot/v2026.04/defconfig/mekotronics-r58s2-rk3588s_defconfigpatch/u-boot/v2026.04/dt_upstream_rockchip/rk3588s-mekotronics-r58s2.dts
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@config/boards/mekotronics-r58s2.conf`:
- Around line 14-15: The BOOT_SCENARIO value "tpl-blob-atf-mainline" conflicts
with the board's later changes that unset uboot_custom_postprocess and switch to
a binman-style u-boot-rockchip.bin layout; update the board to use the matching
scenario or restore the tpl post-processing: either change BOOT_SCENARIO to
"binman-atf-mainline" to match the binman/u-boot-rockchip.bin packaging, or
re-enable the tpl/ATF postprocess by removing the unset of
uboot_custom_postprocess so the idbloader.img path in rockchip64_common.inc
remains valid.
- Around line 6-9: This board enables KERNEL_TARGET="vendor" and sets
BOOT_FDT_FILE="rockchip/rk3588s-blueberry-rp01a-v10.dtb" but the required vendor
kernel DTB is not provided in this PR; update the board config
(mekotronics-r58s2.conf) to either switch KERNEL_TARGET back to "mainline" or
remove/clear BOOT_FDT_FILE until the vendor kernel patch
(armbian/linux-rockchip#461) is merged, or add the missing DTB to the repo;
specifically modify the KERNEL_TARGET and/or BOOT_FDT_FILE entries so builds no
longer depend on the absent vendor kernel DTB.
In `@patch/u-boot/v2026.04/defconfig/mekotronics-r58s2-rk3588s_defconfig`:
- Around line 26-27: The preboot string in CONFIG_PREBOOT uses "led STATUS"
which doesn't match the DTS node label; update CONFIG_PREBOOT to reference the
actual LED identifier used in the device tree (e.g., replace "led STATUS" with
"led green-led" to match the green-led node, or use "led green_led" if your DTS
uses that snake_case label) so the preboot command will successfully control the
LED; ensure the new identifier appears in the CONFIG_PREBOOT value.
🪄 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: 6f6af345-4a09-48d1-ae12-45ad4bb74dd5
📒 Files selected for processing (5)
config/boards/mekotronics-r58s2.confpatch/u-boot/legacy/u-boot-radxa-rk35xx/defconfig/mekotronics_r58s2-rk3588_defconfigpatch/u-boot/legacy/u-boot-radxa-rk35xx/dt/rk3588s-blueberry-rp01a.dtspatch/u-boot/v2026.04/defconfig/mekotronics-r58s2-rk3588s_defconfigpatch/u-boot/v2026.04/dt_upstream_rockchip/rk3588s-mekotronics-r58s2.dts
|
@igorpecovnik this is ready now. |
|
✅ This PR has been reviewed and approved — all set for merge! |
* main: (1005 commits) sunxi-7.0: restore original patch headers again @rpardini How to prevent that? sunxi-7.0: rewrite kernel patches for 7.0-rc6 uefi-x86-7.0: rewrite kernel patches for 7.0-rc6 rockchip64-7.0: rewrite patches for 7.0-rc6 mainline: bump to 7.0-rc6 SpacemiT: Disable k1-usb: add disconnect function support Board: Add Mekotronics R58S2 (armbian#9610) sunxi-6.18: restore original patch headers make them persistent against rewrites sunxi-6.18: rewrite kernel patches for 6.18.20 SpacemiT MUSE Book: Fixup SRC_CMDLINE var action: fix typos, update defaults, and harden GPG signing sunxi: remove BSP GMAC/EPHY patch that breaks H6 internal EMAC rockchip-rv1106: Enable (=m) Realtek 8188EU rockchip64: rk3528: fix ethernet PHY detection on NanoPi Zero2 (6.18 + 7.0) rockchip64: rk3528: enable USB OTG mode and fix PHY timer crash (6.18 + 7.0) config: rockchip-rk3588: build Motorcomm driver as module config: orangepi5pro: address maintainer review (remove deprecated vars, add test targets) config: move Motorcomm driver configs to family level fix: address CodeRabbit review (codec error handling, Kconfig constraints and DTS typos) kernel: rockchip64: add ASoC es8328 LRCK sharing fix boards: rockchip64: rk3588: add Orange Pi 5 Pro support to edge kernel boards: rockchip64: rk3588: add Orange Pi 5 Pro support to current kernel uboot: rockchip: rk3588: add Orange Pi 5 Pro support mkspi: fix devicetree opp voltage settings families: sm8550: Limit kernel version to 6.18.18 `Automatic` board configs status synchronise sunxi-6.18: drm/gem-dma: Support dedicated DMA device for allocation sunxi-7.0: drm/gem-dma: Support dedicated DMA device for allocation framework artifact-rootfs - remove the last vestige of LEGACY_DEBOOTSTRAP SpacemiT Legacy: Add CONFIG_R8125=m SpacemiT Legacy: Add CONFIG_NET modules SpacemiT Legacy: CONFIG_IP_NF_NAT=m SpacemiT Legacy: CONFIG_AIC_WLAN_SUPPORT=y SpacemiT: Update legacy defconfig SpacemiT: Update linux 6.6.99 to 6.6.100 SpacemiT MUSE Book: Add the k1-musebook.dts SpacemiT MUSE Book: Add $board.conf uefi-arm64-6.12: revert exit() API change patch uefi-arm64-6.12: fix stmmac compilation errors sunxi: fix iommu driver patch to allow compilation sunxi-7.0: rewrite patches against rc5 kernel config rewrite was also done but resulted in no changes sunxi-7.0: fix iommu driver patch sunxi-edge: rewrite kernel patches against 7.0-rc4 sunxi-7.0: fix broken patch sunxi-7.0: rewrite kernel configs sunxi-7.0: adjust two patches to adapt for megi's changes sunxi-7.0: disable unneeded defcon patch from megi sunxi-7.0: fix context for iommu driver patch sunxi-edge: bump to 7.0 sunxi-7.0: new series.conf sunxi-7.0: copy over everything left sunxi-7.0: extract all relevant branches from megi (again) stmmac: Refactor Phytium ethernet patches into modular components Enable device mapper snapshot support Enable device mapper snapshot support pre-deploy qemu binary, if needed, before mmdebstrap runs framework rootfs-create: remove LEGACY_DEBOOTSTRAP, use only the upstream mmdebstrap uefi-arm64: rewrite patches for 7.0-rc4 uefi-x86: rewrite kernel patches to 7.0-rc4 uefi-edge: move loong64, arm64 and x86 patches to 7.0 uefi-edge: rewrite kernel configs for arm64 and x86 to 7.0 uefi-edge: bump to 7.0 sunxi: fix `Unhandled Exception in EL3.` and/causing secondary cpus not coming online rockchip64-6.18: rewrite patches against 6.18.20 uefi-x86-6.18: rewrite kernel patches against 6.18.20 build(deps): bump tj-actions/changed-files from 47.0.4 to 47.0.5 `Automatic` board configs status synchronise KDE Neon: add dolphin file browser and upower armbian-kernel: improve code documentation and formatting Add Ariaboard Photonicat 2 support for rockchip64-6.18 (armbian#9535) sm8550-6.18: Fix TF card IO performance regression nanopi-zero2: add USB support for RK3528 (current + edge) (armbian#9500) SMART AM40: Ignore RK3399 PCIe SError NORCO EMB-3531: Ignore RK3399 PCIe SError HACK: Ignore SError to enable rk3399 PCIe bus enumeration uboot v2026.04: rewrite patches rock-3a: bump uboot to v2026.04-rc4 Qidi X-6: fix devicetree opp voltage settings (armbian#9577) aic8800-dkms extension (armbian#9578) BesTV R3300-L: Add missing Xorg configuration Update some board csc bump 7.0 to rc5 leave repository workaround in place for now meson64-6.18: rewrite kernel config Seems like some xtables legacy option wasn't there Fix application of Retroid Pocket 5/mini device trees build(deps): bump pascalgn/size-label-action from 0.5.5 to 0.5.7 `Automatic` board configs status synchronise mksklipad50: fix devicetree opp voltage settings u-boot: mekotronics-r58x-pro: replace DTS symlink with real copy rockchip64: rk3588: update I2S MCLK gate patches to match upstream v3 fix defconfig patch Add support for qidi x-* boards (armbian#9564) `Automatic` board configs status synchronise rockchip64-7.0: mekotronics-r58x-pro: analog sound: use SuperKali's new clock rockchip64-7.0: mekotronics-r58x-pro: convert analog audio to simple-audio-card Update odroidxu4-current to 6.6.129 OrangePi-RV2/R2S: rename board config from wip to csc rockchip64-6.18: rewrite kernel patches for 6.18.19 sunxi-6.18: rewrite kernel patches for 6.18.19 sunxi-6.18: remove stray commit from patch SpacemiT: Delete v2 Enable-SD-card-support-with-UHS-modes patch ...
* lts-dev: (1016 commits) ti: configs: family: k3: Update baseline to 12.00.00.07 sunxi-7.0: restore original patch headers again @rpardini How to prevent that? sunxi-7.0: rewrite kernel patches for 7.0-rc6 uefi-x86-7.0: rewrite kernel patches for 7.0-rc6 rockchip64-7.0: rewrite patches for 7.0-rc6 mainline: bump to 7.0-rc6 SpacemiT: Disable k1-usb: add disconnect function support Board: Add Mekotronics R58S2 (armbian#9610) sunxi-6.18: restore original patch headers make them persistent against rewrites sunxi-6.18: rewrite kernel patches for 6.18.20 SpacemiT MUSE Book: Fixup SRC_CMDLINE var action: fix typos, update defaults, and harden GPG signing sunxi: remove BSP GMAC/EPHY patch that breaks H6 internal EMAC rockchip-rv1106: Enable (=m) Realtek 8188EU rockchip64: rk3528: fix ethernet PHY detection on NanoPi Zero2 (6.18 + 7.0) rockchip64: rk3528: enable USB OTG mode and fix PHY timer crash (6.18 + 7.0) config: rockchip-rk3588: build Motorcomm driver as module config: orangepi5pro: address maintainer review (remove deprecated vars, add test targets) config: move Motorcomm driver configs to family level fix: address CodeRabbit review (codec error handling, Kconfig constraints and DTS typos) kernel: rockchip64: add ASoC es8328 LRCK sharing fix boards: rockchip64: rk3588: add Orange Pi 5 Pro support to edge kernel boards: rockchip64: rk3588: add Orange Pi 5 Pro support to current kernel uboot: rockchip: rk3588: add Orange Pi 5 Pro support mkspi: fix devicetree opp voltage settings families: sm8550: Limit kernel version to 6.18.18 `Automatic` board configs status synchronise sunxi-6.18: drm/gem-dma: Support dedicated DMA device for allocation sunxi-7.0: drm/gem-dma: Support dedicated DMA device for allocation framework artifact-rootfs - remove the last vestige of LEGACY_DEBOOTSTRAP SpacemiT Legacy: Add CONFIG_R8125=m SpacemiT Legacy: Add CONFIG_NET modules SpacemiT Legacy: CONFIG_IP_NF_NAT=m SpacemiT Legacy: CONFIG_AIC_WLAN_SUPPORT=y SpacemiT: Update legacy defconfig SpacemiT: Update linux 6.6.99 to 6.6.100 SpacemiT MUSE Book: Add the k1-musebook.dts SpacemiT MUSE Book: Add $board.conf uefi-arm64-6.12: revert exit() API change patch uefi-arm64-6.12: fix stmmac compilation errors sunxi: fix iommu driver patch to allow compilation sunxi-7.0: rewrite patches against rc5 kernel config rewrite was also done but resulted in no changes sunxi-7.0: fix iommu driver patch sunxi-edge: rewrite kernel patches against 7.0-rc4 sunxi-7.0: fix broken patch sunxi-7.0: rewrite kernel configs sunxi-7.0: adjust two patches to adapt for megi's changes sunxi-7.0: disable unneeded defcon patch from megi sunxi-7.0: fix context for iommu driver patch sunxi-edge: bump to 7.0 sunxi-7.0: new series.conf sunxi-7.0: copy over everything left sunxi-7.0: extract all relevant branches from megi (again) stmmac: Refactor Phytium ethernet patches into modular components Enable device mapper snapshot support Enable device mapper snapshot support pre-deploy qemu binary, if needed, before mmdebstrap runs framework rootfs-create: remove LEGACY_DEBOOTSTRAP, use only the upstream mmdebstrap uefi-arm64: rewrite patches for 7.0-rc4 uefi-x86: rewrite kernel patches to 7.0-rc4 uefi-edge: move loong64, arm64 and x86 patches to 7.0 uefi-edge: rewrite kernel configs for arm64 and x86 to 7.0 uefi-edge: bump to 7.0 sunxi: fix `Unhandled Exception in EL3.` and/causing secondary cpus not coming online rockchip64-6.18: rewrite patches against 6.18.20 uefi-x86-6.18: rewrite kernel patches against 6.18.20 build(deps): bump tj-actions/changed-files from 47.0.4 to 47.0.5 `Automatic` board configs status synchronise KDE Neon: add dolphin file browser and upower armbian-kernel: improve code documentation and formatting Add Ariaboard Photonicat 2 support for rockchip64-6.18 (armbian#9535) sm8550-6.18: Fix TF card IO performance regression nanopi-zero2: add USB support for RK3528 (current + edge) (armbian#9500) SMART AM40: Ignore RK3399 PCIe SError NORCO EMB-3531: Ignore RK3399 PCIe SError HACK: Ignore SError to enable rk3399 PCIe bus enumeration uboot v2026.04: rewrite patches rock-3a: bump uboot to v2026.04-rc4 Qidi X-6: fix devicetree opp voltage settings (armbian#9577) aic8800-dkms extension (armbian#9578) BesTV R3300-L: Add missing Xorg configuration Update some board csc bump 7.0 to rc5 leave repository workaround in place for now meson64-6.18: rewrite kernel config Seems like some xtables legacy option wasn't there Fix application of Retroid Pocket 5/mini device trees build(deps): bump pascalgn/size-label-action from 0.5.5 to 0.5.7 `Automatic` board configs status synchronise mksklipad50: fix devicetree opp voltage settings ti: configs: family: k3: Update mesa pkg names with "-pvr" ti: configs: family: k3: Update baseline to 12.00.00.06 u-boot: mekotronics-r58x-pro: replace DTS symlink with real copy rockchip64: rk3588: update I2S MCLK gate patches to match upstream v3 fix defconfig patch Add support for qidi x-* boards (armbian#9564) `Automatic` board configs status synchronise rockchip64-7.0: mekotronics-r58x-pro: analog sound: use SuperKali's new clock rockchip64-7.0: mekotronics-r58x-pro: convert analog audio to simple-audio-card Update odroidxu4-current to 6.6.129 OrangePi-RV2/R2S: rename board config from wip to csc ti: configs: family: k3: Update baseline to 12.00.00.05 ...
Description
This PR adds support for the Mekotronics R58S2 with mainline u-boot 2026.04 and the vendor kernel 6.1.
Legacy u-boot is tested and included but disabled.
How Has This Been Tested?
Dependent changes
Checklist:
Note
Use squash merge option for this PR
Summary by CodeRabbit