]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - android/platform-system-libvintf.git/log
android/platform-system-libvintf.git
5 years agoMerge "System always contains root dir." android-o-mr1-iot-release-1.0.4
Tom Cherry [Wed, 29 Aug 2018 17:05:40 +0000 (17:05 +0000)]
Merge "System always contains root dir."

5 years agorequire quotes on kconfig string values
Steve Muckle [Thu, 23 Aug 2018 22:18:46 +0000 (15:18 -0700)]
require quotes on kconfig string values

When parsing the Android kernel config fragments, require (and remove)
quotes around string values.

This change also fails the parsing if the string does not conform to one
of the possible types of string, integer, or tristate.

Change-Id: I2723f341ce086a39ace541ea98eec402b994448d

5 years agoSystem always contains root dir.
Yifan Hong [Tue, 14 Aug 2018 17:55:14 +0000 (10:55 -0700)]
System always contains root dir.

In recovery, system image is mounted to /mnt/system. After the work of
first stage ramdisk, system image always contains the root dir, no
matter what value of ro.build.system_root_image is.

Test: do compat check in recovery
Bug: 112586588
Change-Id: I3890c9c1335b23fd22a8910bca07e59d631bac71

5 years agoAllow OTA package to contain fake AVB version
Yifan Hong [Mon, 13 Aug 2018 19:37:47 +0000 (12:37 -0700)]
Allow OTA package to contain fake AVB version

The system_matrix.xml in compatibility.zip can contain a fake
AVB version as specified by BOARD_OTA_FRAMEWORK_VBMETA_VERSION_OVERRIDE.
This allows OTA to pass compatibility check when the AVB version is
updated *during* the OTA.
Bug: 112291283
Test: specify BOARD_OTA_FRAMEWORK_VBMETA_VERSION_OVERRIDE.
      and manual test.

Change-Id: I250bf3b547eb6edfdcdcee4dff64405f97e74b15

5 years agoSerializeFlags is a namespace.
Yifan Hong [Wed, 8 Aug 2018 21:19:41 +0000 (14:19 -0700)]
SerializeFlags is a namespace.

The SerializeFlags becomes a namespace that contains
the original class definition under type SerializeFlags::Type
and static constants.

Consequently, all SeralizeFlags methods can
now be constexpr.

Also added static tests.

Test: libvintf_test
Test: vintf_object_test
Bug: 110711640
Change-Id: I786a1f77e19defc2ab2d025de3ed7cfe48f4fbce

5 years agoDisabledChecks -> CheckFlags namespace
Yifan Hong [Wed, 8 Aug 2018 20:04:51 +0000 (13:04 -0700)]
DisabledChecks -> CheckFlags namespace

Switch from negative flags to positive flags using
the dedicated CheckFlags::Type class.

Bug: 110711640
Test: libvintf_test
Test: vintf_object_test
Change-Id: I13f741b64520bd58349dbbf6c874dd1559d79ad8

5 years agoAssembleVintf: fix error message for unsupported tags/attrs for additional manifests
Yifan Hong [Thu, 2 Aug 2018 23:03:59 +0000 (16:03 -0700)]
AssembleVintf: fix error message for unsupported tags/attrs for additional manifests

The error message used to contain extraneous values like:

<manifest version="1.0" type="device" target-level="1">
   <sepolicy>
       <version>0.0</version>
   </sepolicy>
</manifest>

Fix it so that it becomes:
<manifest target-level="1" />

Test: manual with additional manifest, then
      `m device_manifest.xml`

Bug: 78943004

Change-Id: I2d66c4db5a5c2136907ac2dc814262909c73b9e0

5 years agoSerializeFlags: Remove legacy APIs
Yifan Hong [Wed, 8 Aug 2018 00:44:10 +0000 (17:44 -0700)]
SerializeFlags: Remove legacy APIs

Remove legacy bitwise operators and boolean conversions
that are meant to be compatible with the old negative flags
usage. Also fix all such usages.

Bug: 110711640
Test: libvintf_test
Change-Id: Ic69a7066dd3ae320aeb0a1848eb7719f67da29d3

5 years agoassemble_vintf: fix error message for -n -l conflict
Yifan Hong [Wed, 8 Aug 2018 00:26:12 +0000 (17:26 -0700)]
assemble_vintf: fix error message for -n -l conflict

There is no error message when -n and -l is specified together.
Add error message.

Also fix flag handling logic to use new SerializeFlags API.
Bug: 110711640
Test: libvintf_test

Change-Id: I78203f20a2cff16a497894243c6c1a519ca59661

5 years agoSerializeFlags: remove legacyValue() API
Yifan Hong [Tue, 7 Aug 2018 23:01:34 +0000 (16:01 -0700)]
SerializeFlags: remove legacyValue() API

Remove constructor with legacyValue (which contains NOT bits) and
getter to legacyValue. Instead, SerializeFlags objects are constructed
with positive flags.

Bug: 110711640
Test: libvintf_test
Change-Id: I41e2b913822b9e75b17a1f2336e5a35236e9671e

5 years agoSerializeFlag => SerializeFlags
Yifan Hong [Wed, 8 Aug 2018 00:41:56 +0000 (17:41 -0700)]
SerializeFlag => SerializeFlags

This is a straightforward refactoring to remove the SerializeFlag enum.
They are combined into one class because SerializeFlag is the old
negative bitfields and is confusing. SerializeFlags will contain
positive bitfields.

Bug: 110711640
Test: libvintf_test

Change-Id: I46070db674955add4971b0dc5736a43436f54ddf

5 years agoAdd SerializeFlags class.
Yifan Hong [Tue, 7 Aug 2018 22:51:14 +0000 (15:51 -0700)]
Add SerializeFlags class.

Bug: 110711640
Test: libvintf_test
Change-Id: I2a2c98d2965a4a79df24525b7ef5e4fff903066e

5 years agoMerge "Make libvintf recovery_available" android-o-mr1-iot-release-1.0.3
Tao Bao [Mon, 6 Aug 2018 23:31:42 +0000 (23:31 +0000)]
Merge "Make libvintf recovery_available"

5 years agoMake libvintf recovery_available
Jerry Zhang [Tue, 17 Jul 2018 19:21:40 +0000 (12:21 -0700)]
Make libvintf recovery_available

Bug: 110380063
Test: Compiles, recovery works
Change-Id: I89b4f7c25f457659d3a4b20fc44786691266126a

5 years agoassemble_vintf: add --no-kernel-requirements option
Yifan Hong [Mon, 30 Jul 2018 17:38:47 +0000 (10:38 -0700)]
assemble_vintf: add --no-kernel-requirements option
am: 86678e40bc

Change-Id: I7a4d7a80bf9ae013f33911dd33682af079d098ff

5 years agoassemble_vintf: add --no-kernel-requirements option
Yifan Hong [Thu, 26 Jul 2018 18:38:54 +0000 (11:38 -0700)]
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

5 years agoupdate kernel config suffix to .config
Steve Muckle [Wed, 25 Jul 2018 23:31:52 +0000 (16:31 -0700)]
update kernel config suffix to .config
am: ad6aa914d5

Change-Id: I33b7caa239d355fb0a9be5e0574b59465598093e

5 years agoupdate kernel config suffix to .config
Steve Muckle [Mon, 23 Jul 2018 22:44:01 +0000 (15:44 -0700)]
update kernel config suffix to .config

The kernel configs are changing their naming scheme to use
a suffix of ".config" rather than ".cfg".

Test: build and boot
Bug: 111762107
Change-Id: I590bccb6150d07795d84b12b588faa5e51138605

5 years agolibvintf: recovery_available: true
Yifan Hong [Tue, 17 Jul 2018 17:35:08 +0000 (10:35 -0700)]
libvintf: recovery_available: true
am: 3dc4584b1a

Change-Id: Idac1cea3287ffde4a6ab5e270dfb9fa44be6242a

5 years agolibvintf: recovery_available: true
Yifan Hong [Mon, 16 Jul 2018 22:02:34 +0000 (15:02 -0700)]
libvintf: recovery_available: true

Test: recovery mode test getService
Bug: 111507946
Bug: 80132328
Change-Id: Id971983cfeb800332f84876cc1bb619e39ade6ee

5 years agoAdd -Wextra-semi.
Yifan Hong [Tue, 17 Jul 2018 01:04:47 +0000 (18:04 -0700)]
Add -Wextra-semi.
am: 832e39078a

Change-Id: I0c13b08ef28e57a2c3d5dedb6608c704cdf014ec

5 years agoAdd -Wextra-semi.
Yifan Hong [Mon, 16 Jul 2018 22:22:55 +0000 (15:22 -0700)]
Add -Wextra-semi.

The headers fail to compile when included
in libhidl, because libhidl has -Wextra-semi.
I decided to clean them up and add -Wextra-semi
for all files for libvintf.

Test: builds
Change-Id: Ida1ed6d3855e582a5c09bc60128dd8c4cfd4210a

5 years agoVintfObjectRecovery: partitions are mounted to /mnt
Yifan Hong [Tue, 17 Jul 2018 00:55:02 +0000 (17:55 -0700)]
VintfObjectRecovery: partitions are mounted to /mnt
am: 91c1b2703b

Change-Id: I325389aa9bf007f200d2255a836cc41444ce4687

5 years agoHostFileSystem -> FileSystemUnderPath
Yifan Hong [Tue, 17 Jul 2018 00:54:58 +0000 (17:54 -0700)]
HostFileSystem -> FileSystemUnderPath
am: db3084356a

Change-Id: I79a2ba680b0b8ab4eeba432be6fb7f94fb86a971

5 years agoVintfObject::checkCompatibility: better error message.
Yifan Hong [Tue, 17 Jul 2018 00:54:54 +0000 (17:54 -0700)]
VintfObject::checkCompatibility: better error message.
am: 878556ed52

Change-Id: Ic1b8b32feb33223771d0bceb0356d3d6aeb7eb62

5 years agoVintfObjectRecovery: partitions are mounted to /mnt
Yifan Hong [Fri, 13 Jul 2018 23:03:59 +0000 (16:03 -0700)]
VintfObjectRecovery: partitions are mounted to /mnt

Recovery now mounts system and vendor partition under /mnt. Update
VintfObjectRecovery to reflect this, so that during OTA, the partitions
are correctly mounted and checked.

During OTA, access to /vendor will always be redirected to /mnt/vendor.
Access to /system will be redirected to
- /mnt/system if ro.build.system_root_image is false
- /mnt/system/system otherwise.

Test: manual by calling CheckCompatibility in "Run graphics test"

Change-Id: I4c4448e526b2a1f14c6a77b14ac72915256b85cb
Fixes: 111372832
5 years agoHostFileSystem -> FileSystemUnderPath
Yifan Hong [Fri, 13 Jul 2018 23:06:25 +0000 (16:06 -0700)]
HostFileSystem -> FileSystemUnderPath

The class is also used by recovery, so moving it to libvintf.
Test: pass

Change-Id: I735212b5ce53a0ba440686ced02feebc51a14841

5 years agoVintfObject::checkCompatibility: better error message.
Yifan Hong [Fri, 13 Jul 2018 20:45:30 +0000 (13:45 -0700)]
VintfObject::checkCompatibility: better error message.

Don't fail so fast.
Test: vintf_object_test

Change-Id: I5fe86410eea601a46abf5817ecf9fe527707cd22

5 years agoVintfObject now provides instance methods.
Yifan Hong [Mon, 16 Jul 2018 18:07:11 +0000 (11:07 -0700)]
VintfObject now provides instance methods.
am: 9f78c180ff

Change-Id: Idac69cbf04fa0b5339cf9c9d0bca5dddd05646b4

5 years agoVintfObject now provides instance methods.
Yifan Hong [Thu, 12 Jul 2018 21:45:52 +0000 (14:45 -0700)]
VintfObject now provides instance methods.

VintfObject used to only contain static methods. It now
contains instance methods, and the static methods are
delegates to the instance methods. For example:

GetDeviceHalManifest calls GetInstance()->getDeviceHalManifest()
getDeviceHalManifest does the actual job.

The static dependencies (FileSystem, PropertyFetcher, PartitionMounter,
ObjectFactory<RuntimeInfo> are also moved from utils.cpp to the
static VintfObject instance.

Tests are updated to create a test VintfObject instance with
the mocked dependencies, and run test on the test object.

As a result, utils.cpp is now empty and removed, and
libvintf_common is the same as libvintf. Hence libvintf_common is also
removed.

This allows:
- Allows better mocking in tests. Tests are now independent of
  each other because a new VintfObject is created for every test.
  (Previously this is done very badly by clearing the global states,
  which is error prone)
  - A bug in VintfObjectTest.FrameworkCompatibilityMatrixCombine
    is discovered because it depends on setting global states in
    previous test cases. This is also fixed in this CL.
- In recovery, two VintfObject is required; one for XMLs in the
  recovery image (under /) and one for XMLs in system/vendor image
  (under /mnt). HIDL HAL getService in recovery depends on the former,
  and OTA depends on the latter. This CL prepares recovery to work.
  (A follow-up CL is needed to update VintfObjectRecovery to use
  /mnt for getService).

Some other notable changes in the CL:
- CompatibilityMatrix/HalManifest fetchAllInformation now takes
  a FileSystem argument to fetch files correctly, because the global
  FileSystem object is removed.
- Globals in utils.cpp / utils-fake.cpp is removed
- DevicePropertyFetcher is moved from utils.cpp to PropertyFetcher.cpp
  and is always built (for both host and target); but host VintfObject
  uses dummy PropertyFetcher by default. (See
  createDefaultPropertyFetcher in VintfObject.cpp).

Bug: 110855270
Bug: 80132328
Bug: 111372832

Test: vintf_object_test
Test: livintf_test

Change-Id: I24320662191b977c0e562129e49b33e80de727cc

5 years agoMerge "Allow multiple DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILEs."
Yifan Hong [Mon, 2 Jul 2018 19:55:36 +0000 (12:55 -0700)]
Merge "Allow multiple DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILEs."
am: f3378017ea

Change-Id: Id582f2c34e9dc61235a58fa2d4ffc4bc65395643

5 years agoMerge "Allow multiple DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILEs." android-o-mr1-iot-release-1.0.2 android-p-preview-5
Treehugger Robot [Mon, 2 Jul 2018 19:37:01 +0000 (19:37 +0000)]
Merge "Allow multiple DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILEs."

5 years agoAllow multiple DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILEs.
Yifan Hong [Mon, 2 Jul 2018 17:15:24 +0000 (10:15 -0700)]
Allow multiple DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILEs.

Test: multiple DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE is specified, and built
Bug: 68291320
Change-Id: I60358a8b678bc43ced4eec15505c09b245c9764a

5 years agoassemble_vintf: first arg cannot contain extra things
Yifan Hong [Fri, 29 Jun 2018 21:20:02 +0000 (14:20 -0700)]
assemble_vintf: first arg cannot contain extra things
am: 0a35ab16fe

Change-Id: I561412bc64c89f670b9f2800569d44c9556f386e

5 years agoassemble_vintf: first arg cannot contain extra things
Yifan Hong [Fri, 29 Jun 2018 18:32:57 +0000 (11:32 -0700)]
assemble_vintf: first arg cannot contain extra things

... other than <hal> and type attribute.
Bug: 78943004
Test: build vintf stuff
Test: add extra device manifest and the following fails:
- specify "level"
- specify <sepolicy>

Change-Id: I1b0bbae5727dc8a0de1ff043ccf126d9e7c65e9b

5 years ago[automerger skipped] Remove shared lib dependencies of checkvintf
Jae Shin [Tue, 19 Jun 2018 13:43:42 +0000 (06:43 -0700)]
[automerger skipped] Remove shared lib dependencies of checkvintf
am: 13ebc4c20d  -s ours

Change-Id: I7bff60005e5ccd543fe5fa463b3e0405003fee82

5 years agoRemove shared lib dependencies of checkvintf android-p-preview-4
Jae Shin [Tue, 5 Jun 2018 02:20:00 +0000 (11:20 +0900)]
Remove shared lib dependencies of checkvintf

checkvintf is used to check the compatibility between system
and vendor in mixed build targets. Because inter branch build
targets need to be hosted on new manifest branches, checkvintf
was added to the dist package and should not have extra shared
library dependencies.

Test: m -j checkvintf; check that checkvintf is executable on its
own
Bug: 74214049

Merged-In: Iabf1c2477d163be6060d493a2f4b85e37fc339df
Change-Id: Iabf1c2477d163be6060d493a2f4b85e37fc339df
(cherry picked from commit e448ccc3c752877411396b445080c85fee8fba62)

5 years agoMerge pi-dev-plus-aosp-without-vendor into stage-aosp-master
Xin Li [Fri, 8 Jun 2018 18:09:26 +0000 (11:09 -0700)]
Merge pi-dev-plus-aosp-without-vendor into stage-aosp-master

Bug: 79597307
Change-Id: I74b5318764006ad4272e0dc685cfcb556f77236a

5 years ago[automerger skipped] libvintf: always use -DLIBVINTF_TARGET for target. am: 8eb7bc56a4
Steven Moreland [Tue, 5 Jun 2018 22:33:59 +0000 (15:33 -0700)]
[automerger skipped] libvintf: always use -DLIBVINTF_TARGET for target. am: 8eb7bc56a4
am: a1887e2b28  -s ours

Change-Id: I24cc9a3c06db0a63f2e1e2c19572a154162879ac

5 years agolibvintf: always use -DLIBVINTF_TARGET for target.
Steven Moreland [Tue, 5 Jun 2018 21:54:21 +0000 (14:54 -0700)]
libvintf: always use -DLIBVINTF_TARGET for target.
am: 8eb7bc56a4

Change-Id: Iadbbdd798fbfabb36f4670a94f2d711f8586cecc

5 years agoRemove shared lib dependencies of checkvintf
Jae Shin [Tue, 5 Jun 2018 17:55:27 +0000 (10:55 -0700)]
Remove shared lib dependencies of checkvintf
am: e448ccc3c7

Change-Id: Idafe234a63ebb4de05fd08f32faa612aa9c409cc

5 years agoRemove shared lib dependencies of checkvintf
Jae Shin [Tue, 5 Jun 2018 02:20:00 +0000 (11:20 +0900)]
Remove shared lib dependencies of checkvintf

checkvintf is used to check the compatibility between system
and vendor in mixed build targets. Because inter branch build
targets need to be hosted on new manifest branches, checkvintf
was added to the dist package and should not have extra shared
library dependencies.

Test: m -j checkvintf; check that checkvintf is executable on its
own
Bug: 74214049

Change-Id: Iabf1c2477d163be6060d493a2f4b85e37fc339df

5 years agolibvintf: always use -DLIBVINTF_TARGET for target.
Steven Moreland [Fri, 1 Jun 2018 22:55:23 +0000 (15:55 -0700)]
libvintf: always use -DLIBVINTF_TARGET for target.

This was missing from libvintf and only applied to
libvintf_common, but libvintf also has utils.cpp which
depends on LIBVINTF_TARGET being defined. This caused
all property reads that libvintf made to return the
default value.

Bug: 91735839
Test: add an odm manifest for SE conditional on
    a system property (ro.boot.product.hardware.sku)
    and make sure it is read into the manifest (using
    the vintf tool) and also that a client can get the
    service:
$ lshal | grep secure
Y android.hardware.secure_element@1.0::ISecureElement/SIM1                                  0/2        881    2262 567

Test: `adb shell vintf` shows the manifest as parsing and the HAL as
    being on the device:
     DM                    android.hardware.secure_element@1.0::IDevice/SIM1
               FCM         android.hardware.secure_element@1.0::ISecureElement/SIM[1-9][0-9]*
               FCM         android.hardware.secure_element@1.0::ISecureElement/eSE[1-9][0-9]*

Change-Id: Ibdfdcfce8d17b964015fc05983c99573c7f060a1
Merged-In: Ibdfdcfce8d17b964015fc05983c99573c7f060a1

5 years agolibvintf: always use -DLIBVINTF_TARGET for target.
Steven Moreland [Mon, 4 Jun 2018 18:04:33 +0000 (11:04 -0700)]
libvintf: always use -DLIBVINTF_TARGET for target.
am: 16a15a748f

Change-Id: I3624f10450481624f2ed868ef5c10187a718fcc8

5 years agolibvintf: always use -DLIBVINTF_TARGET for target.
Steven Moreland [Fri, 1 Jun 2018 22:55:23 +0000 (15:55 -0700)]
libvintf: always use -DLIBVINTF_TARGET for target.

This was missing from libvintf and only applied to
libvintf_common, but libvintf also has utils.cpp which
depends on LIBVINTF_TARGET being defined. This caused
all property reads that libvintf made to return the
default value.

Bug: 91735839
Test: add an odm manifest for SE conditional on
    a system property (ro.boot.product.hardware.sku)
    and make sure it is read into the manifest (using
    the vintf tool) and also that a client can get the
    service:
$ lshal | grep secure
Y android.hardware.secure_element@1.0::ISecureElement/SIM1                                  0/2        881    2262 567

Test: `adb shell vintf` shows the manifest as parsing and the HAL as
    being on the device:
     DM                    android.hardware.secure_element@1.0::IDevice/SIM1
               FCM         android.hardware.secure_element@1.0::ISecureElement/SIM[1-9][0-9]*
               FCM         android.hardware.secure_element@1.0::ISecureElement/eSE[1-9][0-9]*

Change-Id: Ibdfdcfce8d17b964015fc05983c99573c7f060a1

5 years agoresolve merge conflicts of ddb8069159acc545713533e8745b8250c63dc8e8 to pi-dev-plus...
Jae Shin [Wed, 30 May 2018 09:04:40 +0000 (18:04 +0900)]
resolve merge conflicts of ddb8069159acc545713533e8745b8250c63dc8e8 to pi-dev-plus-aosp

BUG: None
Test: I solemnly swear I tested this conflict resolution.

Change-Id: I46c6d4a6bd63abd3d75d41e632966fd3f2a59526

5 years agoAdd checkvintf to dist for inter branch build targets am: 32b2052088
Jae Shin [Wed, 30 May 2018 08:33:42 +0000 (01:33 -0700)]
Add checkvintf to dist for inter branch build targets am: 32b2052088
am: 24bbf7dd08

Change-Id: I672869bff55e7c801ed646c04e8e6c4e87799dca

5 years agoAdd checkvintf to dist for inter branch build targets
Jae Shin [Wed, 30 May 2018 08:28:17 +0000 (01:28 -0700)]
Add checkvintf to dist for inter branch build targets
am: 32b2052088

Change-Id: If18503d54dfe09039831da47db0136b6e2bee966

5 years agoAdd checkvintf to dist for inter branch build targets android-o-mr1-iot-release-1.0.1
Jae Shin [Fri, 25 May 2018 06:08:44 +0000 (15:08 +0900)]
Add checkvintf to dist for inter branch build targets

checkvintf is used to check the compatibility between system and
vendor for mixed build targets such as P GSI + O-MR1 vendor.

These inter branch build targets will be built from a new manifest
branch, as mandated by the guideline in go/build_chaining. Adding
checkvintf to dist allows us to get this tool from the parent
target instead of having to build in the lightweight manifest
branch.

Bug: 74214049
Test: lunch aosp_arm64_ab-userdebug; make -j dist; confirm that
checkvintf is outputed under DIST_DIR

Change-Id: I2b2a72225772b40096363e70374e441f7f9e756d
Merged-In: I2b2a72225772b40096363e70374e441f7f9e756d

5 years agoAdd contains(Arch, Arch) am: 0773e13046
Yifan Hong [Tue, 29 May 2018 19:39:08 +0000 (12:39 -0700)]
Add contains(Arch, Arch) am: 0773e13046
am: 5c214db00a

Change-Id: I364efa71aff9fb31908f7b8a236451db0779851f

5 years agoAdd contains(Arch, Arch)
Yifan Hong [Tue, 29 May 2018 19:24:08 +0000 (12:24 -0700)]
Add contains(Arch, Arch)
am: 0773e13046

Change-Id: I2008398110c86898d15fa5dccba03cecc787476b

5 years agoAdd contains(Arch, Arch)
Yifan Hong [Fri, 25 May 2018 23:11:14 +0000 (16:11 -0700)]
Add contains(Arch, Arch)

... that returns true if the second value
is a subset of the first value.

Test: builds (static_asserts)
Change-Id: Ifc739b114521771862d967cada812f3e319f5109

5 years agoAdd checkvintf to dist for inter branch build targets
Jae Shin [Thu, 24 May 2018 09:04:17 +0000 (18:04 +0900)]
Add checkvintf to dist for inter branch build targets

checkvintf is used to check the compatibility between system and
vendor for mixed build targets such as P GSI + O-MR1 vendor.

These inter branch build targets will be built from a new manifest
branch, as mandated by the guideline in go/build_chaining. Adding
checkvintf to dist allows us to get this tool from the parent
target instead of having to build in the lightweight manifest
branch.

Bug: 74214049
Test: lunch aosp_arm64_ab-userdebug; make -j dist; confirm that
checkvintf is outputed under DIST_DIR

Change-Id: Iac3ecc7127c351000b36710f8adf06c61ae51799
Merged-In: I2b2a72225772b40096363e70374e441f7f9e756d

5 years agoAllow to get <vendor-ndk><version> from matrix am: 52b7faece3
Yifan Hong [Thu, 24 May 2018 23:04:45 +0000 (16:04 -0700)]
Allow to get <vendor-ndk><version> from matrix am: 52b7faece3
am: a76a101c97

Change-Id: Id4b430633d40162b62be34355a7c34398e8d8b37

5 years agoAllow to get <vendor-ndk><version> from matrix
Yifan Hong [Thu, 24 May 2018 19:05:43 +0000 (12:05 -0700)]
Allow to get <vendor-ndk><version> from matrix
am: 52b7faece3

Change-Id: I514a5632aaa95acda3d7ad3ef19ee57307254653

5 years agoAllow to get <vendor-ndk><version> from matrix
Yifan Hong [Tue, 22 May 2018 23:21:31 +0000 (16:21 -0700)]
Allow to get <vendor-ndk><version> from matrix

Test: vts_treble_vintf_vendor_test
Test: libvintf_test
Bug: 78117402
Change-Id: I4da7d23a354a59aaa27d0b61f8fd98a54f0fb1ec

5 years agoHide HalGroup::getHals am: 2eb2cb4900
Yifan Hong [Mon, 7 May 2018 22:59:56 +0000 (15:59 -0700)]
Hide HalGroup::getHals am: 2eb2cb4900
am: 686493f8b9

Change-Id: I8475b110bf33d21348c1a49a883d44c7b9f4651f

5 years agoHide HalGroup::getHals
Yifan Hong [Mon, 7 May 2018 21:00:14 +0000 (14:00 -0700)]
Hide HalGroup::getHals
am: 2eb2cb4900

Change-Id: I7132d6fe6f6518b10ef0559053629adbeac5baa9

5 years agoHide HalGroup::getHals android-p-preview-2 android-p-preview-3
Yifan Hong [Wed, 2 May 2018 01:49:19 +0000 (18:49 -0700)]
Hide HalGroup::getHals

Test: builds
Test: libvintf_test
Fixes: 74247301
Change-Id: Ie3b58ab42e66fab2f9d2e5d490461476d5c84d5d

5 years agoMerge changes from topic "lshal_fqname" am: 588955a06e
Yifan Hong [Thu, 3 May 2018 18:13:19 +0000 (11:13 -0700)]
Merge changes from topic "lshal_fqname" am: 588955a06e
am: ca984683bc

Change-Id: I61b83c76c88702831cce34f8090cef1bc5a8dbfc

5 years agoMerge changes from topic "lshal_fqname"
Yifan Hong [Thu, 3 May 2018 18:08:22 +0000 (11:08 -0700)]
Merge changes from topic "lshal_fqname"
am: 588955a06e

Change-Id: I16f1cb0b0dd1488fc2b11f09e5ac6abb0e273c5f

5 years agoMerge changes from topic "lshal_fqname" android-o-mr1-iot-release-1.0.0 android-wear-p-preview-2
Yifan Hong [Thu, 3 May 2018 18:00:47 +0000 (18:00 +0000)]
Merge changes from topic "lshal_fqname"

* changes:
  Add HalManifest::insertInstance
  Remove unused ManfiestHal::insertLegacyInstance
  Add ManifestHal::insertInstance
  Add more types to MapValueIterator.
  Add TransportArch constructors.

5 years agoMerge "Don't override BOARD_SEPOLICY_VERS if already set." am: eea41348e1
Steven Moreland [Thu, 3 May 2018 01:28:18 +0000 (18:28 -0700)]
Merge "Don't override BOARD_SEPOLICY_VERS if already set." am: eea41348e1
am: 6cff9397de

Change-Id: Ib78cadc18ec60c85c7b9d40a8d490a9b4abbbe90

5 years agoMerge "Don't override BOARD_SEPOLICY_VERS if already set."
Steven Moreland [Thu, 3 May 2018 01:23:47 +0000 (18:23 -0700)]
Merge "Don't override BOARD_SEPOLICY_VERS if already set."
am: eea41348e1

Change-Id: Ided0fb928214b3795f0d232c9e5c58c844ae7a07

5 years agoMerge "Don't override BOARD_SEPOLICY_VERS if already set."
Steven Moreland [Thu, 3 May 2018 01:17:53 +0000 (01:17 +0000)]
Merge "Don't override BOARD_SEPOLICY_VERS if already set."

5 years agoAdd HalManifest::insertInstance
Yifan Hong [Wed, 2 May 2018 02:09:56 +0000 (19:09 -0700)]
Add HalManifest::insertInstance

This is an API to add the new <fqname> tags. This helps,
for example, lshal.

Bug:74247301
Test: libvintf_test

Change-Id: Iae3f9bae7120e430b376171c4e23b7d1d0798c06

5 years agoRemove unused ManfiestHal::insertLegacyInstance
Yifan Hong [Wed, 2 May 2018 01:39:27 +0000 (18:39 -0700)]
Remove unused ManfiestHal::insertLegacyInstance

This API was used by lshal to insert <interface>
<instance> tags. Now lshal insert <fqname> tags
via insertInstance.

Test: builds
Bug: 74247301
Change-Id: Ia5bf158d7d05df6c80f90f915705be7e87ea6ee8

5 years agoAdd ManifestHal::insertInstance
Yifan Hong [Wed, 2 May 2018 02:08:51 +0000 (19:08 -0700)]
Add ManifestHal::insertInstance

... that allows to add <fqname> to ManifestHal object from code.
This helps, for example, lshal.
Bug: 74247301
Test: pass

Change-Id: I28b5bb1240e24f1762d2df4cb1ded242fabea99e

5 years agoAdd more types to MapValueIterator.
Yifan Hong [Wed, 2 May 2018 02:06:24 +0000 (19:06 -0700)]
Add more types to MapValueIterator.

iterateValues() accept non-const maps.
Test: pass
Bug: 74247301

Change-Id: Ib565c326570e62d7232a417a0dd58e59061d6265

5 years agoAdd TransportArch constructors.
Yifan Hong [Tue, 1 May 2018 23:08:04 +0000 (16:08 -0700)]
Add TransportArch constructors.

Test: pass
Bug: 74247301
Change-Id: Ie3c744c364b79ea87f6100f09bd019e86c24bea1

5 years agoDon't override BOARD_SEPOLICY_VERS if already set.
Steven Moreland [Tue, 1 May 2018 18:21:35 +0000 (11:21 -0700)]
Don't override BOARD_SEPOLICY_VERS if already set.

Allow the input manifest to already contain BOARD_SEPOLICY_VERS.

Bug: 78943004 # for full combine
Test: m assembled_framework_manifest.xml produces correct manifest w/o
    warning + w/o overriding sepolicy vers.

Change-Id: Ieb98d8a650fb8f5791f08e378514d3f8f04f131f

5 years agoMerge "assemble_vintf: Update -c help message." am: 731c36aff1
Yifan Hong [Tue, 1 May 2018 21:51:48 +0000 (14:51 -0700)]
Merge "assemble_vintf: Update -c help message." am: 731c36aff1
am: b0886dd106

Change-Id: Iacf54c2f01a59bc71812e926979185f3e51b20a3

5 years agoMerge "assemble_vintf: Update -c help message."
Yifan Hong [Tue, 1 May 2018 21:47:34 +0000 (14:47 -0700)]
Merge "assemble_vintf: Update -c help message."
am: 731c36aff1

Change-Id: Ib674bd903cf59cd3a1e9e8c19316ffb90f8ea271

5 years agoMerge "assemble_vintf: Update -c help message."
Yifan Hong [Tue, 1 May 2018 21:39:17 +0000 (21:39 +0000)]
Merge "assemble_vintf: Update -c help message."

5 years agoassemble_vintf: Update -c help message.
Yifan Hong [Mon, 30 Apr 2018 22:02:31 +0000 (15:02 -0700)]
assemble_vintf: Update -c help message.

Test: assemble_vintf --help
Change-Id: I17a928f106a1a886f98d4893cd75da843857f1c5
Fixes: 78895849
5 years ago[automerger skipped] CompatibilityMatrix::combine add <kernel> from new matrices...
Yifan Hong [Tue, 1 May 2018 18:54:19 +0000 (11:54 -0700)]
[automerger skipped] CompatibilityMatrix::combine add <kernel> from new matrices am: d6de7f696c
am: 55c2afa2fd  -s ours

Change-Id: I5ed71d51b5ee58ab3b0713bc934fac96275a5ce7

5 years agoCompatibilityMatrix::combine add <kernel> from new matrices
Yifan Hong [Tue, 1 May 2018 18:50:11 +0000 (11:50 -0700)]
CompatibilityMatrix::combine add <kernel> from new matrices
am: d6de7f696c

Change-Id: Ie9cb06b9fdfb0d60cbe9d84bf4d6429e7f2dae45

5 years agoCompatibilityMatrix::combine add <kernel> from new matrices
Yifan Hong [Fri, 27 Apr 2018 01:40:02 +0000 (18:40 -0700)]
CompatibilityMatrix::combine add <kernel> from new matrices

Just as <hal> and <xmlfile> are added from new matrices
to old matrices as optional, so are <kernel> tags as well.
This avoids the hack that new <kernel> versions are added
retroactively. Specifically, we don't want to add 4.14 to
every matrix, but rather let libvintf do this automagically.

Bug: 78576469
Test: vintf_object_test
Test: libvintf_test
Test: manually inspect built matrices
Change-Id: Ia779c5e25c7c3db218007d23e4c887e8cd44e730
Merged-In: Ia779c5e25c7c3db218007d23e4c887e8cd44e730

5 years agoCompatibilityMatrix::combine add <kernel> from new matrices
Yifan Hong [Fri, 27 Apr 2018 22:50:45 +0000 (15:50 -0700)]
CompatibilityMatrix::combine add <kernel> from new matrices
am: 29aa7f5903

Change-Id: Icb81031b50671069b546c9bac7c3c1a0d01d4515

5 years agoCompatibilityMatrix::combine add <kernel> from new matrices
Yifan Hong [Fri, 27 Apr 2018 01:40:02 +0000 (18:40 -0700)]
CompatibilityMatrix::combine add <kernel> from new matrices

Just as <hal> and <xmlfile> are added from new matrices
to old matrices as optional, so are <kernel> tags as well.
This avoids the hack that new <kernel> versions are added
retroactively. Specifically, we don't want to add 4.14 to
every matrix, but rather let libvintf do this automagically.

Bug: 78576469
Test: vintf_object_test
Test: libvintf_test
Test: manually inspect built matrices
Change-Id: Ia779c5e25c7c3db218007d23e4c887e8cd44e730

5 years ago[automerger skipped] Merge "Compat if POLICYVERS <= security_policyvers()" am: 1dd79d71f5
Yifan Hong [Thu, 19 Apr 2018 01:02:54 +0000 (18:02 -0700)]
[automerger skipped] Merge "Compat if POLICYVERS <= security_policyvers()" am: 1dd79d71f5
am: 3845d35b4d  -s ours

Change-Id: If03169a6f3bb5d24716c4a01348b7fcf55386b62

5 years agoMerge "Compat if POLICYVERS <= security_policyvers()"
Yifan Hong [Thu, 19 Apr 2018 00:58:49 +0000 (17:58 -0700)]
Merge "Compat if POLICYVERS <= security_policyvers()"
am: 1dd79d71f5

Change-Id: Ibd201b1701df5073b82916b092fa5497ea1e8e6f

5 years agoMerge "Compat if POLICYVERS <= security_policyvers()"
Treehugger Robot [Thu, 19 Apr 2018 00:52:48 +0000 (00:52 +0000)]
Merge "Compat if POLICYVERS <= security_policyvers()"

6 years agoCompat if POLICYVERS <= security_policyvers()
Yifan Hong [Mon, 16 Apr 2018 21:31:29 +0000 (14:31 -0700)]
Compat if POLICYVERS <= security_policyvers()
am: 9893552f43

Change-Id: I7b0048f26d472ba650018e711369e4279c7c2c25

6 years agoCompat if POLICYVERS <= security_policyvers()
Yifan Hong [Mon, 16 Apr 2018 16:16:41 +0000 (09:16 -0700)]
Compat if POLICYVERS <= security_policyvers()

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

6 years agoCompat if POLICYVERS <= security_policyvers()
Yifan Hong [Mon, 16 Apr 2018 16:16:41 +0000 (09:16 -0700)]
Compat if POLICYVERS <= security_policyvers()

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

6 years agoCleanup global FileFetcher am: 10d862283d
Yifan Hong [Wed, 11 Apr 2018 17:55:48 +0000 (10:55 -0700)]
Cleanup global FileFetcher am: 10d862283d
am: 37e129c359

Change-Id: Id6b0fa2fe92f7501a8801da42d0fc183f996410f

6 years agoCleanup global FileFetcher
Yifan Hong [Wed, 11 Apr 2018 17:49:12 +0000 (10:49 -0700)]
Cleanup global FileFetcher
am: 10d862283d

Change-Id: I8733f35adad0aafe441169a8cf9977eadcbda483

6 years agoCleanup global FileFetcher android-o-mr1-iot-preview-8
Yifan Hong [Fri, 6 Apr 2018 22:41:05 +0000 (15:41 -0700)]
Cleanup global FileFetcher

This global instance is modifiable everywhere and
is hard to maintain. It also contains references as
out-variables, which is not the standard.

Clean it up by refactoring it into a public (i.e.
not in details namespace) class, FileSystem.

Introduce VintfObject::InitFileSystem that allows
the behavior to be changed before any files are read.

Bug: 37999212
Test: host and target libvintf_test, vintf_object_test

Change-Id: I1c64b31fd37119450be89dfd1d2bfe76a71ccf3d
Merged-In: I1c64b31fd37119450be89dfd1d2bfe76a71ccf3d

6 years agolibvintf_recovery: to Soong am: 00611d5483
Yifan Hong [Fri, 6 Apr 2018 02:45:41 +0000 (19:45 -0700)]
libvintf_recovery: to Soong am: 00611d5483
am: 7555b2aa30

Change-Id: I0bd45ec580d75f04f3044e222217e88d41e4789f

6 years agolibvintf_recovery: to Soong
Yifan Hong [Fri, 6 Apr 2018 02:36:38 +0000 (19:36 -0700)]
libvintf_recovery: to Soong
am: 00611d5483

Change-Id: I113df10fcb3ab7d59b79a54e9549596ab7668ffd

6 years agolibvintf_recovery: to Soong
Yifan Hong [Thu, 5 Apr 2018 23:28:33 +0000 (16:28 -0700)]
libvintf_recovery: to Soong

Now that libfs_mgr is in Soong, this can be in Soong
too.

Test: builds
Test: boot to recovery
Change-Id: I3e7751505052731ada97845a66cbf3fa1434ed7a

6 years agoMerge "Support for fragmented manifests." am: a10930e9fc
Steven Moreland [Thu, 5 Apr 2018 23:24:40 +0000 (16:24 -0700)]
Merge "Support for fragmented manifests." am: a10930e9fc
am: 1911da5ddf

Change-Id: I15d8d12e8b09e160e9ed8786dcd271f55eaa89e5

6 years agoMerge "Support for fragmented manifests."
Steven Moreland [Thu, 5 Apr 2018 23:17:59 +0000 (16:17 -0700)]
Merge "Support for fragmented manifests."
am: a10930e9fc

Change-Id: I7da787cd4081ebc87141206503fd329bbe4b7bec

6 years agoMerge "Support for fragmented manifests."
Treehugger Robot [Thu, 5 Apr 2018 23:09:14 +0000 (23:09 +0000)]
Merge "Support for fragmented manifests."

6 years agoAlways include file names in assembled xmls. am: 5875afcd60
Steven Moreland [Thu, 5 Apr 2018 22:25:51 +0000 (15:25 -0700)]
Always include file names in assembled xmls. am: 5875afcd60
am: 79dcd7dfcc

Change-Id: I2a41e816f80f0be4fbbd558b1a829fbc8131f8f4

6 years agoassemble_vintf: documentation -i can be duplicated am: 34f7405eb5
Steven Moreland [Thu, 5 Apr 2018 22:25:47 +0000 (15:25 -0700)]
assemble_vintf: documentation -i can be duplicated am: 34f7405eb5
am: f253c0ac0d

Change-Id: I06162c5f6ed044da37984e2575b42cc90213cb00

6 years agoAlways include file names in assembled xmls.
Steven Moreland [Thu, 5 Apr 2018 22:19:48 +0000 (15:19 -0700)]
Always include file names in assembled xmls.
am: 5875afcd60

Change-Id: I066122b50a93659b04795dc31e4c6a876f13c89a

6 years agoassemble_vintf: documentation -i can be duplicated
Steven Moreland [Thu, 5 Apr 2018 22:19:45 +0000 (15:19 -0700)]
assemble_vintf: documentation -i can be duplicated
am: 34f7405eb5

Change-Id: I0459f5ef845f26f69c24732598eae0cf78cd57d6

6 years agoAlways include file names in assembled xmls.
Steven Moreland [Thu, 5 Apr 2018 20:14:08 +0000 (13:14 -0700)]
Always include file names in assembled xmls.

With fragments becoming more popular and build
system support for them on the way, this is useful
for debugging.

Change-Id: Ida7631dc0f314739aa1b275a6aee0264972c0f21
Fixes: 77640776
Test: libvintf_test