summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* assemble_vintf: allow <kernel> entries from source files.d-oreo-mr1-core-releaseYifan Hong2018-10-301-10/+0
| | | | | | | | | The built compatibility_matrix.empty.xml contains <kernel> entries that gets copied to built framework compatibility matrix. Test: libvintf_test Bug: 69636193 Change-Id: I880b1c1ae66a158160e53d5adf241f23c8f68463
* Compat if POLICYVERS <= security_policyvers()Yifan Hong2018-10-302-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | POLICYVERS in the build system specifies the policydb version that the policy is compiled with. security_policyvers() specifies the maximum policy version that the kernel is compatible with. Allow POLICYVERS <= security_policyvers() to be considered compatible. This changes compatibility check logic for RuntimeInfo, hence this does not affect OTA, except the following case: * device kernel reports 30 * new images are built with POLICYVERS=31 * fwk matrix has 31 * device do OTA with these images * OTA will fail Right now, since there are no plans to bump POLICYVERS in build system (and it stays 30), OTA won't break. Bug: 77886167 Test: vts_treble_vintf_test Change-Id: I91fb631b291d17e26ad1a9befb669aac6b7ed654 Merged-In: I91fb631b291d17e26ad1a9befb669aac6b7ed654
* Snap for 4399693 from c81841f975705f37bfffec7e1d84a9b461539bb3 to oc-mr1-releaseoreo-mr1-releaseandroid-build-team Robot2017-10-171-3/+1
|\ | | | | | | Change-Id: I95cf64207cc09b2a59b73c095e42dcf04685c7dd
| * Allow native HALs to have <transport> tag.Yifan Hong2017-10-161-3/+1
| | | | | | | | | | | | | | | | | | | | | | assemble_vintf should not drop the empty <transport/> tag for native HALs, otherwise older versions of libvintf cannot parse the file. Test: m system_manifest.xml -j and manually look at the file Test: sideload package from O DR Bug: 67653129 Change-Id: I403031f1546e7a26b0ad40b992d191ee3c7b80c6
* | release-request-b613f8ce-05b5-465e-b783-c1b87f3c1e95-for-git_oc-mr1-release- ↵android-build-team Robot2017-09-136-41/+98
|\| | | | | | | | | | | 4332123 snap-temp-L59300000101925107 Change-Id: I677a2fdc1151095a7a7c6912027396fe1d5cc0f7
| * Allow to disable certain checks in VintfObject::CheckCompatibilityYifan Hong2017-09-116-41/+98
| | | | | | | | | | | | | | | | | | | | | | | | Allow to disable AVB version checks. Test: builds Test: vintf_object_test Test: libvintf_test Bug: 38325029 Bug: 65270190 Change-Id: Iadc2408f635a5487a5af4e19f516147930f4bc4b Merged-In: Iadc2408f635a5487a5af4e19f516147930f4bc4b
* | release-request-81b48854-d0e0-49af-bcf2-857273cbb8dc-for-git_oc-mr1-release- ↵android-build-team Robot2017-08-302-23/+109
|\| | | | | | | | | | | 4306444 snap-temp-L17300000097872583 Change-Id: I77d08f512193f6a1476b230884253a4a4970274e
| * assemble_vintf: do not allow duplicated --kernel version.Yifan Hong2017-08-281-3/+8
| | | | | | | | | | | | | | | | | | For example, assemble_vintf ... --kernel=3.18... --kernel=3.18... is not allowed. Test: pass Bug: 64124223 Change-Id: I339eec86f5ec6881ab0a2273d4e5e62b183e2333
| * assemble_vintf: add generateConditionsYifan Hong2017-08-281-3/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Generate <condition> tag for the kernel config fragment based on the architechture. android-base-foo.cfg -> CONFIG_FOO=y For example, requirements in android-base-arm64.cfg are only enforced when CONFIG_ARM64=y. Test: m system_compatibility_matrix.xml -j Bug: 64124223 Change-Id: Ib094fb476b8521e0fcce8a73302335d127805fc5
| * assemble_vintf: accept arch specific kernel fragmentsYifan Hong2017-08-282-8/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is now allowed to provide the following arg: --kernel=3.18:.../android-base.cfg:.../android-base-arm64.cfg assemble_vintf detects the name of these files and sets conditions accordingly. For example, * android-base.cfg refer to common configs (no conditions) * android-base-foo-bar.cfg refer to configs that are conditioned on CONFIG_FOO_BAR being set. Also, android-base.cfg must exist for each version. Test: m system_compatibility_matrix.xml -j Bug: 64124223 Change-Id: Ib852b9f0c3ce6addce18473480f3da2f221f8d92
| * assemble_vintf: remove hardcoded <kernel> versionYifan Hong2017-08-251-12/+12
| | | | | | | | | | | | | | | | | | | | ... from fwk comp mat. Per b/38324908, these entries are hard-coded to compatibility_matrix.xml; they should be injected from the build system. Test: m system_compatibility_matrix.xml -j Bug: 64124223 Change-Id: Ia82b38c0e0109a2840ec45588bf805b786412c89
| * assemble_vintf: add assembleFrameworkCompatibilityMatrixKernelsYifan Hong2017-08-251-17/+26
| | | | | | | | | | | | | | | | | | Refactor code to execute the procedure of processing android-base.cfg files in a separate function. Test: m system_compatibility_matrix.xml -j Bug: 64124223 Change-Id: Ic6159fe3b6e69687a9a062f34e95e05733e7308a
* | release-request-c924aaac-f0a2-4215-8dc4-e314f22460d9-for-git_oc-mr1-release- ↵android-build-team Robot2017-08-288-45/+487
|\| | | | | | | | | | | 4301796 snap-temp-L23200000097143969 Change-Id: I9266fe874d08f4ed61b01eadd9360f52c13bc716
| * Fix memory leak in string created for strtok.Luis A. Lozano2017-08-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Reported by static analyzer: system/libvintf/assemble_vintf.cpp:100:18: warning: Potential leak of memory pointed to by 'modPath' [clang-analyzer-cplusplus.NewDeleteLeaks] Bug: 27101951 Test: verified warning is gone. Change-Id: Iab26bc356e3df2a811ad7d34228533ea5dcd8edb Merged-In: Iab26bc356e3df2a811ad7d34228533ea5dcd8edb
| * Add tests for kernel config fragments in fwk comp mat.Yifan Hong2017-08-241-0/+367
| | | | | | | | | | | | | | Test: libvintf_test Bug: 64124223 Change-Id: I04f3332c84ec9e9c025079f6f83e2573dab27a81 Merged-In: I04f3332c84ec9e9c025079f6f83e2573dab27a81
| * Do not allow first <kernel> version to have non-empty <condition>.Yifan Hong2017-08-241-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stating <condition> on a <kernel> tag in fwk compat mat means the fragment is conditionally used. Older libvintf (libvintf on O devices) use the first <kernel> tag with a match version unconditionally. Disable this to allow old libvintf to parse the requirements more correctly. In detail: * O libvintf may still falsely accept incompatible fwk comp mat, because it only looks at the first <kernel> element. The conditional requirements are not checked. * O libvintf does not falsely reject a compatible fwk comp mat. Conditional requirements are never the first <kernel> element and hence are not checked by O libvintf. This is a workaround solution for backwards compatibility, since O has been released. Test: libvintf_test Bug: 64124223 Change-Id: I20a9bb768720fc83ac5cdf293a976cb279cb6eab Merged-In: I20a9bb768720fc83ac5cdf293a976cb279cb6eab
| * Remove unused CompatibilityMatrix::findKernelYifan Hong2017-08-242-16/+0
| | | | | | | | | | | | | | | | | | findKernel is no longer used by RuntimeInfo::checkCompatibility. Test: mma Bug: 64124223 Change-Id: I1f620a935ef788a084a8a73cfe80badb3db9a0f5 Merged-In: I1f620a935ef788a084a8a73cfe80badb3db9a0f5
| * Improve error messages in parse_xml.cppYifan Hong2017-08-241-2/+2
| | | | | | | | | | | | | | Test: pass Bug: 64124223 Change-Id: I8fdd8e0a2e3b96725c30339dcbdcaff848322cf4 Merged-In: I8fdd8e0a2e3b96725c30339dcbdcaff848322cf4
| * Match /proc/config.gz with fwk comp mat <kernel> fragmentsYifan Hong2017-08-243-25/+78
| | | | | | | | | | | | | | | | | | | | | | | | Multiple <kernel> elements with the same version can exist. The <condition> element decides whether the <kernel> element is actually used during matching. Test: libvintf_test Bug: 64124223 Change-Id: I0dd28b8b1bdfe06a4da61aaa81df91f4df5fcf26 Merged-In: I0dd28b8b1bdfe06a4da61aaa81df91f4df5fcf26
| * Add <conditions> to <kernel> in framework compat matYifan Hong2017-08-232-1/+24
| | | | | | | | | | | | | | | | | | | | | | When <conditions> are present, the <kernel> tag is only checked when all conditions are met. This is to support arch-specific kernel config requirements. Test: libvintf_test Bug: 64124223 Change-Id: I91ecd115ca42473b79bda24d9b8613eed817e7e2 Merged-In: I91ecd115ca42473b79bda24d9b8613eed817e7e2
* | release-request-edd71ba9-6f93-47be-957d-774c9d43a2dc-for-git_oc-mr1-release- ↵android-build-team Robot2017-08-175-4/+183
|\| | | | | | | | | | | 4281935 snap-temp-L68100000094184972 Change-Id: Idba23eb68d6b0af1c647be21bf5d85ed39df11bf
| * Add hardcoded version checks for netutils-wrapperYifan Hong2017-08-164-1/+183
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Each version bump of netutils-wrapper lose some functionality, and hence only the major version is bumped. Also, vendor code should only depend on a single version of netutils-wrapper. Hardcode this requirement in host-side libvintf to check compatibility when framework manifest and device compatibility matrix is built. Test: host libvintf_test Test: target libvintf_test Test: host vintf_object_test Test: target vintf_object_test Test: m system_manifest.xml compatibility_matrix.xml Test: boots Bug: 64447338 Change-Id: I75c28f3e021d16860e4577c3ecfaec2bd89d8a3d
| * Enable AVB version matching in RuntimeYifan Hong2017-08-161-3/+0
| | | | | | | | | | | | | | Test: `adb shell vintf` shows compatible Test: boots Bug: 38325029 Change-Id: I6857a391bfa2a6f8ef68a2ac0374c7e5c8f62e93
* | release-request-9ff446ef-fe26-4f50-a0f0-c1d38619140f-for-git_oc-mr1-release- ↵android-build-team Robot2017-08-091-3/+18
|\| | | | | | | | | | | 4257899 snap-temp-L58400000090817127 Change-Id: I6c7d3652ed6951343ebac8c3847661728368b13e
| * Merge "accept multiple kernel config fragments per kernel version" into ↵TreeHugger Robot2017-08-081-3/+18
| |\ | | | | | | | | | oc-mr1-dev
| | * accept multiple kernel config fragments per kernel versionSteve Muckle2017-08-071-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Android kernel config fragment was recently broken up to factor out architecture-specific config options. This means it is necessary to accept two config fragments per kernel version. Multiple config fragments may now be passed to the --kernel option, they are to be separated by ':' characters. Test: test vintf compatibility with and without compliant arch-specific kernel features Bug: 64124223 Merged-In: Ie2d1490106d2020309458db6adbc99628651eb7e Change-Id: Ie2d1490106d2020309458db6adbc99628651eb7e
* | | release-request-c8b8af6b-4899-402a-9ff7-72255ba5300b-for-git_oc-mr1-release- ↵android-build-team Robot2017-08-082-2/+54
|\| | | | | | | | | | | | | | | | | 4253898 snap-temp-L09600000090287887 Change-Id: Ic0149dda2bba986f42267a6f7769c1c688229a62
| * | Native HALs don't require <transport>.Yifan Hong2017-08-072-2/+54
| |/ | | | | | | | | | | | | | | | | | | | | This is stated in go/android-treble-vintf-object but the code was not well tested. Fortunately, native HALs are not used (until now), so we need to conform to the documentation here. Test: libvintf_test Bug: 64447338 Change-Id: I00d96137d4052d9da50f696ef665a73d09d818a7 Merged-In: I00d96137d4052d9da50f696ef665a73d09d818a7
* | release-request-d3de000d-8c5a-4c3c-b63e-e989421d7762-for-git_oc-mr1-release- ↵android-build-team Robot2017-07-131-2/+3
|\| | | | | | | | | | | 4176727 snap-temp-L91200000081901352 Change-Id: I1d878a83c3a826ebdc4ba36fb3f7327264f0e485
| * Do not abort when assemble_vintf does not get env vars am: 488e16a673 am: ↵Yifan Hong2017-07-121-2/+3
| |\ | | | | | | | | | | | | | | | | | | | | | 084e18dc6e am: 24aed79b09 am: d4bc5d800d Change-Id: I4df0575a6276aaaef91baf2075c3f01b8e5ef23e
| | * Do not abort when assemble_vintf does not get env vars am: 488e16a673 am: ↵Yifan Hong2017-07-121-2/+3
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 084e18dc6e am: 24aed79b09 Change-Id: Ic9544eaea0c2837c704cb595b6bbfc8a1dd5c829
| | | * Do not abort when assemble_vintf does not get env vars am: 488e16a673Yifan Hong2017-07-121-2/+3
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | am: 084e18dc6e Change-Id: Ied6c98548fc251a0579b08af65406ae95c39bca7
| | | | * Do not abort when assemble_vintf does not get env varsYifan Hong2017-07-121-2/+3
| | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 488e16a673 Change-Id: I81a4b690612dfe5c1829bca8d404f854c8160377
| | | | | * Do not abort when assemble_vintf does not get env varsandroid-o-preview-4Yifan Hong2017-07-121-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make reasonable defaults when env vars are missing, so that new flags added won't cause a build breakage on old branches. Test: builds (assemble_vintf is used only at build time) Bug: 38325029 Change-Id: Ib76f321ee0de8939b24313e6b123d1b2d14a1e8d
| * | | | | Revert "Revert "assemble_vintf: adding avb.vbmeta-version into framework ↵Yifan Hong2017-07-120-0/+0
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | compatiblity matrix"" am: 7f6c00c77c am: fe538e86bc am: 7fbfb36a28 am: 1795b67dd0 Change-Id: I37c279644248292a28f799056cdc429904951946
| | * | | | Revert "Revert "assemble_vintf: adding avb.vbmeta-version into framework ↵Yifan Hong2017-07-120-0/+0
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | compatiblity matrix"" am: 7f6c00c77c am: fe538e86bc am: 7fbfb36a28 Change-Id: I70bc851fddd7041c808f63a9274d1dfbd7c55805
| | | * | | Revert "Revert "assemble_vintf: adding avb.vbmeta-version into framework ↵Yifan Hong2017-07-121-0/+6
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | compatiblity matrix"" am: 7f6c00c77c am: fe538e86bc Change-Id: I5a1230d0fa0e8bbc7ac82d00b93a6d13536817fc
| | | | * | Revert "Revert "assemble_vintf: adding avb.vbmeta-version into framework ↵Yifan Hong2017-07-121-0/+6
| | | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | compatiblity matrix"" am: 7f6c00c77c Change-Id: Ic2350f7062979cadf165136725e193d6eb341be8
| | | | | * Revert "Revert "assemble_vintf: adding avb.vbmeta-version into framework ↵Yifan Hong2017-07-121-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | compatiblity matrix"" This reverts commit 823b9a2ab6d0e947add01e2d285bd9b277084f56. Bug: 38325029 Test: builds (assemble_vintf is used only at build time) Change-Id: I306fd92e843e6125d953f9db2604a9f06381b086
* | | | | | release-request-b6f2d5b3-a3d6-410f-b58f-c85ba8187177-for-git_oc-mr1-release- ↵android-build-team Robot2017-07-124-16/+45
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4173087 snap-temp-L93200000081515229 Change-Id: Id0be64d4d4b1716ccec636c478488cda6c9e15a8
| * | | | | Do not use regex to parse /proc/config.gz. am: 02e94004a6 am: 93368447ca am: ↵Yifan Hong2017-07-114-16/+45
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 49f514ed57 am: 0aa770f6ea Change-Id: I4a8f47dd14ea69d8681c30cb6106f2cb0f171577
| | * | | | Do not use regex to parse /proc/config.gz. am: 02e94004a6 am: 93368447caYifan Hong2017-07-114-16/+45
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 49f514ed57 Change-Id: I75d20c6cbfb380298f939d5e591bb27a1a7b968d
| | | * | | Do not use regex to parse /proc/config.gz. am: 02e94004a6Yifan Hong2017-07-114-16/+45
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 93368447ca Change-Id: I046cd154bd0473e471e018bb757d23fb1607904d
| | | | * | Do not use regex to parse /proc/config.gz.Yifan Hong2017-07-114-16/+45
| | | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 02e94004a6 Change-Id: I537f1c82c7813180e17ee92c9776e835a0a2da6d
| | | | | * Do not use regex to parse /proc/config.gz.Yifan Hong2017-07-114-16/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During boot, a compatibility check is performed and /proc/config.gz is parsed. /proc/config.gz has a well defined format: # CONFIG_FOO is not set CONFIG_BAR=y with no trailing / leading spaces, spaces around '=', or trailing comments. Using regex is slow and unnecessary, hence a normal string search is performed instead. On the other hand, for assemble_vintf that needs to parse android-base.cfg, because the file is maintained by humans, free format is accepted, and regex is used. Test: boots (boot time compat check passes) Test: boot time regression no longer happens (~120ms vs. ~90ms) Test: libvintf_test Bug: 63537988 Change-Id: If6ab207d40459689386aaf40cd835effc5597886
* | | | | | release-request-fda658d8-eecf-4c78-a2e9-e5093ca10451-for-git_oc-mr1-release- ↵android-build-team Robot2017-07-094-35/+108
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4165363 snap-temp-L49300000080728237 Change-Id: I1f6e5af954e1f9a8cb9eb751a620989d86b74fb5
| * | | | | Allow KernelConfigParser to be less restrictive am: c188972e09 am: ↵Yifan Hong2017-07-072-23/+91
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 84fc76ec23 am: fb300b0005 am: ae61f4eb0e Change-Id: I981156da4421aa7354e33c8c1cad7b28858b064a
| | * | | | Allow KernelConfigParser to be less restrictive am: c188972e09 am: 84fc76ec23Yifan Hong2017-07-072-23/+91
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: fb300b0005 Change-Id: I2fe950c8e95c27c39c6794285d3de1267c21cb31
| | | * | | Allow KernelConfigParser to be less restrictive am: c188972e09Yifan Hong2017-07-072-23/+91
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 84fc76ec23 Change-Id: I1ccd70bbdb95fce27cd345a449134a160e705c0f
| | | | * | Allow KernelConfigParser to be less restrictiveYifan Hong2017-07-072-23/+91
| | | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: c188972e09 Change-Id: Ieec7c02b014efc512275abfc9ec965274891e0cc