Description
Describe problem solved by the proposed feature
参考 https://github.com/milkv-duo/duo-buildroot-sdk
当 RT-smart 支持了 duo 系列产品后,也需要一个简单易用的打包工具,方便用户能够快速地简短命令操作即可生成一个完整的系统 package(包括了 firmware,sbi,u-boot,os(RT-thread) 以及文件系统),快速烧写到开发板中即可启动。
P.S. 这个需求本身并不属于 RT-Thread 内核的一部分,先提在这里,后面如果找到合适的仓库(或者新建)后在移走。
Describe your preferred solution
duo 的 RT-smart 系统镜像(或者叫做“整体image”)我理解会由三部分组成:fip.bin + boot.sd + rootfs.img
其中 fip.bin 和 boot.sd 是 duo 自己格式要求的 对 loader + uboot+ kernel 的二次封装
而 fip.bin 和 boot.sd 的制作目前已经集成在 RTT 仓库中,只是实现上不太好,具体见 #9060 的描述
所以改进的计划如下:
Step 1
我们需要实现一个轻量级的 fip.bin 和 boot.sd 的打包工具,替换现有的 cvitek_bootloader, 解决 #9060 问题。目前这个工作分解为以下 3 个 task:
- TASK: 为 duo 产品的 RT-smart 开发打包工具 plctlab/plct-rt-thread#1
- TASK: 为 duo-pkgtool 制作 prebuild 实现自动化 plctlab/plct-rt-thread#6
以上两个工作的产出是 https://github.com/plctlab/rttpkgtool - [Feature] 优化 bsp/cvitek 固件打包的处理 #9060 :这个是对现有 RTT 仓库的清理,用新的 轻量级的 rttpkgtool 替换现有的 cvitek_bootloader
Step 2
在 fip.bin 和 boot.sd 生成的基础上再加上 rootfs.img 生成 “完整的 image”
在 RTT 生态中可能的参考系统是:https://github.com/RT-Thread/smart-build
如果把 duo 的 bsp 加入 smart-build 仓库看护的话整体流程是:
- smart-build 拉取 rtt 内核,进入 bsp下执行 scons 生成
fip.bin
和boot.sd
(scons 会后台调用 rttpkgtool) - smart-build 编译出 rootfs
- smart-build 将
fip.bin
,boot.sd
和 rootfs 打包成一个镜像,该镜像上电烧录至 sd 卡中可以直接使用
注意对于 1,AARCH64 大核的构建行为稍有不同,已经提了另一个 issue
Describe possible alternatives
No response