Skip to content

Commit 7aa3269

Browse files
nashifcfriedt
authored andcommitted
kernel: boot args kconfig cleanup
Cleanup kconfig of bootargs and put everything in one menuconfig. Signed-off-by: Anas Nashif <[email protected]>
1 parent c9269b9 commit 7aa3269

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

kernel/Kconfig

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1109,31 +1109,32 @@ config STATIC_INIT_GNU
11091109
will emit an error if constructors are needed and this option has been
11101110
disabled.
11111111

1112-
config BOOTARGS
1112+
menuconfig BOOTARGS
11131113
bool "Support bootargs"
11141114
help
11151115
Enables bootargs support and passing them to main().
11161116

1117+
if BOOTARGS
11171118
config DYNAMIC_BOOTARGS
11181119
bool "Support dynamic bootargs"
1119-
depends on BOOTARGS
11201120
help
11211121
Enables dynamic bootargs support.
11221122

11231123
config BOOTARGS_STRING
11241124
string "static bootargs string"
1125-
depends on BOOTARGS && !DYNAMIC_BOOTARGS
1125+
depends on !DYNAMIC_BOOTARGS
11261126
help
11271127
Static bootargs string. It includes argv[0], so if its expected that it
11281128
contains executable name it should be put at the beginning of this string.
11291129

11301130
config BOOTARGS_ARGS_BUFFER_SIZE
11311131
int "Size of buffer containing main arguments in bytes"
11321132
default 1024
1133-
depends on BOOTARGS
11341133
help
11351134
Configures size of buffer containing all arguments passed to main.
11361135

1136+
endif # BOOTARGS
1137+
11371138
endmenu
11381139

11391140
rsource "Kconfig.device"

kernel/boot_args.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
* Copyright The Zephyr Project contributors
33
*/
44

5-
#include <zephyr/sys/util.h>
6-
#include <ctype.h>
7-
#include <zephyr/logging/log.h>
8-
LOG_MODULE_DECLARE(os, CONFIG_KERNEL_LOG_LEVEL);
5+
#include <zephyr/sys/util.h>
6+
#include <ctype.h>
7+
#include <zephyr/logging/log.h>
8+
LOG_MODULE_DECLARE(os, CONFIG_KERNEL_LOG_LEVEL);
99

1010
extern const char *get_bootargs(void);
1111
char **prepare_main_args(int *argc)
@@ -91,4 +91,4 @@ char **prepare_main_args(int *argc)
9191
}
9292
(*argc)++;
9393
}
94-
}
94+
}

0 commit comments

Comments
 (0)