Skip to content

Conversation

@rpardini
Copy link
Member

@rpardini rpardini commented Dec 25, 2025

mekotronics-r58-4x4: enable edge branch with mainline kernel & u-boot

  • mekotronics: u-boot: generic mainline u-boot 2025.01
    • this is hidden under MEKO_USE_MAINLINE_UBOOT=yes
    • also disable PLYMOUTH then
  • mekotronics(all): bump generic mainline u-boot to v2026.01-rc5
    • also enable CONFIG_ROCKCHIP_MASKROM_IMAGE for quick development
    • fix conflicting vendor hook
      • only hack the vendor u-boot down to next-dev-v2024.03 for vendor/legacy
  • rockchip64-6.18: mekotronics-r58-4x4: basic DT with SD/eMMC/UART/rk806
    • very basic, started from a mainlined DT, stripped almost everything
    • only SD/eMMC/debug UART and basic regulators
  • rockchip64-6.18: mekotronics-r58-4x4: adapt rk806 according to vendor
    • a translation of the vendor "&rk806single" and its "pmic-power-off" with rk806_dvs1_slp
  • rockchip64-6.18: mekotronics-r58-4x4: eMMC & SD fixes +regulator
  • rockchip64-6.18: mekotronics-r58-4x4: big voltage for big cores
  • rockchip64-6.18: mekotronics-r58-4x4: simple u2phy0(_otg) and usb_host0_xhci for UMS
  • rockchip64-6.18: mekotronics-r58-4x4: pcie3x4 (NVMe)
  • rockchip64-6.18: mekotronics-r58-4x4: pcie2x1l0 (wifi) and pcie2x1l1 (rtl8169)
    • wifi doesn't come up; guess I'll have to add bus-range later
    • rtl8169 works
  • rockchip64-6.18: mekotronics-r58-4x4: hdmi, vop, gpu, saradc, tsadc
    • all work fine
  • rockchip64-6.18: mekotronics-r58-4x4: i2c2 regulator and NPU
  • rockchip64-6.18: mekotronics-r58-4x4: "power" led & pinctrl
  • rockchip64-6.18: mekotronics-r58-4x4: hdmi audio (out)
  • rockchip64-6.18: mekotronics-r58-4x4: hdmi-in (hdmirx)
    • the 4x4 has 4 HDMI-In's, only one of them (labeled "HDMI IN60") is 3588-native
  • rockchip64-6.18: mekotronics-r58-4x4: rtc
  • rockchip64-6.18: mekotronics-r58-4x4: wifi on pcie2x1l0 with clock and wifi_host_wake_irq
  • rockchip64-6.18: mekotronics-r58-4x4: uart1 (green connector on back of board)
  • rockchip64-6.18: mekotronics-r58-4x4: uart6 and bluetooth part of BCM43752
    • all credit to armsom sige7 DT, otherwise I'd be lost forever
  • rockchip64-6.18: mekotronics-r58-4x4: usb 2.0 type-A ports & regulator/pinctrl
    • straight-ish from vendor (which is a complete mess)
    • front:
      • blue ports work (in usb2.0 mode, which also happens in vendor kernel)
      • black ports do NOT work (but are powered...?)
    • back:
      • white ports work in usb 2.0 mode (as expected, also in vendor kernel)
        • those ports have too-long wires (flat cable) and reset all the time
    • in summary: blue "USB3" ports at the front work in USB2.0 mode
      • rest doesn't
  • rockchip64-6.18: mekotronics-r58-4x4: rtl8125/8169 describe in DT for stable MAC
    • this will later be patched by an u-boot board file fdt_init() with ethaddr
    • for now just hardcoded
  • mekotronics-r58-4x4: fix vendor u-boot
    • add missing symlink to u-boot patches, same as other meko boards
  • mekotronics-r58-4x4: add v2026.01 mainline u-boot
    • DT is a copy from kernel, minus the NPU nodes (which u-boot doesn't know about yet)
  • mekotronics-r58-4x4: enable edge branch with mainline kernel & u-boot

    merry everything and a happy always

    • mainline:
      • enable "edge" branch, with custom DT
        • works: almost everything
        • does NOT work:
          • USB-C port is only for OTG/UMS (NOT USB3-host) - didn't describe fusb302 et al in DT
          • any of the 3x HDMI -> MIPI (or whatever) HDMI-In's (thus this is a 1x1, not 4x1)
          • front USB3 blue ports are actually USB2 (also in vendor kernel)
          • front USB2 black ports don't work (but are powered)
          • Analog audio - didn't describe, could be, but I've no way to test
      • use mainline u-boot v2026.01-rc5 (with custom DT/defconfig/etc) with mainline ATF
      • boot order: SD -> NVMe -> USB -> eMMC -> ETH
    • adapt usage of shared "mekotronics" vendor include only for vendor/legacy
    • also fix DTB: rockchip/rk3588-blueberry-r58-4x4.dtb for vendor
      • same across vendor and mainline
      • mainline u-boot kinda-boots vendor kernel, but TF-A mismatch ref HDMI-rx
        • so use vendor u-boot and rk blob for vendor branch/kernel

Summary by CodeRabbit

  • New Features
    • Added complete hardware support for Mekotronics R58 4x4 board with RK3588-based processor.
    • Introduced mainline bootloader support alongside vendor legacy boot path.
    • Added comprehensive device tree definitions enabling proper hardware initialization, power management, and peripheral control.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 25, 2025

📝 Walkthrough

Walkthrough

This PR adds RK3588 Blueberry (Mekotronics R58 4x4) board support and branch-aware boot configuration: updates board variables (kernel targets, FDT, partition table), adds a full kernel and U-Boot device tree, introduces mainline vs vendor branch logic with new U-Boot hooks and a v2026.01 defconfig, and updates vendor hooks for mainline U-Boot usage.

Changes

Cohort / File(s) Summary
Board configuration
config/boards/mekotronics-r58-4x4.conf
Change KERNEL_TARGET to "edge,vendor"; update BOOT_FDT_FILE to rockchip/rk3588-blueberry-r58-4x4.dtb; add BOOT_SOC and IMAGE_PARTITION_TABLE; remove UEFI_EDK2_BOARD_ID; add branch-conditional logic with early return for vendor path and three new public U-Boot hook functions for mainline path.
Vendor hooks
config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh
Add post_family_config__vendor_uboot_mekotronics (skip on mainline); extend mainline hooks to use upstream u-boot v2026.01, update UBOOT_TARGET_MAP, override write_uboot_platform to use binman-provided images and set PLYMOUTH=no; add helper to enable RAMBoot images and related mainline adjustments.
Kernel device tree
patch/kernel/archive/rockchip64-6.18/dt/rk3588-blueberry-r58-4x4.dts
Add complete kernel DTS for RK3588 Blueberry R58 4x4 describing model, regulators, power domains, HDMI/PCIe/USB/I2C/SPI, pinctrl, LEDs, and extensive regulator topology.
U-Boot defconfig & legacy
patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig, patch/u-boot/legacy/u-boot-radxa-rk35xx/board_mekotronics-r58-4x4
New v2026.01 defconfig enabling RK3588 SPL, peripherals (USB, PCIe, MMC, NVMe, Ethernet, GPIO, LEDs), DT filename set to blueberry DT; small legacy patch entry added.
U-Boot device trees
patch/u-boot/v2026.01/dt_uboot/rk3588-blueberry-r58-4x4-u-boot.dtsi, patch/u-boot/v2026.01/dt_upstream_rockchip/rk3588-blueberry-r58-4x4.dts
Add include to generic RK3588 u-boot dtsi and upstream DTS mirroring kernel DT with board-specific regulators, PCIe/USB topology, pinctrl, and peripheral nodes for U-Boot build.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant BoardCfg as Board Config\n(mekotronics-r58-4x4.conf)
    participant Branch as Branch Logic\n(vendor vs edge/current)
    participant VendorHooks as Vendor Hooks\n(mekotronics-rk3588.hooks.sh)
    participant UBootBuild as U-Boot Build\n(defconfig + dt)
    participant KernelDT as Kernel DT\n(rk3588-blueberry-r58-4x4.dts)

    User->>BoardCfg: load board config
    BoardCfg->>Branch: evaluate BRANCH
    alt vendor/legacy
        Branch->>VendorHooks: run vendor hook
        VendorHooks->>VendorHooks: set BOOTDELAY, BOOTSOURCE, BOOTBRANCH
        VendorHooks-->>BoardCfg: early return (skip mainline)
    else current/edge (mainline)
        Branch->>VendorHooks: run mainline hooks
        VendorHooks->>VendorHooks: set upstream u-boot v2026.01, UBOOT_TARGET_MAP, write_uboot_platform, PLYMOUTH=no
        VendorHooks->>UBootBuild: supply defconfig & patches
        UBootBuild->>KernelDT: include u-boot dtsi and board DTS
    end
    UBootBuild->>User: produce U-Boot images
    KernelDT->>User: produce kernel DTB
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

Suggested labels

BSP

Suggested reviewers

  • paolosabatino
  • krachlatte
  • prahal
  • igorpecovnik
  • catalinii
  • amazingfate

Poem

🐇 I hopped through configs, DTs, and hooks today,

Edge and vendor branches now find their way.
Blueberry rails hum, U‑Boot learns to sing,
Images assemble—hear the bootloader spring!
Hooray for boards that make rabbits sway 🫐

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title clearly summarizes the main change: enabling edge branch support with mainline kernel and U-Boot for the mekotronics-r58-4x4 board, which aligns with the substantial changes made across board configuration, U-Boot, and device tree files.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 02 Milestone: First quarter release Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... labels Dec 25, 2025
@rpardini rpardini force-pushed the pr/mekotronics-r58-4x4-enable-edge-branch-with-mainline-kernel--u-boot branch from d06eab4 to 5f0e469 Compare December 25, 2025 02:03
@rpardini rpardini marked this pull request as ready for review December 25, 2025 02:04
@rpardini rpardini requested a review from pyavitz as a code owner December 25, 2025 02:04
Copy link
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: 2

🧹 Nitpick comments (1)
config/boards/mekotronics-r58-4x4.conf (1)

88-96: Duplicate config entry in enable_configs array.

CONFIG_CMD_USB_MASS_STORAGE appears twice in the array at line 90. While harmless (scripts/config is idempotent), consider removing the duplicate for clarity.

🔎 Proposed fix
 	# UMS, RockUSB, gadget stuff
 	display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable UMS/RockUSB gadget" "info"
-	declare -a enable_configs=("CONFIG_CMD_USB_MASS_STORAGE" "CONFIG_USB_GADGET" "USB_GADGET_DOWNLOAD" "CONFIG_USB_FUNCTION_ROCKUSB" "CONFIG_USB_FUNCTION_ACM" "CONFIG_CMD_ROCKUSB" "CONFIG_CMD_USB_MASS_STORAGE")
+	declare -a enable_configs=("CONFIG_CMD_USB_MASS_STORAGE" "CONFIG_USB_GADGET" "USB_GADGET_DOWNLOAD" "CONFIG_USB_FUNCTION_ROCKUSB" "CONFIG_USB_FUNCTION_ACM" "CONFIG_CMD_ROCKUSB")
 	for config in "${enable_configs[@]}"; do
 		run_host_command_logged scripts/config --enable "${config}"
 	done
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 60e869c and 5f0e469.

📒 Files selected for processing (7)
  • config/boards/mekotronics-r58-4x4.conf
  • config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh
  • patch/kernel/archive/rockchip64-6.18/dt/rk3588-blueberry-r58-4x4.dts
  • patch/u-boot/legacy/u-boot-radxa-rk35xx/board_mekotronics-r58-4x4
  • patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig
  • patch/u-boot/v2026.01/dt_uboot/rk3588-blueberry-r58-4x4-u-boot.dtsi
  • patch/u-boot/v2026.01/dt_upstream_rockchip/rk3588-blueberry-r58-4x4.dts
🧰 Additional context used
🧠 Learnings (31)
📓 Common learnings
Learnt from: EvilOlaf
Repo: armbian/build PR: 8428
File: config/boards/lckfb-taishanpi.csc:5-9
Timestamp: 2025-07-25T03:51:50.830Z
Learning: When reviewing PRs in the Armbian build system, U-Boot defconfig files and patches may be added as part of the PR changes but might not be visible in the current repository clone state during review. It's important to check the actual PR file changes directly via GitHub or the PR API to get the complete picture of what files are being added or modified.
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-19T13:56:45.124Z
Learning: When reviewing kernel or u-boot version bump PRs in the Armbian build system, check if patches existed in previous kernel version directories (e.g., sunxi-6.12, sunxi-6.13) before describing them as new features. If a patch and the majority of its contents existed previously with no major functionality changes, focus the review on the actual changes: the version bump itself and patch compatibility adjustments. Don't describe existing patches being ported/maintained across versions as new features or drivers—this is misleading. The patches are existing code being re-aligned to work with the new upstream version.
Learnt from: pyavitz
Repo: armbian/build PR: 9058
File: patch/u-boot/legacy/u-boot-spacemit-k1/003-SpacemiT-K1X-Fixups.patch:28-67
Timestamp: 2025-12-13T11:39:08.046Z
Learning: In the Armbian build system for SpacemiT U-Boot patches (patch/u-boot/legacy/u-boot-spacemit-k1/), alignment with mainline U-Boot behavior is prioritized. For example, in boot mode handling, leaving devnum unchanged in the default case (when devtype is cleared) follows mainline conventions rather than explicitly clearing it to handle edge cases.
Learnt from: EvilOlaf
Repo: armbian/build PR: 8428
File: config/boards/lckfb-taishanpi.csc:5-9
Timestamp: 2025-07-25T03:51:50.830Z
Learning: When reviewing PRs in the Armbian build system, U-Boot defconfig files and patches may be added as part of the PR changes but might not be visible in the current repository clone state during review. It's important to check the actual PR file changes directly via GitHub API (https://api.github.com/repos/armbian/build/pulls/{pr_number}/files) to get the complete picture of what files are being added or modified, especially for U-Boot patches that will be applied during the build process.
Learnt from: rpardini
Repo: armbian/build PR: 8044
File: patch/u-boot/v2025.04/cmd-fileenv-read-string-from-file-into-env.patch:73-75
Timestamp: 2025-03-31T22:20:41.849Z
Learning: When porting patches between U-Boot versions (like from 2025.01 to 2025.04), rpardini prefers to maintain patches as-is rather than introducing refactoring changes, even when potential improvements are identified. This approach prioritizes consistency and reduces the risk of introducing new issues.
Learnt from: amazingfate
Repo: armbian/build PR: 8619
File: config/sources/families/rockchip.conf:222-230
Timestamp: 2025-09-14T06:32:29.806Z
Learning: In the Armbian build system, the write_uboot_platform() function implementations follow different patterns across Rockchip family files. The newer standard (used in rockchip64_common.inc and rk3506) includes 'status=none' parameter in dd commands, while older implementations (rk3288, rk322x) use an older pattern without this parameter. The rk3506 implementation correctly follows the current Rockchip family standard.
Learnt from: rpardini
Repo: armbian/build PR: 8879
File: config/sources/families/uefi-x86.conf:0-0
Timestamp: 2025-11-06T15:36:04.682Z
Learning: As of PR #8879, the uefi-x86 family in the Armbian build system now includes kernel patches for the first time. The current and edge branches for uefi-x86 are specifically configured for Apple T2-based x86 machines, including T2-specific patches from the linux-t2 project and custom kernel configuration options for Apple hardware drivers.
Learnt from: EvilOlaf
Repo: armbian/build PR: 8968
File: patch/u-boot/u-boot-sunxi/arm64-dts-sun50i-h6-orangepi.dtsi-Rollback-r_rsb-to-r_i2c.patch:36-36
Timestamp: 2025-11-20T18:20:11.985Z
Learning: The rewrite-patches tool (REWRITE_PATCHES=yes) in the Armbian build system can inadvertently introduce semantic changes when the u-boot/kernel git base revision differs from expected state. The tool applies patches, commits them, and re-exports them using git format-patch, which can cause the re-exported patch to reflect the base revision's state rather than preserving the original patch intent. This is particularly problematic for device tree changes like interrupt specifications. The tool currently lacks validation mechanisms to detect such semantic drift, and affected patches must be manually corrected after rewriting.
Learnt from: tabrisnet
Repo: armbian/build PR: 8913
File: config/sources/families/k3-beagle.conf:16-16
Timestamp: 2025-11-10T22:05:40.490Z
Learning: In the Armbian build system, kernel branches using non-mainline/vendor forks (like BeagleBoard's linux repository) should be named "vendor" or "vendor-rt" rather than "current" or "edge". The "current" and "edge" naming is reserved for mainline kernel branches. This affects both the case statement in family config files (e.g., `vendor | vendor-rt)` instead of `current | current-rt)`) and the corresponding KERNEL_TARGET declarations in board config files.
Learnt from: rpardini
Repo: armbian/build PR: 8044
File: patch/u-boot/v2025.04/cmd-fileenv-read-string-from-file-into-env.patch:76-86
Timestamp: 2025-03-31T22:20:48.475Z
Learning: For the Armbian build project, maintaining consistency with existing patches across U-Boot versions (such as between 2025.01 and 2025.04) is prioritized over refactoring individual patches for code improvements.
Learnt from: amazingfate
Repo: armbian/build PR: 8619
File: config/sources/families/rockchip.conf:64-70
Timestamp: 2025-09-14T06:29:18.958Z
Learning: In the Armbian build system, vendor branch configurations in family files are designed to be shared across multiple SoCs within the same family that use the same vendor kernel tree. For example, rk35xx and rockchip-rk3588 families both use identical vendor branch settings (same KERNELSOURCE, KERNELBRANCH, and KERNELPATCHDIR), demonstrating that vendor branches are intentionally generic rather than SoC-specific.
Learnt from: HackingGate
Repo: armbian/build PR: 8665
File: config/boards/photonicat2.csc:4-4
Timestamp: 2025-10-26T10:41:35.118Z
Learning: In the Armbian build system, rk3576 boards consistently use BOARDFAMILY="rk35xx" for both vendor and edge kernel targets. The rk35xx family configuration sources rockchip64_common.inc, which provides edge and current kernel branch definitions, making these branches available even though they're not defined directly in rk35xx.conf.
Learnt from: EvilOlaf
Repo: armbian/build PR: 8886
File: patch/kernel/rk35xx-vendor-6.1/dt/rk3528-nanopi-rev01.dts:9-9
Timestamp: 2025-11-08T06:39:24.527Z
Learning: In Armbian's Rockchip vendor kernel branches (rk35xx-vendor), device tree files may not require the same headers as mainline Linux. For example, input key definitions like KEY_BACK and KEY_VOLUMEUP may be handled differently in BSP kernels and don't necessarily need explicit includes like <dt-bindings/input/input.h> that would be required in mainline kernel device trees.
📚 Learning: 2025-11-08T06:39:24.527Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8886
File: patch/kernel/rk35xx-vendor-6.1/dt/rk3528-nanopi-rev01.dts:9-9
Timestamp: 2025-11-08T06:39:24.527Z
Learning: In Armbian's Rockchip vendor kernel branches (rk35xx-vendor), device tree files may not require the same headers as mainline Linux. For example, input key definitions like KEY_BACK and KEY_VOLUMEUP may be handled differently in BSP kernels and don't necessarily need explicit includes like <dt-bindings/input/input.h> that would be required in mainline kernel device trees.

Applied to files:

  • patch/kernel/archive/rockchip64-6.18/dt/rk3588-blueberry-r58-4x4.dts
  • patch/u-boot/v2026.01/dt_uboot/rk3588-blueberry-r58-4x4-u-boot.dtsi
  • patch/u-boot/legacy/u-boot-radxa-rk35xx/board_mekotronics-r58-4x4
  • config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh
  • patch/u-boot/v2026.01/dt_upstream_rockchip/rk3588-blueberry-r58-4x4.dts
  • config/boards/mekotronics-r58-4x4.conf
📚 Learning: 2025-12-17T05:09:02.306Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-17T05:09:02.306Z
Learning: In the Armbian build system, kernel patches (e.g., in patch/kernel/archive/sunxi-6.18/patches.armbian/) contain device tree overlays and other code that have existed for years and are maintained/ported across kernel versions. When reviewing PRs that modify these patch files, focus on the actual changes being made (e.g., Makefile fixes, new additions) rather than reviewing the entire existing content within the patch as if it were new code. The patch file contents are existing, stable code unless explicitly modified in the PR diff.

Applied to files:

  • patch/kernel/archive/rockchip64-6.18/dt/rk3588-blueberry-r58-4x4.dts
  • patch/u-boot/v2026.01/dt_uboot/rk3588-blueberry-r58-4x4-u-boot.dtsi
  • patch/u-boot/v2026.01/dt_upstream_rockchip/rk3588-blueberry-r58-4x4.dts
📚 Learning: 2025-11-15T14:33:30.654Z
Learnt from: SuperKali
Repo: armbian/build PR: 8936
File: patch/kernel/archive/rockchip64-6.18/dt/rk3576-nanopi-r76s.dts:800-802
Timestamp: 2025-11-15T14:33:30.654Z
Learning: In RK3576 device tree files (like rk3576-nanopi-r76s.dts), the serial0 alias is already defined in the upstream kernel's rk3576.dtsi base file, so board-specific DTS files do not need to redeclare it when enabling &uart0 for serial console.

Applied to files:

  • patch/kernel/archive/rockchip64-6.18/dt/rk3588-blueberry-r58-4x4.dts
  • patch/u-boot/v2026.01/dt_uboot/rk3588-blueberry-r58-4x4-u-boot.dtsi
  • patch/u-boot/v2026.01/dt_upstream_rockchip/rk3588-blueberry-r58-4x4.dts
📚 Learning: 2025-12-23T04:44:25.212Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 9067
File: patch/kernel/archive/rockchip64-6.19/dt/rk3399-orangepi-4-lts.dts:869-875
Timestamp: 2025-12-23T04:44:25.212Z
Learning: During code reviews of device tree changes (any .dts file), verify node properties against the official kernel device tree binding documentation (*.yaml) rather than relying solely on patterns observed in existing DTS files. This helps catch copy-paste or drift errors and ensures properties align with authoritative bindings for each device node type.

Applied to files:

  • patch/kernel/archive/rockchip64-6.18/dt/rk3588-blueberry-r58-4x4.dts
  • patch/u-boot/v2026.01/dt_upstream_rockchip/rk3588-blueberry-r58-4x4.dts
📚 Learning: 2025-11-20T18:20:11.985Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8968
File: patch/u-boot/u-boot-sunxi/arm64-dts-sun50i-h6-orangepi.dtsi-Rollback-r_rsb-to-r_i2c.patch:36-36
Timestamp: 2025-11-20T18:20:11.985Z
Learning: The rewrite-patches tool (REWRITE_PATCHES=yes) in the Armbian build system can inadvertently introduce semantic changes when the u-boot/kernel git base revision differs from expected state. The tool applies patches, commits them, and re-exports them using git format-patch, which can cause the re-exported patch to reflect the base revision's state rather than preserving the original patch intent. This is particularly problematic for device tree changes like interrupt specifications. The tool currently lacks validation mechanisms to detect such semantic drift, and affected patches must be manually corrected after rewriting.

Applied to files:

  • patch/kernel/archive/rockchip64-6.18/dt/rk3588-blueberry-r58-4x4.dts
  • patch/u-boot/v2026.01/dt_uboot/rk3588-blueberry-r58-4x4-u-boot.dtsi
  • patch/u-boot/legacy/u-boot-radxa-rk35xx/board_mekotronics-r58-4x4
  • patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig
  • config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh
  • patch/u-boot/v2026.01/dt_upstream_rockchip/rk3588-blueberry-r58-4x4.dts
  • config/boards/mekotronics-r58-4x4.conf
📚 Learning: 2025-10-26T10:41:35.118Z
Learnt from: HackingGate
Repo: armbian/build PR: 8665
File: config/boards/photonicat2.csc:4-4
Timestamp: 2025-10-26T10:41:35.118Z
Learning: In the Armbian build system, rk3576 boards consistently use BOARDFAMILY="rk35xx" for both vendor and edge kernel targets. The rk35xx family configuration sources rockchip64_common.inc, which provides edge and current kernel branch definitions, making these branches available even though they're not defined directly in rk35xx.conf.

Applied to files:

  • patch/kernel/archive/rockchip64-6.18/dt/rk3588-blueberry-r58-4x4.dts
  • patch/u-boot/v2026.01/dt_uboot/rk3588-blueberry-r58-4x4-u-boot.dtsi
  • patch/u-boot/legacy/u-boot-radxa-rk35xx/board_mekotronics-r58-4x4
  • patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig
  • config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh
  • config/boards/mekotronics-r58-4x4.conf
📚 Learning: 2025-03-31T22:20:41.849Z
Learnt from: rpardini
Repo: armbian/build PR: 8044
File: patch/u-boot/v2025.04/cmd-fileenv-read-string-from-file-into-env.patch:73-75
Timestamp: 2025-03-31T22:20:41.849Z
Learning: When porting patches between U-Boot versions (like from 2025.01 to 2025.04), rpardini prefers to maintain patches as-is rather than introducing refactoring changes, even when potential improvements are identified. This approach prioritizes consistency and reduces the risk of introducing new issues.

Applied to files:

  • patch/u-boot/v2026.01/dt_uboot/rk3588-blueberry-r58-4x4-u-boot.dtsi
  • patch/u-boot/legacy/u-boot-radxa-rk35xx/board_mekotronics-r58-4x4
  • patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig
  • config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh
  • patch/u-boot/v2026.01/dt_upstream_rockchip/rk3588-blueberry-r58-4x4.dts
📚 Learning: 2025-09-14T06:32:29.806Z
Learnt from: amazingfate
Repo: armbian/build PR: 8619
File: config/sources/families/rockchip.conf:222-230
Timestamp: 2025-09-14T06:32:29.806Z
Learning: In the Armbian build system, the write_uboot_platform() function implementations follow different patterns across Rockchip family files. The newer standard (used in rockchip64_common.inc and rk3506) includes 'status=none' parameter in dd commands, while older implementations (rk3288, rk322x) use an older pattern without this parameter. The rk3506 implementation correctly follows the current Rockchip family standard.

Applied to files:

  • patch/u-boot/v2026.01/dt_uboot/rk3588-blueberry-r58-4x4-u-boot.dtsi
  • patch/u-boot/legacy/u-boot-radxa-rk35xx/board_mekotronics-r58-4x4
  • patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig
  • config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh
  • patch/u-boot/v2026.01/dt_upstream_rockchip/rk3588-blueberry-r58-4x4.dts
  • config/boards/mekotronics-r58-4x4.conf
📚 Learning: 2025-12-13T11:39:08.046Z
Learnt from: pyavitz
Repo: armbian/build PR: 9058
File: patch/u-boot/legacy/u-boot-spacemit-k1/003-SpacemiT-K1X-Fixups.patch:28-67
Timestamp: 2025-12-13T11:39:08.046Z
Learning: In the Armbian build system for SpacemiT U-Boot patches (patch/u-boot/legacy/u-boot-spacemit-k1/), alignment with mainline U-Boot behavior is prioritized. For example, in boot mode handling, leaving devnum unchanged in the default case (when devtype is cleared) follows mainline conventions rather than explicitly clearing it to handle edge cases.

Applied to files:

  • patch/u-boot/v2026.01/dt_uboot/rk3588-blueberry-r58-4x4-u-boot.dtsi
  • patch/u-boot/legacy/u-boot-radxa-rk35xx/board_mekotronics-r58-4x4
  • patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig
  • config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh
  • patch/u-boot/v2026.01/dt_upstream_rockchip/rk3588-blueberry-r58-4x4.dts
  • config/boards/mekotronics-r58-4x4.conf
📚 Learning: 2025-03-31T22:20:48.475Z
Learnt from: rpardini
Repo: armbian/build PR: 8044
File: patch/u-boot/v2025.04/cmd-fileenv-read-string-from-file-into-env.patch:76-86
Timestamp: 2025-03-31T22:20:48.475Z
Learning: For the Armbian build project, maintaining consistency with existing patches across U-Boot versions (such as between 2025.01 and 2025.04) is prioritized over refactoring individual patches for code improvements.

Applied to files:

  • patch/u-boot/v2026.01/dt_uboot/rk3588-blueberry-r58-4x4-u-boot.dtsi
  • patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig
📚 Learning: 2025-09-14T06:10:25.610Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8619
File: config/sources/families/rockchip.conf:64-70
Timestamp: 2025-09-14T06:10:25.610Z
Learning: In the Armbian build system, rk32xx and rk33xx Rockchip SoCs no longer have BSP-based (vendor) kernel branches. The rk3506 is the first 32-bit Rockchip SoC to use the vendor branch in the current codebase.

Applied to files:

  • patch/u-boot/v2026.01/dt_uboot/rk3588-blueberry-r58-4x4-u-boot.dtsi
📚 Learning: 2025-10-22T07:51:53.015Z
Learnt from: igorpecovnik
Repo: armbian/build PR: 8789
File: config/kernel/linux-sunxi64-edge.config:839-839
Timestamp: 2025-10-22T07:51:53.015Z
Learning: In Armbian's wireless driver configuration, CONFIG_RK_WIFI_DEVICE_* options are Rockchip-specific device registration settings, while CONFIG_WLAN_UWE* are the actual cross-platform driver modules for UWE5622 wireless chips. The UWE5622 chip (manufactured by Unisoc/Spreadtrum) is used on multiple Allwinner boards including Orange Pi Zero 2/2W/3 and Orange Pi 3 LTS, so CONFIG_WLAN_UWE5621/5622 along with Unisoc infrastructure options (CONFIG_SPARD_WLAN_SUPPORT, CONFIG_SC23XX, CONFIG_UNISOC_WIFI_PS, CONFIG_WCN_BSP_DRIVER_BUILDIN) are correct in sunxi64 kernel configs.

Applied to files:

  • patch/u-boot/v2026.01/dt_uboot/rk3588-blueberry-r58-4x4-u-boot.dtsi
  • patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig
📚 Learning: 2025-12-13T11:45:02.422Z
Learnt from: pyavitz
Repo: armbian/build PR: 9058
File: patch/u-boot/legacy/u-boot-spacemit-k1/003-SpacemiT-K1X-Fixups.patch:17-25
Timestamp: 2025-12-13T11:45:02.422Z
Learning: In the SpacemiT U-Boot patches for Armbian (patch/u-boot/legacy/u-boot-spacemit-k1/), the environment variable `devnum` is set to the device name string (e.g., "mmc", "nvme") rather than a numeric index, and `distro_bootpart` holds the partition number. This implementation aligns with mainline U-Boot conventions for the SpacemiT platform and has been verified to work correctly by the maintainer.

Applied to files:

  • patch/u-boot/legacy/u-boot-radxa-rk35xx/board_mekotronics-r58-4x4
  • patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig
  • patch/u-boot/v2026.01/dt_upstream_rockchip/rk3588-blueberry-r58-4x4.dts
  • config/boards/mekotronics-r58-4x4.conf
📚 Learning: 2025-12-19T13:56:45.124Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-19T13:56:45.124Z
Learning: When reviewing kernel or u-boot version bump PRs in the Armbian build system, check if patches existed in previous kernel version directories (e.g., sunxi-6.12, sunxi-6.13) before describing them as new features. If a patch and the majority of its contents existed previously with no major functionality changes, focus the review on the actual changes: the version bump itself and patch compatibility adjustments. Don't describe existing patches being ported/maintained across versions as new features or drivers—this is misleading. The patches are existing code being re-aligned to work with the new upstream version.

Applied to files:

  • patch/u-boot/legacy/u-boot-radxa-rk35xx/board_mekotronics-r58-4x4
  • patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig
  • config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh
  • patch/u-boot/v2026.01/dt_upstream_rockchip/rk3588-blueberry-r58-4x4.dts
📚 Learning: 2025-11-02T20:49:56.719Z
Learnt from: igorpecovnik
Repo: armbian/build PR: 8849
File: config/boards/radxa-e54c.csc:14-28
Timestamp: 2025-11-02T20:49:56.719Z
Learning: In Armbian board configuration files (config/boards/*.conf, *.csc, etc.), do not use kernel_config_set, kernel_config_set_m, kernel_config_set_y, or custom_kernel_config__* functions to modify kernel configuration. Kernel configuration is associated with LINUXFAMILY/BOARDFAMILY, not individual BOARD. Board-specific kernel modifications cause inconsistency in kernel packages published to the apt repository because boards within a family share the same kernel packages. Kernel configuration changes must be made in the appropriate kernel config file (e.g., config/kernel/linux-*-*.config) or in family configuration files (config/sources/families/*.conf, *.inc) instead.

Applied to files:

  • patch/u-boot/legacy/u-boot-radxa-rk35xx/board_mekotronics-r58-4x4
  • patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig
  • config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh
  • config/boards/mekotronics-r58-4x4.conf
📚 Learning: 2025-09-18T03:36:17.862Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8537
File: config/boards/qcom-robotics-rb5.conf:1-1
Timestamp: 2025-09-18T03:36:17.862Z
Learning: In Armbian board configuration files (regardless of file extension), the standard pattern is to have only one line as a comment describing the board hardware specifications. This single-line description typically includes the SoC model, core count, RAM options, and key features like connectivity options, storage interfaces, and special features. The file extensions indicate board support status: .conf (standard support), .csc (community supported), .eos (end of support), .tvb (tvbox), .wip (work in progress).

Applied to files:

  • patch/u-boot/legacy/u-boot-radxa-rk35xx/board_mekotronics-r58-4x4
📚 Learning: 2025-07-25T03:51:50.830Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8428
File: config/boards/lckfb-taishanpi.csc:5-9
Timestamp: 2025-07-25T03:51:50.830Z
Learning: When reviewing PRs in the Armbian build system, U-Boot defconfig files and patches may be added as part of the PR changes but might not be visible in the current repository clone state during review. It's important to check the actual PR file changes directly via GitHub or the PR API to get the complete picture of what files are being added or modified.

Applied to files:

  • patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig
  • patch/u-boot/v2026.01/dt_upstream_rockchip/rk3588-blueberry-r58-4x4.dts
  • config/boards/mekotronics-r58-4x4.conf
📚 Learning: 2025-07-25T03:51:50.830Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8428
File: config/boards/lckfb-taishanpi.csc:5-9
Timestamp: 2025-07-25T03:51:50.830Z
Learning: When reviewing PRs in the Armbian build system, U-Boot defconfig files and patches may be added as part of the PR changes but might not be visible in the current repository clone state during review. It's important to check the actual PR file changes directly via GitHub API (https://api.github.com/repos/armbian/build/pulls/{pr_number}/files) to get the complete picture of what files are being added or modified, especially for U-Boot patches that will be applied during the build process.

Applied to files:

  • patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig
📚 Learning: 2025-07-27T15:53:30.629Z
Learnt from: pyavitz
Repo: armbian/build PR: 8421
File: config/kernel/linux-sunxi64-edge.config:805-825
Timestamp: 2025-07-27T15:53:30.629Z
Learning: In the Armbian build system, kernel configurations prioritize broad hardware compatibility over optimization concerns. Even when including numerous legacy/obsolete drivers causes technical issues like increased initramfs size and slower enumeration, the project philosophy is to "appease the masses" by ensuring maximum device compatibility rather than optimizing for specific use cases.

Applied to files:

  • patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig
📚 Learning: 2025-09-14T06:29:18.958Z
Learnt from: amazingfate
Repo: armbian/build PR: 8619
File: config/sources/families/rockchip.conf:64-70
Timestamp: 2025-09-14T06:29:18.958Z
Learning: In the Armbian build system, vendor branch configurations in family files are designed to be shared across multiple SoCs within the same family that use the same vendor kernel tree. For example, rk35xx and rockchip-rk3588 families both use identical vendor branch settings (same KERNELSOURCE, KERNELBRANCH, and KERNELPATCHDIR), demonstrating that vendor branches are intentionally generic rather than SoC-specific.

Applied to files:

  • patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig
  • config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh
  • config/boards/mekotronics-r58-4x4.conf
📚 Learning: 2025-10-22T07:56:19.424Z
Learnt from: igorpecovnik
Repo: armbian/build PR: 8789
File: config/kernel/linux-sunxi64-edge.config:839-839
Timestamp: 2025-10-22T07:56:19.424Z
Learning: In Linux kernel configuration, some `=y` (builtin) options are infrastructure or feature flags that enable subsystems or features for modular drivers, rather than directly compiling code into the kernel. For example, in Armbian wireless configs, options like CONFIG_SPARD_WLAN_SUPPORT=y, CONFIG_SC23XX=y, CONFIG_WCN_BSP_DRIVER_BUILDIN=y, CONFIG_UNISOC_WIFI_PS=y are module infrastructure/feature enablers, while the actual drivers (CONFIG_WLAN_UWE5621=m, CONFIG_WLAN_UWE5622=m) remain as loadable modules. These infrastructure options don't cause kernel bloat.

Applied to files:

  • patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig
📚 Learning: 2025-11-10T23:44:53.363Z
Learnt from: tabrisnet
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-11-10T23:44:53.363Z
Learning: For the RV1106 family in Armbian (config/sources/families/rockchip-rv1106.conf), udev.children-max=1 is set in the kernel boot parameters to prevent early-boot OOM errors. The RV1106 has a single-core CPU, so parallelism in udev child processes provides no practical benefit. Testing higher values is impractical due to the difficulty of monitoring at this early boot stage.

Applied to files:

  • patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig
📚 Learning: 2025-08-30T04:13:16.457Z
Learnt from: tabrisnet
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-08-30T04:13:16.457Z
Learning: Armbian kernel configuration files like linux-filogic-current.config are autogenerated overlays on top of arch defconfig. Comments added manually will be lost during future updates by maintainers, and explicit "CONFIG_OPTION is not set" statements aren't needed for mutually exclusive options since these are overlay configs that only specify changes from the base configuration.

Applied to files:

  • patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig
📚 Learning: 2025-10-26T12:56:29.185Z
Learnt from: rpardini
Repo: armbian/build PR: 8820
File: config/sources/families/include/meson64_common.inc:51-53
Timestamp: 2025-10-26T12:56:29.185Z
Learning: In the Armbian build framework, scripts/config correctly handles kernel configuration option names both with and without the CONFIG_ prefix, so opts_m+=("CONFIG_RTL8822CS") and opts_m+=("RTL8822CS") are both valid and will work correctly.

Applied to files:

  • patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig
📚 Learning: 2025-11-10T22:05:40.490Z
Learnt from: tabrisnet
Repo: armbian/build PR: 8913
File: config/sources/families/k3-beagle.conf:16-16
Timestamp: 2025-11-10T22:05:40.490Z
Learning: In the Armbian build system, kernel branches using non-mainline/vendor forks (like BeagleBoard's linux repository) should be named "vendor" or "vendor-rt" rather than "current" or "edge". The "current" and "edge" naming is reserved for mainline kernel branches. This affects both the case statement in family config files (e.g., `vendor | vendor-rt)` instead of `current | current-rt)`) and the corresponding KERNEL_TARGET declarations in board config files.

Applied to files:

  • config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh
  • config/boards/mekotronics-r58-4x4.conf
📚 Learning: 2025-09-12T19:28:38.491Z
Learnt from: Grippy98
Repo: armbian/build PR: 8622
File: config/sources/families/k3.conf:66-66
Timestamp: 2025-09-12T19:28:38.491Z
Learning: In the Armbian k3 family build system (config/sources/families/k3.conf), builds do not fail when TIBOOT3_BOOTCONFIG is unset, even though tiboot3.bin is still listed in UBOOT_TARGET_MAP. The gating mechanism in pre_config_uboot_target__build_first_stage function works as intended to conditionally build/copy tiboot3.bin only when TIBOOT3_BOOTCONFIG is defined.

Applied to files:

  • config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh
  • config/boards/mekotronics-r58-4x4.conf
📚 Learning: 2025-10-14T05:08:11.785Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8754
File: config/boards/bestv-r3300-l.csc:14-16
Timestamp: 2025-10-14T05:08:11.785Z
Learning: In the Armbian build system, BOOTBRANCH_BOARD is a valid framework variable used as a fallback when BOOTBRANCH is unset. The framework checks BOOTBRANCH_BOARD before applying the default bootloader branch value (see config/sources/common.conf). Board configuration files can use BOOTBRANCH_BOARD to specify the bootloader branch.

Applied to files:

  • config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh
  • config/boards/mekotronics-r58-4x4.conf
📚 Learning: 2025-08-02T05:46:10.664Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-08-02T05:46:10.664Z
Learning: In the Armbian build system, the modern recommended approach for kernel configuration is to use the kernel-config command via "./compile.sh BOARD=boardname BRANCH=branchname kernel-config" instead of the deprecated KERNEL_CONFIGURE=yes flag. This provides a two-step workflow: configure using menuconfig, then build, with better transparency and control over configuration changes.

Applied to files:

  • config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh
  • config/boards/mekotronics-r58-4x4.conf
📚 Learning: 2025-09-07T17:39:32.272Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8586
File: config/boards/nanopi-r76s.conf:15-21
Timestamp: 2025-09-07T17:39:32.272Z
Learning: In the Armbian build system, the variables $BOARD and $SDCARD are always set by the build framework, so guard checks for these variables are unnecessary in board configuration files and hook functions.

Applied to files:

  • config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh
📚 Learning: 2025-12-18T23:40:41.627Z
Learnt from: rpardini
Repo: armbian/build PR: 9101
File: lib/functions/image/compress-checksum.sh:44-48
Timestamp: 2025-12-18T23:40:41.627Z
Learning: In the Armbian build framework, scripts run with set -e, so a non-zero exit status will abort the script. During reviews, assume failures will stop execution unless explicitly handled. Verify that commands that must fail are checked, errors are propagated, and any critical steps have proper error handling (e.g., using pipefail where appropriate, checking exit codes, and not masking failures).

Applied to files:

  • config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh
🔇 Additional comments (12)
patch/u-boot/v2026.01/dt_uboot/rk3588-blueberry-r58-4x4-u-boot.dtsi (1)

1-1: LGTM!

Standard U-Boot DTSI pattern for RK3588 boards, correctly including the generic U-Boot definitions.

patch/u-boot/legacy/u-boot-radxa-rk35xx/board_mekotronics-r58-4x4 (1)

1-1: LGTM!

Correct board mapping for the vendor U-Boot path, linking to the r58x defconfig which handles multiple board variants.

config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh (2)

9-21: LGTM!

The vendor U-Boot hook correctly guards against edge/current branches and maintains the stable next-dev-v2024.03 branch for vendor builds, avoiding the MAC address stability issues mentioned in the comment.


24-55: Verify the interaction between hooks.sh and board config mainline paths.

The MEKO_USE_MAINLINE_UBOOT conditional provides a separate mainline U-Boot path from the r58-4x4 board config's native edge branch support. The guard at line 11 ensures r58-4x4's edge/current branches use the board config's mainline setup instead.

Note that this hooks.sh path uses ${RKBIN_DIR}/${BL31_BLOB} while the board config uses bl31.elf in the UBOOT_TARGET_MAP. Both approaches work (rkbin blob vs mainline ATF), but the difference reflects the distinct use cases.

patch/kernel/archive/rockchip64-6.18/dt/rk3588-blueberry-r58-4x4.dts (3)

1-11: LGTM!

Proper DTS header with dual licensing, correct includes for RK3588 bindings, and appropriate base DTSI inclusion.


389-395: MAC address placeholders noted.

The TODO comments correctly indicate these placeholder MAC addresses need U-Boot patching. This is standard practice for PCIe Ethernet devices. Ensure the mainline U-Boot has the fdt_fixup or equivalent mechanism to patch these at runtime.


952-984: LGTM!

NPU nodes are correctly enabled for the kernel DT with proper supply wiring. The vdd_npu_s0 regulator from I2C2 provides both core and SRAM power.

patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig (1)

1-98: Well-structured defconfig for mainline U-Boot.

The configuration appropriately enables RK3588 support with comprehensive peripheral coverage. Using CONFIG_TARGET_ROCK5B_RK3588=y is a reasonable choice for boards without dedicated upstream targets, as it provides the necessary RK3588 infrastructure.

Notable inclusions:

  • PCIe/NVMe for M.2 storage
  • USB host/gadget stacks including ROCKUSB for recovery
  • RTL8169 and DWC_ETH_QOS for networking
  • FIT with signature support for secure boot capability
patch/u-boot/v2026.01/dt_upstream_rockchip/rk3588-blueberry-r58-4x4.dts (1)

951-986: LGTM!

Appropriately commenting out NPU nodes for U-Boot - these are not needed at boot time and can be safely excluded. The comment clearly documents the intent.

config/boards/mekotronics-r58-4x4.conf (3)

14-20: Clean vendor/mainline branch separation.

The early return pattern effectively separates vendor and mainline configurations, ensuring vendor builds use the appropriate defconfig and shared vendor configuration while mainline builds get the full customization below.


50-55: Boot order customization looks appropriate.

The boot order mmc0 nvme scsi usb mmc1 pxe dhcp spi prioritizes SD card, then NVMe, with eMMC (mmc1) after USB. This aligns with the PR description (SD → NVMe → USB → eMMC → ETH) and is sensible for development/recovery scenarios.

Note: The regular_git diff at line 54 is helpful for debugging but will produce output during builds.


26-44: Well-structured mainline U-Boot configuration.

The hook correctly:

  • Uses mainline ATF (bl31.elf) matching BOOT_SCENARIO="tpl-blob-atf-mainline"
  • Unsets inherited functions before redefining write_uboot_platform
  • Implements the standard Rockchip u-boot-rockchip.bin placement (32k offset)
  • Disables Plymouth for cleaner boot experience with mainline U-Boot

- this is hidden under `MEKO_USE_MAINLINE_UBOOT=yes`
- also disable PLYMOUTH then
- also enable CONFIG_ROCKCHIP_MASKROM_IMAGE for quick development
- fix conflicting vendor hook
  - only hack the vendor u-boot down to next-dev-v2024.03 for vendor/legacy
- very basic, started from a mainlined DT, stripped almost everything
- only SD/eMMC/debug UART and basic regulators
- a translation of the vendor "&rk806single" and its "pmic-power-off" with rk806_dvs1_slp
…(rtl8169)

- wifi doesn't come up; guess I'll have to add bus-range later
- rtl8169 works
- the 4x4 has 4 HDMI-In's, only one of them (labeled "HDMI IN60") is 3588-native
…43752

- all credit to armsom sige7 DT, otherwise I'd be lost forever
…r/pinctrl

- straight-ish from vendor (which is a complete mess)
- front:
  - blue ports work (in usb2.0 mode, which also happens in vendor kernel)
  - black ports do NOT work (but are powered...?)
- back:
  - white ports work in usb 2.0 mode (as expected, also in vendor kernel)
    - those ports have too-long wires (flat cable) and reset all the time
- in summary: blue "USB3" ports at the front work in USB2.0 mode
  - rest doesn't
… stable MAC

- this will later be patched by an u-boot board file fdt_init() with ethaddr
- for now just hardcoded
- add missing symlink to u-boot patches, same as other meko boards
- DT is a copy from kernel, minus the NPU nodes (which u-boot doesn't know about yet)
> merry everything and a happy always
- mainline:
  - enable "edge" branch, with custom DT
    - works: almost everything
    - does NOT work:
      - USB-C port is only for OTG/UMS (NOT USB3-host) - didn't describe fusb302 et al in DT
      - any of the 3x HDMI -> MIPI (or whatever) HDMI-In's (thus this is a 1x1, not 4x1)
      - front USB3 blue ports are actually USB2 (also in vendor kernel)
      - front USB2 black ports don't work (but are powered)
      - Analog audio - didn't describe, could be, but I've no way to test
  - use mainline u-boot v2026.01-rc5 (with custom DT/defconfig/etc) with mainline ATF
  - boot order: SD -> NVMe -> USB -> eMMC -> ETH
- adapt usage of shared "mekotronics" vendor include only for vendor/legacy
- also fix DTB: `rockchip/rk3588-blueberry-r58-4x4.dtb` for vendor
  - same across vendor and mainline
  - mainline u-boot kinda-boots vendor kernel, but TF-A mismatch ref HDMI-rx
    - so use vendor u-boot and rk blob for vendor branch/kernel
@rpardini rpardini force-pushed the pr/mekotronics-r58-4x4-enable-edge-branch-with-mainline-kernel--u-boot branch from 5f0e469 to 726ba5b Compare December 25, 2025 10:47
Copy link
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: 0

🧹 Nitpick comments (3)
patch/u-boot/v2026.01/dt_upstream_rockchip/rk3588-blueberry-r58-4x4.dts (1)

1-950: U-Boot and kernel DTS are nearly identical—consider synchronization strategy.

The kernel DTS (patch/kernel/archive/rockchip64-6.18/dt/rk3588-blueberry-r58-4x4.dts) and this U-Boot DTS share ~95% identical content. Future changes to one may need to be applied to the other. This is a common pattern in Armbian, but worth noting for maintainability.

config/boards/mekotronics-r58-4x4.conf (2)

90-93: Duplicate config in enable_configs array.

CONFIG_CMD_USB_MASS_STORAGE appears twice in the array (first and last element). While harmless (scripts/config handles duplicates gracefully), it should be cleaned up.

🔎 Proposed fix
 	# UMS, RockUSB, gadget stuff
 	display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable UMS/RockUSB gadget" "info"
-	declare -a enable_configs=("CONFIG_CMD_USB_MASS_STORAGE" "CONFIG_USB_GADGET" "USB_GADGET_DOWNLOAD" "CONFIG_USB_FUNCTION_ROCKUSB" "CONFIG_USB_FUNCTION_ACM" "CONFIG_CMD_ROCKUSB" "CONFIG_CMD_USB_MASS_STORAGE")
+	declare -a enable_configs=("CONFIG_CMD_USB_MASS_STORAGE" "CONFIG_USB_GADGET" "USB_GADGET_DOWNLOAD" "CONFIG_USB_FUNCTION_ROCKUSB" "CONFIG_USB_FUNCTION_ACM" "CONFIG_CMD_ROCKUSB")

90-90: Inconsistent CONFIG_ prefix usage in array.

USB_GADGET_DOWNLOAD is missing the CONFIG_ prefix. While scripts/config handles this correctly (per retrieved learnings), consistency improves readability.

🔎 Proposed fix
-	declare -a enable_configs=("CONFIG_CMD_USB_MASS_STORAGE" "CONFIG_USB_GADGET" "USB_GADGET_DOWNLOAD" "CONFIG_USB_FUNCTION_ROCKUSB" "CONFIG_USB_FUNCTION_ACM" "CONFIG_CMD_ROCKUSB" "CONFIG_CMD_USB_MASS_STORAGE")
+	declare -a enable_configs=("CONFIG_CMD_USB_MASS_STORAGE" "CONFIG_USB_GADGET" "CONFIG_USB_GADGET_DOWNLOAD" "CONFIG_USB_FUNCTION_ROCKUSB" "CONFIG_USB_FUNCTION_ACM" "CONFIG_CMD_ROCKUSB")
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 5f0e469 and 726ba5b.

📒 Files selected for processing (7)
  • config/boards/mekotronics-r58-4x4.conf
  • config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh
  • patch/kernel/archive/rockchip64-6.18/dt/rk3588-blueberry-r58-4x4.dts
  • patch/u-boot/legacy/u-boot-radxa-rk35xx/board_mekotronics-r58-4x4
  • patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig
  • patch/u-boot/v2026.01/dt_uboot/rk3588-blueberry-r58-4x4-u-boot.dtsi
  • patch/u-boot/v2026.01/dt_upstream_rockchip/rk3588-blueberry-r58-4x4.dts
🚧 Files skipped from review as they are similar to previous changes (2)
  • patch/u-boot/v2026.01/dt_uboot/rk3588-blueberry-r58-4x4-u-boot.dtsi
  • patch/u-boot/legacy/u-boot-radxa-rk35xx/board_mekotronics-r58-4x4
🧰 Additional context used
🧠 Learnings (29)
📓 Common learnings
Learnt from: rpardini
Repo: armbian/build PR: 8879
File: config/sources/families/uefi-x86.conf:0-0
Timestamp: 2025-11-06T15:36:04.682Z
Learning: As of PR #8879, the uefi-x86 family in the Armbian build system now includes kernel patches for the first time. The current and edge branches for uefi-x86 are specifically configured for Apple T2-based x86 machines, including T2-specific patches from the linux-t2 project and custom kernel configuration options for Apple hardware drivers.
Learnt from: EvilOlaf
Repo: armbian/build PR: 8428
File: config/boards/lckfb-taishanpi.csc:5-9
Timestamp: 2025-07-25T03:51:50.830Z
Learning: When reviewing PRs in the Armbian build system, U-Boot defconfig files and patches may be added as part of the PR changes but might not be visible in the current repository clone state during review. It's important to check the actual PR file changes directly via GitHub or the PR API to get the complete picture of what files are being added or modified.
Learnt from: pyavitz
Repo: armbian/build PR: 9058
File: patch/u-boot/legacy/u-boot-spacemit-k1/003-SpacemiT-K1X-Fixups.patch:28-67
Timestamp: 2025-12-13T11:39:08.046Z
Learning: In the Armbian build system for SpacemiT U-Boot patches (patch/u-boot/legacy/u-boot-spacemit-k1/), alignment with mainline U-Boot behavior is prioritized. For example, in boot mode handling, leaving devnum unchanged in the default case (when devtype is cleared) follows mainline conventions rather than explicitly clearing it to handle edge cases.
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-19T13:56:45.124Z
Learning: When reviewing kernel or u-boot version bump PRs in the Armbian build system, check if patches existed in previous kernel version directories (e.g., sunxi-6.12, sunxi-6.13) before describing them as new features. If a patch and the majority of its contents existed previously with no major functionality changes, focus the review on the actual changes: the version bump itself and patch compatibility adjustments. Don't describe existing patches being ported/maintained across versions as new features or drivers—this is misleading. The patches are existing code being re-aligned to work with the new upstream version.
Learnt from: rpardini
Repo: armbian/build PR: 8044
File: patch/u-boot/v2025.04/cmd-fileenv-read-string-from-file-into-env.patch:73-75
Timestamp: 2025-03-31T22:20:41.849Z
Learning: When porting patches between U-Boot versions (like from 2025.01 to 2025.04), rpardini prefers to maintain patches as-is rather than introducing refactoring changes, even when potential improvements are identified. This approach prioritizes consistency and reduces the risk of introducing new issues.
Learnt from: tabrisnet
Repo: armbian/build PR: 8913
File: config/sources/families/k3-beagle.conf:16-16
Timestamp: 2025-11-10T22:05:40.490Z
Learning: In the Armbian build system, kernel branches using non-mainline/vendor forks (like BeagleBoard's linux repository) should be named "vendor" or "vendor-rt" rather than "current" or "edge". The "current" and "edge" naming is reserved for mainline kernel branches. This affects both the case statement in family config files (e.g., `vendor | vendor-rt)` instead of `current | current-rt)`) and the corresponding KERNEL_TARGET declarations in board config files.
Learnt from: amazingfate
Repo: armbian/build PR: 8619
File: config/sources/families/rockchip.conf:222-230
Timestamp: 2025-09-14T06:32:29.806Z
Learning: In the Armbian build system, the write_uboot_platform() function implementations follow different patterns across Rockchip family files. The newer standard (used in rockchip64_common.inc and rk3506) includes 'status=none' parameter in dd commands, while older implementations (rk3288, rk322x) use an older pattern without this parameter. The rk3506 implementation correctly follows the current Rockchip family standard.
Learnt from: EvilOlaf
Repo: armbian/build PR: 8428
File: config/boards/lckfb-taishanpi.csc:5-9
Timestamp: 2025-07-25T03:51:50.830Z
Learning: When reviewing PRs in the Armbian build system, U-Boot defconfig files and patches may be added as part of the PR changes but might not be visible in the current repository clone state during review. It's important to check the actual PR file changes directly via GitHub API (https://api.github.com/repos/armbian/build/pulls/{pr_number}/files) to get the complete picture of what files are being added or modified, especially for U-Boot patches that will be applied during the build process.
Learnt from: tabrisnet
Repo: armbian/build PR: 8746
File: config/kernel/linux-filogic-edge.config:344-470
Timestamp: 2025-10-11T19:52:54.648Z
Learning: The chainsx/linux-filogic kernel (legacy branch) for BPI-R4 uses out-of-tree proprietary drivers (CONFIG_NET_DSA_AN8855, CONFIG_AIROHA_EN8801SC_PHY, CONFIG_AIR_AN8855_PHY, CONFIG_MDIO_AN8855, CONFIG_MFD_AIROHA_AN8855). The frank-w/BPI-Router-Linux kernel (current and edge branches) uses mainline kernel drivers instead: CONFIG_NET_DSA_MT7530 for the DSA switch and CONFIG_MEDIATEK_2P5GE_PHY for PHY support. These provide equivalent functionality for BPI-R4 networking.
Learnt from: EvilOlaf
Repo: armbian/build PR: 8886
File: patch/kernel/rk35xx-vendor-6.1/dt/rk3528-nanopi-rev01.dts:9-9
Timestamp: 2025-11-08T06:39:24.527Z
Learning: In Armbian's Rockchip vendor kernel branches (rk35xx-vendor), device tree files may not require the same headers as mainline Linux. For example, input key definitions like KEY_BACK and KEY_VOLUMEUP may be handled differently in BSP kernels and don't necessarily need explicit includes like <dt-bindings/input/input.h> that would be required in mainline kernel device trees.
Learnt from: amazingfate
Repo: armbian/build PR: 8619
File: config/sources/families/rockchip.conf:64-70
Timestamp: 2025-09-14T06:29:18.958Z
Learning: In the Armbian build system, vendor branch configurations in family files are designed to be shared across multiple SoCs within the same family that use the same vendor kernel tree. For example, rk35xx and rockchip-rk3588 families both use identical vendor branch settings (same KERNELSOURCE, KERNELBRANCH, and KERNELPATCHDIR), demonstrating that vendor branches are intentionally generic rather than SoC-specific.
Learnt from: HackingGate
Repo: armbian/build PR: 8665
File: config/boards/photonicat2.csc:4-4
Timestamp: 2025-10-26T10:41:35.118Z
Learning: In the Armbian build system, rk3576 boards consistently use BOARDFAMILY="rk35xx" for both vendor and edge kernel targets. The rk35xx family configuration sources rockchip64_common.inc, which provides edge and current kernel branch definitions, making these branches available even though they're not defined directly in rk35xx.conf.
Learnt from: EvilOlaf
Repo: armbian/build PR: 8619
File: config/sources/families/rockchip.conf:64-70
Timestamp: 2025-09-14T06:10:25.610Z
Learning: In the Armbian build system, rk32xx and rk33xx Rockchip SoCs no longer have BSP-based (vendor) kernel branches. The rk3506 is the first 32-bit Rockchip SoC to use the vendor branch in the current codebase.
Learnt from: EvilOlaf
Repo: armbian/build PR: 8754
File: config/boards/bestv-r3300-l.csc:14-16
Timestamp: 2025-10-14T05:08:11.785Z
Learning: In the Armbian build system, BOOTBRANCH_BOARD is a valid framework variable used as a fallback when BOOTBRANCH is unset. The framework checks BOOTBRANCH_BOARD before applying the default bootloader branch value (see config/sources/common.conf). Board configuration files can use BOOTBRANCH_BOARD to specify the bootloader branch.
📚 Learning: 2025-03-31T22:20:41.849Z
Learnt from: rpardini
Repo: armbian/build PR: 8044
File: patch/u-boot/v2025.04/cmd-fileenv-read-string-from-file-into-env.patch:73-75
Timestamp: 2025-03-31T22:20:41.849Z
Learning: When porting patches between U-Boot versions (like from 2025.01 to 2025.04), rpardini prefers to maintain patches as-is rather than introducing refactoring changes, even when potential improvements are identified. This approach prioritizes consistency and reduces the risk of introducing new issues.

Applied to files:

  • patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig
  • patch/u-boot/v2026.01/dt_upstream_rockchip/rk3588-blueberry-r58-4x4.dts
  • config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh
📚 Learning: 2025-12-13T11:39:08.046Z
Learnt from: pyavitz
Repo: armbian/build PR: 9058
File: patch/u-boot/legacy/u-boot-spacemit-k1/003-SpacemiT-K1X-Fixups.patch:28-67
Timestamp: 2025-12-13T11:39:08.046Z
Learning: In the Armbian build system for SpacemiT U-Boot patches (patch/u-boot/legacy/u-boot-spacemit-k1/), alignment with mainline U-Boot behavior is prioritized. For example, in boot mode handling, leaving devnum unchanged in the default case (when devtype is cleared) follows mainline conventions rather than explicitly clearing it to handle edge cases.

Applied to files:

  • patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig
  • config/boards/mekotronics-r58-4x4.conf
  • patch/u-boot/v2026.01/dt_upstream_rockchip/rk3588-blueberry-r58-4x4.dts
  • config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh
📚 Learning: 2025-07-25T03:51:50.830Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8428
File: config/boards/lckfb-taishanpi.csc:5-9
Timestamp: 2025-07-25T03:51:50.830Z
Learning: When reviewing PRs in the Armbian build system, U-Boot defconfig files and patches may be added as part of the PR changes but might not be visible in the current repository clone state during review. It's important to check the actual PR file changes directly via GitHub or the PR API to get the complete picture of what files are being added or modified.

Applied to files:

  • patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig
  • patch/u-boot/v2026.01/dt_upstream_rockchip/rk3588-blueberry-r58-4x4.dts
📚 Learning: 2025-09-14T06:32:29.806Z
Learnt from: amazingfate
Repo: armbian/build PR: 8619
File: config/sources/families/rockchip.conf:222-230
Timestamp: 2025-09-14T06:32:29.806Z
Learning: In the Armbian build system, the write_uboot_platform() function implementations follow different patterns across Rockchip family files. The newer standard (used in rockchip64_common.inc and rk3506) includes 'status=none' parameter in dd commands, while older implementations (rk3288, rk322x) use an older pattern without this parameter. The rk3506 implementation correctly follows the current Rockchip family standard.

Applied to files:

  • patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig
  • config/boards/mekotronics-r58-4x4.conf
  • patch/u-boot/v2026.01/dt_upstream_rockchip/rk3588-blueberry-r58-4x4.dts
  • config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh
📚 Learning: 2025-11-20T18:20:11.985Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8968
File: patch/u-boot/u-boot-sunxi/arm64-dts-sun50i-h6-orangepi.dtsi-Rollback-r_rsb-to-r_i2c.patch:36-36
Timestamp: 2025-11-20T18:20:11.985Z
Learning: The rewrite-patches tool (REWRITE_PATCHES=yes) in the Armbian build system can inadvertently introduce semantic changes when the u-boot/kernel git base revision differs from expected state. The tool applies patches, commits them, and re-exports them using git format-patch, which can cause the re-exported patch to reflect the base revision's state rather than preserving the original patch intent. This is particularly problematic for device tree changes like interrupt specifications. The tool currently lacks validation mechanisms to detect such semantic drift, and affected patches must be manually corrected after rewriting.

Applied to files:

  • patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig
  • config/boards/mekotronics-r58-4x4.conf
  • patch/u-boot/v2026.01/dt_upstream_rockchip/rk3588-blueberry-r58-4x4.dts
  • patch/kernel/archive/rockchip64-6.18/dt/rk3588-blueberry-r58-4x4.dts
  • config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh
📚 Learning: 2025-12-19T13:56:45.124Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-19T13:56:45.124Z
Learning: When reviewing kernel or u-boot version bump PRs in the Armbian build system, check if patches existed in previous kernel version directories (e.g., sunxi-6.12, sunxi-6.13) before describing them as new features. If a patch and the majority of its contents existed previously with no major functionality changes, focus the review on the actual changes: the version bump itself and patch compatibility adjustments. Don't describe existing patches being ported/maintained across versions as new features or drivers—this is misleading. The patches are existing code being re-aligned to work with the new upstream version.

Applied to files:

  • patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig
  • patch/u-boot/v2026.01/dt_upstream_rockchip/rk3588-blueberry-r58-4x4.dts
  • patch/kernel/archive/rockchip64-6.18/dt/rk3588-blueberry-r58-4x4.dts
📚 Learning: 2025-03-31T22:20:48.475Z
Learnt from: rpardini
Repo: armbian/build PR: 8044
File: patch/u-boot/v2025.04/cmd-fileenv-read-string-from-file-into-env.patch:76-86
Timestamp: 2025-03-31T22:20:48.475Z
Learning: For the Armbian build project, maintaining consistency with existing patches across U-Boot versions (such as between 2025.01 and 2025.04) is prioritized over refactoring individual patches for code improvements.

Applied to files:

  • patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig
📚 Learning: 2025-12-13T11:45:02.422Z
Learnt from: pyavitz
Repo: armbian/build PR: 9058
File: patch/u-boot/legacy/u-boot-spacemit-k1/003-SpacemiT-K1X-Fixups.patch:17-25
Timestamp: 2025-12-13T11:45:02.422Z
Learning: In the SpacemiT U-Boot patches for Armbian (patch/u-boot/legacy/u-boot-spacemit-k1/), the environment variable `devnum` is set to the device name string (e.g., "mmc", "nvme") rather than a numeric index, and `distro_bootpart` holds the partition number. This implementation aligns with mainline U-Boot conventions for the SpacemiT platform and has been verified to work correctly by the maintainer.

Applied to files:

  • patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig
  • config/boards/mekotronics-r58-4x4.conf
  • patch/u-boot/v2026.01/dt_upstream_rockchip/rk3588-blueberry-r58-4x4.dts
  • config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh
📚 Learning: 2025-10-26T10:41:35.118Z
Learnt from: HackingGate
Repo: armbian/build PR: 8665
File: config/boards/photonicat2.csc:4-4
Timestamp: 2025-10-26T10:41:35.118Z
Learning: In the Armbian build system, rk3576 boards consistently use BOARDFAMILY="rk35xx" for both vendor and edge kernel targets. The rk35xx family configuration sources rockchip64_common.inc, which provides edge and current kernel branch definitions, making these branches available even though they're not defined directly in rk35xx.conf.

Applied to files:

  • patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig
  • config/boards/mekotronics-r58-4x4.conf
  • config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh
📚 Learning: 2025-07-25T03:51:50.830Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8428
File: config/boards/lckfb-taishanpi.csc:5-9
Timestamp: 2025-07-25T03:51:50.830Z
Learning: When reviewing PRs in the Armbian build system, U-Boot defconfig files and patches may be added as part of the PR changes but might not be visible in the current repository clone state during review. It's important to check the actual PR file changes directly via GitHub API (https://api.github.com/repos/armbian/build/pulls/{pr_number}/files) to get the complete picture of what files are being added or modified, especially for U-Boot patches that will be applied during the build process.

Applied to files:

  • patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig
📚 Learning: 2025-10-22T07:51:53.015Z
Learnt from: igorpecovnik
Repo: armbian/build PR: 8789
File: config/kernel/linux-sunxi64-edge.config:839-839
Timestamp: 2025-10-22T07:51:53.015Z
Learning: In Armbian's wireless driver configuration, CONFIG_RK_WIFI_DEVICE_* options are Rockchip-specific device registration settings, while CONFIG_WLAN_UWE* are the actual cross-platform driver modules for UWE5622 wireless chips. The UWE5622 chip (manufactured by Unisoc/Spreadtrum) is used on multiple Allwinner boards including Orange Pi Zero 2/2W/3 and Orange Pi 3 LTS, so CONFIG_WLAN_UWE5621/5622 along with Unisoc infrastructure options (CONFIG_SPARD_WLAN_SUPPORT, CONFIG_SC23XX, CONFIG_UNISOC_WIFI_PS, CONFIG_WCN_BSP_DRIVER_BUILDIN) are correct in sunxi64 kernel configs.

Applied to files:

  • patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig
📚 Learning: 2025-07-27T15:53:30.629Z
Learnt from: pyavitz
Repo: armbian/build PR: 8421
File: config/kernel/linux-sunxi64-edge.config:805-825
Timestamp: 2025-07-27T15:53:30.629Z
Learning: In the Armbian build system, kernel configurations prioritize broad hardware compatibility over optimization concerns. Even when including numerous legacy/obsolete drivers causes technical issues like increased initramfs size and slower enumeration, the project philosophy is to "appease the masses" by ensuring maximum device compatibility rather than optimizing for specific use cases.

Applied to files:

  • patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig
📚 Learning: 2025-09-14T06:29:18.958Z
Learnt from: amazingfate
Repo: armbian/build PR: 8619
File: config/sources/families/rockchip.conf:64-70
Timestamp: 2025-09-14T06:29:18.958Z
Learning: In the Armbian build system, vendor branch configurations in family files are designed to be shared across multiple SoCs within the same family that use the same vendor kernel tree. For example, rk35xx and rockchip-rk3588 families both use identical vendor branch settings (same KERNELSOURCE, KERNELBRANCH, and KERNELPATCHDIR), demonstrating that vendor branches are intentionally generic rather than SoC-specific.

Applied to files:

  • patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig
  • config/boards/mekotronics-r58-4x4.conf
  • config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh
📚 Learning: 2025-11-02T20:49:56.719Z
Learnt from: igorpecovnik
Repo: armbian/build PR: 8849
File: config/boards/radxa-e54c.csc:14-28
Timestamp: 2025-11-02T20:49:56.719Z
Learning: In Armbian board configuration files (config/boards/*.conf, *.csc, etc.), do not use kernel_config_set, kernel_config_set_m, kernel_config_set_y, or custom_kernel_config__* functions to modify kernel configuration. Kernel configuration is associated with LINUXFAMILY/BOARDFAMILY, not individual BOARD. Board-specific kernel modifications cause inconsistency in kernel packages published to the apt repository because boards within a family share the same kernel packages. Kernel configuration changes must be made in the appropriate kernel config file (e.g., config/kernel/linux-*-*.config) or in family configuration files (config/sources/families/*.conf, *.inc) instead.

Applied to files:

  • patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig
  • config/boards/mekotronics-r58-4x4.conf
  • config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh
📚 Learning: 2025-10-22T07:56:19.424Z
Learnt from: igorpecovnik
Repo: armbian/build PR: 8789
File: config/kernel/linux-sunxi64-edge.config:839-839
Timestamp: 2025-10-22T07:56:19.424Z
Learning: In Linux kernel configuration, some `=y` (builtin) options are infrastructure or feature flags that enable subsystems or features for modular drivers, rather than directly compiling code into the kernel. For example, in Armbian wireless configs, options like CONFIG_SPARD_WLAN_SUPPORT=y, CONFIG_SC23XX=y, CONFIG_WCN_BSP_DRIVER_BUILDIN=y, CONFIG_UNISOC_WIFI_PS=y are module infrastructure/feature enablers, while the actual drivers (CONFIG_WLAN_UWE5621=m, CONFIG_WLAN_UWE5622=m) remain as loadable modules. These infrastructure options don't cause kernel bloat.

Applied to files:

  • patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig
📚 Learning: 2025-11-10T23:44:53.363Z
Learnt from: tabrisnet
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-11-10T23:44:53.363Z
Learning: For the RV1106 family in Armbian (config/sources/families/rockchip-rv1106.conf), udev.children-max=1 is set in the kernel boot parameters to prevent early-boot OOM errors. The RV1106 has a single-core CPU, so parallelism in udev child processes provides no practical benefit. Testing higher values is impractical due to the difficulty of monitoring at this early boot stage.

Applied to files:

  • patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig
📚 Learning: 2025-08-30T04:13:16.457Z
Learnt from: tabrisnet
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-08-30T04:13:16.457Z
Learning: Armbian kernel configuration files like linux-filogic-current.config are autogenerated overlays on top of arch defconfig. Comments added manually will be lost during future updates by maintainers, and explicit "CONFIG_OPTION is not set" statements aren't needed for mutually exclusive options since these are overlay configs that only specify changes from the base configuration.

Applied to files:

  • patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig
📚 Learning: 2025-10-26T12:56:29.185Z
Learnt from: rpardini
Repo: armbian/build PR: 8820
File: config/sources/families/include/meson64_common.inc:51-53
Timestamp: 2025-10-26T12:56:29.185Z
Learning: In the Armbian build framework, scripts/config correctly handles kernel configuration option names both with and without the CONFIG_ prefix, so opts_m+=("CONFIG_RTL8822CS") and opts_m+=("RTL8822CS") are both valid and will work correctly.

Applied to files:

  • patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig
  • config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh
📚 Learning: 2025-11-10T22:05:40.490Z
Learnt from: tabrisnet
Repo: armbian/build PR: 8913
File: config/sources/families/k3-beagle.conf:16-16
Timestamp: 2025-11-10T22:05:40.490Z
Learning: In the Armbian build system, kernel branches using non-mainline/vendor forks (like BeagleBoard's linux repository) should be named "vendor" or "vendor-rt" rather than "current" or "edge". The "current" and "edge" naming is reserved for mainline kernel branches. This affects both the case statement in family config files (e.g., `vendor | vendor-rt)` instead of `current | current-rt)`) and the corresponding KERNEL_TARGET declarations in board config files.

Applied to files:

  • config/boards/mekotronics-r58-4x4.conf
  • config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh
📚 Learning: 2025-10-14T05:08:11.785Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8754
File: config/boards/bestv-r3300-l.csc:14-16
Timestamp: 2025-10-14T05:08:11.785Z
Learning: In the Armbian build system, BOOTBRANCH_BOARD is a valid framework variable used as a fallback when BOOTBRANCH is unset. The framework checks BOOTBRANCH_BOARD before applying the default bootloader branch value (see config/sources/common.conf). Board configuration files can use BOOTBRANCH_BOARD to specify the bootloader branch.

Applied to files:

  • config/boards/mekotronics-r58-4x4.conf
  • config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh
📚 Learning: 2025-11-08T06:39:24.527Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8886
File: patch/kernel/rk35xx-vendor-6.1/dt/rk3528-nanopi-rev01.dts:9-9
Timestamp: 2025-11-08T06:39:24.527Z
Learning: In Armbian's Rockchip vendor kernel branches (rk35xx-vendor), device tree files may not require the same headers as mainline Linux. For example, input key definitions like KEY_BACK and KEY_VOLUMEUP may be handled differently in BSP kernels and don't necessarily need explicit includes like <dt-bindings/input/input.h> that would be required in mainline kernel device trees.

Applied to files:

  • config/boards/mekotronics-r58-4x4.conf
  • patch/u-boot/v2026.01/dt_upstream_rockchip/rk3588-blueberry-r58-4x4.dts
  • patch/kernel/archive/rockchip64-6.18/dt/rk3588-blueberry-r58-4x4.dts
  • config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh
📚 Learning: 2025-09-27T21:50:15.915Z
Learnt from: tabrisnet
Repo: armbian/build PR: 8678
File: config/kernel/linux-sunxi64-current.config:94-94
Timestamp: 2025-09-27T21:50:15.915Z
Learning: When kernel config files are generated through Armbian's automated process (previous config → armbian-kernel.sh changes → make oldconfig → Armbian machinery processing), manual config file edits are not appropriate since they would be overwritten. Deprecated option handling should be implemented in the automated tooling instead.

Applied to files:

  • config/boards/mekotronics-r58-4x4.conf
📚 Learning: 2025-09-12T19:28:38.491Z
Learnt from: Grippy98
Repo: armbian/build PR: 8622
File: config/sources/families/k3.conf:66-66
Timestamp: 2025-09-12T19:28:38.491Z
Learning: In the Armbian k3 family build system (config/sources/families/k3.conf), builds do not fail when TIBOOT3_BOOTCONFIG is unset, even though tiboot3.bin is still listed in UBOOT_TARGET_MAP. The gating mechanism in pre_config_uboot_target__build_first_stage function works as intended to conditionally build/copy tiboot3.bin only when TIBOOT3_BOOTCONFIG is defined.

Applied to files:

  • config/boards/mekotronics-r58-4x4.conf
  • config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh
📚 Learning: 2025-08-02T05:46:10.664Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-08-02T05:46:10.664Z
Learning: In the Armbian build system, the modern recommended approach for kernel configuration is to use the kernel-config command via "./compile.sh BOARD=boardname BRANCH=branchname kernel-config" instead of the deprecated KERNEL_CONFIGURE=yes flag. This provides a two-step workflow: configure using menuconfig, then build, with better transparency and control over configuration changes.

Applied to files:

  • config/boards/mekotronics-r58-4x4.conf
  • config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh
📚 Learning: 2025-12-17T05:09:02.306Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-17T05:09:02.306Z
Learning: In the Armbian build system, kernel patches (e.g., in patch/kernel/archive/sunxi-6.18/patches.armbian/) contain device tree overlays and other code that have existed for years and are maintained/ported across kernel versions. When reviewing PRs that modify these patch files, focus on the actual changes being made (e.g., Makefile fixes, new additions) rather than reviewing the entire existing content within the patch as if it were new code. The patch file contents are existing, stable code unless explicitly modified in the PR diff.

Applied to files:

  • patch/u-boot/v2026.01/dt_upstream_rockchip/rk3588-blueberry-r58-4x4.dts
  • patch/kernel/archive/rockchip64-6.18/dt/rk3588-blueberry-r58-4x4.dts
📚 Learning: 2025-11-15T14:33:30.654Z
Learnt from: SuperKali
Repo: armbian/build PR: 8936
File: patch/kernel/archive/rockchip64-6.18/dt/rk3576-nanopi-r76s.dts:800-802
Timestamp: 2025-11-15T14:33:30.654Z
Learning: In RK3576 device tree files (like rk3576-nanopi-r76s.dts), the serial0 alias is already defined in the upstream kernel's rk3576.dtsi base file, so board-specific DTS files do not need to redeclare it when enabling &uart0 for serial console.

Applied to files:

  • patch/u-boot/v2026.01/dt_upstream_rockchip/rk3588-blueberry-r58-4x4.dts
📚 Learning: 2025-12-23T04:44:25.212Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 9067
File: patch/kernel/archive/rockchip64-6.19/dt/rk3399-orangepi-4-lts.dts:869-875
Timestamp: 2025-12-23T04:44:25.212Z
Learning: During code reviews of device tree changes (any .dts file), verify node properties against the official kernel device tree binding documentation (*.yaml) rather than relying solely on patterns observed in existing DTS files. This helps catch copy-paste or drift errors and ensures properties align with authoritative bindings for each device node type.

Applied to files:

  • patch/u-boot/v2026.01/dt_upstream_rockchip/rk3588-blueberry-r58-4x4.dts
  • patch/kernel/archive/rockchip64-6.18/dt/rk3588-blueberry-r58-4x4.dts
📚 Learning: 2025-12-18T23:40:41.627Z
Learnt from: rpardini
Repo: armbian/build PR: 9101
File: lib/functions/image/compress-checksum.sh:44-48
Timestamp: 2025-12-18T23:40:41.627Z
Learning: In the Armbian build framework, scripts run with set -e, so a non-zero exit status will abort the script. During reviews, assume failures will stop execution unless explicitly handled. Verify that commands that must fail are checked, errors are propagated, and any critical steps have proper error handling (e.g., using pipefail where appropriate, checking exit codes, and not masking failures).

Applied to files:

  • config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh
🧬 Code graph analysis (3)
config/boards/mekotronics-r58-4x4.conf (2)
lib/functions/compilation/uboot.sh (1)
  • compile_uboot_target (52-303)
.github/generate_CODEOWNERS.sh (1)
  • generate_for_board (18-68)
patch/u-boot/v2026.01/dt_upstream_rockchip/rk3588-blueberry-r58-4x4.dts (1)
lib/tools/common/dt_makefile_patcher.py (1)
  • auto_patch_dt_makefile (68-191)
config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh (3)
lib/functions/logging/runners.sh (1)
  • run_host_command_logged (204-206)
lib/functions/compilation/uboot.sh (1)
  • patch_uboot_target (22-48)
lib/functions/compilation/uboot-patching.sh (1)
  • uboot_main_patching_python (10-63)
🔇 Additional comments (12)
config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh (3)

24-55: Potential hook duplication with board.conf.

This conditional block (guarded by MEKO_USE_MAINLINE_UBOOT=yes) defines mainline U-Boot configuration, but config/boards/mekotronics-r58-4x4.conf also defines similar hooks (post_family_config__meko4x4_use_mainline_uboot, etc.) for edge/current branches. The two paths appear to serve different purposes:

  1. MEKO_USE_MAINLINE_UBOOT=yes - experimental override for vendor/legacy branches
  2. Board.conf's edge/current path - standard mainline configuration

However, the hooks have different names and slightly different configurations (e.g., different UBOOT_TARGET_MAP values). Ensure this is intentional—the hooks.sh version includes USB maskrom binaries (u-boot-rockchip-usb471.bin, u-boot-rockchip-usb472.bin) while board.conf does not.


43-45: LGTM: write_uboot_platform follows current Rockchip standard.

The dd command correctly includes status=none parameter, following the newer standard used in rockchip64_common.inc. Based on learnings, this is the preferred pattern for Rockchip family files.


39-40: Variables are properly defined in the family configuration. BL31_BLOB, DDR_BLOB, and RKBIN_DIR are all set in config/sources/families/include/rockchip64_common.inc which is sourced by rockchip-rk3588.conf. No verification needed.

patch/kernel/archive/rockchip64-6.18/dt/rk3588-blueberry-r58-4x4.dts (4)

478-489: eMMC hs400 mode disabled—documented workaround.

The comment explains hs400 causes issues and hs200 provides ~150MB/s. This is a reasonable workaround with clear documentation. Consider filing an upstream issue if this is a silicon/driver bug worth tracking.


882-888: USB OTG configured correctly for peripheral/gadget mode.

The USB0 XHCI controller is set to dr_mode = "peripheral" with maximum-speed = "high-speed", which aligns with the PR description stating USB-C is limited to OTG/UMS mode due to missing fusb302 description. The configuration is intentional and properly limited.


952-984: NPU nodes enabled with proper supply configuration.

The NPU cores and MMUs are enabled with vdd_npu_s0 supply from the I2C2 regulator. This provides NPU functionality for the edge kernel branch.


389-395: Hardcoded placeholder MAC addresses lack runtime fixup implementation.

The mac-address and local-mac-address properties contain identical placeholders (ea 72 73 83 a4 f5) marked with @TODO: to be patched by U-Boot. However, no MAC address fixup implementation for RTL8125 was found in U-Boot code or device tree configuration. Verify that U-Boot actually implements this fixup, otherwise the device will boot with a non-unique MAC address, potentially causing network conflicts.

patch/u-boot/v2026.01/dt_upstream_rockchip/rk3588-blueberry-r58-4x4.dts (1)

951-986: NPU nodes correctly excluded for U-Boot.

The NPU-related nodes are commented out with a clear /* NOT for u-boot yet */ marker. This is appropriate since U-Boot doesn't utilize NPU functionality, and including these nodes could cause issues with undefined node references in the U-Boot DT base.

config/boards/mekotronics-r58-4x4.conf (3)

36-37: Different UBOOT_TARGET_MAP from hooks.sh—intentional differentiation.

The board.conf uses BL31=bl31.elf (mainline ATF binary name) while hooks.sh uses ${RKBIN_DIR}/${BL31_BLOB}. This is correct:

  • Board.conf (edge/current): Uses BOOT_SCENARIO="tpl-blob-atf-mainline" which provides bl31.elf
  • hooks.sh (MEKO_USE_MAINLINE_UBOOT override on vendor): Uses blob path

The board.conf also produces only u-boot-rockchip.bin while hooks.sh additionally produces USB maskrom binaries. This seems intentional for the experimental override path.


50-55: Boot order customization looks correct.

The boot order mmc0 -> nvme -> scsi -> usb -> mmc1 prioritizes SD card over NVMe and eMMC, which matches the PR description ("SD -> NVMe -> USB -> eMMC"). The sed replacement and diff output for verification are appropriate.


14-20: Early return pattern correctly gates mainline configuration.

The return 0 on line 19 ensures vendor/legacy branches source shared vendor configuration and skip all mainline-specific hooks defined below. This is a clean separation pattern.

patch/u-boot/v2026.01/defconfig/mekotronics-r58-4x4-rk3588_defconfig (1)

1-98: Well-structured mainline U-Boot defconfig for Mekotronics R58-4X4.

The defconfig properly configures the board for U-Boot v2026.01-rc5 using the canonical Rock5B RK3588 target as the base, with device tree and configurations customized for the mekotronics-r58-4x4 variant. The setup aligns with the board configuration, which explicitly specifies mainline U-Boot for current/edge kernel branches. The defconfig provides appropriate support for storage (MMC, NVMe, SCSI/AHCI), networking (RTL8125, DWC_ETH_QOS, USB Ethernet), USB stack (XHCI, EHCI, OHCI, DWC3, gadget/UMS/RockUSB), and boot infrastructure (FIT images, SPL with ATF).

@rpardini rpardini merged commit d0444e1 into armbian:main Dec 28, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

02 Milestone: First quarter release 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.

2 participants