Skip to content

Commit 5178385

Browse files
author
zhengchenxiao
committed
rename rk3500 to nanopi_r5s
1 parent c85f2ae commit 5178385

File tree

7 files changed

+50
-28
lines changed

7 files changed

+50
-28
lines changed

models/Kconfig

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

88
#
9-
# 厂商选择
9+
# 芯片厂商选择
1010
#
1111
choice
1212
prompt "Select Vendor"
@@ -60,7 +60,7 @@ if VENDOR_NXP
6060
endchoice
6161

6262
#
63-
# 根据选择的芯片配置开发板
63+
# 根据选择的芯片配置开发板厂商
6464
#
6565
if CHIP_MODEL_IMX
6666
choice
@@ -133,19 +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
146-
149+
config COMPANY_FRIENDLY
150+
bool "FriendlyARM Company"
151+
default y
152+
help
153+
Select FriendlyARM Company for RK3568.
154+
155+
if COMPANY_FRIENDLY
156+
menu "NanoPi Series"
157+
158+
config BOARD_NANOPI_R5S
159+
bool "NanoPi R5S Board"
160+
help
161+
Select NanoPi R5S board for RK3568.
162+
163+
endmenu
164+
endif
165+
166+
endmenu
167+
endif
147168
endif
148169

170+
149171
#
150172
# 如果选择了 QEMU,配置相应的开发板
151173
#
File renamed without changes.

repo/packages/r/rt-thread/bsp/rk3500/rkxx_idbloader.img renamed to repo/packages/r/rt-thread/bsp/rk3500/nanopi_r5s_idbloader.img

File renamed without changes.

repo/packages/r/rt-thread/bsp/rk3500/rkxx_u-boot.itb renamed to repo/packages/r/rt-thread/bsp/rk3500/nanopi_r5s_u-boot.itb

File renamed without changes.

repo/packages/r/rt-thread/bsp/rockchip_rk3500.lua renamed to repo/packages/r/rt-thread/bsp/rockchip_rk3568_friendly_nanopi_r5s.lua

File renamed without changes.

repo/packages/r/rt-thread/xmake.lua

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -44,25 +44,23 @@ do
4444
end
4545

4646
-- 获取配置项的值
47-
local function get_config_values(config_file, vendor_key, model_key, board_key,kernel_key)
47+
local function get_config_values(config_file,configkey)
4848
local content = read_config_file(config_file)
49-
local vendor_pattern = vendor_key .. "([^%s=]*)=y"
50-
local model_pattern = model_key .. "([^%s=]*)=y"
51-
local board_pattern = board_key .. "([^%s=]*)=y"
52-
local kernel_pattern = kernel_key .. "([^%s=]*)=y"
49+
local key = configkey .. "([^%s=]*)=y"
5350

54-
local vendor = content:match(vendor_pattern)
55-
local model = content:match(model_pattern)
56-
local board = content:match(board_pattern)
57-
local kernel_source = content:match(kernel_pattern)
58-
if kernel_source == "LOCAL" then
51+
local config_key = content:match(key)
52+
if config_key == "LOCAL" then
5953
local kernel_config = 'CONFIG_KERNEL_LOCAL_DIR="(.-)"'
60-
kernel_source = content:match(kernel_config)
54+
config_key = content:match(kernel_config)
6155
end
62-
return vendor, model, board, kernel_source
56+
return config_key
6357
end
6458

65-
local vendor, model, board, kernel_source= get_config_values(config_file, "CONFIG_VENDOR_", "CONFIG_CHIP_MODEL_", "CONFIG_BOARD_", "CONFIG_KERNEL_SOURCE_")
59+
local vendor = get_config_values(config_file, "CONFIG_VENDOR_", "CONFIG_CHIP_MODEL_", "CONFIG_BOARD_", "CONFIG_KERNEL_SOURCE_")
60+
local model = get_config_values(config_file, "CONFIG_CHIP_MODEL_")
61+
local board = get_config_values(config_file, "CONFIG_BOARD_")
62+
local company = get_config_values(config_file, "CONFIG_COMPANY_")
63+
local kernel_source = get_config_values(config_file, "CONFIG_KERNEL_SOURCE_")
6664

6765
-- 获取 package 的安装目录
6866
local rt_install_dir = package:installdir()
@@ -93,13 +91,15 @@ do
9391
print("RT-Thread repository already exists in package directory. Skipping clone.")
9492
end
9593

96-
if vendor or model or board then
94+
if vendor or model or board or company then
9795
local parts = {}
9896
if vendor then table.insert(parts, vendor:lower()) end
9997
if model then table.insert(parts, model:lower()) end
98+
if company then table.insert(parts, company:lower()) end
10099
if board then table.insert(parts, board:lower()) end
101100
local bsp_dir = table.concat(parts, "_")
102101
local bsp_dir = bsp_dir:lower() -- BSP小写
102+
print("bsp_dir:",bsp_dir)
103103
bsp_dir = bsp_dir .. ".build"
104104
local bsp_file = bsp_dir .. ".lua"
105105
local bsp_packages = path.join(os.scriptdir(), "bsp")

tools/scripts/tasks/sdk-image/on_run.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ local function get_other_files_from_curdir()
9191
print("Base directory: ", file_dir)
9292

9393
local files = {
94-
uboot = path.join(file_dir, "rkxx_u-boot.itb"),
95-
fdt = path.join(file_dir, "rkxx_fdt"),
96-
idbloader = path.join(file_dir, "rkxx_idbloader.img"),
94+
uboot = path.join(file_dir, "nanopi_r5s_u-boot.itb"),
95+
fdt = path.join(file_dir, "nanopi_r5s.fdt"),
96+
idbloader = path.join(file_dir, "nanopi_r5s_idbloader.img"),
9797
}
9898

9999
for name, path in pairs(files) do

0 commit comments

Comments
 (0)