[PATCH 0/8] bootconfig: Update for the recent reports

From: Masami Hiramatsu
Date: Thu Feb 20 2020 - 02:26:57 EST


Hello,

Here are some patches to update bootconfig. There are
several implementation changes and syntax fix/updates.

As we discussed in the previous thread, modifies bootconfig.

- [1/8] Make CONFIG_BOOT_CONFIG=n by default
- [2/8] Add magic word for bootconfig
- [8/8] Print array as multiple commands for
legacy command line

With the magic word, we can identify bootconfig without
checksum, also if we find a wrong bootconfig, there is no
reason to suppress the error message anymore.

- [3/8] Remove unneeded error message silencer
- [4/8] Remove unneeded checksum

In addition, I found some issues on bootconfig syntax, so
fix it. (these also include testcase update)

- [5/8] Reject if subkey and value has same parent
- [6/8] Overwrite value on same key by default
- [7/8] Add append value operator ("+=")

To update synchronously, each patch includes code, test
and documentation. If it is better to split (especially
documentation). please let me know.

TODO: support kernel builtin bootconfig. Should we reuse
firmware builtin loader? But it seems we just need a Makefile.

Thank you,

---

Masami Hiramatsu (8):
bootconfig: Set CONFIG_BOOT_CONFIG=n by default
bootconfig: Add bootconfig magic word for indicating bootconfig explicitly
tools/bootconfig: Remove unneeded error message silencer
bootconfig: Remove unneeded checksum
bootconfig: Reject subkey and value on same parent key
bootconfig: Overwrite value on same key by default
bootconfig: Add append value operator support
bootconfig: Print array as multiple commands for legacy command line


Documentation/admin-guide/bootconfig.rst | 37 +++++++++++-
include/linux/bootconfig.h | 3 +
init/Kconfig | 2 -
init/main.c | 54 +++++++-----------
kernel/trace/Kconfig | 3 +
lib/bootconfig.c | 44 +++++++++++----
tools/bootconfig/include/linux/printk.h | 5 --
tools/bootconfig/main.c | 77 +++++++++++---------------
tools/bootconfig/samples/bad-mixed-kv1.bconf | 3 +
tools/bootconfig/samples/bad-mixed-kv2.bconf | 3 +
tools/bootconfig/test-bootconfig.sh | 31 +++++++++-
11 files changed, 164 insertions(+), 98 deletions(-)
create mode 100644 tools/bootconfig/samples/bad-mixed-kv1.bconf
create mode 100644 tools/bootconfig/samples/bad-mixed-kv2.bconf

--
Masami Hiramatsu (Linaro) <mhiramat@xxxxxxxxxx>