assemble_vintf: add --no-kernel-requirements option
When specified, <config> under <kernel> will not be written to the
output matrix, and kernel minor revision will be set to zero.
These requirements are added in P but is verified against the running
kernel (instead of the incoming kernel). This incorrect behavior
in recovery forces us to drop these requirements during OTA.
These requirements are still checked by VTS.
Bug: 111840577
Test: libvintf_test
Change-Id: Id0d7851f5cc11fbd8e6e2928ce377769855445db
diff --git a/AssembleVintf.cpp b/AssembleVintf.cpp
index ea8c9b3..b54b971 100644
--- a/AssembleVintf.cpp
+++ b/AssembleVintf.cpp
@@ -678,6 +678,12 @@
return true;
}
+ bool setNoKernelRequirements() override {
+ mSerializeFlags |= SerializeFlag::NO_KERNEL_CONFIGS;
+ mSerializeFlags |= SerializeFlag::NO_KERNEL_MINOR_REVISION;
+ return true;
+ }
+
private:
std::vector<NamedIstream> mInFiles;
Ostream mOutRef;