File tree Expand file tree Collapse file tree 5 files changed +22
-10
lines changed
repo/packages/r/rt-thread/bsp Expand file tree Collapse file tree 5 files changed +22
-10
lines changed Original file line number Diff line number Diff line change 66
77### RT-Thread-Smart
88
9- RT-Thread Smart(以下简称 Smart) 是基于 RT-Thread 操作系统上的混合操作系统,简称为 rt-smart,它把应用从内核中独立出来,形成独立的用户态应用程序,并具备独立的地址空间(32 位系统上是 4G 的独立地址空间)。详细信息请见 [ RT-Thread 文档中心] ( https://www.rt-thread.org/document/site/#/rt-thread-version/rt-thread-smart/introduction/rt-smart-intro/rt-smart-intro )
9+ RT-Thread Smart(以下简称 Smart) 是基于 RT-Thread 操作系统上的混合操作系统,简称为 rt-smart,它把应用从内核中独立出来,形成独立的用户态应用程序(进程模型) ,并具备独立的地址空间(32 位系统上是 4G 的独立地址空间)。详细信息请见 [ RT-Thread 文档中心] ( https://www.rt-thread.org/document/site/#/rt-thread-version/rt-thread-smart/introduction/rt-smart-intro/rt-smart-intro )
1010
1111### Xmake
1212
@@ -28,12 +28,12 @@ xmake 是一个基于 Lua 的轻量级跨平台构建工具,使用 xmake.lua
2828 sudo add-apt-repository ppa:xmake-io/xmake
2929 sudo apt update
3030 sudo apt install xmake
31- pip install kconfiglib
31+ pip install kconfiglib scons requests tqdm psutil
3232 ```
3333
34342 . ** 克隆仓库**
3535
36- 将 Smart 的 userapps 仓库克隆下来, 假定我们的工作路径是 ` $WS ` :
36+ 将 smart-build 仓库克隆下来, 假定我们的工作路径是 ` $WS ` :
3737
3838 ``` shell
3939 cd $WS
@@ -44,10 +44,10 @@ xmake 是一个基于 Lua 的轻量级跨平台构建工具,使用 xmake.lua
4444
4545 文件系统由多个应用程序组成,这些应用程序都放在 ` apps ` 目录下。由于 smart 采用 xmake 编译用户态环境,因此 smart 的编译方式非常简单。
4646
47- 首先进入 userapps 并运行 ` env.sh ` 添加一下环境变量。
47+ 首先进入 smart-build 并运行 ` env.sh ` 添加一下环境变量(注意: ` source env.sh ` 和 ` source ./env.sh ` 是有区别的) 。
4848
4949 ``` shell
50- cd $WS /userapps
50+ cd $WS /smart-build
5151 source ./env.sh
5252 ```
5353
@@ -67,15 +67,15 @@ xmake 是一个基于 Lua 的轻量级跨平台构建工具,使用 xmake.lua
6767
68684 . ** 制作镜像文件**
6969
70- 运行 ` xmake ` 制作image镜像,所谓制作文件系统,就是将上一步编译生成的用户程序按照文件系统的布局拷贝到 ` $WS/userapps /models/build/rootfs ` 路径下,并根据提前写好的on_run.lua脚本打包生成特定格式的 image 文件。
70+ 运行 ` xmake ` 制作image镜像,所谓制作文件系统,就是将上一步编译生成的用户程序按照文件系统的布局拷贝到 ` $WS/smart-build /models/build/rootfs ` 路径下,并根据提前写好的on_run.lua脚本打包生成特定格式的 image 文件。
7171
7272 ``` shell
7373 xmake
7474 ```
7575
7676 目前支持的镜像格式包括 ext4/fat/cromfs。
7777
78- 这里的例子会在 ` $WS/userapps /models/build ` 路径下生成 ` ext4.img ` 文件。
78+ 这里的例子会在 ` $WS/smart-build /models/build ` 路径下生成 ` ext4.img ` 文件。
7979
8080 ![ image-20241211512457899.png] ( ./assets/image-20241211512457899.png )
8181
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
55export XMAKE_RCFILES=${script_dir} /tools/scripts/xmake.lua
66export RT_XMAKE_LINK_TYPE=" static"
77
8-
98# Check whether unzip is installed.
109if ! command -v unzip & > /dev/null; then
1110 echo " Unzip is not installed. Installing unzip"
@@ -26,6 +25,7 @@ if ! command -v unzip &> /dev/null; then
2625 fi
2726
2827 echo " Unzip has been successfully installed."
28+ echo " smart-build env ready!"
2929else
30- echo " Unzip is installed. "
30+ echo " smart-build env ready! "
3131fi
Original file line number Diff line number Diff line change 1+ # TARGET_FILE置空,不再生成rtconfig.h文件
2+ config TARGET_FILE
3+ string
4+ default ""
5+
16mainmenu "Chip and Board Configuration"
27
38#
Original file line number Diff line number Diff line change @@ -29,6 +29,12 @@ add_requires("xmake::rt-thread", {optional = true})
2929target (" image" )
3030 set_kind (" phony" )
3131
32+ if os.isdir (" ~/.env/tools/scripts" ) then
33+ local current_path = os.getenv (" PATH" )
34+ current_path = " ~/.env/tools/scripts" .. " :" .. current_path
35+ add_runenvs (" PATH" , current_path )
36+ end
37+
3238 add_packages (" apps" )
3339 add_packages (" rt-thread" )
3440
Original file line number Diff line number Diff line change @@ -38,7 +38,8 @@ function build(toolchainsdir)
3838 -- print("===============",config_dir,"===============")
3939 -- os.cp(config_dir,build)
4040 os .cd (build )
41- os .exec (" scons --pyconfig-silent" )
41+ os .exec (" scons --menuconfig" )
42+ os .exec (" pkgs --update" )
4243 os .exec (" scons" )
4344 -- exit()
4445 os .execv (" cp" , {build .. " /rtthread.bin" , build_dir })
You can’t perform that action at this time.
0 commit comments