Commit Graph

1403 Commits

Author SHA1 Message Date
Tao Bao 88c9dddd0f Revert "Move /default.prop to /system/etc/prop.default"
This reverts commit fad00e4318.

init fails to read default.prop under recovery:
init: Couldn't load properties from /default.prop: Too many symbolic links encountered

Bug: 62525809
Change-Id: I133e9025693e3e01278ec73c8d08860fc89d314b
2017-06-12 17:00:42 +00:00
Hung-ying Tyan fad00e4318 Move /default.prop to /system/etc/prop.default
This patch tries to fix the problem where the default properties need
to go with the system image especially on non-AB devices where
/default.prop is on the ramdisk image. A symlink is created at
/default.prop for backward compatibility.

Bug: 37815285
Test: Tested with ag/2376383. Booted pixel phones, checked the location
      of prop.default, verified the symlink, checked a few properties
      (via adb shell getprop) and manually tested a few apps (Camera,
      Maps etc).
      sign_target_files_apks.py was tested with:
      sign_target_files_apks -o -e DynamiteLoader.apk= -e DynamiteModulesA.apk= \
          -e DynamiteModulesB.apk= -e DynamiteModulesC.apk= -e DynamiteModulesD.apk= \
          -e GoogleCertificates.apk= out/dist/*-target_files-*.zip signed-target_files.zip

Change-Id: I1a9a2ba49c8252afc13ced3dea71253afbd3091e
2017-06-09 13:00:58 +08:00
TreeHugger Robot 48c8af949b Merge "Makefile: support build and avb signing of dtbo img" into oc-dev 2017-05-31 00:50:37 +00:00
TreeHugger Robot 290b8c71e4 Merge "Add the option to reserve headroom for partition images. This is useful for device with low disk space with different build variants." into oc-dev 2017-05-30 18:03:15 +00:00
Yueyao Zhu 161fe38009 Makefile: support build and avb signing of dtbo img
Test: make with corresponding configurations in BoardConfig.mk
- dtbo.img is copied to the OUT directory
- avbtool info_image --image dtbo.img shows avb hashes
- avbtool info_image --image vbmeta.img shows dtbo partition info

Bug: 37730955
Change-Id: If3edaab860926c743f18fd031c911b076eb09fab
(cherry picked from commit 211c90158c)
2017-05-26 11:58:21 +08:00
Michael Schwartz cb5b8d2d47 Include Treble metadata on Treble enabled devices
Bug: 38431773
Test: `m -j dist` for bullhead and sailfish and inspect target_files
Change-Id: I55da654f42af08f27a79249177a0078b66cf1662
2017-05-22 14:02:27 -07:00
Julius D'souza 8756c0fedc Add the option to reserve headroom for partition
images. This is useful for device with low disk
space with different build variants.

This is a manual cherry-pick from aosp/master.

Bug: 37469715
Test: regular image builds successfully, errors occur
when the headroom size is greater than available
partition space.

Merged-In: I526cdd0f84981bbd16e3afcfe1cd7fc43dce98ef

Change-Id: I840d212bb46612074c43b39e94546901f60e4b4c
2017-05-19 14:27:28 -07:00
Steve Muckle f4ccb4f735 fix builds on macOS when kernel modules are used
The mac implementation of sed has different requirements for the -i
option. Instead of using that, just redirect the output to the final
location of modules.dep, since it's being copied in the very next
line anyway.

Bug: 38268091
Test: run build with kernel modules on macOS
Merged-In: I49e4a1a69f01139ef47711ab1223d3a8e5cda568
Change-Id: I49e4a1a69f01139ef47711ab1223d3a8e5cda568
2017-05-12 16:28:26 -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
Jaekyun Seok 3b7560bf88 Split vendor license notices into vendor partition
Xml files will be generated instead of html files, and then Settings
will generate html file on runtime from xml files of partitions.

Test: build succeeded and tested on sailfish
Bug: 37099941
Change-Id: Id7899381a537b1947cbb6164ed2b4a98492334af
2017-04-28 16:29:17 +09:00
Bowgo Tsai 16ba563b71 AVB: support BOARD_BUILD_SYSTEM_ROOT_IMAGE
Passing --setup_rootfs_from_kernel to avbtool when
BOARD_BUILD_SYSTEM_ROOT_IMAGE is true

Bug: 33590159
Test: 'make' sailfish with BOARD_AVB_ENABLE := true
Test: 'make dist' with BOARD_AVB_ENABLE := true
Change-Id: Ieb58dd9ae6be1eceb90a33c739b85cff5cbc6e0a
Merged-In: Ieb58dd9ae6be1eceb90a33c739b85cff5cbc6e0a
(cherry picked from commit 9b3776017f)
2017-04-15 13:57:42 +08:00
Bowgo Tsai 3f0fd3d085 AVB: support signing vendor.img
Uses avbtool to sign vendor.img if BOARD_AVB_ENABLE is set.
It also allows appending additional arguments to avbtool via
BOARD_AVB_VENDOR_ADD_HASHTREE_FOOTER_ARGS.

e.g.,
  BOARD_AVB_ENABLE := true
  BOARD_AVB_VENDOR_ADD_HASHTREE_FOOTER_ARGS := --generate_fec

Bug: 35415839
Test: "make" with the above variables and use avbtool to check vbmeta is
      appended to vendor.img
Test: "make dist" with the above variables

Change-Id: I8ada38dff3def6d34613e77c67944def8a49f464
Merged-In: I8ada38dff3def6d34613e77c67944def8a49f464
(cherry picked from commit 8ee4a3db8c)
2017-04-15 13:57:21 +08: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
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
Jin Qian abcec5e0bf Makefile: copy mke2fs.conf to ota root
Bug: 34947454
Change-Id: I99999c4f56df295c0bb028daf3dcc0898176c5ed
(cherry picked from commit 53524b5da9)
2017-04-04 18:19:45 +00:00
Andreas Gampe e5339ae1d2 Build: Force system owner for ASAN in system
For tar-ed ASAN artifacts, enforce ownership by the system uid.

(cherry picked from commit 2c498a391b)

Bug: 36458146
Test: m && m SANITIZE_TARGET=true SANITIZE_TARGET_SYSTEM=true
Change-Id: I190cba3d160f15a89ef74f26e7aaa853a449929f
2017-03-31 16:44:09 -07:00
Andreas Gampe a92434f4c0 Build: ASAN in system
Add build system support for asan.tar.bz in the system image. This
is triggered by SANITIZE_TARGET_SYSTEM=true.

(cherry picked from commit 039b5c779f)

Bug: 36458146
Test: m && m SANITIZE_TARGET=true SANITIZE_TARGET_SYSTEM=true
Change-Id: I725f99f16a8c9182b1c7ad26580c73d3708f8554
2017-03-29 18:36:24 -07:00
Makoto Onuki 517d32d4da Add USE_FILESLIST_GO to switch to fileslist.go
fileslist.go is still disabled by default.  To enable, use:
USE_FILESLIST_GO=true m -j

Bug: 36274890
Test: Manual, with m -j

Change-Id: I722e17fa7fb6ba91e2b2c44cd7524d974cbe4a56
(cherry picked from commit 9fe97e231b)
2017-03-28 13:19:03 -07:00
Steve Muckle 5c06e9702a Merge "Fix modules.dep breakage with multiple module dependencies" am: 73461abd0c am: 9c0198e6e9
am: f54833b9d9

Change-Id: I23e179b3442365eaa5862fb2a1f08b3d9f600279
2017-03-28 01:30:58 +00:00
Steve Muckle f54833b9d9 Merge "Fix modules.dep breakage with multiple module dependencies" am: 73461abd0c
am: 9c0198e6e9

Change-Id: I4e1ecf13d31bec16a4fe44358c1dd8def0203916
2017-03-28 01:26:57 +00:00
Treehugger Robot 73461abd0c Merge "Fix modules.dep breakage with multiple module dependencies" 2017-03-28 01:11:39 +00:00
Steve Muckle b74e0b9b0d Fix modules.dep breakage with multiple module dependencies
If a module has multiple dependencies, the current regexp for making
the dependencies absolute paths only modifies the first dependency.

Test: build sailfish with module configuration including multiple
      dependencies
Change-Id: I8f2b40c8c5ec228aa8f831086bcdd561c8714910
2017-03-27 13:48:28 -07:00
Dan Willemsen 60ff056b6f Merge "Fix fileslist for system other image" am: b05fe25b9f
am: eb90e156e1

Change-Id: Iab1644dafeeae80254d5a0c0aeabc9bff6cfc1e2
2017-03-24 23:19:42 +00:00
Dan Willemsen 5c8542e1b4 Fix fileslist for system other image
This got lost from the previous backport, since systemotherimage wasn't
in AOSP yet.

(The Merged-In is a random Change-Id only on master so that this only
merges up to master)

Test: lunch aosp_marlin-eng; m -j systemotherimage
Change-Id: I92c05f27c92d877f3b83e5c5ae2e76728eb162bd
Merged-In: Iafed66e19bc114552b0261dd299379dbb37873c6
2017-03-24 21:26:21 +00:00
Jiyong Park 06241051e8 Make telephony work on generic system image
Bug: 36070427
Test: modem is up and emergency call can be made
Change-Id: Ic09200943a7ae7c51e420c6485f3b1b95c702265
2017-03-24 08:47:47 +00:00
Dan Willemsen bf9edaafc0 Merge "Depend on (bs|img)diff for target-files-package" am: 90151623fc am: e9e4001b34
am: 29651c25fa

Change-Id: If1f601510b7a33936c73d371a676bbcc509089f7
2017-03-24 07:33:13 +00:00
Dan Willemsen 29651c25fa Merge "Depend on (bs|img)diff for target-files-package" am: 90151623fc
am: e9e4001b34

Change-Id: Icb85efa78c4649a7f849dc5274a5a69413468966
2017-03-24 07:31:40 +00:00
Dan Willemsen d79a08f9fb Depend on (bs|img)diff for target-files-package
add_img_to_target_files may use these to create the recovery patch, so
add a dependency. They were previously a transitive dependency through
the system image to the standalone recovery patch creation.

Bug: 36575896
Test: rm out/host/linux-x86/bin/imgdiff; m -j target-files-package
Change-Id: I2a43220e94c09393e88e1d9950032f5665a0d2ce
2017-03-23 22:09:06 -07:00
Dan Willemsen f33d764b33 Merge "Ensure /system/vendor symlink exists in target-files-package" am: ac8b2ab702 am: 5179e70cc3
am: d54ba0b9ff

Change-Id: Iab5a3288253edeed370e58296594faa3239b0196
2017-03-23 22:06:32 +00:00
Dan Willemsen d54ba0b9ff Merge "Ensure /system/vendor symlink exists in target-files-package" am: ac8b2ab702
am: 5179e70cc3

Change-Id: I3e834d540c4b59c1499db2bd425cce2ef39ad986
2017-03-23 22:01:33 +00:00
Dan Willemsen f75d7fa8ea Ensure /system/vendor symlink exists in target-files-package
This used to happen in the system image creation, but the target-files
didn't really depend on the system image, so I removed that dependency.
But then we weren't creating the symlink all the time.

This should be safe to run in parallel with the same link step in the
system creation.

Bug: 36540023
Test: m -j target-files-package, ensure vendor symlink is created
      without system.img.
Change-Id: I37059fa1ce759a0870dc4c65c5515050992245e2
2017-03-23 13:22:46 -07:00
Dan Willemsen e272d9c64a Merge changes I84e4f878,I37b65eb9 am: bfc4f5e339 am: f4b5c3139c
am: 92fe48a888

Change-Id: I8a653a18a012117300df711e3a4fd9faa46d32c5
2017-03-23 02:25:51 +00:00
Dan Willemsen 92fe48a888 Merge changes I84e4f878,I37b65eb9 am: bfc4f5e339
am: f4b5c3139c

Change-Id: Ica893d7c29751a29174b43f585d7f4723e46992b
2017-03-23 02:23:21 +00:00
Treehugger Robot bfc4f5e339 Merge changes I84e4f878,I37b65eb9
* changes:
  Parallelize system*.img and target-files-package
  Add missing dependencies of targets-files-package
2017-03-23 02:16:35 +00:00
Dan Willemsen ea8f68ed6c Merge "Speed up non-AB ota_from_target_files in the build system" am: 47ba4239c8 am: 02e29c5b48
am: 62fb821faf

Change-Id: Idb3a0c991efe712865db7343861212a74ea56b0a
2017-03-22 02:26:50 +00:00
Dan Willemsen 62fb821faf Merge "Speed up non-AB ota_from_target_files in the build system" am: 47ba4239c8
am: 02e29c5b48

Change-Id: Ifeea7db10217543d49bdd1cf1e657287b313521a
2017-03-22 02:25:18 +00:00
Dan Willemsen 47ba4239c8 Merge "Speed up non-AB ota_from_target_files in the build system" 2017-03-22 01:41:39 +00:00
Dan Willemsen aadd499bc3 Parallelize system*.img and target-files-package
We don't actually need to build the system image before
target-files-package, we just need to make sure everything is present in
$(PRODUCT_OUT)/system. So switch the dependencies around.

This can't be done as easily for the vendor image, since it may be a
prebuilt, or we may need to install some kernel modules into
$(PRODUCT_OUT)/vendor when building vendor.img. It tends to be smaller
anyway, so the time savings isn't as big.

Test: Make sure the build server outputs the same files
Test: Ensure target-files-package is identical before/after.
Change-Id: I84e4f878491ab2b71582f4f49418dbfbba75590f
2017-03-21 16:36:14 -07:00
Dan Willemsen 653bea928a Add missing dependencies of targets-files-package
And move simple cases of $(ACP) to cp. That does change OTA/bin/updater
from 0640 to 0700, but that's more consistent anyways.

Test: m -j target-files-package; ensure it's the same before/after.
Change-Id: I37b65eb9ddccd2f360aa007f929ece35c9e44f9b
2017-03-21 16:32:43 -07:00
Nan Zhang 2deac67a86 Merge "Fixed the issue that dirname: META got zipped twice." am: 8b6458e9a9 am: e22afd4998
am: b7ef9849c3

Change-Id: I6b824a1ae1eb66a98aafc8c0148b0b49006edd8a
2017-03-21 22:40:23 +00:00
Dan Willemsen cea5cd210e Speed up non-AB ota_from_target_files in the build system
We've just created the target files package and still have the extracted
directory, so pass that to ota_from_target_files so that it doesn't have
to re-extract what we just compressed.

This saves a little bit of time -- for bullhead-userdebug on internal
master, this brings the time to build an OTA from ~340s -> ~310s. Much
of the time is still spent generating and signing the OTA.

Test: lunch bullhead-userdebug; m -j otapackage
Test: bullhead-ota-*.zip is identical before/after
Change-Id: Ib51cf6b02123e9c49280e9957c6590645470a52c
2017-03-21 15:34:27 -07:00
Nan Zhang b7ef9849c3 Merge "Fixed the issue that dirname: META got zipped twice." am: 8b6458e9a9
am: e22afd4998

Change-Id: Ied0d73ed404185b26fa69605b81beccdd8bad6ab
2017-03-21 22:33:24 +00:00
Treehugger Robot 8b6458e9a9 Merge "Fixed the issue that dirname: META got zipped twice." 2017-03-21 22:15:19 +00:00
Nan Zhang cabecd9c55 Fixed the issue that dirname: META got zipped twice.
When building target-files-package, dir: META has to be copied first
to help early validation of the .zip file.

In order to prevent $(zip_root)/META from getting copied twice to $@.list,
use the method (find -path -prune -o -print) instead of (grep pattern -v).

Test: m target-files-package
Bug: b/31676493
Change-Id: Id6b4d77fb62aa136253de88573cc51a575b90be2
2017-03-21 20:07:41 +00:00
Dan Willemsen a471822a57 Merge "Add LOCAL_VENDOR_MODULE as a synonym to LOCAL_PROPRIETARY_MODULE" am: d69837deea am: 6acc699303
am: ac6291f639

Change-Id: I3687f90010d283326d1d3c2ac545fb39b5996a21
2017-03-21 06:16:51 +00:00
Dan Willemsen ac6291f639 Merge "Add LOCAL_VENDOR_MODULE as a synonym to LOCAL_PROPRIETARY_MODULE" am: d69837deea
am: 6acc699303

Change-Id: I382bbf77b3068b9d70a9cc2619d585938ac6718b
2017-03-21 06:12:51 +00:00
Dan Willemsen 05a2b931e9 Add LOCAL_VENDOR_MODULE as a synonym to LOCAL_PROPRIETARY_MODULE
The vendor image will have more than just proprietary modules in it
under Treble, so let's stop marking open source code as proprietary just
to move it to vendor.

Bug: 36452052
Test: compare build-aosp_arm.ninja before/after, no changes.
Test: Try defining LOCAL_VENDOR_MODULE / LOCAL_PROPRIETARY_MODULE in the
same and different ways, ensure it works.
Change-Id: I0ab046bcb7563a20d44ed00667e18497ef0873a8
2017-03-20 20:57:04 -07:00
Alex Klyubin 4ed1bc98d1 Merge "Add /file_contexts.bin only to devices which need it" am: 77dab1ed35 am: 47b3e3d92e
am: 932def3aaa

Change-Id: Ib5a66afee6df3017c4ede1610729f66ac445b189
2017-03-14 14:56:55 +00:00
Alex Klyubin 932def3aaa Merge "Add /file_contexts.bin only to devices which need it" am: 77dab1ed35
am: 47b3e3d92e

Change-Id: I739ae1146cde7826b8afe67252b67ec5366c08f0
2017-03-14 14:52:23 +00:00
TreeHugger Robot d32f2916f5 Merge "Use BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED for system props split" 2017-03-14 00:40:13 +00:00