orangepi4pro: Add community support for Orange Pi 4 Pro (Allwinner A733) [new files only]#9967
orangepi4pro: Add community support for Orange Pi 4 Pro (Allwinner A733) [new files only]#9967shkolnik wants to merge 13 commits into
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds Orange Pi 4 Pro support: sun60iw2 family config, board metadata and post-tweaks, bootenv and U-Boot boot script, four device-tree patches, and a pinned vendor U-Boot builder that emits vendor .fex boot artifacts. ChangesOrange Pi 4 Pro Board Support
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Hey @shkolnik! 👋Thanks for submitting your first pull request to the Armbian project — we're excited to have you contributing! 🧡 If you'd like to stay informed about project updates or collaborate more closely with the team, Also, don’t forget to ⭐ star the repo if you haven’t already — and welcome aboard! 🚀 |
🚫 Missing required board assetsThis PR adds new board configuration(s). Required assets must already exist in github/armbian/armbian.github.io.
Missing items
Once the missing files are added (or a PR is opened in armbian/armbian.github.io), re-run this check. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@config/boards/orangepi4pro.csc`:
- Around line 226-227: The final U-Boot output validation only checks
boot_package.fex and boot0_sdcard.fex; update the condition that currently tests
"[[ -f "${out_dir}/boot_package.fex" && -f "${out_dir}/boot0_sdcard.fex" ]]" to
also require "${out_dir}/boot0_spinor.fex" so the check verifies all three
artifacts (boot_package.fex, boot0_sdcard.fex, boot0_spinor.fex) before calling
exit_with_error; this keeps the validation consistent with the earlier
three-file check and ensures write_uboot_platform_mtd() has the required
boot0_spinor.fex.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 902ef391-59ee-4084-a0a9-b740d7d9a998
📒 Files selected for processing (9)
config/boards/orangepi4pro.cscconfig/bootenv/sun60iw2.txtconfig/bootscripts/boot-sun60iw2-opi.cmdconfig/kernel/linux-sun60iw2-opi-vendor.configconfig/sources/families/sun60iw2.confpatch/kernel/archive/sun60iw2-opi-vendor/0001-orangepi4pro-set-model-string.patchpatch/kernel/archive/sun60iw2-opi-vendor/0002-orangepi4pro-disable-unused-ufs.patchpatch/kernel/archive/sun60iw2-opi-vendor/0003-orangepi4pro-disable-axp515-bmu.patchpatch/kernel/archive/sun60iw2-opi-vendor/0004-orangepi4pro-disable-unpopulated-ac101-audio.patch
|
Added the board assets here: armbian/armbian.github.io#330 |
|
this needs to be looked at more careful. I find this code quite confusing, last but not least due to tons of comments (which could also be in commit messages). |
|
@EvilOlaf Thanks for reviewing. I pushed a commit that attempts to improve the readability by reducing excessive comments and eliminating the HEREDOC. Let me know if this is a bit better. I agree it's crazy to see this super old U-Boot code used for a board that was just released. I'm just trying to leverage what they provided (however ancient) to be able to boot Armbian. Regarding the U-Boot board vs. family consideration... I'm not 100% sure but I don't think the currently available U-Boot tooling works consistently across the SoC family in a typical way. https://github.com/NickAlilovic/build/tree/Radxa-A7A As far as I can tell The resulting bootloaders aren't interchangeable. Allwinner's boot0 carries board-specific DRAM training, and the two boards use different PMICs (OPi AXP8191 vs Radxa AXP318W), so Radxa's bootloader probably wouldn't bring up DRAM / power correctly. I wanted to share this additional context, but If you prefer it I can still move all the custom U boot stuff into the sun60iw2 family file, since there's only one sun60iw2 board at this time. If or when another board is added then the family file can be adapted as needed to support it. Just let me know! |
|
I be totally honest. For my guts feel this is too messy to have it in the framework as it is. Others may disagree with my opinion. In any case this is not your fault. As you said you try to use what is there in some way and I get that. My suggestion would be to (try to) collaborate with nicka since he's being messing with the radxa equivalents for quite a whole to perhaps get A733 stuff unified in a more pretty way, less quirks. |
|
Thanks @EvilOlaf — I completely understand the desire to keep things clean and share as much build configuration as possible among boards in the same family. The vendor support for A733 boards is genuinely quirky and I'm not going to pretend it's elegant. On coordinating with @NickAlilovic — I don't want to dismiss the idea, but I'd gently push back on it as the path for this PR. My goal here is deliberately narrow: get one minimal, working board (OPi 4 Pro) into people's hands now. I think that is more achievable if kept decoupled from Nick's effort, which is much larger and headed in a somewhat different direction (mainline-kernel carrying out-of-tree GPU/NPU patches). And I don't think coordinating would actually change the thing that makes this quirky: each vendor ships its own kernel and its own U-Boot fork, and those can't be unified (different boot0/DRAM, different PMICs). The quirk is inherent to the vendor stack, not to how this is organized — so a joint effort wouldn't make it less quirky, it'd mostly make it bigger and slower. I did try to leave room for convergence later: another A733 board can be added with its own vendor tooling without touching sun60iw2.conf, and if the open-stack work matures the family can absorb whatever becomes common. On the "in the framework as it is" concern — I submitted this as a community (.csc) board precisely because it's vendor-dependent and not yet ideal. It's purely additive (9 new files, nothing existing changed), works with the standard hooks so caching and CI behave normally, and can't affect any other board. I'd genuinely welcome concrete changes if there are specific ones that would help, and since you mentioned others might see it differently, I'm glad to hear the rest of the team's take too. I just want to find a path that lets people run Armbian on these devices today. Thanks! -James |
…ifferent sun60iw2 boards
|
@EvilOlaf Good news, it looks like you were right and quite a bit more can be shared between the boards in the family! Please let me know if this appears to be moving in the right direction. Shared (family):Orange Pi's vendor U-Boot fork (fetch + build + Allwinner pack), the vendor 6.6 kernel source/branch/defconfig, boot env, and rootfs tweaks. Per board:device tree, kernel patch dir, the DRAM blobs (boot0 + sys_config), and SD boot offsets — each board fetches its own blobs in Details:@NickAlilovic pointed me to this project by @dok2d that uses Orange Pi's vendor tools to build a (non-Armbian) Debian Trixie for the Radxa Cubie a7z: https://github.com/dok2d/cubie-a7z-debian. That showed the OPi U-Boot fork can produce a working bootloader for both boards given each board's boot blobs, and the OPi kernel fork builds for the Cubie once patched with its device tree. I didn't/don't have a Cubie device available to verify compatibility with the Orange Pi tooling, but using the @dok2d project as a reference for a working build on Cubie I was able to put together a strawman PR supporting both boards with a majority of functionality in the family file. I am not including the Cubie configuration in this PR both because it has not been tested on hardware and to keep scope tight, but I thought it was a worthwhile exercise to put together and see what needed to vary board-to-board. That WIP is here (for reference): https://github.com/shkolnik/armbian-build/pull/5/changes I ordered a Cubie a7z from Aliexpress to test, but no idea when that will actually reach me. I will post in the forums as well and see if someone wants to try it out while I'm waiting. I did flash and test these latest changes on my Orange Pi 4 Pro successfully. |
|
I tested this and was able to boot image on my OPI 4 Pro
About OPi AXP8191 vs Radxa AXP318W I think they are same: Sunxi Linux AXP wiki, Thats why it worked for Radxa boards too. About GPU can't we use same hack as for OrangePi Zero 3W? |
|
@ijiki16 that's great, thanks for testing! I'll look at adding in the GPU hack you linked in another branch (just to keep this branch/PR stable for review). |
|
looks overall cleaner. Still wild but good for now |
…urfaced an issue where the default boot address layout in OPi's configuration is cramped and only allows for kernels up to ~30Mb, causing the device to fail to boot. This change spaces the boot addresses out so we can boot larger (but still completely reasonable) kernels.
|
Thanks @EvilOlaf! |

Hi friends - I wanted to use Armbian on my new Orange Pi 4 Pro and found it wasn't supported yet, so I put together this board support package. I have been using it successfully on my device for a few days now, including with booting from an installed NVMe SSD.
This is my first contribution to Armbian so please let me know if there is anything you want me to revise to stay consistent with the project norms and guidelines.
Thanks!
-James
Description
Adds community-supported (
.csc) board config for the Orange Pi 4 Pro, a new Allwinner A733 (sun60iw2) SBC with no prior Armbian support. Target is a headless Debian Trixie server on Orange Pi's vendor BSP 6.6 kernel (single branch:vendor).The change is purely additive — 9 new files, no existing files modified — so it cannot affect any other board:
config/boards/orangepi4pro.csc— board config (device tree, DRAM-blob fetch, bootloader write offsets)config/sources/families/sun60iw2.conf— new A733 SoC family: fetches + builds the vendor U-Boot, packs the boot images, sets the kernel source/branch/config, and ships Orange Pi'sbsp/headers in the linux-headers package (so out-of-tree modules can build)config/kernel/linux-sun60iw2-vendor.config— vendor 6.6 kernel config (Orange Pi's, adopted verbatim)config/bootscripts/boot-sun60iw2.cmd,config/bootenv/sun60iw2.txt— boot script/envpatch/kernel/archive/sun60iw2-opi-vendor/— 4 small DT cleanups (model string; disable unpopulated UFS / AXP515 BMU / AC101 audio)Dependencies
Bootloader Notes:
BOOTSOURCE/BOOTBRANCHare pinned to the vendor commit.post_config_uboot_target), aPWDfix for theenv -imake (uboot_make_config), and the Allwinner pack tools (x86-only) run underqemu-x86_64-static.uboot_custom_postprocesspacks the built U-Boot intoboot0_*.fex/boot_package.fexwith Orange Pi's pack tooling; the per-board DRAM-init blobs are fetched at build time byfetch_custom_uboot__orangepi4pro.Context / discussion: https://forum.armbian.com/topic/55919-35-orange-pi-4-pro
[GitHub issue] reference: N/A (no open issue found)
[Jira] reference number: N/A
What is not included?
Targeted at CLI / headless-server use. The following A733 features are not supported in this config — none are regressions, all are low-priority for the headless target, and they can land in later iterations:
otg manager: probe of 10.usbc0 failed), so dual-role / USB-gadget use is non-functional.How Has This Been Tested?
Built a Trixie CLI image from a clean cache (Docker, arm64 host). Flashed and booted on hardware:
ttyS0+ SSH)armbian-install("Boot from MTD Flash") — boots from NVMe with SD removed; SD-first override confirmedChecklist:
Summary by CodeRabbit
New Features
Improvements
Stability