Commit graph

49 commits

Author SHA1 Message Date
Spandan Das
ce69e9c812 Convert check_radio_versions to python3
Additionaly,
1. Run it as a python_binary_host so that it uses the hermetic python
toolchain
2. Fix an existing bug where if `board_info_txt` was empty, $^ would
   evaluate to its own path, and it would try to parse the relevant
   configuration from the wrong file

Bug: 196300985
Test: m out/target/product/vsoc_arm64/android-info.txt
Change-Id: Ie1e51a93041591829da4351dd57f37106e15d764
2022-10-24 21:02:00 +00:00
Bob Badour
3a0f0c157e Non-module targets.
Bug: 151177513
Bug: 213388645
Bug: 210912771

Test: m droid dist reportmissinglicenses

Change-Id: Ia7cddef9748f6c036a2fc7539dad717ebc131f7c
2022-04-07 22:03:29 -07:00
Bowgo Tsai
9346c4e2ad android-info.txt: do not output 'board=' if no board_name
If no board name, output nothing to the android-info.txt.
Currently the output of 'board=' might trigger some parsing error
on some clients.

Bug: 189990989
Test: make out/target/product/generic_arm64/android-info.txt
Change-Id: Ia9aab6c092c07349aa57f0e73f8c69b6e05874c1
2021-06-03 17:54:31 +08:00
Bob Badour
0390580262 [LSC] Add LOCAL_LICENSE_KINDS to build/make
Added SPDX-license-identifier-Apache-2.0 to:
  target/product/sysconfig/Android.bp
  tools/apicheck/Android.bp
  tools/product_config/Android.bp
  tools/releasetools/Android.bp
  tools/signapk/Android.bp
  tools/signtos/Android.bp
  tools/zipalign/Android.bp
  tools/ziptime/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
    SPDX-license-identifier-CC-BY SPDX-license-identifier-GPL
    SPDX-license-identifier-GPL-2.0 SPDX-license-identifier-LGPL
    SPDX-license-identifier-MIT legacy_not_a_contribution
    legacy_restricted
to:
  Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
    SPDX-license-identifier-CC-BY SPDX-license-identifier-GPL
    SPDX-license-identifier-MIT
to:
  tools/Android.bp
  tools/droiddoc/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
    SPDX-license-identifier-GPL SPDX-license-identifier-GPL-2.0
    SPDX-license-identifier-LGPL SPDX-license-identifier-MIT
to:
  core/base_rules.mk
  core/dex_preopt_libart.mk
  core/package_internal.mk

Added SPDX-license-identifier-Apache-2.0 legacy_not_a_contribution
to:
  target/board/Android.mk

Added legacy_restricted
to:
  core/tasks/tools/package-modules.mk
  target/product/gsi/Android.bp
  target/product/gsi/Android.mk
  target/product/security/Android.bp
  target/product/security/Android.mk
  tools/acp/Android.bp
  tools/atree/Android.bp
  tools/fs_config/Android.bp
  tools/fs_config/Android.mk
  tools/fs_get_stats/Android.bp
  tools/libhost/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: Id67a4eb1312940f999643b2ae57f45f34f120724
2021-02-14 10:37:20 -08:00
Yifan Hong
610cbc900e Vendor SKU manifests: define env variables properly
In particular, BOARD_SEPOLICY_VERS may be defined in
system/sepolicy/Android.mk, so defer its evaluation.

Test: build with vendor SKU
Bug: 148601741
Change-Id: Iab3f5dcba4edb65deaab38cc2712d22b89e1a83c
2020-03-17 15:58:07 -07:00
Yifan Hong
07ea2c0360 Rename DEVICE_MANIFEST_<sku>_FILE to FILES
Use plural since multiple files can be defined and assembled together.

Test: pass
Bug: 148601741
Change-Id: I82a7aeb68ea26702e63757a41f32840b6186ab88
2020-03-13 18:32:07 -07:00
Roopesh Nataraja
11e776fc32 Build DEVICE manifests and fragments for each SKU
Single vendor can support multiple skus with different
capabilities. Add support to define and build sku
based device manifests.

Specify DEVICE manifests in BoardConfig.mk as below.

  # installed to /vendor/etc/vintf/manifest_{sku}.xml
  DEVICE_MANIFEST_SKUS := sku1 sku2 sku3

  DEVICE_MANIFEST_SKU1_FILE := device/foo/bar/manifest_sku1.xml
  DEVICE_MANIFEST_SKU2_FILE := device/foo/bar/manifest_sku2.xml
  DEVICE_MANIFEST_SKU3_FILE := device/foo/bar/manifest_sku3.xml

Bug: 148601741

Change-Id: Id57d4ad21b0d3edf8d60d07446b6b806c1df20ab
2020-03-09 15:09:08 -07:00
Yifan Hong
975474a5b8 Remove BUILT_VENDOR_MANIFEST variable.
This was used by BUILT_SYSTEM_MATRIX and BUILT_ASSEMBLED_VENDOR_MANIFEST, but they
are deleted now.

Test: builds
Change-Id: Ie7e242dce9c6511b90fcf06ae4b6926b230b9873
2020-01-14 14:25:38 -08:00
Yifan Hong
51be69f063 device_(manifest|matrix).xml -> vendor_*
Building device_manifest.xml or device_compatibility_matrix.xml only
builds vendor manifest / matrices, but not all device manifest /
matrices (e.g. vintf_fragments, ODM manifest, etc.). Make the name more
accurate.

Test: m check-vintf-all

Change-Id: Ib017507c421355263d53a9e5b357f169c77da36d
2020-01-14 14:24:51 -08:00
Dan Willemsen
c84e4cb917 Add missing dependencies to python scripts
These were found when trying to run remotely on RBE with only the
sources depended upon available for each rule.

Bug: 130111713
Test: treehugger
Change-Id: Id763f8fc7dfbe60445f98604db3422147165f537
2019-06-10 23:58:49 +00:00
Yifan Hong
b321665b9d Build ODM manifests and fragments for each SKU.
In BoardConfig.mk, ODM manifests can be specify as follows:

    # installed to /odm/etc/vintf/manifest.xml
    ODM_MANIFEST_FILES := device/foo/bar/odm_manifest.xml

    # installed to /odm/etc/vintf/manifest_baz.xml
    ODM_MANIFEST_SKUS := baz
    ODM_MANIFEST_BAZ_FILES := device/foo/bar/odm_manifest_baz.xml

This is preferred over PRODUCT_COPY_FILES because it uses
assemble_vintf to check manifest at build time.

Test: builds

Change-Id: I18517b8ba09d3271627d6f21b8250b1bfc9e5db3
2019-02-19 12:37:50 -08:00
Yifan Hong
87328762e4 Move system manifest / device matrix build rules
Test: build these files
Change-Id: I6467f4b7ce421358c30ad7a4c72a77dcc2ed3f88
2018-02-01 15:36:40 -08:00
Yifan Hong
5ff1f0a38a Add System SDK Versions to VINTF.
Add PLATFORM_SYSTEMSDK_VERSIONS to framework manifest
and BOARD_SYSTEMSDK_VERSIONS to device comp matrix.

Test: m framework_manifest.xml -j
Test: BOARD_SYSTEMSDK_VERSIONS=P m device_compatibility_matrix.xml -j

Bug: 69088799
Change-Id: I0b5ac6f1c2802c353b2989b017c1cdfc9fe27987
2018-01-22 14:18:16 -08:00
Yifan Hong
65310d6b06 Merge "move VINTF metadata to /etc/vintf/ ." 2018-01-19 22:01:28 +00:00
Yifan Hong
8f863693c9 move VINTF metadata to /etc/vintf/ .
In particular,
/vendor/manifest.xml => /vendor/etc/vintf/manifest.xml
/system/manifest.xml => /system/etc/vintf/manifest.xml
/vendor/compatibility_matrix.xml =>
    /vendor/etc/vintf/compatibility_matrix.xml

Test: verify that fileis exist in destination
Test: hwservicemanager can read these files
Bug: 36790901
Change-Id: Ic361a48e170fb9a77faec76ad0e829625427820d
2018-01-19 10:52:27 -08:00
Yifan Hong
238c6ba8fe add <vendor-ndk> to VINTF.
Test: libvintf_test
Test: vintf_object_test
Test: build and verify that <vendor-ndk> tags
are in framework manifest and device compatibility
matrix.

Fixes: 36400653

Change-Id: I4d44bff81fecc8fd2f7ab8e15770544b7b85aef9
2018-01-16 21:49:52 +00:00
Yifan Hong
919dcf1b6e framework_cm.xml: move to hardware/interfaces
Test: m dist
Bug: 69636193

Change-Id: Ic15a445d700552cb0973d6919ed5843bdecba363
2018-01-10 16:32:04 -08:00
Steven Moreland
b14b530f82 Allow devices to extend the system manifest.
Introduces DEVICE_FRAMEWORK_MANIFEST_FILE, a list
of files which are added to system/manifest.xml.
This is required for devices to properly display
what hals they implement and also therefore for
them to pass vts_treble_vintf_test since it
now tests manifests based on hal origin.

Notice, this is named singularly to match
DEVICE_MANIFEST_FILE which is also a list of files.
They may be better both named "FILES", but for
consistency and legacy reasons, they can be thought
of as "everything that composes the X manifest
file".

Fixes: 70042049
Test: add system manifest extension which needs it
  and it no longer fails vts_treble_vintf_test for
  hals being served from the wrong partitions.

Change-Id: I1f59d5c3cadb7a7d4576b73196ca7b41103a49c5
2017-12-22 14:02:11 -08:00
Yifan Hong
b1b5a0969b Merge changes from topic "fcm_version"
* changes:
  Move fwk comp mat level logic into assemble_vintf
  PRODUCT_COMPATIBILITY_MATRIX_LEVEL_OVERRIDE is deprecated.
2017-12-15 18:58:34 +00:00
Yifan Hong
43ec6ead28 Rename VINTF XML module names
* system_compatibility_matrix/manifest.xml
   => framework_...
* compatibility_matrix/manifest.xml
   => device_...

This is to follow the naming scheme in VINTF
doc.

Test: build all four targets

Change-Id: If5f6a99ded9964f3500c8e5fb97278f8fd0de387
2017-12-14 18:19:44 -08:00
Yifan Hong
ed42caf94d Move fwk comp mat level logic into assemble_vintf
Deprecation schedule requirements is specified in assemble_vintf.
Move all checking logic to assemble_vintf.

Test: builds

Bug: 69636193
Change-Id: I2d62555633494014dc0005931de6c8ae9e6877fa
Merged-In: I2d62555633494014dc0005931de6c8ae9e6877fa
2017-12-14 15:35:15 -08:00
Colin Cross
fdea893833 Replace build/tools with build/make/tools
Test: m checkbuild
Change-Id: I8db6c27a6d2372f142d10568fe92d6f2e9a59252
2017-12-06 16:12:40 -08:00
Steven Moreland
9588438023 Use PRODUCT_ENFORCE_VINTF_MANIFEST.
PRODUCT_FULL_TREBLE is being split up into smaller,
more manageable flags.

Bug: 62019611
Test: manual
Change-Id: I046f9eb4099cf441842f3d0e6908d99df063c27e
2017-11-13 09:32:24 -08:00
Steve Muckle
378c2bb42a get kernel configs from kernel/configs
The kernel configs have moved out of VTS and into their own
repository.

Test: build and boot
Change-Id: I649af63216e7b18604586f70396bceff626c30d0
2017-09-12 16:26:28 -07:00
Yifan Hong
63e264d142 fwk comp mat: add arch specific kernel requirements
Test: m system_compatibility_matrix.xml -j
Bug: 64124223
Change-Id: Ieda3ea43e5d3b7d393461bd54b311b58af443f7c
Merged-In: Ieda3ea43e5d3b7d393461bd54b311b58af443f7c
2017-08-28 17:32:59 -07:00
Yifan Hong
a508b30df5 fwk comp mat: use a for loop for supported kernel versions
Test: m system_compatibility_matrix.xml -j

Bug: 64124223
Change-Id: Ife95bfb5b7103239e116df1ae844cc3a643b4c28
Merged-In: Ife95bfb5b7103239e116df1ae844cc3a643b4c28
2017-08-28 17:32:59 -07:00
Yifan Hong
1aecc84239 Add <kernel> entry to fwk compat mat.
Test: builds and verify that system/compatibility_matrix.xml
      has configs filled.
Test: `vintf | tail` on marlin shows that fwk compat mat
      is compatible with runtime info.

Bug: 38324908
Change-Id: I8a35ea582fea1faa083c409ec58813c3ac82dc9c
Merged-In: I8a35ea582fea1faa083c409ec58813c3ac82dc9c
2017-08-24 11:28:04 -07:00
Bowgo Tsai
eb7b438994 Pass FRAMEWORK_VBMETA_VERSION to assemble_vintf
Note that this depends on a change in avbtool:
  https://android-review.googlesource.com/#/c/406374/

Bug: 38325029
Test: builds system.img, checks $OUT/system/compatibility_matrix.xml
      contains correct vbmeta-version
Change-Id: Iacc0a2687fb39600ad6b8e9cfbfe5c1a3b90b40b
Merged-In: Iacc0a2687fb39600ad6b8e9cfbfe5c1a3b90b40b
2017-08-24 11:28:04 -07:00
Yifan Hong
dae462bdd1 Accept multiple input files for device manifest.
Test: test with DEVICE_MANIFEST_FILE variable split
      into multiple files

Bug: 38217107
Change-Id: I1146898e4ccf0e8bac7d8541032f160476dbc148
Merged-In: I1146898e4ccf0e8bac7d8541032f160476dbc148
2017-08-24 11:28:02 -07:00
Yifan Hong
4a352c9df0 Only checks compatibility for VINTF XMLs when PRODUCT_FULL_TREBLE
Bug: 37954458
Bug: 37321309

Test: build with lunch bullhead (PRODUCT_FULL_TREBLE=false)
Test: build with lunch marlin   (PRODUCT_FULL_TREBLE=true)
Change-Id: I2f3f8e4439e3986b9af635ac52c116f352215642
2017-05-03 16:33:23 -07:00
Yifan Hong
c9ad35ce39 Add compatibility check for system_manifest/compatibility_matrix.xml
Add compatibility check against device vintf schemas
when framework schemas are built.

Test: build with lunch marlin (that has manifest.xml)
Test: build with mini_emulator_arm64 (that doesn't have manfiest.xml)

Bug: 37321309

Change-Id: I87db152754d0185938bcef0c4395f477b8fd269b
2017-05-01 22:29:16 -07:00
Yifan Hong
b5cbe22b84 Add device/fwk compatibility matrices to device.
Also renamed matrix.xml to compatibility_matrix.xml.

Test: make and ensure vendor/compatibility_matrix.xml is there.
Test: adb shell vintf (see matrices, compatible = true)

Bug: 37321309
Change-Id: I4ebbedf47a576a50a42df53b72e507ed31ef2e56
2017-05-01 21:49:18 -07:00
Yifan Hong
aa21221f80 Use assemble_vintf to verify framework manifests.
Test: builds, and verify that system/manifest.xml is there.

Bug: 36681384 Runtime-Collectible information must be statically
collectible
Bug: 36983271 VINTF checked at build time

Change-Id: Ic3bb50211311fa423a2ad56bd2891cb57d7dc1a5
2017-04-14 16:29:55 -07:00
Yifan Hong
283af596eb Use assemble_vintf to verify device manifests.
Test: builds, and verify that vendor/manifest.xml has
sepolicy version.

Bug: 36681384 Runtime-Collectible information must be statically
collectible
Bug: 36983271 VINTF checked at build time

Change-Id: I10e4cff6ed1b78a7cb9239e822ab054e1b90e7d3
2017-04-14 16:29:04 -07:00
Michael Schwartz
4d9cb56866 Rule to copy device manifest to device
The device manifest defines the collection of HAL interfaces exposed by
the vendor. Create a common rule so each target need not define their own.

Bug: 36810913
Test: Ran marlin build and inspected file was copied
Change-Id: I9f53796fdd85e706f91664d275aff6dbd785213f
2017-04-13 08:42:42 -07:00
Ying Wang
ad7fd29b31 Don't bother going through the source tree
Don't bother going through the source tree in more circumstances:
all cleaning goals, helping goals, no-deps goals.

Bug: 10244578
Change-Id: Id53a249085c62838e4193962a85e0ac34f46954f
2013-08-09 10:08:30 -07:00
Doug Zongker
9296f09277 optional cross-check between OTA radio images and board-info.txt
Adds a python script which checks the version of each radio image
added with the new add-radio-file-checked macro against a file
containing sha-1 -> version string mappings and the contents of
board-info.txt, so that the build can fail if board-info.txt and the
OTA images are out of sync.

Change-Id: Icb61dc2adefc240ced9059941582c23b629089c0
2012-03-21 09:18:15 -07:00
Doug Zongker
545b7996cc prefer an explicitly-set TARGET_BOARD_INFO_FILE
Change-Id: Ie667a4d0070d1f0bbdfe9fa6d96871bcceb959b8
2012-01-19 10:43:49 -08:00
Ying Wang
dc31d76b5d Use TARGET_BOARD_INFO_FILE to locate board-info.txt
So board-info.txt can be inherited from the parent device.

Change-Id: I5d99a2483b9a325e475f3c602d9e0f5d2b95e80c
2011-06-13 17:36:08 -07:00
Ying Wang
652654927d Don't clean INSTALLED_RADIOIMAGE_TARGET in target/board/Android.mk
We are deprecating use of AndroidBoard.mk. To move add-radio-file to
Android.mk, cleaning INSTALLED_RADIOIMAGE_TARGET may clean the radio
target set by other Android.mks that get included before
target/board/Android.mk.
Bug: 3500660

Change-Id: Iee19c40c18f0e9ec23bad4b6ab0e600756af615a
2011-03-01 14:16:58 -08:00
Jean-Baptiste Queru
3f4e53aa25 Allow devices without AndroidBoard.mk
A long time ago, Android.mk in devices had the same semantics
as the current AndroidBoard.mk. This eventually caused problems
(as it didn't allow having a true Android.mk there) so we switched,
and left an error behind in case people were still using the old
semantics (i.e. having an Android.mk but no AndroidBoard.mk).

Fast forward a few years to the present: we're finding that we want
to get rid of AndroidBoard.mk, so there are devices that will have
Android.mk but not AndroidBoard.mk. As this is becoming a legitimate
case, the error for it is removed, and the include for AndroidBoard.mk
is made optional.

Change-Id: Ic683419d4aaab122259715e0112660d2a6359e91
2010-09-15 11:59:33 -07:00
Ying Wang
35b84b287f Overwrite android-info instead of appending to it
if someone changes board-info.txt, then it should be copied out to
 out/target/product/<device>/android-info.txt, instead of appending.
2009-12-03 11:25:47 -08:00
Brian Swetland
2b80317be2 only auto-generate board= requirement if a board-info file is not specified
If a board-info file is specified (as is usually the case) we should honor
its requirements.
2009-11-25 13:43:25 -08:00
Doug Zongker
e01100c7ac generalize the definition of a "radio image"
Non-HTC devices may have multiple files constituting their "radio
image".  Generalize the INSTALLED_RADIOIMAGE_TARGET variable a bit:
initially define it as empty, then let AndroidBoard.mk files add to
it.  Provide a convenience function add-radio-image for them to call
to add files.  Put all those files into the target_files zip for use
in OTA and fastboot package construction.

Note that for HTC devices, this changes the name of the radio image in
the target_files zip:  instead of "RADIO/image" it will be
"RADIO/radio.img".  Tools that use the target_files zip will need to
be changed.
2009-06-22 17:46:19 -07:00
The Android Open Source Project
88b607994a auto import from //depot/cupcake/@135843 2009-03-03 19:28:42 -08:00
The Android Open Source Project
05806d7af6 auto import from //depot/cupcake/@135843 2009-03-03 18:28:14 -08:00
The Android Open Source Project
475fa12ade auto import from //branches/cupcake/...@130745 2009-02-10 15:43:57 -08:00
The Android Open Source Project
dcc08f073b Code drop from //branches/cupcake/...@124589 2008-12-17 18:03:49 -08:00
The Android Open Source Project
b6c1cf6de7 Initial Contribution 2008-10-21 07:00:00 -07:00