xtensa: make bootparam parsing optional
A kernel may not need any boot parameters from the bootloader, allow disabling bootparam parsing in that case. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
This commit is contained in:
Родитель
8b5163eb98
Коммит
baac1d36d1
|
@ -473,6 +473,15 @@ config BUILTIN_DTB
|
||||||
string "DTB to build into the kernel image"
|
string "DTB to build into the kernel image"
|
||||||
depends on OF
|
depends on OF
|
||||||
|
|
||||||
|
config PARSE_BOOTPARAM
|
||||||
|
bool "Parse bootparam block"
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Parse parameters passed to the kernel from the bootloader. It may
|
||||||
|
be disabled if the kernel is known to run without the bootloader.
|
||||||
|
|
||||||
|
If unsure, say Y.
|
||||||
|
|
||||||
config BLK_DEV_SIMDISK
|
config BLK_DEV_SIMDISK
|
||||||
tristate "Host file-based simulated block device support"
|
tristate "Host file-based simulated block device support"
|
||||||
default n
|
default n
|
||||||
|
|
|
@ -42,6 +42,9 @@ RomInitAddr:
|
||||||
.word KERNELOFFSET
|
.word KERNELOFFSET
|
||||||
#endif
|
#endif
|
||||||
RomBootParam:
|
RomBootParam:
|
||||||
|
#ifndef CONFIG_PARSE_BOOTPARAM
|
||||||
|
.word 0
|
||||||
|
#else
|
||||||
.word _bootparam
|
.word _bootparam
|
||||||
_bootparam:
|
_bootparam:
|
||||||
.short BP_TAG_FIRST
|
.short BP_TAG_FIRST
|
||||||
|
@ -50,6 +53,7 @@ _bootparam:
|
||||||
.short BP_TAG_LAST
|
.short BP_TAG_LAST
|
||||||
.short 0
|
.short 0
|
||||||
.long 0
|
.long 0
|
||||||
|
#endif
|
||||||
|
|
||||||
.align 4
|
.align 4
|
||||||
_SetupMMU:
|
_SetupMMU:
|
||||||
|
|
|
@ -79,6 +79,7 @@ static char __initdata command_line[COMMAND_LINE_SIZE];
|
||||||
static char default_command_line[COMMAND_LINE_SIZE] __initdata = CONFIG_CMDLINE;
|
static char default_command_line[COMMAND_LINE_SIZE] __initdata = CONFIG_CMDLINE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_PARSE_BOOTPARAM
|
||||||
/*
|
/*
|
||||||
* Boot parameter parsing.
|
* Boot parameter parsing.
|
||||||
*
|
*
|
||||||
|
@ -176,6 +177,13 @@ static int __init parse_bootparam(const bp_tag_t* tag)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
static int __init parse_bootparam(const bp_tag_t *tag)
|
||||||
|
{
|
||||||
|
pr_info("Ignoring boot parameters at %p\n", tag);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_OF
|
#ifdef CONFIG_OF
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче