2023-08-30 16:21:18 +08:00
|
|
|
# RT-Thread building script for component
|
|
|
|
|
|
|
|
|
|
from building import *
|
|
|
|
|
|
|
|
|
|
Import('rtconfig')
|
|
|
|
|
|
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
|
src = Glob('run.c')
|
|
|
|
|
src += Glob('reset.c')
|
|
|
|
|
src += Glob('aicupg.c')
|
|
|
|
|
src += Glob('ram_boot.c')
|
|
|
|
|
if GetDepend('AIC_BOOTLOADER_CMD_PROGRESS_BAR'):
|
|
|
|
|
src += Glob('progress_bar.c')
|
|
|
|
|
if GetDepend('AIC_BOOTLOADER_CMD_MEM'):
|
|
|
|
|
src += Glob('mem.c')
|
2023-11-09 20:19:51 +08:00
|
|
|
if GetDepend('AIC_BOOTLOADER_CMD_NOR_BOOT') and GetDepend('LPKG_USING_FDTLIB'):
|
2023-08-30 16:21:18 +08:00
|
|
|
src += Glob('nor_boot.c')
|
2023-11-09 20:19:51 +08:00
|
|
|
if GetDepend('AIC_BOOTLOADER_CMD_NOR_BOOT') and not GetDepend('LPKG_USING_FDTLIB'):
|
|
|
|
|
src += Glob('nor_boot_no_fitimage.c')
|
2023-08-30 16:21:18 +08:00
|
|
|
if GetDepend('AIC_BOOTLOADER_CMD_NAND_BOOT'):
|
|
|
|
|
src += Glob('nand_boot.c')
|
2023-12-12 14:23:53 +08:00
|
|
|
if GetDepend('AIC_BOOTLOADER_CMD_MMC_BOOT') and GetDepend('LPKG_USING_FDTLIB'):
|
2023-08-30 16:21:18 +08:00
|
|
|
src += Glob('mmc_boot.c')
|
2023-12-12 14:23:53 +08:00
|
|
|
if GetDepend('AIC_BOOTLOADER_CMD_MMC_BOOT') and not GetDepend('LPKG_USING_FDTLIB'):
|
|
|
|
|
src += Glob('mmc_boot_no_fitimage.c')
|
2023-08-30 16:21:18 +08:00
|
|
|
if GetDepend('AIC_BOOTLOADER_CMD_PSRAM_TEST'):
|
|
|
|
|
src += Glob('psram_test.c')
|
|
|
|
|
if GetDepend('AIC_BOOTLOADER_CMD_XIP_BOOT'):
|
|
|
|
|
src += Glob('xip_boot.c')
|
|
|
|
|
|
|
|
|
|
CPPPATH = [cwd]
|
|
|
|
|
ASFLAGS = ''
|
|
|
|
|
|
|
|
|
|
group = DefineGroup('BLCMD', src, depend = [''], CPPPATH = CPPPATH, ASFLAGS = ASFLAGS)
|
|
|
|
|
|
|
|
|
|
Return('group')
|