• Home
  • Annotate
  • current directory
Name Date Size #Lines LOC

..21-Aug-2025-

applications/21-Aug-2025-

board/21-Aug-2025-

.config A D21-Aug-202553.5 KiB1,7161,580

.gitignore A D21-Aug-2025115 1211

Kconfig A D21-Aug-2025701 3626

README.md A D21-Aug-20252 KiB8548

SConscript A D21-Aug-2025311 1511

SConstruct A D21-Aug-20251.9 KiB6446

generateimg.sh A D21-Aug-2025111 21

link.lds A D21-Aug-20254.4 KiB196164

link_stacksize.lds A D21-Aug-202524 21

rtconfig.h A D21-Aug-202514 KiB651241

rtconfig.py A D21-Aug-20251.7 KiB5742

README.md

1# RT-Thread全志D1移植
2
3全志 d1-allwinner-nezha 属于 riscv64 平台
4
5## 编译环境搭建
6
7- 拉取 RT-Thread Smart的代码仓库 `git clone https://gitee.com/guozhanxin/rtthread-smart.git`
8
9### windows 环境
10
11- 打开 RT-Thread ENV 工具
12
13- 进入 tools 目录 `cd tools`
14
15- 拉取 `riscv64`平台的编译工具 `python get_toolchain.py riscv64`
16
17- 返回上级目录 `cd ..`
18
19- 设置环境变量 `./smart-env.bat`
20
21### ubuntu 环境
22
23- 打开 ubuntu shell 终端
24
25- 进入 tools 目录 `cd tools`
26
27- 拉取 `riscv64`平台的编译工具 `python get_toolchain.py riscv64`
28
29- 返回上级目录 `cd ..`
30
31- 设置环境变量 `source smart-env.sh riscv64`
32
33### 编译环境验证
34
35- 输入:`riscv64-unknown-linux-musl-gcc -v`
36
37## 开发与编译
38
39- windows 下使用RT-Thread ENV 工具, `menuconfig` 配置工程,`scons` 编译工程
40
41- ubuntu 下 使用shell 终端: `scons --menuconfig` 配置工程, `scons` 编译工程
42
43
44## 下载验证
45
46- 编译完后,通过:mkimage 生成 img 镜像文件,这个img 镜像文件可以使用 U-boot 引导启动
47
48- 启动方式一般有:SD卡启动、NandFlash启动、网络引导启动
49
50- windows 下使用全志的:`AllwinnertechPhoeniSuitRelease20201225`
51
52- 可以使用 xfel 工具进行烧写NandFlash
53
54## 运行效果
55
56```c
57## Booting kernel from Legacy Image at 45000000 ...
58   Image Name:
59   Image Type:   RISC-V Linux Kernel Image (uncompressed)
60   Data Size:    249576 Bytes = 243.7 KiB
61   Load Address: 45000000
62   Entry Point:  45000000
63   Verifying Checksum ... OK
64[01.861]
65Starting kernel ...
66heap: [0x45077bb0 - 0x48277bb0]
67 \ | /
68- RT -     Thread Smart Operating System
69 / | \     5.0.0 build Jun 18 2022
70 2006 - 2020 Copyright by rt-thread team
71file system initialization done!
72Hello RISC-V
73msh />
74
75```
76
77## 参考文档
78
79- [https://club.rt-thread.org/ask/article/389ac36250b57737.html](https://club.rt-thread.org/ask/article/389ac36250b57737.html)
80
81
82
83
84
85