Commit graph

67474 commits

Author SHA1 Message Date
Mitch Phillips
82a4cfb397 Merge "Add MTE ELF note to makefile-generated native tests." 2021-03-15 21:33:07 +00:00
Mitch Phillips
1a8405f827 Add MTE ELF note to makefile-generated native tests.
The MTE ELF note is intended to be added to all aarch64 test binaries.
This is already implemented for cc_test in soong, but we should also add
it to makefile-generated tests.

Bug: 156029370
Bug: 181133973

Test: atest CtsBionicTestCases on QEMU+MTE, observe previously-failing
      tests will now succeed.
Test: m camera_client_test; readelf -t <snip>/camera_client_test | grep
      memtag, make sure there's the elf note.

Change-Id: I2e7c4d1379ccdef04f05dd7aff675e6834d4799b
2021-03-15 10:45:05 -07:00
Ulya Trafimovich
a2404510af Reimplement verify_uses_libraries.sh in manifest_check.py.
Previously there were two different scripts that did similar things:
1) build/soong/scripts/manifest_check.py
2) build/make/core/verify_uses_libraries.sh

Both scripts extracted <uses-library> tags and `targetSdkVersion` from
the manifests of Java modules, but 1) worked for XML manifests, and 2)
worked for APKs. This CL reimplements the functionality from 2) in 1),
so that one script can handle both XML manifests and APKs.

Bug: 132357300

Test: lunch cf_x86_64_phone-userdebug && m && launch_cvd \
      adb wait-for-device && adb root && adb logcat \
      | grep -E 'ClassLoaderContext [a-z ]+ mismatch'
      # empty grep output, no errors

Change-Id: I386aa1a37699182cdf6f3f94ef8aa7b96a4017d3
2021-03-15 13:50:57 +00:00
Justin Yun
69f7191d5d Define __ANDROID_VENDOR__ and __ANDROID_PRODUCT__
__ANDROID_VNDK__ is defined for the modules that are able to use the
VNDK libraries. As both product and vendor variants define
__ANDROID_VNDK__, we don't know if a module is built for vendor or
product on build time.

__ANDROID_VENDOR__ and __ANDROID_PRODUCT__ macros can be used to
specify the image-variant-dependent codes.

Bug: 180646847
Test: m nothing
Change-Id: I9a37607b1e1e4e16eab02fb6c96d1a92158c96b8
2021-03-15 18:17:35 +09:00
goodway.wang_cp
50acc66276 Do not pack symbolic link instead copying
Change-Id: I43f56276541addfd6063655e53f21fe483780bc1
Signed-off-by: goodway.wang_cp <sz755cp2369@gmail.com>
2021-03-15 17:13:50 +08:00
Treehugger Robot
4d71d70496 Merge "Enable madvising of odex, vdex and art files" 2021-03-13 02:13:52 +00:00
Devin Moore
a74a5a19bf Merge "Add bootconfig to kernel cmdline when BOARD_BOOTCONFIG not empty" 2021-03-12 22:57:58 +00:00
Jagadeesh Pakaravoor
bee9f1d3f7 Enable madvising of odex, vdex and art files
Enable madvsing odex, vdex and art files to MADV_WILLNEED by setting the
size limits to UINT32_MAX.

Test: presubmit
Bug: 178853586
Change-Id: I7647a4be214dcd43341f216aba0a7791f877e379
2021-03-12 13:20:09 -08:00
Justin DeMartino
f15053ee39 Allow extending of the list of directories to be scanned for VSDK
Bug: 180925851
Test: m nothing, manually
Change-Id: I499f084f04e45eb719882be97e3a581ff868cc98
2021-03-12 19:38:14 +00:00
Treehugger Robot
b7ade64e3f Merge "Trigger data wipe on spl-downgrade as well" 2021-03-12 18:50:38 +00:00
Cindy Zhou
e48dccaa83 Merge "Enable cfi for 32bit arch" 2021-03-12 12:41:39 +00:00
Treehugger Robot
c2643ead16 Merge "check_all_partition_sizes_log -> .log" 2021-03-12 06:57:08 +00:00
David Anderson
0260435d70 Merge "Add --disable_vabc to ota_from_target_files help text." 2021-03-12 02:51:22 +00:00
Yifan Hong
d11953c3b7 check_all_partition_sizes_log -> .log
So that it can be viewed directly in the web browser.
Test: pass

Change-Id: Ic90a5d1511153a74726f1bdee5d9a058756f2d19
2021-03-11 14:47:59 -08:00
David Anderson
45b4230726 Add --disable_vabc to ota_from_target_files help text.
Bug: N/A
Test: N/A
Change-Id: Ib8f9cd5dae746b0f2dac15d4de378116f4b93178
2021-03-11 13:01:31 -08:00
Petri Gynther
3296b3136e Merge changes I899810c7,If73b15d7
* changes:
  Add vendor_dlkm, odm, odm_dlkm to dynamic partition filter
  Fix typo: DLKIMMAGE
2021-03-11 20:00:25 +00:00
Petri Gynther
345294f459 Merge changes Ibac6424f,Ief572e30
* changes:
  Copy vendor_ramdisk[-debug].img to out/dist
  Add support for building vendor_ramdisk-debug.img
2021-03-11 19:55:02 +00:00
Treehugger Robot
e4adbd3306 Merge "[LSC] Add LOCAL_LICENSE_KINDS to build/make" 2021-03-11 09:51:40 +00:00
Bob Badour
a8cf0e040e [LSC] Add LOCAL_LICENSE_KINDS to build/make
Added SPDX-license-identifier-Apache-2.0 to:
  core/tasks/tools/package-modules.mk

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m nothing

Exempt-From-Owner-Approval: janitorial work
Change-Id: I751a3d65c9791c5397e1bcdb89342c0b61647411
2021-03-10 23:31:03 -08:00
Petri Gynther
09865a4911 Add vendor_dlkm, odm, odm_dlkm to dynamic partition filter
When building images in -without-vendor clients, we need to filter out:
vendor, vendor_dlkm, odm, odm_dlkm

from the dynamic partitions list for the OTA image build to succeed.

Bug: 173653839
Bug: 182319837
Test: add vendor_dlkm, odm, odm_dlkm to dynamic partitions + make dist
Change-Id: I899810c7f46e40730280d89b94047779705b6e2f
2021-03-10 21:34:07 -08:00
Petri Gynther
689e11a7ce Fix typo: DLKIMMAGE
Fix two typos in Makefile.

It turns out that BOARD_ODM_VENDOR_DLKMIMAGE is not correct.
Need to replace it with BOARD_PREBUILT_ODM_DLKMIMAGE.

Test: use grep to check usage
Change-Id: If73b15d7abb7504aa313d616f6cef2d80d76705d
2021-03-10 21:07:41 -08:00
Yifan Hong
80ab21490b Add PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS to check_vintf_compatible_log
If kernel checks are missing, this can tell
us explicitly that the flag was disabled.

Test: pass
Change-Id: If5de88edbf352c163bc725c3e02a8cd29312e7f5
2021-03-10 18:10:13 -08:00
Treehugger Robot
3eca99ee7a Merge "VINTF logs ends in .log suffix." 2021-03-11 02:07:23 +00:00
Cindy Zhou
5d793fb740 Enable cfi for 32bit arch
Enabling cfi for 32-bit arch; b/35157333 seems to have been resolved in b/67507331.

Bug: 158010610

Test: manual interaction with Wimbley device: youtube video, chrome
navigations, gmail
MPTS testing on Sargo

Change-Id: I79eeb7e880ea09d857f8339901b67f77243a575c
2021-03-10 17:10:21 -08:00
Devin Moore
d6eab6f827 Add bootconfig to kernel cmdline when BOARD_BOOTCONFIG not empty
The 'bootconfig' kernel cmdline parameter needs to exist for the kernel
to search for bootconfig.
If BOARD_BOOTCONFIG contains anything, then add the parameter to the
kernel cmdline.

Test: Boot cuttlefish and verify /proc/cmdline has 'bootconfig' after
removing it from cuttlefish BoardConfig.mk
Bug: 173815685

Change-Id: I112a2a8e02ba7265c5547d9244298e07f26985ba
2021-03-10 16:28:49 -08:00
Devin Moore
b6840067c4 Merge "Throw an error if androidboot.hardware is used for bootconfig" 2021-03-10 22:42:12 +00:00
Petri Gynther
1426cab468 Copy vendor_ramdisk[-debug].img to out/dist
Test: make
Change-Id: Ibac6424f600b77d222585c17a91d59fb6985df26
2021-03-10 13:22:29 -08:00
Petri Gynther
d7946d13f0 Add support for building vendor_ramdisk-debug.img
Existing BoardConfig.mk variable:
BOARD_BUILD_VENDOR_RAMDISK_IMAGE := true

generates:
out/target/product/<name>/vendor_ramdisk.img

Extend the above to additionally generate:
out/target/product/<name>/vendor_ramdisk-debug.img

as the two ramdisks should be built together.

Test: make
Change-Id: Ief572e30c9225d0f5569e9ff89096c69accafc7f
2021-03-10 13:22:29 -08:00
Treehugger Robot
40ea7379a8 Merge "Workaround for existing packages check failure when the generic product is used with ART prebuilts." 2021-03-10 19:13:43 +00:00
Kelvin Zhang
06400177a3 Trigger data wipe on spl-downgrade as well
Test: make an spl-downgrade pkg
Change-Id: I3220719a1b3fe6b2f07bfb9fd526ec6e94ca16ba
2021-03-10 11:06:10 -05:00
Devin Moore
2e43e34d53 Throw an error if androidboot.hardware is used for bootconfig
Bootconfig does not allow the keys to have values and subkeys at the
same time.
"androidboot.hardware" and "androidboot.hardware.*" subkeys have existed as
kernel cmdline parameters. We want to throw an error at build time when
"androidboot.hardware" is use in bootconfig because it may be a common
occurence while migrating to bootconfig.
"hardware" should be used instead, without the "androidboot" prefix.

Test: build with and without "androidboot.hardware=test" in
BOARD_BOOTCONFIG
Bug: 173815685

Change-Id: Ic62a86cb23c9d79dbdbacd18eed3449210566ce7
2021-03-09 16:59:33 -08:00
Colin Cross
6023b1944d Merge "Fix kati regen due to build_number.txt" 2021-03-10 00:50:47 +00:00
Yifan Hong
fd150d3dcc VINTF logs ends in .log suffix.
This is so that it can be viewed in the web
browser directly.

Test: pass
Change-Id: Ib35a93ab6beac550a593ec46814100ff851f32a5
2021-03-09 12:19:33 -08:00
Martin Stjernholm
e564ec3502 Workaround for existing packages check failure when the generic
product is used with ART prebuilts.

The prebuilt packages in packages/modules/ArtPrebuilt don't get
Android.mk entries in the `generic` product (as opposed to e.g.
`aosp_arm`), so the enforce-product-packages-exist check fails there.

Exclude the ART APEX modules from the check as a workaround. It's also
necessary to remove the check for superfluous allow list entries, since
which modules are actually missing depends on many other variables (see
runtime_libart.mk).

Test: m nothing TARGET_PRODUCT=generic \
      SOONG_CONFIG_art_module_source_build=false
Bug: 172480615
Bug: 182105280
Change-Id: Id67278615f3e7c64c7658bbf1b2aa71ed6b381da
2021-03-09 12:49:06 +00:00
Ulyana Trafimovich
d534e22d10 Merge "Disable verify_uses_libraries check if dexpreopt is globally disabled." 2021-03-09 08:40:23 +00:00
Po Hu
6e64c14ce9 Fix kati regen due to build_number.txt
Do NOT touch build_number.txt if BUILD_NUMBER is explicitly set
but not changed from last build.

Bug: 182221512
Test: BUILD_NUMBER=123 m nothing
Change-Id: Ic88f6e0d2b9767d84e1ec5c826018d1ea08c0fc0
2021-03-09 14:11:05 +08:00
Petri Gynther
2ebf9b6798 Merge changes I65c0c3c9,I61740a30
* changes:
  Cleanup: fileslist target commands
  Cleanup: ram disk -> ramdisk
2021-03-09 01:22:22 +00:00
Treehugger Robot
896fee8a63 Merge "Cleanup: internal vendor ramdisk targets" 2021-03-08 23:37:42 +00:00
Petri Gynther
728e0bd468 Cleanup: fileslist target commands
Remove unnecessary @ and $(hide) from fileslist target commands.
Keep @echo to print that line with a progress bar [ x% x/y ].

Test: make
Change-Id: I65c0c3c9c045cc7ca2c2801ee6b3b0c996be59a9
2021-03-08 14:12:35 -08:00
Petri Gynther
4c063e33c8 Cleanup: ram disk -> ramdisk
Test: make
Change-Id: I61740a309c6637c10b935806f7b379cfaf3ae855
2021-03-07 00:52:46 -08:00
Petri Gynther
6a6d6217d7 Cleanup: internal vendor ramdisk targets
Test: make
Change-Id: I356e82ab9b32164ff734567f489faf31021dfc4b
2021-03-07 00:51:40 -08:00
Petri Gynther
0ceba881c5 Merge "Add support for building vendor_ramdisk.img" 2021-03-06 06:55:05 +00:00
Petri Gynther
828828ba07 Add support for building vendor_ramdisk.img
Allow BoardConfig.mk to set:
BOARD_BUILD_VENDOR_RAMDISK_IMAGE := true

to build:
out/target/product/<name>/vendor_ramdisk.img

This is done to support GKI device kernel development.

Kernel developers build vmlinux + DTB + GKI kernel modules locally
and then use kernel build tools to output:

* vmlinux + ramdisk.img => boot.img
* GKI kernel modules + DTB + vendor_ramdisk.img => vendor_boot.img

In other words, kernel developers use ramdisk.img and vendor_ramdisk.img
as prebuilts for building flashable boot.img and vendor_boot.img
directly from the kernel development environment.

Test: make vendorramdisk with BOARD_BUILD_VENDOR_RAMDISK_IMAGE := true
Test: make vendorramdisk with BOARD_BUILD_VENDOR_RAMDISK_IMAGE omitted
Change-Id: Id67839887b6bf608f4a5f13384c551c12ee9fdbd
2021-03-05 17:45:03 -08:00
Martin Stjernholm
b579ef2cf9 Merge "Always use ART sources for Fuchsia." 2021-03-05 22:46:22 +00:00
Martin Stjernholm
399fc37446 Always use ART sources for Fuchsia.
Fuchsia currently adds a number of ART internal packages in
device/google/fuchsia/fuchsia.mk, so it cannot use prebuilts.

Test: m TARGET_PRODUCT=fuchsia_arm64 \
        TARGET_BUILD_VARIANT={user,eng} nothing
  with SOONG_CONFIG_art_module_source_build set to false by default.
Bug: 172480615
Change-Id: I6af54accd8cc724b92072ae112960ace8faa70d5
2021-03-05 15:59:20 +00:00
Treehugger Robot
5d8217afb7 Merge "Fix m bootimage_test_harness failure" 2021-03-05 15:03:39 +00:00
Tianjie Xu
56cc49eab9 Merge changes I6ccf5fb9,I39a308fb
* changes:
  Add a check for missing entries in AVB_FOOTER_ARGS_BY_PARTITION
  Add missing R partitions in AVB_FOOTER_ARGS
2021-03-04 19:19:40 +00:00
Ulya Trafimovich
6f06f9ea7a Disable verify_uses_libraries check if dexpreopt is globally disabled.
Without dexpreopt the check is not necessary, and although it is good to
have, it is difficult to maintain on non-linux build platforms where
dexpreopt is generally disabled (the check may fail due to various
unrelated reasons, such as a failure to get manifest from an APK).

Bug: 181570790
Bug: 132357300

Test: Emulate the failed no-dexpreopt build in b/181570790:
  - modify verify_uses_libraries to make a subcommand fail
  - check that the build with dexpreopt fails:
    $ lunch cf_x86_64_phone-userdebug && m
  - set `WITH_DEXPREOPT := false` in make/core/board_config.mk
  - check that the build without dexpreopt succeeds (allow boot image
    and system servert dexproept to avoid unrelated build failures, this
    does not affect verify_uses_libraries):
    $ WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY=true \
      lunch cf_x86_64_phone-userdebug && m

Change-Id: Ic456be4e3047a60415a21fae658077165fb03165
2021-03-04 12:35:02 +00:00
Bowgo Tsai
f85e68f554 Fix m bootimage_test_harness failure
Commit I66b57de91042bfd56ba54a3659843d8cf7873955 added the support
for different boot partition sizes but didn't consider the case of
building boot-test-harness.img. This CL fixes this by allowing
'boot-test-harness.img' as a boot image variant.

Bug: 181618515
Test: `m bootimage_test_harness` pass
Change-Id: I190d3bf26725ac54999758efbca66a94c5cd5c86
2021-03-04 14:41:16 +08:00
Petri Gynther
b10f7d2a9c Merge "Rename vendor-ramdisk to vendor_ramdisk" 2021-03-04 04:40:04 +00:00