Skip to content

Commit f2b98d0

Browse files
committed
Merge tag 'bootconfig-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
Pull bootconfig updates from Masami Hiramatsu: - Fix ftrace2bconf.sh tool for checking event enable status correctly - Add CONFIG_BOOT_CONFIG_FORCE to apply bootconfig without 'bootconfig' boot parameter - Enable CONFIG_BOOT_CONFIG_FORCE by default if a bootconfig is embedded in the kernel - Increase max number of nodes of bootconfig to 8192 * tag 'bootconfig-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: bootconfig: Increase max nodes of bootconfig from 1024 to 8192 for DCC support bootconfig: Default BOOT_CONFIG_FORCE to y if BOOT_CONFIG_EMBED Allow forcing unconditional bootconfig processing tools/bootconfig: fix single & used for logical condition
2 parents fcc77d7 + 6c40624 commit f2b98d0

File tree

5 files changed

+21
-4
lines changed

5 files changed

+21
-4
lines changed

Documentation/admin-guide/bootconfig.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,8 @@ To remove the config from the image, you can use -d option as below::
201201

202202
Then add "bootconfig" on the normal kernel command line to tell the
203203
kernel to look for the bootconfig at the end of the initrd file.
204+
Alternatively, build your kernel with the ``CONFIG_BOOT_CONFIG_FORCE``
205+
Kconfig option selected.
204206

205207
Embedding a Boot Config into Kernel
206208
-----------------------------------
@@ -217,7 +219,9 @@ path to the bootconfig file from source tree or object tree.
217219
The kernel will embed it as the default bootconfig.
218220

219221
Just as when attaching the bootconfig to the initrd, you need ``bootconfig``
220-
option on the kernel command line to enable the embedded bootconfig.
222+
option on the kernel command line to enable the embedded bootconfig, or,
223+
alternatively, build your kernel with the ``CONFIG_BOOT_CONFIG_FORCE``
224+
Kconfig option selected.
221225

222226
Note that even if you set this option, you can override the embedded
223227
bootconfig by another bootconfig which attached to the initrd.

include/linux/bootconfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ struct xbc_node {
5959
/* Maximum size of boot config is 32KB - 1 */
6060
#define XBC_DATA_MAX (XBC_VALUE - 1)
6161

62-
#define XBC_NODE_MAX 1024
62+
#define XBC_NODE_MAX 8192
6363
#define XBC_KEYLEN_MAX 256
6464
#define XBC_DEPTH_MAX 16
6565

init/Kconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1384,6 +1384,19 @@ config BOOT_CONFIG
13841384

13851385
If unsure, say Y.
13861386

1387+
config BOOT_CONFIG_FORCE
1388+
bool "Force unconditional bootconfig processing"
1389+
depends on BOOT_CONFIG
1390+
default y if BOOT_CONFIG_EMBED
1391+
help
1392+
With this Kconfig option set, BOOT_CONFIG processing is carried
1393+
out even when the "bootconfig" kernel-boot parameter is omitted.
1394+
In fact, with this Kconfig option set, there is no way to
1395+
make the kernel ignore the BOOT_CONFIG-supplied kernel-boot
1396+
parameters.
1397+
1398+
If unsure, say N.
1399+
13871400
config BOOT_CONFIG_EMBED
13881401
bool "Embed bootconfig file in the kernel"
13891402
depends on BOOT_CONFIG

init/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ static char *extra_init_args;
156156

157157
#ifdef CONFIG_BOOT_CONFIG
158158
/* Is bootconfig on command line? */
159-
static bool bootconfig_found;
159+
static bool bootconfig_found = IS_ENABLED(CONFIG_BOOT_CONFIG_FORCE);
160160
static size_t initargs_offs;
161161
#else
162162
# define bootconfig_found false

tools/bootconfig/scripts/ftrace2bconf.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ referred_vars() {
9393
}
9494

9595
event_is_enabled() { # enable-file
96-
test -f $1 & grep -q "1" $1
96+
test -f $1 && grep -q "1" $1
9797
}
9898

9999
per_event_options() { # event-dir

0 commit comments

Comments
 (0)