fix: without KConfig in rsource and without command help.
ToolsCI / Tools (push) Waiting to run
AutoTestCI / components/cpp11 (push) Waiting to run
AutoTestCI / kernel/atomic (push) Waiting to run
AutoTestCI / kernel/atomic/riscv64 (push) Waiting to run
AutoTestCI / kernel/atomic_c11 (push) Waiting to run
AutoTestCI / kernel/atomic_c11/riscv64 (push) Waiting to run
AutoTestCI / kernel/device (push) Waiting to run
AutoTestCI / kernel/ipc (push) Waiting to run
AutoTestCI / kernel/irq (push) Waiting to run
AutoTestCI / kernel/mem (push) Waiting to run
AutoTestCI / kernel/mem/riscv64 (push) Waiting to run
AutoTestCI / kernel/thread (push) Waiting to run
AutoTestCI / kernel/timer (push) Waiting to run
AutoTestCI / rtsmart/aarch64 (push) Waiting to run
AutoTestCI / rtsmart/arm (push) Waiting to run
AutoTestCI / rtsmart/riscv64 (push) Waiting to run
AutoTestCI / components/utest (push) Waiting to run
RT-Thread BSP Static Build Check / ESP32C3 (push) Waiting to run
RT-Thread BSP Static Build Check / Infineon_TI_microchip (push) Waiting to run
RT-Thread BSP Static Build Check / RT-Thread Online Packages (STM32F407 RT-Spark) (push) Waiting to run
RT-Thread BSP Static Build Check / RTduino/Arduino Libraries (Raspberry Pico) (push) Waiting to run
RT-Thread BSP Static Build Check / RTduino/Arduino Libraries (STM32F412 Nucleo) (push) Waiting to run
RT-Thread BSP Static Build Check / aarch64 (push) Waiting to run
RT-Thread BSP Static Build Check / gd32_n32_apm32 (push) Waiting to run
RT-Thread BSP Static Build Check / hpmicro (push) Waiting to run
RT-Thread BSP Static Build Check / i386-unknown (push) Waiting to run
RT-Thread BSP Static Build Check / llvm-arm (push) Waiting to run
RT-Thread BSP Static Build Check / mips (push) Waiting to run
RT-Thread BSP Static Build Check / nordic(yml) (push) Waiting to run
RT-Thread BSP Static Build Check / nuvoton (push) Waiting to run
RT-Thread BSP Static Build Check / nxp_renesas (push) Waiting to run
RT-Thread BSP Static Build Check / others_at32_hc32_ht32 (push) Waiting to run
RT-Thread BSP Static Build Check / riscv-none (push) Waiting to run
RT-Thread BSP Static Build Check / riscv64-unknown (push) Waiting to run
RT-Thread BSP Static Build Check / simulator (push) Waiting to run
RT-Thread BSP Static Build Check / stm32_f2_f4 (push) Waiting to run
RT-Thread BSP Static Build Check / stm32_f7_g0_h7_mp15_u5_h5_wb5 (push) Waiting to run
RT-Thread BSP Static Build Check / stm32l4_f0_f1 (push) Waiting to run
BSP compilation with more drivers / BSP Compilation with More Drivers (push) Waiting to run
pkgs_test / change (push) Has been skipped

This commit is contained in:
ZhaoCake
2025-01-09 09:48:47 +08:00
committed by Rbb666
parent 71b6d42181
commit f8171f5c0b
+39
View File
@@ -423,10 +423,34 @@ def copy_essential_paths(RTT_ROOT, rtt_dir_path, copied_files=None):
return copied_files
def copy_components_kconfig(RTT_ROOT, rtt_dir_path):
"""Copy all Kconfig files under components directory"""
components_dir = os.path.join(RTT_ROOT, 'components')
print('=> copying components Kconfig files')
# Walk through all directories under components
for root, dirs, files in os.walk(components_dir):
if 'Kconfig' in files:
# Get relative path from components directory
rel_path = os.path.relpath(root, RTT_ROOT)
src_file = os.path.join(root, 'Kconfig')
dst_file = os.path.join(rtt_dir_path, rel_path, 'Kconfig')
# Create destination directory if not exists
dst_dir = os.path.dirname(dst_file)
if not os.path.exists(dst_dir):
os.makedirs(dst_dir)
do_copy_file(src_file, dst_file)
print(f' => copying Kconfig from {rel_path}')
def components_copy_files(RTT_ROOT, rtt_dir_path, config_file):
"""Copy components based on configuration"""
print('=> components (selective copy)')
# Copy all Kconfig files first
copy_components_kconfig(RTT_ROOT, rtt_dir_path)
# Track copied build files to avoid duplication
copied_files = set()
@@ -530,4 +554,19 @@ def MkDist(program, BSP_ROOT, RTT_ROOT, Env, project_name, project_path):
# Generate documentation
generate_dist_doc(dist_dir, enabled_components, project_name+'-dist', BSP_ROOT, RTT_ROOT)
target_project_type = GetOption('target')
if target_project_type:
child = subprocess.Popen('scons --target={} --project-name="{}"'.format(target_project_type, project_name), cwd=dist_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
stdout, stderr = child.communicate()
if child.returncode == 0:
print(stdout)
else:
print(stderr)
else:
print('suggest to use command scons --dist [--target=xxx] [--project-name="xxx"] [--project-path="xxx"]')
# make zip package
if project_path == None:
zip_dist(dist_dir, project_name)
print('dist project successfully!')