Skip to content

Conversation

@vidplace7
Copy link
Member

@vidplace7 vidplace7 commented Oct 28, 2025

Description

Add new RK3506 CSC board "Luckfox Lyra Plus".
Additionally, tweaks RK3506 BOOT_SOC-specific settings to allow RK3506g2 to boot. (Else fails with memory allocation issues)

Depends on:

Relates to:

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also note any relevant details for your test configuration.

  • ./compile.sh BOARD=luckfox-lyra-plus BRANCH=vendor KERNEL_CONFIGURE=no DEB_COMPRESS=xz KERNEL_BTF=yes INSTALL_ARMBIAN_FIRMWARE=yes BUILD_DESKTOP=no BUILD_MINIMAL=yes RELEASE=trixie
  • Luckfox Lyra Plus boots, shell works over UART0
  • Ethernet working
  • Boot from SD working

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 11 Milestone: Fourth quarter release size/small PR with less then 50 lines Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... labels Oct 28, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 28, 2025

Walkthrough

This PR adds support for the Luckfox Lyra Plus (Rockchip RK3506G2) by introducing a new board configuration file (config/boards/luckfox-lyra-plus.csc), a RK3506-specific bootenv file (config/bootenv/rk3506.txt), and a boot script (config/bootscripts/boot-rk3506.cmd) that sets a ramdisk load address. It also updates config/sources/families/rockchip.conf to use the new RK3506 bootenv file and changes SERIALCON to a default-preserving expansion.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify luckfox-lyra-plus.csc follows existing board config conventions and that the low-memory comment/extension (commented enable_extension) is intentional.
  • Check rockchip.conf change to SERIALCON=${SERIALCON:="ttyS2"} doesn't alter expected behavior for other boards.
  • Confirm BOOTENV_FILE change to rk3506.txt and contents of rk3506.txt and boot-rk3506.cmd are consistent with RK3506 boot requirements.

Possibly related PRs

Suggested reviewers

  • prahal
  • rpardini
  • krachlatte
  • igorpecovnik
  • pyavitz

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main changes: adding a new Luckfox Lyra Plus board and adjusting RK3506 BOOT_SOC settings, which are reflected in the changeset.
Description check ✅ Passed The pull request description clearly relates to the changeset, explaining the addition of a new RK3506 board configuration and RK3506-specific boot settings adjustments.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

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 (1)
config/bootenv/rk3506.txt (1)

3-3: Consider adding a trailing newline.

The file is missing a trailing newline, which is a minor POSIX compliance and style issue. This is optional but helps with text file handling.

Apply this diff to add a trailing newline:

 bootlogo=false
+
📜 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 f958184 and b066e02.

📒 Files selected for processing (4)
  • config/boards/luckfox-lyra-plus.csc (1 hunks)
  • config/bootenv/rk3506.txt (1 hunks)
  • config/bootscripts/boot-rk3506.cmd (1 hunks)
  • config/sources/families/rockchip.conf (2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-10-26T10:41:35.118Z
Learnt from: HackingGate
PR: armbian/build#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:

  • config/sources/families/rockchip.conf
  • config/boards/luckfox-lyra-plus.csc
📚 Learning: 2025-09-14T06:32:29.806Z
Learnt from: amazingfate
PR: armbian/build#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:

  • config/sources/families/rockchip.conf
🪛 LanguageTool
config/bootenv/rk3506.txt

[grammar] ~3-~3: Dit kan een fout zijn.
Context: ...xtraargs=coherent_pool=4M bootlogo=false

(QB_NEW_NL)

🔇 Additional comments (6)
config/bootenv/rk3506.txt (1)

2-2: Verify coherent_pool size for 128MB device.

The coherent_pool=4M setting allocates approximately 3% of the total 128MB RAM for DMA coherent memory. While this may be appropriate, please verify that this allocation doesn't constrain the system too much, especially given the low-memory profile of this board. Consider testing with different values if boot or runtime issues arise.

config/bootscripts/boot-rk3506.cmd (1)

7-7: Memory address layout looks reasonable for 128MB device.

The ramdisk_addr_r at 0x02800000 (42MB) provides adequate spacing from load_addr at 0x2000000 (32MB) and should work well for a device with 128MB total RAM. The address is properly used in the load command (line 47) and bootz command (line 80).

If you encounter memory-related boot issues, consider verifying the complete memory map to ensure kernel, ramdisk, and DTB don't overlap:

  • kernel_addr_r (inherited from u-boot environment)
  • ramdisk_addr_r = 0x02800000 (42MB)
  • fdt_addr_r (inherited from u-boot environment)
  • load_addr = 0x2000000 (32MB)
config/sources/families/rockchip.conf (2)

17-17: Good use of parameter expansion for overridable default.

The change to SERIALCON=${SERIALCON:="ttyS2"} correctly provides a default value while allowing board configurations to override it. This works well with the new Luckfox Lyra Plus board that sets SERIALCON="ttyFIQ0" in its board config.


51-51: Boot environment file correctly points to new RK3506-specific config.

The change to BOOTENV_FILE='rk3506.txt' properly references the new boot environment file created in this PR with RK3506-specific settings (coherent_pool=4M, etc.). This separation from the generic rockchip.txt is appropriate for the distinct requirements of the RK3506 SoC.

config/boards/luckfox-lyra-plus.csc (2)

1-13: Configuration looks good overall.

The board configuration properly sets up the RK3506G2 with appropriate settings:

  • SERIALCON="ttyFIQ0" correctly overrides the family default for this board's serial console
  • BOOT_SOC="rk3506" properly selects the RK3506 boot configuration
  • DDR_BLOB and other boot parameters are appropriately specified

2-2: Clarify board name discrepancy.

The PR title mentions "Luckfox Lyra Zero W" but the board configuration specifies BOARD_NAME="Luckfox Lyra Plus". Please verify which is the correct name for this board to ensure consistency between the PR description and the actual configuration.

@github-actions github-actions bot added the Ready to merge Reviewed, tested and ready for merge label Nov 5, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 5, 2025

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

@github-actions github-actions bot removed the Needs review Seeking for review label Nov 5, 2025
@igorpecovnik igorpecovnik merged commit a14a9d1 into armbian:main Nov 5, 2025
10 checks passed
@vidplace7 vidplace7 deleted the luckfox-lyra-plus branch November 11, 2025 18:10
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, ... Ready to merge Reviewed, tested and ready for merge size/small PR with less then 50 lines

Development

Successfully merging this pull request may close these issues.

2 participants