Skip to content

orangepi-4a: add initial mainline kernel support #8330

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

EvilOlaf
Copy link
Member

@EvilOlaf EvilOlaf commented Jun 25, 2025

Description

This PR (very sloppily) adds support to build mainline kernels for the Orange Pi 4A.
It does not allow building ready-to-use images due to lack of proper U-Boot.
Maybe somebody wants to use it as a base to tinker further.

Based on bare mainline w/o standard patchset and this: https://lore.kernel.org/all/20250619173007.3367034-1-wens@kernel.org/

How Has This Been Tested?

Checklist:

  • 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 size/large PR with 250 lines or more 08 Milestone: Third quarter release Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... labels Jun 25, 2025
Copy link
Contributor

coderabbitai bot commented Jun 25, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

This change introduces support for the Orange Pi 4A board by adding a new board configuration file (orangepi-4a.csc) specifying board parameters and partition layout. It also adds a comprehensive Linux kernel configuration file (linux-sun55iw3-edge.config) tailored for the sun55iw3-edge platform, enabling a wide range of kernel features and hardware support. Additionally, the sun55iw3.conf source configuration is updated to include a new "edge" branch, setting kernel versioning and source parameters for the 6.16 kernel series.

Possibly related PRs

  • sunxi-6.15: switching EDGE to v6.15 #8270: Updates the kernel version for the "edge" branch from 6.14 to 6.15, similar to this PR which introduces a new kernel version (6.16) for the "edge" branch, indicating a related progression in kernel version management.

Suggested labels

Ready to merge, BSP, Framework

Suggested reviewers

  • igorpecovnik
✨ Finishing Touches
🧪 Generate Unit Tests
  • Create PR with Unit Tests
  • Post Copyable Unit Tests in 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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@EvilOlaf
Copy link
Member Author

@coderabbitai review

Copy link
Contributor

coderabbitai bot commented Jun 25, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai bot added BSP Board Support Packages Framework Framework components Ready to merge Reviewed, tested and ready for merge labels Jun 25, 2025
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: 1

🧹 Nitpick comments (2)
config/boards/orangepi-4a.csc (2)

4-6: Complete the hardware-specific configuration fields.

Several critical configuration fields are incomplete and marked as "fixme":

  • BOOTCONFIG needs the correct U-Boot defconfig for Orange Pi 4A
  • OVERLAY_PREFIX should match the actual device tree naming convention

These hardware-specific configurations require knowledge of the Orange Pi 4A's actual device tree and U-Boot support. Please verify the correct values with the hardware documentation or existing working configurations.


4-4: Add board maintainer information.

The BOARD_MAINTAINER field is empty. Please add maintainer contact information for ongoing support and issue tracking.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fa9302f and 2d77ada.

⛔ Files ignored due to path filters (1)
  • patch/kernel/archive/sunxi-6.16/add-orangepi-4a.patch is excluded by !patch/**
📒 Files selected for processing (3)
  • config/boards/orangepi-4a.csc (1 hunks)
  • config/kernel/linux-sun55iw3-edge.config (1 hunks)
  • config/sources/families/sun55iw3.conf (1 hunks)
🔇 Additional comments (2)
config/boards/orangepi-4a.csc (1)

9-9: Verify the device tree file path.

The BOOT_FDT_FILE is marked as "fixme" and may not reflect the actual device tree file that will be available for the Orange Pi 4A in mainline kernel 6.16-rc3.

Please verify that sun55i-t527-orangepi-4a.dtb will be available in the mainline kernel or if a different device tree file should be used.

config/kernel/linux-sun55iw3-edge.config (1)

1-1465: Comprehensive kernel configuration appropriate for initial mainline support.

This kernel configuration provides extensive hardware support and debugging capabilities suitable for initial Orange Pi 4A mainline kernel development. Key highlights:

  • Proper ARM64 and Sunxi platform support enabled
  • Comprehensive driver support for networking, storage, multimedia, and USB
  • Debug features enabled for development and troubleshooting
  • Security and virtualization features included
  • Preemptible kernel configuration for better responsiveness

The extensive feature set aligns well with the goal of providing a foundation for further development as mentioned in the PR objectives.

@github-actions github-actions bot removed the Ready to merge Reviewed, tested and ready for merge label Jun 30, 2025
@EvilOlaf
Copy link
Member Author

Alright this is kind of interesting. I tried to bump this to the v3 sent upstream but the framework does not accept this patch which just moves some stuff around in the same file: https://patchwork.kernel.org/project/linux-arm-kernel/patch/20250628161608.3072968-4-wens@kernel.org/
It detects it as previously applied patch which is wrong: https://paste.armbian.com/emuvizapis

For now I strip this patch since there is no function change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
08 Milestone: Third quarter release BSP Board Support Packages Framework Framework components Hardware Hardware related like kernel, U-Boot, ... Needs review Seeking for review Patches Patches related to kernel, U-Boot, ... size/large PR with 250 lines or more
Development

Successfully merging this pull request may close these issues.

1 participant