Commit graph

7001 commits

Author SHA1 Message Date
Logan Chien
8abf06faa4 Exclude system shared libs from fix suggestion am: 751a987bcc
Original change: https://android-review.googlesource.com/c/platform/build/+/1190333

Change-Id: Ie9ff04af02f76aa0aafd934aa1cb8d13b041bdd0
2020-09-28 04:13:26 +00:00
Chris Gross
69c6598b21 Merge "Misc fixes to release tools." 2020-09-26 18:13:24 +00:00
Stephen Hines
7f5d326ce2 Fix ordering of checks based on llvm-readobj output.
llvm-readobj has reordered some of its output, causing issues when
checking for DT_SONAME and other fields.

Bug: http://b/169195129
Test: m for a failing target
Change-Id: Ifbc120b703ec47b52e77c2baf0e4d080960e9ef9
2020-09-22 20:54:21 -07:00
Logan Chien
751a987bcc Exclude system shared libs from fix suggestion
This commit removes system shared libs (e.g. libc, libdl, or libm) from
the prebuilt ELF check fix suggestion.

Bug: 141925662
Test: Write a bad Android.mk module and check fix suggestions
Change-Id: I4a827d07b24a976c1910b814126790abbeccc793
2020-09-22 18:55:11 +08:00
Chih-hung Hsieh
d890f596ce Merge "Add new Java/C++/Yacc warning patterns" 2020-09-22 07:11:54 +00:00
Chris Gross
435b8fe7ba Misc fixes to release tools.
- Remove vendor_dlkm and odm_dlkm from the default list of items that
need to be merged
- Allow a prebuilt system.img to be used when adding images to the
target files archive

Test: Built Pixel 3a and inspected the output
Change-Id: If5291fff559ed9517133f6b476d8dee2500c5b4c
2020-09-21 13:37:21 -07:00
Tom Cherry
787ef71f29 Merge "Use libcutils_headers for android_filesystem_config.h" 2020-09-21 17:26:10 +00:00
Chih-Hung Hsieh
e8f4a716ad Add new Java/C++/Yacc warning patterns
Test: warn.py --url=http://cs/android --separator='?l=' build.log > warnings.html
Test: warn.py --gencsv build.log > warnings.csv
Change-Id: I49eafa322902f0587738b583b6262117595318ee
2020-09-18 21:51:06 -07:00
Tom Cherry
54752bf0ae Use libcutils_headers for android_filesystem_config.h
android_filesystem_config.h is found since system/core/include is on
the include path for all projects and contains a symlink to the real
android_filesystem_config.h.  This is fragile and the below bug seeks
to remove this symlink and have users correctly depend on
libcutils_headers.

Bug: 165825252
Test: build
Change-Id: Ie921c4fd96d6e4e42d127bfbfe7a892756ad9495
2020-09-18 22:49:10 +00:00
Treehugger Robot
281affb8a8 Merge "fs_config: Update docs" 2020-09-17 17:15:56 +00:00
Tom Cherry
329545d912 fs_config: Update docs
1. Convert to README.md
2. Sync come content with the updates on source.android.com
3. fs_config uses bionic/libc/kernel/uapi/linux/capability.h, not
system/core/include/private/android_filesystem_capability.h as the
capability header, so update the documentation accordingly.

Test: n/a
Change-Id: I24a084d7a804d3f5d2259cfcea85b8ff4e79d290
2020-09-16 16:21:30 -07:00
Yifan Hong
4e501b58b8 Merge "Revert "Add modules partition."" 2020-09-16 22:45:54 +00:00
Yifan Hong
c08cbf0f4a Revert "Add modules partition."
Revert submission 1413808-modules_partition

Reason for revert: modules partition no longer needed
Reverted Changes:
Iceafebd85:Add modules partition
I2fa96199a:rootdir: Add modules directory
Ie397b9ec6:Add modules partition.
I4200d0cf5:fastboot: add modules partition

Bug: 163543381

Change-Id: Iec1d9421bbfeb114fb705f85d910c6def1f211b6
2020-09-15 19:09:26 +00:00
Luca Stefani
e0fc4caea9 Sync modules required by releasetools
Test: m otapackage
Change-Id: Id9e43909f3600224af5649b2615dffd7d59723eb
2020-09-12 06:10:13 +00:00
Joe Onorato
55c090ebe0 Merge changes I4a43604b,I7200f5f9,If3402a0a
* changes:
  Add CSV output of remaining makefiles for bp converstion
  Refactor the mongo main() into a class in mk2bp_catalog.py
  Add per-partition summaries and "easy" transitions to mk2bp_catalog
2020-09-11 05:46:48 +00:00
Yifan Hong
b1e66600c0 Merge "Add modules partition." 2020-09-11 00:25:24 +00:00
Joe Onorato
3198607cfd Add CSV output of remaining makefiles for bp converstion
Test: m out/target/product/$(get_build_var TARGET_DEVICE)/mk2bp_remaining.html out/target/product/$(get_build_var TARGET_DEVICE)/mk2bp_remaining.csv
Change-Id: I4a43604b2d536387c787b02a4627a0ad9e2a6ff9
2020-09-10 14:09:29 -07:00
Joe Onorato
8ade9b2e00 Refactor the mongo main() into a class in mk2bp_catalog.py
Test: m out/target/product/$(get_build_var TARGET_DEVICE)/mk2bp_remaining.html
Change-Id: I7200f5f9a6735bb0da3928aa5dc74723d69752d3
2020-09-10 14:09:28 -07:00
Joe Onorato
934bd8dcfc Add per-partition summaries and "easy" transitions to mk2bp_catalog
"Easy" means makefiles that are both clean themselves and
only depend on clean targets themselves too.

Test: m out/target/product/$(get_build_var TARGET_DEVICE)/mk2bp_remaining.html
Change-Id: If3402a0ada5d9db5fb04c617d197ab28d695b03c
2020-09-10 14:09:28 -07:00
Yifan Hong
c0f187f5f9 Add modules partition.
Modules partition is a dynamic read-write partition.
- AVB is not enabled on the partition
- OTA is file-based; see follow up CL for details
- No build prop files; in particular, no build fingerprint
- No fs_config
- No notice files; notice files are included in individual APEXes

Test: build on CF
Bug: 163543381

Change-Id: Ie397b9ec61dfd1c158450d050196024604854d4d
2020-09-09 15:00:02 -07:00
Kelvin Zhang
7a1364a36a Merge "Generate partition timestamps in ota_from_target_files" am: 49fe034137
Original change: https://android-review.googlesource.com/c/platform/build/+/1402687

Change-Id: I23b48a511fded51330d7620ec748d36225175e2f
2020-09-04 12:37:45 +00:00
Kelvin Zhang
39aea44a96 Generate partition timestamps in ota_from_target_files
Test: make an OTA package
Bug: 162553432
Change-Id: I17b9f1b24307255b1e5115de12fa516126b32365
2020-09-03 14:04:21 -04:00
Treehugger Robot
5040d41e20 Merge "Add ota_metadata_pb2 to otatools.zip" am: 58c793ab0b
Original change: https://android-review.googlesource.com/c/platform/build/+/1416089

Change-Id: I77eeb78be1bcdfdae0a7f7b942af0a0307e1cc75
2020-09-02 12:56:13 +00:00
Kelvin Zhang
4d50ea4dd7 Add ota_metadata_pb2 to otatools.zip
Sometimes tests are being run by executing python -m unittest *.py. In
that case, invocation will fail due to missing ota_metadata_pb2, which
is auto generated from ota_metadata.proto(added in recent change).

Bug: 166718341
Test: unzip otatools.zip and python releasetools/test_utils.py
Change-Id: I597c7ef6dbd8e46ccde020b3122cc38a8df28dc9
2020-09-01 16:58:08 -04:00
Xin Li
37a9f38115 Merge "Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)" into stage-aosp-master 2020-09-01 20:03:45 +00:00
Tianjie Xu
f55227e25f Merge "Add per-partition build info into ota metadata" 2020-09-01 18:43:30 +00:00
Tianjie
2bb14864e0 Add per-partition build info into ota metadata
As part of the ota metadata work to support partial update, we should
add the per-partition device name, fingerprint, and version to the ota
metadata.

Bug: 151088567
Bug: 166154730
Test: unit tests pass, generate a package
Change-Id: I7a71a4860aad651daf9e62df39c60d72727c14ff
2020-08-31 14:17:10 -07:00
Tianjie
d5563371d4 Add more enums to the ota type
We'd better have a default type for enums. It's safe to change the
proto definition now since no one is parsing the new meta.

Also add the brick type for manually generated brick pkgs.

Bug: 166154730
Test: unit tests pass
Change-Id: Ie6d4e695c298313276b559601509c9a7a7ee91b1
2020-08-31 14:06:31 -07:00
Xin Li
c2fd58fe67 Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: Ie00dbea32e074838466eeed00f316250c2b4f3c2
Change-Id: I9ee3441fd4d063b9dd489cb1b01d3dbc11332457
2020-08-29 01:19:44 -07:00
Treehugger Robot
002863d698 Merge "Switch to aapt2" 2020-08-29 00:30:28 +00:00
Kelvin Zhang
f5f3eaf01c Switch to aapt2
We already moved to aapt2 in Android.bp, no aapt binary in otatools.zip.
So tests should be updated accordingly.

Test: unittest
Change-Id: I29776d75e108e16bcceda49b8be47a338ee8bc1c
2020-08-28 17:40:29 -04:00
Ram Muthiah
2ad69ab090 Merge "Revert "Revert "Add prebuilt bootloader var and add bootloader t..."" 2020-08-28 04:04:24 +00:00
Ram Muthiah
0c4a352409 Revert "Revert "Add prebuilt bootloader var and add bootloader t..."
Revert submission 1411608-revert-1402265-cf-x86-bootloader-XGKLNEQAPF

Reason for revert: Breakage originally caused by change was fixed. Refer to tracking bug for details.
Reverted Changes:
I89e95d4a6:Revert "Add prebuilt bootloader var and add bootlo...
I8fe199351:Revert "Added bootloader binary to cf x86 based ta...

Bug: 166380489
Bug: 164917252
Test: local build and Treehugger build
Change-Id: Ia895aedd77f2ec825aefecaf74c6dfc1ce631c93
2020-08-27 13:18:24 -07:00
Tianjie
a2076137a1 Define the protobuf for OTA metadata
Background in http://go/android-partial-updates. For partial update
(e.g. system-only) or devices with mixed build, the current
fingerprint & device name no longer suffice as the precondition to
install the package.

Therefore, we need to additionally include the per-partition build
props into the ota metadata. We also define a protobuf for the metadata
so it can be extended later. The metadata of the legacy format is also
kept for backward compatibility.

Bug: 151088567
Test: unittest pass, generate an OTA and check the result
Change-Id: I716f7da54a393cd340280dbddc3c92b3460f8ef8
2020-08-26 16:17:35 -07:00
Kelvin Zhang
ff2c7454fe Merge "Fix lint errors on ota_utils.py" 2020-08-26 13:34:19 +00:00
Ankit Goyal
3c94b2710a Merge "Revert "Add prebuilt bootloader var and add bootloader to img zip"" 2020-08-26 06:54:34 +00:00
Ankit Goyal
6805873751 Revert "Add prebuilt bootloader var and add bootloader to img zip"
Revert submission 1402265-cf-x86-bootloader

Reason for revert: Droidcop-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=git_master&target=adt3-userdebug&lkgb=6791187&lkbb=6791249&fkbb=6791216, bug 166380489
Reverted Changes:
Id67b7bddd:Add prebuilt bootloader var and add bootloader to ...
Id713eaf20:Added bootloader binary to cf x86 based targets

Change-Id: I89e95d4a6a0534c8217785be9b90632fa110bc41
2020-08-26 06:40:59 +00:00
Treehugger Robot
ff6d873873 Merge "build_image relies on mkuserimg_mke2fs." 2020-08-26 04:46:56 +00:00
Ram Muthiah
861f05fb83 Merge "Add prebuilt bootloader var and add bootloader to img zip" 2020-08-26 02:59:22 +00:00
Yifan Hong
770234520d build_image relies on mkuserimg_mke2fs.
Add missing dependency.

Test: TH
Bug: 162921175
Change-Id: Ide1fe0b823e5e7a06c6c0252a5bef7bfaf6f7c28
2020-08-25 16:15:30 -07:00
Ram Muthiah
41a03d3aee Add prebuilt bootloader var and add bootloader to img zip
Needed to enable a prebuilt bootloader to make it to the dist and img
directories.

Added a flag to ensure only devices that request will have the update
package populated with a bootloader

Bug: 164917252
Test: local build and Treehugger build
Change-Id: Id67b7bddda14b51a523f794976591c6de04d71ca
2020-08-25 22:12:27 +00:00
Kelvin Zhang
2e41738566 Fix lint errors on ota_utils.py
Pylint reports lot of error on ota_utils.py, because some members of
OPTIONS object aren't defined. This CL moves some definition from
ota_from_target_files.py to ota_utils.py to fix these lint errors.

Test: Make an OTA package
Change-Id: I1e9f255d5919712b13329046c72650dfac184701
2020-08-25 15:58:24 -04:00
Kelvin Zhang
dd833dcfb2 Searches for debugfs_static in search path
When signing APks on build server, there might not be an android repo.
Usually deapexer.py will be run from otatools.zip after exctration. So
we should look for debugfs_static in search path

Bug: 165347497
Test: Use sign_apk_from_target_files without android repo
Change-Id: Ifaf91764ca0dc08d010f43a24bfe975a07a71e7f
2020-08-21 14:13:13 -04:00
Treehugger Robot
78439f4668 Merge "Searches for debugfs_static in search path" 2020-08-19 23:27:08 +00:00
Kelvin Zhang
d6b799a627 Searches for debugfs_static in search path
When signing APks on build server, there might not be an android repo.
Usually deapexer.py will be run from otatools.zip after exctration. So
we should look for debugfs_static in search path

Bug: 165347497
Test: Sign using self-service
Change-Id: I608870b0184bd8f5f07afa53355b39de47a97e1c
2020-08-19 16:12:23 -04:00
Tianjie
e3c31eac61 Fix the syntax in install-recovery.sh
We recently modify the logic in install-recovery.sh to support
non-A/B updates on VAB launched devices. And the position of the
$(getprop ro.boot.slot_suffix) is misplaced for the recovery image.
For example:
"if ! applypatch --check EMMC$(getprop ro.boot.slot_suffix):/dev/block/recovery:SHA1"
should be:
"if ! applypatch --check EMMC:/dev/block/recovery$(getprop ro.boot.slot_suffix):SHA1"

Bug: 156979431
Test: rerun add_image_to_target_file, then validate_target_files
Change-Id: Id2d45e281151a46d66b37ea8fdb7b5cb4ae72e81
(cherry picked from commit e55f62c971)
2020-08-17 18:38:13 -07:00
Yo Chiang
76279b102f Merge "Revert^2 "releasetools: Disable host module on darwin"" 2020-08-11 04:56:55 +00:00
Yo Chiang
096c515976 Revert^2 "releasetools: Disable host module on darwin"
0ac3666667

Exempt-From-Owner-Approval: Original change was approved

Change-Id: I4030dbc072a90f9b8704926c0956787c75bc5583
2020-08-11 04:56:31 +00:00
Treehugger Robot
b83c9d0461 Merge "extract_kernel.py: add support to output compiler information" 2020-08-11 02:32:23 +00:00
Kelvin Zhang
2f6571884d Merge "Move non-AB OTA generation code to a separate file" 2020-08-11 01:35:23 +00:00