kernel: boot args kconfig cleanup

Cleanup kconfig of bootargs and put everything in one menuconfig.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif
2025-07-17 18:14:29 -04:00
committed by Chris Friedt
parent c9269b9b85
commit 7aa3269a3f
2 changed files with 10 additions and 9 deletions

View File

@@ -1109,20 +1109,20 @@ config STATIC_INIT_GNU
will emit an error if constructors are needed and this option has been
disabled.
config BOOTARGS
menuconfig BOOTARGS
bool "Support bootargs"
help
Enables bootargs support and passing them to main().
if BOOTARGS
config DYNAMIC_BOOTARGS
bool "Support dynamic bootargs"
depends on BOOTARGS
help
Enables dynamic bootargs support.
config BOOTARGS_STRING
string "static bootargs string"
depends on BOOTARGS && !DYNAMIC_BOOTARGS
depends on !DYNAMIC_BOOTARGS
help
Static bootargs string. It includes argv[0], so if its expected that it
contains executable name it should be put at the beginning of this string.
@@ -1130,10 +1130,11 @@ config BOOTARGS_STRING
config BOOTARGS_ARGS_BUFFER_SIZE
int "Size of buffer containing main arguments in bytes"
default 1024
depends on BOOTARGS
help
Configures size of buffer containing all arguments passed to main.
endif # BOOTARGS
endmenu
rsource "Kconfig.device"

View File

@@ -2,10 +2,10 @@
* Copyright The Zephyr Project contributors
*/
#include <zephyr/sys/util.h>
#include <ctype.h>
#include <zephyr/logging/log.h>
LOG_MODULE_DECLARE(os, CONFIG_KERNEL_LOG_LEVEL);
#include <zephyr/sys/util.h>
#include <ctype.h>
#include <zephyr/logging/log.h>
LOG_MODULE_DECLARE(os, CONFIG_KERNEL_LOG_LEVEL);
extern const char *get_bootargs(void);
char **prepare_main_args(int *argc)
@@ -91,4 +91,4 @@ char **prepare_main_args(int *argc)
}
(*argc)++;
}
}
}