Skip to content

bsp: allwinner: fix RT-Smart boot on D1 - #11714

Open
lanceharvie wants to merge 4 commits into
RT-Thread:masterfrom
lanceharvie:fix/allwinner-d1-rtsmart
Open

bsp: allwinner: fix RT-Smart boot on D1#11714
lanceharvie wants to merge 4 commits into
RT-Thread:masterfrom
lanceharvie:fix/allwinner-d1-rtsmart

Conversation

@lanceharvie

Copy link
Copy Markdown

Problem

The Allwinner D1 RT-Smart BSP retained stale startup, MMU, serial, and storage integration code which prevented successful operation on real D1/C906 hardware.

Problems included an obsolete MMU initialization path and kernel address assumptions, allocation before heap initialization, duplicate BSS and UART initialization, Serial V1 configuration, an incorrect console device and baud default, and missing D1 SDMMC partition integration.

Resolution

  • Migrate D1 board initialization to the current common64 MMU model.
  • Identity-map the D1 kernel region at its real 0x45000000 load address.
  • Initialize the heap before allocating BSP components.
  • Remove duplicate BSS and UART HAL initialization.
  • Enable Serial V2 with UART0 at 115200 8N1.
  • Restore the D1 SDMMC0 partition port using current device APIs.
  • Mount ROMFS as a deterministic root filesystem.
  • Resolve watchdog/reset ownership and stale configuration dependencies.
  • Document the D1/C906 hardware and current build procedure.

Validation

The functional bring-up was tested on real Allwinner D1 / T-Head C906 hardware in the Sipeed Lichee RV 86 Panel class and reached an interactive RT-Smart shell:

msh />

Runtime testing covered scheduler operation, system ticks, thread sleep/wakeup, UART0 console, SDMMC block access, ROMFS/devfs, lwIP initialization, and kernel heap/page allocation.

The master-based series builds successfully with the RT-Thread RISC-V musl toolchain:

text      775663
data       46560
bss       417024
total    1239247

The hardware-validated prototype was based on RT-Thread v5.0.2. This current-master adaptation still requires a final board regression using firmware with the corrected T-Head CLINT devicetree binding; that firmware change is separate from this RT-Thread series.

@CLAassistant

CLAassistant commented Aug 16, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions

Copy link
Copy Markdown

👋 感谢您对 RT-Thread 的贡献!Thank you for your contribution to RT-Thread!

为确保代码符合 RT-Thread 的编码规范,请在你的仓库中执行以下步骤运行代码格式化工作流(如果格式化CI运行失败)。
To ensure your code complies with RT-Thread's coding style, please run the code formatting workflow by following the steps below (If the formatting of CI fails to run).


🛠 操作步骤 | Steps

  1. 前往 Actions 页面 | Go to the Actions page
    点击进入工作流 → | Click to open workflow →

  2. 点击 Run workflow | Click Run workflow

  • Use workflow from 保持默认分支(通常为 master
    Keep the default branch (usually master) in Use workflow from
  • branch 输入框填写 PR 分支 fix/allwinner-d1-rtsmart
    Enter PR branch fix/allwinner-d1-rtsmart in the branch field
  • 设置需排除的文件/目录(目录请以"/"结尾)
    Set files/directories to exclude (directories should end with "/")
  1. 等待工作流完成 | Wait for the workflow to complete
    格式化后的代码将作为独立提交推送至你的分支。
    The formatting changes will be pushed to your branch as a separate commit.

完成后,提交将自动更新至 fix/allwinner-d1-rtsmart 分支,关联的 Pull Request 也会同步更新。
Once completed, commits will be pushed to the fix/allwinner-d1-rtsmart branch automatically, and the related Pull Request will be updated.

如有问题欢迎联系我们,再次感谢您的贡献!💐
If you have any questions, feel free to reach out. Thanks again for your contribution!

@github-actions github-actions Bot added the BSP label Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants