Skip to content

Commit 92d2040

Browse files
ahollerRussell King
authored andcommitted
ARM: 5939/1: ARM: Add option CMDLINE_FORCE to force usage of the in-kernel cmdline
Add an option to force usage of the in-kernel cmdline even if the boot loader passes another command string to the kernel. Useful if someone cannot or don't want to change the command-line options of the boot loader but is able to change the kernel. Signed-off-by: Alexander Holler <[email protected]> Signed-off-by: Russell King <[email protected]>
1 parent 830703c commit 92d2040

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

arch/arm/Kconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,6 +1419,17 @@ config CMDLINE
14191419
time by entering them here. As a minimum, you should specify the
14201420
memory size and the root device (e.g., mem=64M root=/dev/nfs).
14211421

1422+
config CMDLINE_FORCE
1423+
bool "Always use the default kernel command string"
1424+
depends on CMDLINE != ""
1425+
help
1426+
Always use the default kernel command string, even if the boot
1427+
loader passes other arguments to the kernel.
1428+
This is useful if you cannot or don't want to change the
1429+
command-line options your boot loader passes to the kernel.
1430+
1431+
If unsure, say N.
1432+
14221433
config XIP_KERNEL
14231434
bool "Kernel Execute-In-Place from ROM"
14241435
depends on !ZBOOT_ROM

arch/arm/kernel/setup.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -593,13 +593,15 @@ static int __init parse_tag_revision(const struct tag *tag)
593593

594594
__tagtable(ATAG_REVISION, parse_tag_revision);
595595

596+
#ifndef CONFIG_CMDLINE_FORCE
596597
static int __init parse_tag_cmdline(const struct tag *tag)
597598
{
598599
strlcpy(default_command_line, tag->u.cmdline.cmdline, COMMAND_LINE_SIZE);
599600
return 0;
600601
}
601602

602603
__tagtable(ATAG_CMDLINE, parse_tag_cmdline);
604+
#endif /* CONFIG_CMDLINE_FORCE */
603605

604606
/*
605607
* Scan the tag table for this tag, and call its parse function.

0 commit comments

Comments
 (0)