Skip to content

khadas-edge2: add support for mainline uboot#8796

Merged
igorpecovnik merged 1 commit intoarmbian:mainfrom
efectn-forks:kedge2-mainline-uboot
Oct 23, 2025
Merged

khadas-edge2: add support for mainline uboot#8796
igorpecovnik merged 1 commit intoarmbian:mainfrom
efectn-forks:kedge2-mainline-uboot

Conversation

@efectn
Copy link
Member

@efectn efectn commented Oct 22, 2025

Description

This PR adds support for mainline uboot to khadas edge 2 board including KBI tool.

GitHub issue reference:
Jira reference number [AR-9999]

How Has This Been Tested?

  • SD boot
  • eMMC boot
  • Tested some kbi commands like hwver, usid, version

Checklist:

Please delete options that are not relevant.

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

@github-actions github-actions bot added 11 Milestone: Fourth quarter release size/large PR with 250 lines or more Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... labels Oct 22, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 22, 2025

Walkthrough

This change modifies the Khadas Edge2 board configuration file to update its bootloader setup. It removes a kernel upgrade freeze constraint, adds a new BL32 blob reference, and implements branch-aware U-Boot configuration logic. The existing post_family_config function is guarded to skip execution for specific branches, while a new function applies mainline U-Boot configuration and overrides boot-related variables when the branch is not "vendor".

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

The changes are localized to a single configuration file with straightforward conditional logic and variable overrides following an established pattern. The modifications involve a guarded function and a new function for mainline U-Boot support without complex interdependencies.

Possibly related PRs

Suggested reviewers

  • rpardini
  • paolosabatino
  • amazingfate
  • catalinii
  • prahal
  • pyavitz
  • igorpecovnik

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The PR title "khadas-edge2: add support for mainline uboot" directly and clearly describes the main change in the pull request. It is specific to the Khadas Edge2 board and identifies the primary feature being added (mainline U-Boot support), which aligns with the code changes shown in the summary that introduce new functions and configurations for mainline U-Boot. The title is concise, readable, and avoids vague language or noise, making it easy for team members scanning history to understand the primary change.
Description Check ✅ Passed The PR description clearly states the purpose of the change: "This PR adds support for mainline uboot to khadas edge 2 board including KBI tool." This description is directly related to the changeset and matches the actual modifications shown in the summary. The description also provides context through testing results (SD boot, eMMC boot, KBI commands) and references to tracking systems, which demonstrates the author has tested the changes and linked them to relevant issues. The description is neither vague nor generic, as it specifically identifies what is being added and to which board.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

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 189bcaf and 4230644.

⛔ Files ignored due to path filters (5)
  • patch/u-boot/v2025.10/board_khadas-edge2/0001-khadas-edge2-add-support-for-KBI-and-apply-some-patc.patch is excluded by !patch/**
  • patch/u-boot/v2025.10/cmd-fileenv-read-string-from-file-into-env.patch is excluded by !patch/**
  • patch/u-boot/v2025.10/general-dw-hdmi-disable.patch is excluded by !patch/**
  • patch/u-boot/v2025.10/general-dwc-otg-usb-fix.patch is excluded by !patch/**
  • patch/u-boot/v2025.10/rk3288-fix-kernel-iommu-page-fault.patch is excluded by !patch/**
📒 Files selected for processing (1)
  • config/boards/khadas-edge2.conf (3 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: SuperKali
PR: armbian/build#8609
File: config/boards/nanopi-r76s.conf:5-5
Timestamp: 2025-09-11T06:12:54.213Z
Learning: In the Armbian build system, board family configuration files (like config/sources/families/rk35xx.conf) can inherit kernel branch definitions from common include files (like config/sources/families/include/rockchip64_common.inc). Even if a branch like "edge" is not defined directly in the family conf file, it may be available through the sourced include file.
📚 Learning: 2025-09-11T06:12:54.213Z
Learnt from: SuperKali
PR: armbian/build#8609
File: config/boards/nanopi-r76s.conf:5-5
Timestamp: 2025-09-11T06:12:54.213Z
Learning: In the Armbian build system, board family configuration files (like config/sources/families/rk35xx.conf) can inherit kernel branch definitions from common include files (like config/sources/families/include/rockchip64_common.inc). Even if a branch like "edge" is not defined directly in the family conf file, it may be available through the sourced include file.

Applied to files:

  • config/boards/khadas-edge2.conf
🔇 Additional comments (4)
config/boards/khadas-edge2.conf (4)

32-34: LGTM! Branch guard correctly isolates vendor U-Boot configuration.

The guard ensures the vendor U-Boot configuration only applies to the vendor branch, allowing the new mainline U-Boot function to handle edge and current branches.


17-17: Verify whether BL32_BLOB declaration is necessary for Khadas Edge2.

The BL32_BLOB is declared at line 17 but is never referenced in the UBOOT_TARGET_MAP configuration at line 59. Comparing with other RK3588 boards (rock-5b, rock-5a, orangepi5, nanopi-m6), all use identical UBOOT_TARGET_MAP patterns with only BL31_BLOB and DDR_BLOB—none include BL32_BLOB. Additionally, khadas-edge2.conf is the only board config that declares BL32_BLOB.

The variable does get picked up by the artifact system's cache invalidation mechanism, so it's not completely unused. However, verify whether:

  • BL32 is actually required for Khadas Edge2's mainline U-Boot boot flow
  • The declaration should be removed, or if it should be added to UBOOT_TARGET_MAP like BL31 and DDR_BLOB

59-59: I was unable to complete a comprehensive search due to execution errors, but I did confirm that U-Boot v2025.10 is a valid release announced October 6, 2025.

However, my searches found no evidence of BL31_BLOB or DDR_BLOB definitions in the visible config files, though earlier output confirmed BOOT_SOC and BL32_BLOB are properly defined in khadas-edge2.conf. These variables may be conditionally sourced from parent includes (like rockchip64_common.inc) at runtime, or they may genuinely be missing.

The original concern remains valid but inconclusive.


56-56: Configuration verified: U-Boot tag v2025.10 exists and supports Khadas Edge2.

The v2025.10 tag is available in the mainline U-Boot repository and includes board support for Khadas Edge2 (RK3588S). Mainline U-Boot contains board support for the Khadas Edge2 (RK3588S), with board files added to the U-Boot tree as of February 2025. The U-Boot rockchip board list includes khadas-edge2-rk3588s in mainline. This tag is appropriate for the current date (October 2025).

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • AR-9999: Request failed with status code 404

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
Copy link
Contributor

✅ This PR has been reviewed and approved — all set for merge!

@github-actions github-actions bot added Ready to merge Reviewed, tested and ready for merge and removed Needs review Seeking for review labels Oct 23, 2025
@igorpecovnik igorpecovnik merged commit 94c259c into armbian:main Oct 23, 2025
1 check passed
@coderabbitai coderabbitai bot mentioned this pull request Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

11 Milestone: Fourth quarter release Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... Ready to merge Reviewed, tested and ready for merge size/large PR with 250 lines or more

Development

Successfully merging this pull request may close these issues.

2 participants