gooftool: add 'verify_cros_config'
This command will:
* Check if RLZ code is nonempty and not 'ZZCR'
* Compare the content of /usr/share/chromeos-config/yaml/config.yaml,
check if current model has the same set of identity and brand-code
defined.
BUG=b:147011183
TEST=make test
Change-Id: I3e7cf00eda0837e2c1fecfb913642a6ba7601219
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/factory/+/1986595
Reviewed-by: Yong Hong <yhong@chromium.org>
Reviewed-by: Philip Chen <philipchen@chromium.org>
Commit-Queue: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
diff --git a/py/gooftool/commands.py b/py/gooftool/commands.py
index 657561b..fa59fc0 100755
--- a/py/gooftool/commands.py
+++ b/py/gooftool/commands.py
@@ -357,6 +357,12 @@
options.enforced_release_channels)
+@Command('verify_cros_config')
+def VerifyCrosConfig(options):
+ """Verify entries in cros config make sense."""
+ return GetGooftool(options).VerifyCrosConfig()
+
+
@Command('write_protect')
def EnableFwWp(options):
"""Enable then verify firmware write protection."""
@@ -545,6 +551,7 @@
VerifyTPM(options)
VerifyVPD(options)
VerifyReleaseChannel(options)
+ VerifyCrosConfig(options)
@Command('untar_stateful_files')