Skip to content

Commit 4248a41

Browse files
author
zhengchenxiao
committed
init
1 parent 5055dbf commit 4248a41

File tree

4 files changed

+16
-20
lines changed

4 files changed

+16
-20
lines changed

README.md

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ xmake 是一个基于 Lua 的轻量级跨平台构建工具,使用 xmake.lua
1414

1515
## 快速入门
1616

17+
![image-20241211512457800](./assets/image-20241211512457800.png)
18+
1719
> 此次以 qemu-virt64-aarch64 为例讲解
1820
19-
1. **安装 xmake**
21+
1. **安装 xmake及kconfiglib库**
2022

2123
请根据 [xmake 官方文档](https://xmake.io/#/zh-cn/guide/installation?id=ubuntu) 进行安装。
2224

@@ -26,6 +28,7 @@ xmake 是一个基于 Lua 的轻量级跨平台构建工具,使用 xmake.lua
2628
sudo add-apt-repository ppa:xmake-io/xmake
2729
sudo apt update
2830
sudo apt install xmake
31+
pip install kconfiglib
2932
```
3033

3134
2. **克隆仓库**
@@ -34,10 +37,10 @@ xmake 是一个基于 Lua 的轻量级跨平台构建工具,使用 xmake.lua
3437

3538
```shell
3639
cd $WS
37-
git clone https://github.com/RT-Thread/userapps.git
40+
git clone https://github.com/RT-Thread/smart-build.git
3841
```
3942

40-
3. **编译用户态应用程序**
43+
3. **选择我们想要编译的开发板及应用**
4144

4245
文件系统由多个应用程序组成,这些应用程序都放在 `apps` 目录下。由于 smart 采用 xmake 编译用户态环境,因此 smart 的编译方式非常简单。
4346

@@ -48,40 +51,33 @@ xmake 是一个基于 Lua 的轻量级跨平台构建工具,使用 xmake.lua
4851
source ./env.sh
4952
```
5053

51-
进入 apps 目录进行编译
54+
进入 models 目录进行选择
5255

5356
```shell
54-
cd apps
55-
xmake f -a aarch64 # 配置为 aarch64平台,如果不执行该条指令进行配置,则默认为 aarch64
56-
xmake -j$(nproc)
57+
cd models
58+
xmake menu #进入菜单选择界面
5759
```
5860

61+
![image-20241211173829621](./assets/image-20241211173829621.png)
62+
5963
目前支持的平台:arm、aarch64、riscv64gc。
6064

6165
![image-20230531173059551](./assets/image-20230531173059551.png)
6266

6367

64-
4. **制作文件系统**
65-
66-
运行 `xmake smart-rootfs` 制作 rootfs,所谓制作文件系统,就是将上一步编译生成的用户程序按照文件系统的布局拷贝到 `$WS/userapps/apps/build/rootfs` 路径下。
67-
68-
```shell
69-
xmake smart-rootfs
70-
```
71-
72-
5. **制作镜像**
68+
4. **制作镜像文件**
7369

74-
运行 `xmake smart-image` 制作镜像,将上一步制作的 `$WS/userapps/apps/build/rootfs` 目录下的文件系统打包生成特定格式的 image 文件。
70+
运行 `xmake` 制作image镜像,所谓制作文件系统,就是将上一步编译生成的用户程序按照文件系统的布局拷贝到 `$WS/userapps/models/build/rootfs` 路径下,并根据提前写好的on_run.lua脚本打包生成特定格式的 image 文件。
7571

7672
```shell
77-
xmake smart-image -f ext4 #制作 ext4 镜像
73+
xmake
7874
```
7975

8076
目前支持的镜像格式包括 ext4/fat/cromfs。
8177

82-
这里的例子会在 `$WS/userapps/apps/build` 路径下生成 `ext4.img` 文件。
78+
这里的例子会在 `$WS/userapps/models/build` 路径下生成 `ext4.img` 文件。
8379

84-
![image-20230531173829621](./assets/image-20230531173829621.png)
80+
![image-20241211512457899.png](./assets/image-20241211512457899.png)
8581

8682
## prebuilt 的版本
8783

assets/image-20241211173829621.png

12 KB
Loading

assets/image-20241211512457800.png

62.8 KB
Loading

assets/image-20241211512457899.png

8.01 KB
Loading

0 commit comments

Comments
 (0)