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 default y
config PKGS_DIR config PKGS_DIR
string default "tools/env/packages"
option env="PKGS_ROOT" help
default "packages" packages directory for RT-Thread online packages
if ! AIC_BOOTLOADER if ! AIC_BOOTLOADER
source "application/Kconfig" source "application/Kconfig"
endif endif
#source "kernel/$PRJ_KERNEL/Kconfig"
#source "$PKGS_DIR/Kconfig"
source ".Kconfig.prj" source ".Kconfig.prj"
source "packages/Kconfig" source "packages/Kconfig"
source "bsp/Kconfig" source "bsp/Kconfig"

View File

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

View File

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

View File

@@ -74,7 +74,7 @@ if PKG_USING_KAWAII_MQTT
default n default n
config SALOF_LOG_LEVEL config SALOF_LOG_LEVEL
int "salof output log level " int "salof output log level"
default KAWAII_MQTT_LOG_LEVEL default KAWAII_MQTT_LOG_LEVEL
endif endif
endif endif

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -15,7 +15,7 @@ if PKG_USING_CW2015
default "i2c1" default "i2c1"
config CW2015_USE_AUTO_UPDATE config CW2015_USE_AUTO_UPDATE
bool "Enable CW2015 AUTO UPDATE BAT INFO " bool "Enable CW2015 AUTO UPDATE BAT INFO"
default n default n
help help
"It will create a thread to update the battery info." "It will create a thread to update the battery info."

View File

@@ -22,7 +22,7 @@ if PKG_USING_INFRARED
endmenu endmenu
config PKG_USING_DRV_INFRARED config PKG_USING_DRV_INFRARED
bool "Use the infrared driver provided by the software package " bool "Use the infrared driver provided by the software package"
default y default y
if PKG_USING_DRV_INFRARED if PKG_USING_DRV_INFRARED
config INFRARED_SEND config INFRARED_SEND

View File

@@ -26,13 +26,13 @@ if PKG_USING_LORA_GW_DRIVER_LIB
config LORA_GW_DRIVER_SPI_BUS_NAME 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)" 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 help
Setup LoRa Gw Driver Spi Bus Name,eg:spi2,Please define BSP_USING_SPIx in the [Target Platform]\\Board\\Kconfig 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 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)" 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 config LORA_GW_DRIVER_USING_SERVICES
bool "Select lora-gw-driver Services" bool "Select lora-gw-driver Services"

View File

@@ -12,7 +12,7 @@ if PKG_USING_LORA_MODEM_DRIVER
config LORA_MODEM_UART_DEVICE config LORA_MODEM_UART_DEVICE
string "Setup LoRa Modem Uart Device Name (eg:uart1,Define BSP_USING_UARTx in [Target Platform]\\Board\\Kconfig)" string "Setup LoRa Modem Uart Device Name (eg:uart1,Define BSP_USING_UARTx in [Target Platform]\\Board\\Kconfig)"
default uart1 default "uart1"
help help
Setup LoRa LoRa Modem Uart Device Name,eg:uart1,Please define BSP_USING_UARTx in the [Target Platform]\\Board\\Kconfig 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 config LORA_RADIO0_DEVICE_NAME
string "Setup LoRa Radio Device Name" string "Setup LoRa Radio Device Name"
default lora-radio0 default "lora-radio0"
config LORA_RADIO0_SPI_BUS_NAME config LORA_RADIO0_SPI_BUS_NAME
string "Setup LoRa Radio Spi Name (eg:spi2,Define BSP_USING_SPIx in [Target Platform]\\Board\\Kconfig)" string "Setup LoRa Radio Spi Name (eg:spi2,Define BSP_USING_SPIx in [Target Platform]\\Board\\Kconfig)"
default spi2 default "spi2"
help help
Setup LoRa Radio Spi Device Name,eg:spi2,Please define BSP_USING_SPIx in the [Target Platform]\\Board\\Kconfig Setup LoRa Radio Spi Device Name,eg:spi2,Please define BSP_USING_SPIx in the [Target Platform]\\Board\\Kconfig

View File

@@ -17,7 +17,7 @@ if PKG_USING_MULTI_INFRARED
endmenu endmenu
config PKG_USING_DRV_MULTI_INFRARED config PKG_USING_DRV_MULTI_INFRARED
bool "Use the multi infrared driver provided by the software package " bool "Use the multi infrared driver provided by the software package"
default y default y
if PKG_USING_DRV_MULTI_INFRARED if PKG_USING_DRV_MULTI_INFRARED
config MULTI_INFRARED_RECEIVE config MULTI_INFRARED_RECEIVE

View File

@@ -11,7 +11,7 @@ if PKG_USING_VDEVICE
default "/packages/peripherals/vdevice" default "/packages/peripherals/vdevice"
config VDEVICE_USING_PIN config VDEVICE_USING_PIN
bool "Use virtualized pin " bool "Use virtualized pin"
select RT_USING_PIN select RT_USING_PIN
default n default n
@@ -22,7 +22,7 @@ if PKG_USING_VDEVICE
endif endif
config VDEVICE_USING_LCD config VDEVICE_USING_LCD
bool "Use virtualized lcd " bool "Use virtualized lcd"
default n default n
if VDEVICE_USING_LCD if VDEVICE_USING_LCD
@@ -32,7 +32,7 @@ if PKG_USING_VDEVICE
endif endif
config VDEVICE_USING_TOUCH config VDEVICE_USING_TOUCH
bool "Use virtualized touch " bool "Use virtualized touch"
select RT_USING_TOUCH select RT_USING_TOUCH
default n default n

View File

@@ -2,7 +2,6 @@
# Kconfig file for package tlsf # Kconfig file for package tlsf
menuconfig PKG_USING_TLSF menuconfig PKG_USING_TLSF
bool "TLSF: A dynamic memory allocation algorithm with predictable execution time and low fragmentation." bool "TLSF: A dynamic memory allocation algorithm with predictable execution time and low fragmentation."
select RT_USING_USERHEAP
default n default n
if PKG_USING_TLSF 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 "kernel/{}/Kconfig"\n'.format(prj_kernel))
f.write('source "application/{}/{}/Kconfig"\n'.format(prj_kernel, prj_app)) 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): 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. # Should generate .Kconfig.prj before apply defconfig, because project depends on this file.
mk_kconfig_prj(aic_root, src) mk_kconfig_prj(aic_root, src)
os.environ['PKGS_ROOT'] = os.path.join(aic_root, 'packages') update_project_env(aic_root)
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', 'defconfig.py') pydefconfig = os.path.join(aic_root, 'kernel', 'rt-thread', 'tools', 'defconfig.py')
defconf_cmd = 'python3 {} {}'.format(pydefconfig, src) defconf_cmd = 'python3 {} {}'.format(pydefconfig, src)
os.system(defconf_cmd) os.system(defconf_cmd)
@@ -205,23 +211,16 @@ def save_defconfig(aic_root):
defconfig = get_prj_defconfig(aic_root) defconfig = get_prj_defconfig(aic_root)
if defconfig: if defconfig:
dst = os.path.join(aic_root, 'target', 'configs', defconfig) dst = os.path.join(aic_root, 'target', 'configs', defconfig)
os.environ['PKGS_ROOT'] = os.path.join(aic_root, 'packages') update_project_env(aic_root)
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', 'savedefconfig.py') pydefconfig = os.path.join(aic_root, 'kernel', 'rt-thread', 'tools', 'savedefconfig.py')
defconf_cmd = 'python3 {} --out {}'.format(pydefconfig, dst) defconf_cmd = 'python3 {} --out {}'.format(pydefconfig, dst)
os.system(defconf_cmd) os.system(defconf_cmd)
def update_defconfig(aic_root): def update_defconfig(aic_root):
os.environ['PKGS_ROOT'] = os.path.join(aic_root, 'packages') defconfig = get_prj_defconfig(aic_root)
os.environ['PKGS_DIR'] = os.path.join(aic_root, 'packages') if defconfig:
os.environ['RTT_ROOT'] = os.path.join(aic_root, 'kernel/rt-thread/') apply_defconfig(aic_root, defconfig)
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)
# cmd-option: list defconfig without bootloader # cmd-option: list defconfig without bootloader