Skip to content

Commit a92c434

Browse files
authored
Merge pull request #6 from Guohezu001/main
fix:some apps not packaged error
2 parents 6040661 + 5178385 commit a92c434

File tree

37 files changed

+2504
-141
lines changed

37 files changed

+2504
-141
lines changed

.github/workflows/ci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CI Build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Check out repository
14+
uses: actions/checkout@v3
15+
16+
- name: Install Dependencies
17+
run: |
18+
sudo apt update
19+
sudo add-apt-repository ppa:xmake-io/xmake -y
20+
sudo apt update
21+
sudo apt install -y nim
22+
sudo apt install -y xmake python3-pip
23+
pip install --upgrade pip
24+
pip install kconfiglib scons requests tqdm psutil
25+
26+
- name: Setup Environment and Build
27+
run: |
28+
# 使用 bash 作为 shell
29+
bash -c '
30+
source env.sh
31+
cd models
32+
xmake -vyD
33+
'
34+
shell: bash

env.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,6 @@ if ! command -v unzip &> /dev/null; then
2929
else
3030
echo "smart-build env ready!"
3131
fi
32+
33+
export PATH=`python3 -m site --user-base`/bin:$HOME/.env/tools/scripts:$PATH
34+
export RTT_EXEC_PATH=/usr/bin

models/.config

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
1-
# CONFIG_VENDOR_NXP is not set
1+
CONFIG_TARGET_FILE=""
22
# CONFIG_VENDOR_ROCKCHIP is not set
33
CONFIG_VENDOR_QEMU=y
4-
# CONFIG_VENDOR_CVITEK is not set
54
CONFIG_BOARD_VIRT64_AARCH64=y
65
# CONFIG_BOARD_VEXPRESS_A9 is not set
76

87
#
9-
# Application Configuration
8+
# Kernel Configuration
9+
#
10+
CONFIG_KERNEL_SOURCE_GIT=y
11+
# CONFIG_KERNEL_SOURCE_LOCAL is not set
12+
# end of Kernel Configuration
13+
14+
#
15+
# Selection the desired apps Application
1016
#
1117
CONFIG_APP_BUSYBOX=y
12-
CONFIG_APP_CPP=y
13-
CONFIG_APP_FFMPEG=y
18+
CONFIG_FORCE_APP_BUSYBOX=y
19+
# CONFIG_APP_CPP is not set
20+
# CONFIG_APP_FFMPEG is not set
1421
CONFIG_APP_HELLO=y
1522
# CONFIG_APP_MICROPYTHON is not set
1623
# CONFIG_APP_PLAYER is not set
@@ -21,4 +28,4 @@ CONFIG_APP_HELLO=y
2128
# CONFIG_APP_WEBCLIENT is not set
2229
# CONFIG_APP_WEBSERVER is not set
2330
# CONFIG_APP_ZLIB is not set
24-
# end of Application Configuration
31+
# end of Selection the desired apps Application

models/.config.old

Lines changed: 0 additions & 24 deletions
This file was deleted.

models/Kconfig

Lines changed: 111 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ config TARGET_FILE
66
mainmenu "Chip and Board Configuration"
77

88
#
9-
# 厂商选择
9+
# 芯片厂商选择
1010
#
1111
choice
1212
prompt "Select Vendor"
13-
default VENDOR_NXP
13+
default VENDOR_QEMU
1414

15-
config VENDOR_NXP
16-
bool "NXP"
17-
help
18-
Select NXP vendor.
15+
#config VENDOR_NXP
16+
# bool "NXP"
17+
# help
18+
# Select NXP vendor.
1919

2020
config VENDOR_ROCKCHIP
2121
bool "Rockchip"
@@ -27,10 +27,10 @@ config VENDOR_QEMU
2727
help
2828
Select QEMU vendor.
2929

30-
config VENDOR_CVITEK
31-
bool "Cvitek"
32-
help
33-
Select Cvitek vendor.
30+
#config VENDOR_CVITEK
31+
# bool "Cvitek"
32+
# help
33+
# Select Cvitek vendor.
3434

3535
endchoice
3636

@@ -60,7 +60,7 @@ if VENDOR_NXP
6060
endchoice
6161

6262
#
63-
# 根据选择的芯片配置开发板
63+
# 根据选择的芯片配置开发板厂商
6464
#
6565
if CHIP_MODEL_IMX
6666
choice
@@ -133,29 +133,41 @@ endif
133133
# 如果选择了 Rockchip,配置相应芯片和开发板
134134
#
135135
if VENDOR_ROCKCHIP
136-
choice
137-
prompt "Select Chip Model for Rockchip"
138-
default CHIP_MODEL_RK3500
139-
140-
config CHIP_MODEL_RK3500
141-
bool "RK3500 Chip"
136+
menu "RKxx soc"
137+
config CHIP_MODEL_RK3568
138+
bool "RK3568 Chip"
139+
default y
142140
help
143-
Select RK3500 chip.
141+
Select RK3568 series chips.
142+
endmenu
143+
#
144+
# 根据 RK3568 芯片选择开发板
145+
#
146+
if CHIP_MODEL_RK3568
147+
menu "FriendlyARM Company"
144148

145-
endchoice
149+
config COMPANY_FRIENDLY
150+
bool "FriendlyARM Company"
151+
default y
152+
help
153+
Select FriendlyARM Company for RK3568.
146154

147-
choice
148-
prompt "Select Development Board for RK3500"
149-
default BOARD_RK3500
155+
if COMPANY_FRIENDLY
156+
menu "NanoPi Series"
150157

151-
config BOARD_RK3500
152-
bool "RK3500 Development Board"
153-
help
154-
Select RK3500 development board.
158+
config BOARD_NANOPI_R5S
159+
bool "NanoPi R5S Board"
160+
help
161+
Select NanoPi R5S board for RK3568.
155162

156-
endchoice
163+
endmenu
164+
endif
165+
166+
endmenu
167+
endif
157168
endif
158169

170+
159171
#
160172
# 如果选择了 QEMU,配置相应的开发板
161173
#
@@ -177,17 +189,88 @@ if VENDOR_QEMU
177189
endchoice
178190
endif
179191

192+
#
193+
# 可选内核来源,如果本地有rt-thread仓库,可以指定本地目录,xmake编译过程中将不会再次拉取rt-thread仓库
194+
#
195+
menu "Kernel Configuration"
196+
197+
choice KERNEL_SOURCE
198+
prompt "Select Kernel Source"
199+
help
200+
Choose how to provide the kernel source.
201+
default KERNEL_SOURCE_GIT
202+
203+
config KERNEL_SOURCE_GIT
204+
bool "Fetch from Git repository"
205+
help
206+
Fetch the kernel source from a Git repository.
207+
208+
config KERNEL_SOURCE_LOCAL
209+
bool "Use a local directory"
210+
help
211+
Use an existing kernel source directory on the local file system.
212+
213+
endchoice
214+
215+
config KERNEL_LOCAL_DIR
216+
string "Local Kernel Directory"
217+
default "/home/rtthread/rt-thread/"
218+
depends on KERNEL_SOURCE_LOCAL
219+
help
220+
Specify the path to the local kernel source directory. This option
221+
is only available if "Use a local directory" is selected above.
222+
223+
endmenu
224+
225+
226+
#
227+
# 可选交叉编译工具链来源,如果本地有toolchain,可以指定本地目录,xmake编译过程中将不会再次拉取交叉编译工具链
228+
#
229+
#menu "toolchain Configuration"
230+
#
231+
#choice TOOLCHAIN_SOURCE
232+
# prompt "Select toolchain Source"
233+
# help
234+
# Choose how to provide the toolchain source.
235+
# default TOOLCHAIN_SOURCE_GIT
236+
#
237+
#config TOOLCHAIN_SOURCE_GIT
238+
# bool "Fetch from Git repository"
239+
# help
240+
# Fetch the TOOLCHAIN source from a Git repository.
241+
#
242+
#config TOOLCHAIN_SOURCE_LOCAL
243+
# bool "Use a local directory"
244+
# help
245+
# Use an existing toolchain source directory on the local file system.
246+
#
247+
#endchoice
248+
#
249+
#config TOOLCHAIN_LOCAL_DIR
250+
# string "Local toolchain Directory"
251+
# default "/home/rtthread/tool/a/aarch64-smart-musleabi/"
252+
# depends on TOOLCHAIN_SOURCE_LOCAL
253+
# help
254+
# Specify the path to the local toolchain source directory. This option
255+
# is only available if "Use a local directory" is selected above.
256+
#
257+
#endmenu
180258

181259
#
182260
# 选择开发板后,配置您想使用的 app
183261
#
184-
menu "Application Configuration"
262+
menu "Selection the desired apps Application"
185263

186264
config APP_BUSYBOX
187265
bool "busybox"
188266
help
189267
Select busybox application.
190268

269+
config FORCE_APP_BUSYBOX
270+
bool
271+
default y
272+
select APP_BUSYBOX
273+
191274
config APP_CPP
192275
bool "cpp"
193276
help

models/xmake.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
add_rules("mode.debug", "mode.release")
2424

2525
add_requires("apps")
26-
-- add_requires("rt-thread")
26+
2727
add_requires("xmake::rt-thread", {optional = true})
2828

2929
target("image")
@@ -45,7 +45,7 @@ target("image")
4545
after_build(function (target)
4646
os.exec("xmake smart-rootfs")
4747
os.exec("xmake smart-image")
48-
-- os.exec("xmake sdk")
48+
os.exec("xmake sdk")
4949
end)
5050

5151
target_end()
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
-- Licensed under the Apache License, Version 2.0 (the "License");
2+
-- You may not use this file except in compliance with the License.
3+
-- You may obtain a copy of the License at
4+
--
5+
-- http://www.apache.org/licenses/LICENSE-2.0
6+
--
7+
-- Unless required by applicable law or agreed to in writing, software
8+
-- distributed under the License is distributed on an "AS IS" BASIS,
9+
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
-- See the License for the specific language governing permissions and
11+
-- limitations under the License.
12+
--
13+
-- Copyright (C) 2023-2023 RT-Thread Development Team
14+
--
15+
-- @author zchenxiao
16+
-- @file deploy.lua
17+
--
18+
-- Change Logs:
19+
-- Date Author Notes
20+
-- ------------ ---------- -----------------------------------------------
21+
-- 2025-01-14 zchenxiao initial version
22+
--
23+
import("rt.rt_utils")
24+
25+
function main(rootfs, installdir, version)
26+
for _, filepath in ipairs(os.files(path.join(installdir, "bin") .. "/*")) do
27+
local filename = path.filename(filepath)
28+
rt_utils.cp_with_symlink(filepath, path.join(rootfs, "bin", filename))
29+
end
30+
end

repo/packages/c/cpp/xmake.lua

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,28 @@ do
3030
on_install("cross@linux,windows", function(package)
3131
local sourcedir_files = path.join(os.curdir(),"apps", "cpp", "*")
3232
local bakdir = path.join(os.curdir())
33+
local items_to_remove = {
34+
"apps",
35+
"assets",
36+
"env.sh",
37+
"README.md",
38+
"repo",
39+
"sdk",
40+
"tools"
41+
}
3342
print("sourcedir_files: " .. sourcedir_files)
3443
print("bakdir: " .. bakdir)
35-
44+
3645
os.cp(sourcedir_files, bakdir)
46+
for _, item in ipairs(items_to_remove) do
47+
local item_path = path.join(bakdir, item)
48+
if os.exists(item_path) then
49+
print("Removing: " .. item_path)
50+
os.rm(item_path)
51+
end
3752

3853
import("package.tools.xmake").install(package)
54+
end
3955
end)
4056

4157
end

0 commit comments

Comments
 (0)