[bsp/xuantie] 修复bsp的dist功能
Some checks failed
pkgs_test / change (push) Has been skipped
AutoTestCI / components/cpp11 (push) Has been cancelled
AutoTestCI / kernel/atomic (push) Has been cancelled
AutoTestCI / kernel/atomic/riscv64 (push) Has been cancelled
AutoTestCI / kernel/atomic_c11 (push) Has been cancelled
AutoTestCI / kernel/atomic_c11/riscv64 (push) Has been cancelled
AutoTestCI / kernel/device (push) Has been cancelled
AutoTestCI / kernel/ipc (push) Has been cancelled
AutoTestCI / kernel/irq (push) Has been cancelled
AutoTestCI / kernel/mem (push) Has been cancelled
AutoTestCI / kernel/mem/riscv64 (push) Has been cancelled
AutoTestCI / kernel/thread (push) Has been cancelled
AutoTestCI / kernel/timer (push) Has been cancelled
AutoTestCI / rtsmart/aarch64 (push) Has been cancelled
AutoTestCI / rtsmart/arm (push) Has been cancelled
AutoTestCI / rtsmart/riscv64 (push) Has been cancelled
AutoTestCI / components/utest (push) Has been cancelled
RT-Thread BSP Static Build Check / 🔍 Summary of Git Diff Changes (push) Has been cancelled
RT-Thread BSP Static Build Check / ${{ matrix.legs.RTT_BSP }} (push) Has been cancelled
RT-Thread BSP Static Build Check / collect-artifacts (push) Has been cancelled
utest_auto_run / AARCH64-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / A9-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / XUANTIE-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64 :default.cfg (push) Has been cancelled
utest_auto_run / A9 :default.cfg (push) Has been cancelled
utest_auto_run / A9-smp :default.cfg (push) Has been cancelled
utest_auto_run / RISCV :default.cfg (push) Has been cancelled
ToolsCI / Tools (push) Has been cancelled
doc_doxygen / doxygen_doc generate (push) Has been cancelled
doc_doxygen / deploy (push) Has been cancelled

This commit is contained in:
Yaochenger
2025-06-27 15:57:20 +08:00
committed by Rbb666
parent b2ce955126
commit d62f1e46b8
21 changed files with 126 additions and 49 deletions

View File

@@ -7,9 +7,13 @@ cwd = GetCurrentDir()
objs = []
list = os.listdir(cwd)
for d in list:
path = os.path.join(cwd, d)
if os.path.isfile(os.path.join(path, 'SConscript')):
objs = objs + SConscript(os.path.join(d, 'SConscript'))
for item in list:
path = os.path.join(cwd, item)
if item == 'libraries' or not os.path.isdir(path):
continue
sconscript_path = os.path.join(path, 'SConscript')
if os.path.isfile(sconscript_path):
objs.extend(SConscript(os.path.join(item, 'SConscript')))
Return('objs')

View File

@@ -24,6 +24,8 @@ BUILD = 'debug'
CORE = 'risc-v'
MAP_FILE = 'rtthread.map'
LINK_FILE = '../../libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_smartl.ld'
if os.path.exists('./libraries'):
LINK_FILE = './libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_smartl.ld'
TARGET_NAME = 'rtthread.bin'
#------- GCC settings ----------------------------------------------------------
@@ -85,6 +87,6 @@ if PLATFORM == 'gcc':
def dist_handle(BSP_ROOT, dist_dir):
import sys
cwd_path = os.getcwd()
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools'))
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), '../tools'))
from sdk_dist import dist_do_building
dist_do_building(BSP_ROOT, dist_dir)

View File

@@ -7,9 +7,13 @@ cwd = GetCurrentDir()
objs = []
list = os.listdir(cwd)
for d in list:
path = os.path.join(cwd, d)
if os.path.isfile(os.path.join(path, 'SConscript')):
objs = objs + SConscript(os.path.join(d, 'SConscript'))
for item in list:
path = os.path.join(cwd, item)
if item == 'libraries' or not os.path.isdir(path):
continue
sconscript_path = os.path.join(path, 'SConscript')
if os.path.isfile(sconscript_path):
objs.extend(SConscript(os.path.join(item, 'SConscript')))
Return('objs')

View File

@@ -24,6 +24,8 @@ BUILD = 'debug'
CORE = 'risc-v'
MAP_FILE = 'rtthread.map'
LINK_FILE = '../../libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_smartl.ld'
if os.path.exists('./libraries'):
LINK_FILE = './libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_smartl.ld'
TARGET_NAME = 'rtthread.bin'
#------- GCC settings ----------------------------------------------------------
@@ -85,6 +87,6 @@ if PLATFORM == 'gcc':
def dist_handle(BSP_ROOT, dist_dir):
import sys
cwd_path = os.getcwd()
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools'))
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), '../tools'))
from sdk_dist import dist_do_building
dist_do_building(BSP_ROOT, dist_dir)

View File

@@ -7,9 +7,13 @@ cwd = GetCurrentDir()
objs = []
list = os.listdir(cwd)
for d in list:
path = os.path.join(cwd, d)
if os.path.isfile(os.path.join(path, 'SConscript')):
objs = objs + SConscript(os.path.join(d, 'SConscript'))
for item in list:
path = os.path.join(cwd, item)
if item == 'libraries' or not os.path.isdir(path):
continue
sconscript_path = os.path.join(path, 'SConscript')
if os.path.isfile(sconscript_path):
objs.extend(SConscript(os.path.join(item, 'SConscript')))
Return('objs')

View File

@@ -24,6 +24,8 @@ BUILD = 'debug'
CORE = 'risc-v'
MAP_FILE = 'rtthread.map'
LINK_FILE = '../../libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_smartl.ld'
if os.path.exists('./libraries'):
LINK_FILE = './libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_smartl.ld'
TARGET_NAME = 'rtthread.bin'
#------- GCC settings ----------------------------------------------------------
@@ -85,6 +87,6 @@ if PLATFORM == 'gcc':
def dist_handle(BSP_ROOT, dist_dir):
import sys
cwd_path = os.getcwd()
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools'))
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), '../tools'))
from sdk_dist import dist_do_building
dist_do_building(BSP_ROOT, dist_dir)

View File

@@ -0,0 +1,17 @@
import os
import sys
import shutil
cwd_path = os.getcwd()
sys.path.append(os.path.join(os.path.dirname(cwd_path), 'rt-thread', 'tools'))
# BSP dist function
def dist_do_building(BSP_ROOT, dist_dir):
from mkdist import bsp_copy_files
import rtconfig
print(dist_dir)
print("=> copy XUANTIE bsp library")
library_dir = os.path.join(dist_dir, './libraries')
library_path = os.path.join(os.path.dirname(BSP_ROOT), '../libraries')
bsp_copy_files(library_path, library_dir)

View File

@@ -7,9 +7,13 @@ cwd = GetCurrentDir()
objs = []
list = os.listdir(cwd)
for d in list:
path = os.path.join(cwd, d)
if os.path.isfile(os.path.join(path, 'SConscript')):
objs = objs + SConscript(os.path.join(d, 'SConscript'))
for item in list:
path = os.path.join(cwd, item)
if item == 'libraries' or not os.path.isdir(path):
continue
sconscript_path = os.path.join(path, 'SConscript')
if os.path.isfile(sconscript_path):
objs.extend(SConscript(os.path.join(item, 'SConscript')))
Return('objs')

View File

@@ -24,6 +24,8 @@ BUILD = 'debug'
CORE = 'risc-v'
MAP_FILE = 'rtthread.map'
LINK_FILE = '../../libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_xiaohui.ld'
if os.path.exists('./libraries'):
LINK_FILE = './libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_xiaohui.ld'
TARGET_NAME = 'rtthread.bin'
#------- GCC settings ----------------------------------------------------------
@@ -92,6 +94,6 @@ if PLATFORM == 'gcc':
def dist_handle(BSP_ROOT, dist_dir):
import sys
cwd_path = os.getcwd()
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools'))
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), '../tools'))
from sdk_dist import dist_do_building
dist_do_building(BSP_ROOT, dist_dir)

View File

@@ -7,9 +7,13 @@ cwd = GetCurrentDir()
objs = []
list = os.listdir(cwd)
for d in list:
path = os.path.join(cwd, d)
if os.path.isfile(os.path.join(path, 'SConscript')):
objs = objs + SConscript(os.path.join(d, 'SConscript'))
for item in list:
path = os.path.join(cwd, item)
if item == 'libraries' or not os.path.isdir(path):
continue
sconscript_path = os.path.join(path, 'SConscript')
if os.path.isfile(sconscript_path):
objs.extend(SConscript(os.path.join(item, 'SConscript')))
Return('objs')

View File

@@ -24,6 +24,8 @@ BUILD = 'debug'
CORE = 'risc-v'
MAP_FILE = 'rtthread.map'
LINK_FILE = '../../libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_xiaohui.ld'
if os.path.exists('./libraries'):
LINK_FILE = './libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_xiaohui.ld'
TARGET_NAME = 'rtthread.bin'
#------- GCC settings ----------------------------------------------------------
@@ -92,6 +94,6 @@ if PLATFORM == 'gcc':
def dist_handle(BSP_ROOT, dist_dir):
import sys
cwd_path = os.getcwd()
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools'))
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), '../tools'))
from sdk_dist import dist_do_building
dist_do_building(BSP_ROOT, dist_dir)

View File

@@ -7,9 +7,13 @@ cwd = GetCurrentDir()
objs = []
list = os.listdir(cwd)
for d in list:
path = os.path.join(cwd, d)
if os.path.isfile(os.path.join(path, 'SConscript')):
objs = objs + SConscript(os.path.join(d, 'SConscript'))
for item in list:
path = os.path.join(cwd, item)
if item == 'libraries' or not os.path.isdir(path):
continue
sconscript_path = os.path.join(path, 'SConscript')
if os.path.isfile(sconscript_path):
objs.extend(SConscript(os.path.join(item, 'SConscript')))
Return('objs')

View File

@@ -24,6 +24,8 @@ BUILD = 'debug'
CORE = 'risc-v'
MAP_FILE = 'rtthread.map'
LINK_FILE = '../../libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_xiaohui.ld'
if os.path.exists('./libraries'):
LINK_FILE = './libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_xiaohui.ld'
TARGET_NAME = 'rtthread.bin'
#------- GCC settings ----------------------------------------------------------
@@ -93,6 +95,6 @@ if PLATFORM == 'gcc':
def dist_handle(BSP_ROOT, dist_dir):
import sys
cwd_path = os.getcwd()
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools'))
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), '../tools'))
from sdk_dist import dist_do_building
dist_do_building(BSP_ROOT, dist_dir)

View File

@@ -7,9 +7,13 @@ cwd = GetCurrentDir()
objs = []
list = os.listdir(cwd)
for d in list:
path = os.path.join(cwd, d)
if os.path.isfile(os.path.join(path, 'SConscript')):
objs = objs + SConscript(os.path.join(d, 'SConscript'))
for item in list:
path = os.path.join(cwd, item)
if item == 'libraries' or not os.path.isdir(path):
continue
sconscript_path = os.path.join(path, 'SConscript')
if os.path.isfile(sconscript_path):
objs.extend(SConscript(os.path.join(item, 'SConscript')))
Return('objs')

View File

@@ -24,6 +24,8 @@ BUILD = 'debug'
CORE = 'risc-v'
MAP_FILE = 'rtthread.map'
LINK_FILE = '../../libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_xiaohui.ld'
if os.path.exists('./libraries'):
LINK_FILE = './libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_xiaohui.ld'
TARGET_NAME = 'rtthread.bin'
#------- GCC settings ----------------------------------------------------------
@@ -92,6 +94,6 @@ if PLATFORM == 'gcc':
def dist_handle(BSP_ROOT, dist_dir):
import sys
cwd_path = os.getcwd()
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools'))
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), '../tools'))
from sdk_dist import dist_do_building
dist_do_building(BSP_ROOT, dist_dir)

View File

@@ -7,9 +7,13 @@ cwd = GetCurrentDir()
objs = []
list = os.listdir(cwd)
for d in list:
path = os.path.join(cwd, d)
if os.path.isfile(os.path.join(path, 'SConscript')):
objs = objs + SConscript(os.path.join(d, 'SConscript'))
for item in list:
path = os.path.join(cwd, item)
if item == 'libraries' or not os.path.isdir(path):
continue
sconscript_path = os.path.join(path, 'SConscript')
if os.path.isfile(sconscript_path):
objs.extend(SConscript(os.path.join(item, 'SConscript')))
Return('objs')

View File

@@ -24,6 +24,8 @@ BUILD = 'debug'
CORE = 'risc-v'
MAP_FILE = 'rtthread.map'
LINK_FILE = '../../libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_xiaohui.ld'
if os.path.exists('./libraries'):
LINK_FILE = './libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_xiaohui.ld'
TARGET_NAME = 'rtthread.bin'
#------- GCC settings ----------------------------------------------------------
@@ -92,6 +94,6 @@ if PLATFORM == 'gcc':
def dist_handle(BSP_ROOT, dist_dir):
import sys
cwd_path = os.getcwd()
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools'))
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), '../tools'))
from sdk_dist import dist_do_building
dist_do_building(BSP_ROOT, dist_dir)

View File

@@ -7,9 +7,13 @@ cwd = GetCurrentDir()
objs = []
list = os.listdir(cwd)
for d in list:
path = os.path.join(cwd, d)
if os.path.isfile(os.path.join(path, 'SConscript')):
objs = objs + SConscript(os.path.join(d, 'SConscript'))
for item in list:
path = os.path.join(cwd, item)
if item == 'libraries' or not os.path.isdir(path):
continue
sconscript_path = os.path.join(path, 'SConscript')
if os.path.isfile(sconscript_path):
objs.extend(SConscript(os.path.join(item, 'SConscript')))
Return('objs')

View File

@@ -24,6 +24,8 @@ BUILD = 'debug'
CORE = 'risc-v'
MAP_FILE = 'rtthread.map'
LINK_FILE = '../../libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_xiaohui.ld'
if os.path.exists('./libraries'):
LINK_FILE = './libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_xiaohui.ld'
TARGET_NAME = 'rtthread.bin'
#------- GCC settings ----------------------------------------------------------

View File

@@ -7,9 +7,13 @@ cwd = GetCurrentDir()
objs = []
list = os.listdir(cwd)
for d in list:
path = os.path.join(cwd, d)
if os.path.isfile(os.path.join(path, 'SConscript')):
objs = objs + SConscript(os.path.join(d, 'SConscript'))
for item in list:
path = os.path.join(cwd, item)
if item == 'libraries' or not os.path.isdir(path):
continue
sconscript_path = os.path.join(path, 'SConscript')
if os.path.isfile(sconscript_path):
objs.extend(SConscript(os.path.join(item, 'SConscript')))
Return('objs')

View File

@@ -24,6 +24,8 @@ BUILD = 'debug'
CORE = 'risc-v'
MAP_FILE = 'rtthread.map'
LINK_FILE = '../../libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_xiaohui.ld'
if os.path.exists('./libraries'):
LINK_FILE = './libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_xiaohui.ld'
TARGET_NAME = 'rtthread.bin'
#------- GCC settings ----------------------------------------------------------
@@ -92,6 +94,6 @@ if PLATFORM == 'gcc':
def dist_handle(BSP_ROOT, dist_dir):
import sys
cwd_path = os.getcwd()
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools'))
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), '../tools'))
from sdk_dist import dist_do_building
dist_do_building(BSP_ROOT, dist_dir)