Kconfig: recover rt-thread online packages

This commit is contained in:
刘可亮
2025-05-15 14:04:44 +08:00
parent 27e6245025
commit 1bb0127d31
21 changed files with 61 additions and 64 deletions

View File

@@ -31,15 +31,14 @@ config PLATFORM_LUBANLITE
default y
config PKGS_DIR
string
option env="PKGS_ROOT"
default "packages"
default "tools/env/packages"
help
packages directory for RT-Thread online packages
if ! AIC_BOOTLOADER
source "application/Kconfig"
endif
#source "kernel/$PRJ_KERNEL/Kconfig"
#source "$PKGS_DIR/Kconfig"
source ".Kconfig.prj"
source "packages/Kconfig"
source "bsp/Kconfig"

View File

@@ -13,7 +13,7 @@ if PKG_USING_ABUP_FOTA
choice
prompt "Enable HTTP/CoAP FOTA"
default ABUP_NETWORKING_MODE
default ABUP_NETWORKING_MODE_HTTP
help
Select the package Networking mode
@@ -38,7 +38,7 @@ endif
choice
prompt "Recover algorithm"
default ABUP_ALGORITHM
default ABUP_ALGORITHM_LUSUN
help
Select the package algorithm

View File

@@ -16,19 +16,19 @@ if PKG_USING_ALI_IOTKIT
config PKG_USING_ALI_IOTKIT_PRODUCT_KEY
string "Config Product Key"
default a1dSQSGZ77X
default "a1dSQSGZ77X"
config PKG_USING_ALI_IOTKIT_PRODUCT_SECRET
string "Config Product Secret"
default NfIdVcfBP7rtH24H
default "NfIdVcfBP7rtH24H"
config PKG_USING_ALI_IOTKIT_DEVICE_NAME
string "Config Device Name"
default RGB-LED-DEV-1
default "RGB-LED-DEV-1"
config PKG_USING_ALI_IOTKIT_DEVICE_SECRET
string "Config Device Secret"
default Ghuiyd9nmGowdZzjPqFtxhm3WUHEbIlI
default "Ghuiyd9nmGowdZzjPqFtxhm3WUHEbIlI"
if (PKG_ALI_IOTKIT_VER_NUM >= 0x30000)
config PKG_ALI_IOTKIT_SELECT_ITEM

View File

@@ -19,7 +19,7 @@ if PKG_USING_TENCENT_IOT_EXPLORER
config PKG_USING_TENCENT_IOT_EXPLORER_DEVICE_NAME
string "Config Device Name"
default dev001
default "dev001"
config PKG_USING_TENCENT_IOT_EXPLORER_DEVICE_SECRET
string "Config Device Secret"

View File

@@ -26,31 +26,31 @@ if PKG_USING_LORAWAN_DRIVER
choice
prompt "Work Mode"
default ClassA
default LORAWAN_DRIVER_ClassA
help
Select the Work Mode
config LORAWAN_DRIVER_ClassA
bool ClassA
bool "ClassA"
config LORAWAN_DRIVER_ClassC
bool ClassC
bool "ClassC"
endchoice
choice
prompt "Join Mode"
default ABP
default LORAWAN_DRIVER_ABP
help
Select the Join Mode
config LORAWAN_DRIVER_OTAA
bool OTAA
bool "OTAA"
config LORAWAN_DRIVER_ABP
bool ABP
bool "ABP"
endchoice
choice
prompt "Select the RF frequency"
default REGION_CN470
default LORAWAN_DRIVER_REGION_CN470
help
Select the RF frequency

View File

@@ -239,40 +239,40 @@ if PKG_USING_LORAWAN_ED_STACK
if REGION_CN470
config LORAWAN_ED_STACK_PHY_PARAMETER_CHANNEL_MASK0
string "Channel Mask0"
default 00FF
default "00FF"
config LORAWAN_ED_STACK_PHY_PARAMETER_CHANNEL_MASK1
string "Channel Mask1"
default 0000
default "0000"
config LORAWAN_ED_STACK_PHY_PARAMETER_CHANNEL_MASK2
string "Channel Mask2"
default 0000
default "0000"
config LORAWAN_ED_STACK_PHY_PARAMETER_CHANNEL_MASK3
string "Channel Mask3"
default 0000
default "0000"
config LORAWAN_ED_STACK_PHY_PARAMETER_CHANNEL_MASK4
string "Channel Mask4"
default 0000
default "0000"
config LORAWAN_ED_STACK_PHY_PARAMETER_CHANNEL_MASK5
string "Channel Mask5"
default 0000
default "0000"
endif
if REGION_CN470S
config LORAWAN_ED_STACK_PHY_PARAMETER_CHANNEL_MASK0
string "Channel Mask0"
default 00FF
default "00FF"
endif
if REGION_EU868
config LORAWAN_ED_STACK_PHY_PARAMETER_CHANNEL_MASK0
string "Channel Mask0"
default 00FF
default "00FF"
endif
if REGION_AS923
config LORAWAN_ED_STACK_PHY_PARAMETER_CHANNEL_MASK0
string "Channel Mask0"
default 00FF
default "00FF"
endif
endmenu

View File

@@ -7,7 +7,7 @@ if PKG_USING_RT_LINK_HW
choice
prompt"Select the underlying transport"
default RT_LINK_USING_UART
default PKG_RT_LINK_USING_UART
config PKG_RT_LINK_USING_UART
bool "use UART"

View File

@@ -57,15 +57,15 @@ if PKG_USING_WIZNET
config WIZ_IPADDR
string "IPv4: IP address"
default 192.168.1.10
default "192.168.1.10"
config WIZ_GWADDR
string "IPv4: Gateway address"
default 192.168.1.1
default "192.168.1.1"
config WIZ_MSKADDR
string "IPv4: Mask address"
default 255.255.255.0
default "255.255.255.0"
endmenu

View File

@@ -29,10 +29,10 @@ choice
prompt "RGB888 pixel bits"
config PKG_USING_RGB888_PIXEL_BITS_32
bool 32
bool "32"
config PKG_USING_RGB888_PIXEL_BITS_24
bool 24
bool "24"
endchoice
config PKG_USING_RGB888_PIXEL_BITS

View File

@@ -15,7 +15,7 @@ if PKG_USING_MP3PLAYER
config MP3_SOUND_DEVICE_NAME
string "The play device name"
default sound0
default "sound0"
config MP3_INPUT_BUFFER_SIZE
int "mp3 input buffer size"
default 2048

View File

@@ -16,7 +16,7 @@ if PKG_USING_MISAKA_AT24CXX
choice
prompt "Version"
default PKG_USING_MISAKA_AT24CXX_LATEST_VERSION
default PKG_USING_MISAKA_AT24CXX_V100
help
Select the package version

View File

@@ -26,13 +26,13 @@ if PKG_USING_LORA_GW_DRIVER_LIB
config LORA_GW_DRIVER_SPI_BUS_NAME
string "Setup LoRa Gw Driver Spi Bus Name (eg:spi1,spi2..,Define BSP_USING_SPIx in [Target Platform]\\Board\\Kconfig)"
default spi2
default "spi2"
help
Setup LoRa Gw Driver Spi Bus Name,eg:spi2,Please define BSP_USING_SPIx in the [Target Platform]\\Board\\Kconfig
config LORA_GW_DRIVER_I2C_DEVICE_NAME
string "Setup LoRa Gw Driver I2C Device Name for Temperture(eg:i2c1,i2c2..,Define BSP_USING_IICx in [Target Platform]\\Board\\Kconfig)"
default i2c3
default "i2c3"
config LORA_GW_DRIVER_USING_SERVICES
bool "Select lora-gw-driver Services"

View File

@@ -12,7 +12,7 @@ if PKG_USING_LORA_MODEM_DRIVER
config LORA_MODEM_UART_DEVICE
string "Setup LoRa Modem Uart Device Name (eg:uart1,Define BSP_USING_UARTx in [Target Platform]\\Board\\Kconfig)"
default uart1
default "uart1"
help
Setup LoRa LoRa Modem Uart Device Name,eg:uart1,Please define BSP_USING_UARTx in the [Target Platform]\\Board\\Kconfig

View File

@@ -32,11 +32,11 @@ if PKG_USING_LORA_RADIO_DRIVER
config LORA_RADIO0_DEVICE_NAME
string "Setup LoRa Radio Device Name"
default lora-radio0
default "lora-radio0"
config LORA_RADIO0_SPI_BUS_NAME
string "Setup LoRa Radio Spi Name (eg:spi2,Define BSP_USING_SPIx in [Target Platform]\\Board\\Kconfig)"
default spi2
default "spi2"
help
Setup LoRa Radio Spi Device Name,eg:spi2,Please define BSP_USING_SPIx in the [Target Platform]\\Board\\Kconfig

View File

@@ -2,7 +2,6 @@
# Kconfig file for package tlsf
menuconfig PKG_USING_TLSF
bool "TLSF: A dynamic memory allocation algorithm with predictable execution time and low fragmentation."
select RT_USING_USERHEAP
default n
if PKG_USING_TLSF

View File

@@ -168,6 +168,15 @@ def mk_kconfig_prj(aic_root, filename):
f.write('source "kernel/{}/Kconfig"\n'.format(prj_kernel))
f.write('source "application/{}/{}/Kconfig"\n'.format(prj_kernel, prj_app))
if prj_kernel == 'rt-thread':
f.write('source "tools/env/packages/packages/Kconfig"\n')
def update_project_env(aic_root):
os.environ['PKGS_ROOT'] = os.path.join(aic_root, 'tools', 'env', 'packages')
os.environ['PKGS_DIR'] = os.path.join(aic_root, 'tools', 'env', 'packages')
os.environ['RTT_ROOT'] = os.path.join(aic_root, 'kernel', 'rt-thread/')
os.environ['RTT_DIR'] = os.path.join(aic_root, 'kernel', 'rt-thread/')
def apply_defconfig(aic_root, defconfig):
@@ -186,10 +195,7 @@ def apply_defconfig(aic_root, defconfig):
# Should generate .Kconfig.prj before apply defconfig, because project depends on this file.
mk_kconfig_prj(aic_root, src)
os.environ['PKGS_ROOT'] = os.path.join(aic_root, 'packages')
os.environ['PKGS_DIR'] = os.path.join(aic_root, 'packages')
os.environ['RTT_ROOT'] = os.path.join(aic_root, 'kernel/rt-thread/')
os.environ['RTT_DIR'] = os.path.join(aic_root, 'kernel/rt-thread/')
update_project_env(aic_root)
pydefconfig = os.path.join(aic_root, 'kernel', 'rt-thread', 'tools', 'defconfig.py')
defconf_cmd = 'python3 {} {}'.format(pydefconfig, src)
os.system(defconf_cmd)
@@ -205,23 +211,16 @@ def save_defconfig(aic_root):
defconfig = get_prj_defconfig(aic_root)
if defconfig:
dst = os.path.join(aic_root, 'target', 'configs', defconfig)
os.environ['PKGS_ROOT'] = os.path.join(aic_root, 'packages')
os.environ['PKGS_DIR'] = os.path.join(aic_root, 'packages')
os.environ['RTT_ROOT'] = os.path.join(aic_root, 'kernel/rt-thread/')
os.environ['RTT_DIR'] = os.path.join(aic_root, 'kernel/rt-thread/')
update_project_env(aic_root)
pydefconfig = os.path.join(aic_root, 'kernel', 'rt-thread', 'tools', 'savedefconfig.py')
defconf_cmd = 'python3 {} --out {}'.format(pydefconfig, dst)
os.system(defconf_cmd)
def update_defconfig(aic_root):
os.environ['PKGS_ROOT'] = os.path.join(aic_root, 'packages')
os.environ['PKGS_DIR'] = os.path.join(aic_root, 'packages')
os.environ['RTT_ROOT'] = os.path.join(aic_root, 'kernel/rt-thread/')
os.environ['RTT_DIR'] = os.path.join(aic_root, 'kernel/rt-thread/')
pydefconfig = os.path.join(aic_root, 'kernel', 'rt-thread', 'tools', 'olddefconfig.py')
defconf_cmd = 'python3 {}'.format(pydefconfig)
os.system(defconf_cmd)
defconfig = get_prj_defconfig(aic_root)
if defconfig:
apply_defconfig(aic_root, defconfig)
# cmd-option: list defconfig without bootloader