[PATCH v2 1/2] Documentation: bootconfig: Add EBNF definiton of bootconfig

From: Masami Hiramatsu (Google)

Date: Sat Mar 14 2026 - 06:10:59 EST


From: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>

Add the EBNF definition to Documentation/admin-guide/bootconfig.rst
as an additional section to formally define the bootconfig syntax.

Signed-off-by: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>
---
Changes in v2:
- Move EBNF as a separated section.
---
Documentation/admin-guide/bootconfig.rst | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

diff --git a/Documentation/admin-guide/bootconfig.rst b/Documentation/admin-guide/bootconfig.rst
index f712758472d5..41bd1ee92395 100644
--- a/Documentation/admin-guide/bootconfig.rst
+++ b/Documentation/admin-guide/bootconfig.rst
@@ -152,6 +152,23 @@ Note that you can NOT put a comment or a newline between value and delimiter
key = 1 # comment
,2

+EBNF definition
+===============
+
+The syntax is defined in EBNF as follows::
+
+ Config = { Statement }
+ Statement = [ Key [ Assignment | Block ] | Comment ] ( "\n" | ";" )
+ Assignment = ( "=" | "+=" | ":=" ) ValueList
+ ValueList = [ Value { "," [ { ( Comment | "\n" ) } ] Value } ]
+ Block = "{" { Statement } "}"
+ Key = Word { "." Word }
+ Word = [a-zA-Z0-9_-]+
+ Value = QuotedValue | UnquotedValue
+ QuotedValue = "\"" { any_character_except_double_quote } "\""
+ | "'" { any_character_except_single_quote } "'"
+ UnquotedValue = { any_printable_character_except_delimiters }
+ Comment = "#" { any_character_except_newline }

/proc/bootconfig
================