Skip to content
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

[Feature] 实现一个打包工具,能够为 duo 快速制作 RT-smart 系统镜像 #9623

Open
unicornx opened this issue Nov 6, 2024 · 3 comments
Assignees
Labels
Arch: RISC-V BSP related with risc-v BSP: Cvitek BSP related with cvitek 🎯 Focus Should focus on this issue/discussion/pr RT-Smart RT-Thread Smart related PR or issues

Comments

@unicornx
Copy link
Contributor

unicornx commented Nov 6, 2024

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

在 RTT 生态中可能的参考系统譬如:https://github.com/RT-Thread/userapps.git ,是基于它开发还是新建一个(待定 FIXME)

这个问题或许可以顺带解决 #9060 ,因为如果有了这个独立的打包工具,RT-Thread 本仓库只要负责生成 rtthread.bin,其他制作 image 的素材脚本都可以移到这个打包工具中提供。

Describe possible alternatives

No response

@unicornx unicornx added BSP: Cvitek BSP related with cvitek RT-Smart RT-Thread Smart related PR or issues labels Nov 6, 2024
@unicornx unicornx self-assigned this Nov 6, 2024
@BernardXiong BernardXiong added the 🎯 Focus Should focus on this issue/discussion/pr label Nov 7, 2024
@BernardXiong
Copy link
Member

感觉是可以重用userapps那套的,那份是基于xmake的方式,可能缺的是一个比较好的包选择配置,以及支持到不同的分区及打包成一个可烧录的映像文件。

@unicornx unicornx changed the title [Feature] 实现一个 sdk 能够为 duo 快速制作 RT-Thread 系统 [Feature] 实现一个 sdk 能够为 duo 快速制作 RT-smart 系统 Nov 12, 2024
@unicornx
Copy link
Contributor Author

unicornx commented Nov 13, 2024

$ qemu-system-riscv64 --version
QEMU emulator version 6.2.0 (Debian 1:6.2+dfsg-2ubuntu6.24)
Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers

TEST 1

kernel: 使用 userapps README 中提供的 prebuild
rootfs: 使用 userapps README 中提供的 prebuild,ext4.img
工作正常

 \ | /
- RT -     Thread Smart Operating System
 / | \     5.2.0 build Nov  8 2024 06:06:34
 2006 - 2024 Copyright by RT-Thread team
lwIP-2.1.2 initialized!
file system initialization done!
Hello RISC-V
 * Build:                RT-Thread 5.2.0 Nov  8 2024 06:06:30
 * Architecture:         unknown

TEST 2

kernel: 使用 userapps README 中提供的 prebuild
rootfs: 自己构建 userapp(main, commitid:9dcc7a2),ext4.img
显示文件系统初始化正常,但无法进入 msh

 \ | /
- RT -     Thread Smart Operating System
 / | \     5.2.0 build Nov  8 2024 06:06:34
 2006 - 2024 Copyright by RT-Thread team
lwIP-2.1.2 initialized!
file system initialization done!
Hello RISC-V

TEST 3

kernel: 自己构建 RT-smart(master, commitid:f8ea6c6527,enable 了 RISCV_S_MODE)
rootfs: 使用 userapps README 中提供的 prebuild 或者自己构建 userapp(main, commitid:9dcc7a2) , ext4.img
显示文件系统初始化失败,可以进入 msh

 \ | /
- RT -     Thread Smart Operating System
 / | \     5.2.0 build Nov 13 2024 10:15:45
 2006 - 2024 Copyright by RT-Thread team
lwIP-2.0.3 initialized!
[I/sal.skt] Socket Abstraction Layer initialize success.
[I/utest] utest is initialize success.
[I/utest] total utest testcase num: (0)
[I/drivers.serial] Using /dev/ttyS0 as default console
[W/DFS.fs] mount / failed with file system type: elm
file system initialization fail!
Hello RISC-V
msh />

TEST 4

kernel: 自己构建 RT-smart(master, commitid:f8ea6c6527,enable 了 RISCV_S_MODE)
rootfs: 自己构建userapp(main, commitid:9dcc7a2),fat.img
显示文件系统初始化成功,可以进入 msh,但工作不太正常,报网络失败,可能是内核中网络驱动没有配置好。

 \ | /
- RT -     Thread Smart Operating System
 / | \     5.2.0 build Nov 13 2024 10:15:45
 2006 - 2024 Copyright by RT-Thread team
lwIP-2.0.3 initialized!
[I/sal.skt] Socket Abstraction Layer initialize success.
[I/utest] utest is initialize success.
[I/utest] total utest testcase num: (0)
[I/drivers.serial] Using /dev/ttyS0 as default console
file system initialization done!
Hello RISC-V
msh />

[E/sal.skt] not find network interface device by protocol family(1).
[E/sal.skt] SAL socket protocol family input failed, return error -3.

@unicornx unicornx added the Arch: RISC-V BSP related with risc-v label Nov 13, 2024
@unicornx unicornx changed the title [Feature] 实现一个 sdk 能够为 duo 快速制作 RT-smart 系统 [Feature] 实现一个打包工具,能够为 duo 快速制作 RT-smart 系统镜像 Nov 28, 2024
@unicornx
Copy link
Contributor Author

详细设计更新在 :plctlab#1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arch: RISC-V BSP related with risc-v BSP: Cvitek BSP related with cvitek 🎯 Focus Should focus on this issue/discussion/pr RT-Smart RT-Thread Smart related PR or issues
Projects
None yet
Development

No branches or pull requests

2 participants