Commit graph

1740 commits

Author SHA1 Message Date
Max Bires
a1749987f0 Adding VENDOR_SECURITY_PATCH to vendor partition build.prop
This will add ro.vendor.build.security_patch to /vendor/build.prop on
device

Bug: 76428542
Test: ro.vendor.build.security_patch entry shows up under
/vendor/build.prop

Change-Id: I4f783e996cb425a49c2b12ae4f364e12c6ca7784
Merged-In: I4f783e996cb425a49c2b12ae4f364e12c6ca7784
(cherry picked from commit 56d444b98f)
2018-04-26 01:36:03 +00:00
TreeHugger Robot
9afed6c9ff Merge changes from topic "space_saver" into pi-dev
* changes:
  releasetools: Default journal size to 0 for system images.
  build_image: default extfs reserved size to 0 on RO partitions.
2018-04-21 00:25:32 +00:00
Ivan Podogov
205a970594 Add vendor properties blacklist
This change allows removing some vendor properties from
(vendor|system/vendor)/build.prop file based on a blacklist.

For WearOS Unified Builds, which can change the product name depending on
the chosen locale, we use runtime-generated value for ro.build.fingerprint,
but since the ro.vendor.build.fingerprint cannot be generated the same way,
we always hit a "Mismatched fingerprints" error.

Bug: 71555551
Test: manual
Change-Id: Ifad793187e930a28fbf9325b03468c7ea86076b7
Merged-In: Ifad793187e930a28fbf9325b03468c7ea86076b7
(cherry picked from commit d572632f3d)
2018-04-19 10:03:42 +00:00
Patrick Tjin
5ff758799c build_image: default extfs reserved size to 0 on RO partitions.
Defaults the reserved blocks for root to 0% on read only partitions
(system, system_other, vendor, oem).  It also adds support for
explicitly specifying the extfs reserved percentage via
BOARD_{SYSTEM,VENDOR,OEM,PRODUCT}IMAGE_EXTFS_RSV_PCT.

This eventually translates down to the -m option for mkfs.

Removing the reserved space can save at least  5% from the default.

  dumpe2fs system:
    Reserved blocks uid:      0 (user root)
    Reserved blocks gid:      0 (group root)

Bug: 75975085
Test: Build, verify reserved space is changed accordingly
Change-Id: I212d82741908b636db0d658a1c4847bbaadfd5ba
2018-03-31 10:22:42 -07:00
TreeHugger Robot
6ee73ee8c0 Merge "Allow addition of recovery DTBO to recovery image" into pi-dev 2018-03-29 23:51:09 +00:00
Hridya Valsaraju
d67d8609bb Allow addition of recovery DTBO to recovery image
Non-A/B devices need to include the DTBO image
within the recovery partition to be self-sufficient
and prevent OTA failures.

Test: Ran 'm dist' and verified that the DTBO image
was included in recovery.img using unpack_bootimg.
Also ran 'make' and verified that the DTBO image was
included in recovery.img using unpack_bootimg.

Bug: 74763691

Change-Id: I38c9c395c95d21f4da42cfa646063bd4416f6bd8
Merged-In: I38c9c395c95d21f4da42cfa646063bd4416f6bd8
(cherry picked from commit e74a38bc6d)
2018-03-29 17:51:57 +00:00
Bowgo Tsai
f1a138b296 Includes odm SELinux contexts files for recovery
Bug: 64240127
Test: normal boot and recovery boot a device
Change-Id: I475d2eef96d2091291b56410f403f14dd3292faa
Merged-In: I475d2eef96d2091291b56410f403f14dd3292faa
(cherry picked from commit 9967125332)
2018-03-21 20:33:53 +08:00
Tao Bao
2d2ce7dd02 Use bsdiff to generate recovery-from-boot.p for system-root-image.
This CL handles a path that uses system-root-image on non-A/B device.
For this path, we can't generate recovery-from-boot patch with imgdiff,
because boot/recovery images contain different number of entries (only
recovery iamge has ramdisk image now).

Using BOARD_USES_FULL_RECOVERY_IMAGE can work around the issue, at the
cost of extra size. Compared to carrying full recovery image, this CL
saves the cost of the kernel size, by putting a patch that's roughly the
size of the recovery ramdisk.

The applypatch executable already detects and handles a bsdiff patch
automatically. No change required to that end.

Note that it won't further reduce the patch size by handling that
ramdisk entry specially, because (a) that's the only difference between
the two images; and (b) there's no corresponding data in boot image to
be diff'd against.

Bug: 72731506
Test: `m dist` with aosp_angler-userdebug. Check the device can install
      recovery image successfully (after intentionally corrupting the
      recovery image).
Test: Build aosp_angler-userdebug with BOARD_BUILD_SYSTEM_ROOT_IMAGE set.
      Verify the generated patch files.
Test: Run validate_target_files.py with the target_files.zips.
Change-Id: I69c06f51ba8c39ae059c5e9a6872a9f10600cf17
Merged-In: I69c06f51ba8c39ae059c5e9a6872a9f10600cf17
(cherry picked from commit 6d5d623987)
2018-03-20 11:38:50 +08:00
Tao Bao
4181f531c7 Conditionally generate META/boot_filesystem_config.txt.
if BOARD_BUILD_SYSTEM_ROOT_IMAGE != true:  # case A
  - BOOT/RAMDISK corresponds to the / under normal boot, with matching
    fs_config in META/boot_filesystem_config.txt.
  - RECOVERY/RAMDISK corresponds to the / under recovery, with fs_config
    in META/recovery_filesystem_config.txt.
else:
  if BOARD_USES_RECOVERY_AS_BOOT == true:  # case B
    - ROOT/ corresponds to the / under normal boot, with fs_config in
      META/root_filesystem_config.txt.
    - BOOT/RAMDISK corresponds to the / under recovery, with fs_config
      in META/boot_filesystem_config.txt.
  else:  # case C
    - ROOT/ corresponds to the / under normal boot, with fs_config in
      META/root_filesystem_config.txt.
    - RECOVERY/RAMDISK corresponds to the / under recovery, with fs_config
      in META/recovery_filesystem_config.txt.
    - BOOT/RAMDISK doesn't exist.

This CL fixes case C, where we shouldn't try to generate
'META/boot_filesystem_config.txt' for BOOT/RAMDISK. It wouldn't be fatal
without this fix, but would wrongly scan the current directory and
include a large fs_config output into target-files.zip.

Bug: 72731506
Test: `lunch aosp_bullhead-userdebug` and `m dist`. (case A)
Test: `lunch aosp_marlin-userdebug` and `m dist`. (case B)
Test: Define 'BOARD_BUILD_SYSTEM_ROOT_IMAGE := true' for angler. `m
      dist` and check the generated target-files.zip. (case C)
Change-Id: I5582ce8cca464d535af0718be0fd8e65791bd6c2
Merged-In: I5582ce8cca464d535af0718be0fd8e65791bd6c2
(cherry picked from commit da01b211f8)
2018-03-20 11:36:55 +08:00
Dan Willemsen
389bbe45a2 Support a pre-extracted PDK zip
Pre-extracting the zip files are more sustainable for git, so that
objects can be shared if unchanged, rather than the 900MB zip file
changing on every build.

This also has the advantage that we could put an Android.bp file inside
the PDK, and Soong would just pick it up.

Bug: 68767391
Test: Build mini_arm64 PDK with platform.zip
Test: Build mini_arm64 PDK with extracted zip file
Change-Id: I16db030a731aea55b69c1d6e2260dbd70b167544
Merged-In: I16db030a731aea55b69c1d6e2260dbd70b167544
(cherry picked from commit 0663f685c2)
2018-03-09 00:27:56 -08:00
Jayant Chowdhary
dcf9ae8fb9 Merge "Collect all lsdump paths and write them to $(OUT_DIR)." am: 1fa15d7491 am: 210dc9010b
am: e47e3d302f

Change-Id: Ie745cfbbc1fa64fa59edd35f4e5454ab13a86b81
2018-03-02 18:08:54 +00:00
Jayant Chowdhary
1fa15d7491 Merge "Collect all lsdump paths and write them to $(OUT_DIR)." 2018-03-02 17:34:33 +00:00
Jayant Chowdhary
67e0cc5d63 Collect all lsdump paths and write them to $(OUT_DIR).
$(OUT_DIR)/target/product/$(TARGET_DEVICE)/lsdump_paths.txt will contain all
.lsdump paths relative to $(ANDROID_BUILD_TOP). This helps faster lookup while
running scripts to generate reference dumps.

Test: m -j findlsdumps for aosp_arm64_ab.
      $OUT_DIR/lsdump_paths/generic_arm64_ab/paths.txt has paths to lsdump files
      generated for the build.

Test: m -j findlsdumps for aosp_arm_ab.
      $OUT_DIR/target/product/generic_arm_ab/lsump_paths.txt has paths to
      lsdump files generated for the build.

Change-Id: Iab1640f57bf9d0af5e88e6dda64a610fedcbe87e
2018-02-28 16:29:51 -08:00
Luis Hector Chavez
0fae5d0806 Merge "Make mksquashfs generate a fs_config-friendly root entry" am: 3d4fb4e335 am: 6128d7f30d
am: 21025515e4

Change-Id: I710cbaa8379c118e0c6a519f5d737a6395de2646
2018-02-27 16:41:46 +00:00
Treehugger Robot
3d4fb4e335 Merge "Make mksquashfs generate a fs_config-friendly root entry" 2018-02-27 16:24:21 +00:00
Nan Zhang
972bd248f9 Merge "Use BUILD_NUMBER_FROM_FILE instead of BUILD_NUMBER in Make." am: d3bec931cd am: 90b8d087e6
am: 7e634580ba

Change-Id: I514525914843c2cad6591ed6f515aed3aecc286a
2018-02-22 02:36:22 +00:00
Nan Zhang
0abdb5811d Use BUILD_NUMBER_FROM_FILE instead of BUILD_NUMBER in Make.
<Two phase commits> Since internal master code has more places that use
BUILD_NUMBER (mostly in vendor/) than AOSP (conflict). We can't
deprecate BUILD_NUMBER directly. Therefore, we try to switch to
BUILD_NUMBER_FROM_FILE as much as possible at first. Then we will do
a one-off deprecation for BUILD_NUMBER in internal master next step.

Test: m -j
Bug: b/70351683
Change-Id: I14ffee7381933c9fde14c4bde8c0c14e45fe98bf
2018-02-21 14:12:18 -08:00
Dan Willemsen
b5ab2c7828 Merge "Revert^2 "Replace $(shell find | sort) with $(sort $(shell find))"" 2018-02-19 22:51:11 +00:00
Jaekyun Seok
9cbf2e00df Merge "Enable BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED for full-treble products" am: 42c7cf0631 am: cae2ca8ef5
am: aabb24c3fc

Change-Id: Ic36f71be5b0d900f13c4d7eb2cb56391110ac90d
2018-02-14 01:04:42 +00:00
Treehugger Robot
42c7cf0631 Merge "Enable BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED for full-treble products" 2018-02-14 00:30:23 +00:00
Tao Bao
5232f099f6 Revert^2 "Replace $(shell find | sort) with $(sort $(shell find))"
This reverts commit 14a3217ff9.

Reason for revert: Wrong blame for b/73143444.

Change-Id: Ibb23349fcbb3c1b855afdd426317e8d2d4fc0adc
2018-02-10 04:03:32 +00:00
Tao Bao
14a3217ff9 Revert "Replace $(shell find | sort) with $(sort $(shell find))"
This reverts commit be0b6cee4f.

Reason for revert: b/73143444

Change-Id: I51800646b816d639b40ee1f012b1bf225c04e0b6
(cherry picked from commit 586c8821083ad1bec874d6de5ab378dbb47dee58)
2018-02-09 19:05:19 -08:00
Colin Cross
de2d9195ff Merge "Move to-upper and to-lower to definitions.mk" am: 74413198b7 am: 7209b4066b
am: 3c508d0b3d

Change-Id: I73f796d5a53f57210f5fad53ca47bbe8af1e59f2
2018-02-09 18:51:06 +00:00
Colin Cross
18fae7a32e Move to-upper and to-lower to definitions.mk
So they can be used by art/test/Android.run-test.mk.

Also remove the line wrapping, which was inserting extra characters
at the beginning of the result, and add a sanity check.

Bug: 26275726
Test: no change to out/build-hikey960-test-art.ninja
Change-Id: I35b54c258a1dc76bb1a8a758ec4a08915a2b226d
2018-02-08 16:03:17 -08:00
Jaekyun Seok
c227ce7c25 Enable BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED for full-treble products
BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED can be true only if early-mount of
partitions is supported. But the early-mount must be supported for full
treble products, and so BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED should be
set by default for full treble products.

Additionally this CL sets ro.vndk.version regardless of
BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED.

Bug: 73078796
Test: tested with walleye
Change-Id: Icfe1b6957b55b0f9261d34d7e92db3dc5073cb58
2018-02-08 11:49:16 +09:00
Luis Hector Chavez
440da2d41a Make mksquashfs generate a fs_config-friendly root entry
This change adds a flag so that the mksquashfs wrapper scripts generate
an entry that is fs_config-friendly for the root inode. Namely, the root
entry is expected to have an empty filename.

Bug: 72745016
Test: m -j100 dist
Change-Id: Iebdf79c5af0b9d999b7e5f5fe240abfe52cbadda
2018-02-07 10:22:52 -08:00
Isaac Chen
585c2960b8 Merge "Add ro.vendor.product.cpu.* to vendor/build.prop" am: b943fb63bf am: f82423f012
am: 1b9a60bae5

Change-Id: I7e03498399edafd4ad298a65bf594bab0ab1f9ed
2018-02-07 02:42:24 +00:00
Isaac Chen
b943fb63bf Merge "Add ro.vendor.product.cpu.* to vendor/build.prop" 2018-02-07 01:57:12 +00:00
Dan Willemsen
246a7ee4cc Merge "Replace $(shell find | sort) with $(sort $(shell find))" am: 9f573a420e am: 0991eed377
am: 5c1bb42d60

Change-Id: I088e34a44d2b31c341c840fd59b886a99edc9661
2018-02-06 22:59:45 +00:00
Dan Willemsen
be0b6cee4f Replace $(shell find | sort) with $(sort $(shell find))
Kati's find emulator doesn't understand "| sort", so use use the make
function instead so that we can emulate the find commands.

 before: *kati*: shell time (regen): 1.316989 / 187
 after:  *kati*: shell time (regen): 1.249748 / 184

The time has a lot of variance, the important change is the reduction in
number of shell commands. Kati has other issues with some of these (it
doesn't support find's implicit -a), which is why it only goes down by
3. I'll be fixing Kati separately to handle those cases.

Test: diff out/build-aosp_taimen.ninja before&after
Change-Id: I5c8c2993f01a8a6af84963e903a8a0c186a61e82
2018-02-05 23:07:58 -08:00
Bowgo Tsai
66f0285f4d Merge "Renames sepolicy files from nonplat_* to vendor_*" am: 8b35ac67b2 am: 7d4299612b
am: 310f79ae18

Change-Id: I5a0101b1552f20b492bb94b3f5a5f2d6e6642306
2018-02-05 17:53:06 +00:00
Bowgo Tsai
09f88a6b88 Renames sepolicy files from nonplat_* to vendor_*
Bug: 64240127
Test: boot bullhead/taimen
2018-02-05 18:22:45 +08:00
Bowgo Tsai
90f5adfbbf Merge "Revert "Renames sepolicy files from nonplat_* to vendor_*"" am: 8a6ab0f240 am: 6703b82a0c
am: 5d4cc6de47

Change-Id: Ibe09ff8507355ba58dfd8e5d76d518fc6cc34b34
2018-02-03 10:13:22 +00:00
Bowgo Tsai
ec7dbbb537 Revert "Renames sepolicy files from nonplat_* to vendor_*"
This reverts commit 8b5f514038.
Fix angler/bullhead boot failure.

Bug: 72787689
Test: build
2018-02-02 07:58:45 +08:00
Bowgo Tsai
e419d370da Merge "Renames sepolicy files from nonplat_* to vendor_*" am: 5e7d417271 am: 897c432036
am: 8f03b86120

Change-Id: I4b38dcd1cc0f85c61c57d113df02fc45a714649d
2018-01-31 14:51:51 +00:00
Isaac Chen
8d11febd59 Add ro.vendor.product.cpu.* to vendor/build.prop
CPU/ABIs related information is already in system/build.prop. It
should also be included in the vendor image so it can still be
examined outside of a device, build environment, or $OUT directory,
by a standalone utility to check its basic characteristics and if
it's compatible with some specific system image (usually GSI).

Bug: 72079894
Test: Built and verified aosp_x86(_64):
      # On host
      $ grep ro.vendor.product.cpu $OUT/vendor/build.prop
      # On device
      $ getprop | grep ro.vendor.product
      $ su
      # grep ro.vendor.product /vendor/build.prop

Change-Id: Ic9ac8065d5983710840e33a805f982de75d86ce3
2018-01-31 14:27:37 +08:00
Bowgo Tsai
8b5f514038 Renames sepolicy files from nonplat_* to vendor_*
Bug: 64240127
Test: boot an existing device
Change-Id: I6d6ac7d9dee450b2a20649e5f4dbb8976f48061e
2018-01-30 16:15:12 +08:00
Pirama Arumuga Nainar
4103f7701e Merge "Write SOONG_MODULES_MISSING_PGO_PROFILE_FILE to $DIST_DIR" am: d33cac8af1 am: 7760fdff02
am: 64e15096e5

Change-Id: I4149b8650a3d1234034355f88a38f97e41a0abba
2018-01-30 06:48:03 +00:00
Treehugger Robot
d33cac8af1 Merge "Write SOONG_MODULES_MISSING_PGO_PROFILE_FILE to $DIST_DIR" 2018-01-30 06:34:15 +00:00
Pirama Arumuga Nainar
ae9595674b Write SOONG_MODULES_MISSING_PGO_PROFILE_FILE to $DIST_DIR
Bug: http://b/72642679

Store missing profile files and the modules that refer to them, passed
via SOONG_MODULES_MISSING_PGO_PROFILE_FILE variable, to
$DIST_DIR/pgo_profile_file_missing.txt as part of the 'dist' target.

Test: 'm dist' and verify creation of pgo_profile_file_missing.txt.
Change-Id: I4ac0a1f413cbb99b33ad1903aeebd3ebcf3b9f59
2018-01-29 14:48:08 -08:00
Steven Moreland
15f6a241ca Merge "Fix INSTALLED_ -> BUILT_ missing refactor piece." am: 98fce11494 am: a7f62c3864
am: e08d290862

Change-Id: I7818b32a508854e7815c484e8bd0284cd94733f0
2018-01-26 00:17:16 +00:00
Treehugger Robot
98fce11494 Merge "Fix INSTALLED_ -> BUILT_ missing refactor piece." 2018-01-25 21:23:28 +00:00
Steven Moreland
915f35166f Fix INSTALLED_ -> BUILT_ missing refactor piece.
Some of the dependencies for target-files-package were
refactored but only partially. Since these are satisfied
by transitive dependencies, the problem wasn't noticed
earlier.

Bug: N/A
Test: target-files-package finds dependencies

Change-Id: Ibdd7587f87735148e55d3b9835478075b6547efc
2018-01-25 10:45:26 -08:00
Jaekyun Seok
d1b1d594a5 Merge "Support /product partition" am: 8fe7f9bfa2 am: 039e0991d5
am: f430ea5ebf

Change-Id: I91381c19408afc350ba7cecf2ca6daf0881f9abd
2018-01-25 04:16:57 +00:00
Jaekyun Seok
b7735d8105 Support /product partition
This CL adds the following build flags to support building product partition
from Android build system.
- BOARD_AVB_PRODUCT_ADD_HASHTREE_FOOTER_ARGS
- BOARD_AVB_PRODUCT_KEY_PATH
- BOARD_AVB_PRODUCT_ALGORITHM
- BOARD_AVB_PRODUCT_ROLLBACK_INDEX_LOCATION
- BOARD_PREBUILT_PRODUCTIMAGE
- BOARD_PRODUCTIMAGE_EXTFS_INODE_COUNT
- BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE
- BOARD_PRODUCTIMAGE_PARTITION_SIZE
- BOARD_PRODUCTIMAGE_SQUASHFS_BLOCK_SIZE
- BOARD_PRODUCTIMAGE_SQUASHFS_COMPRESSOR
- BOARD_PRODUCTIMAGE_SQUASHFS_COMPRESSOR_OPT
- BOARD_PRODUCTIMAGE_SQUASHFS_DISABLE_4K_ALIGN
- BOARD_USES_PRODUCTIMAGE
- LOCAL_PRODUCT_MODULE
- PRODUCT_FOOTER_ARGS
- PRODUCT_PRODUCT_BASE_FS_PATH
- PRODUCT_PRODUCT_VERITY_PARTITION
- TARGET_COPY_OUT_PRODUCT
- TARGET_OUT_PRODUCT*

And PRODUCT_PRODUCT_PROPERTIES is added to save product-specific
properties in /product/build.prop.

Bug: 64195575
Test: succeeded building product.img with BOARD_PRODUCTIMAGE_PARTITION_SIZE,
BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE and PRODUCT_PRODUCT_VERITY_PARTITION.

Change-Id: I774e6a38003734421591e51bed103802ff84f432
2018-01-25 09:33:58 +09:00
Jin Qian
95873268f3 Merge "Add BOARD_EXT4_SHARE_DUP_BLOCKS to share duplicated blocks on ext4" am: 082837365d am: b6ff980ba5
am: 931d76e1c4

Change-Id: I8bfcd310517c8814907e55b1a328c29392612872
2018-01-24 04:21:38 +00:00
Jin Qian
fde9f7906b Add BOARD_EXT4_SHARE_DUP_BLOCKS to share duplicated blocks on ext4
This option applies to system.img and vendor.img.

Bug: 64109868
Change-Id: Ib4c7384049dca08e57441ef71cc81c2fba4462dd
2018-01-22 17:21:11 -08:00
Sen Jiang
1e1c35d051 Merge "Remove zlib_fingerprint support." am: 53a3f70efe am: 2dfaacdd93
am: c5ed82950b

Change-Id: I25e86717bfaf7f22e41d417d16f7b18d55f26ff1
2017-12-27 21:00:08 +00:00
Treehugger Robot
53a3f70efe Merge "Remove zlib_fingerprint support." 2017-12-27 20:49:24 +00:00
Sen Jiang
43935639fb Remove zlib_fingerprint support.
Test: m dist
Change-Id: I580993e5089b3eb73af0ee931dd222ebfd3a8593
2017-12-20 13:14:14 -08:00