Commit Graph

6708 Commits

Author SHA1 Message Date
Tom Cherry
1a9f8356fd Error if $(TARGET_DEVICE_DIR)/android_filesystem_config.h exists
This was deprecated along with TARGET_ANDROID_FILESYSTEM_CONFIG_H so
warn if it still exists.

Test: successful error if it exists, no error if it does not
Change-Id: I7dde3c88aaf7ecec23ffe018cbe8b42ebadb2bf8
2019-02-14 10:02:04 -08:00
Tom Cherry
0241c8e6e7 Merge "Fix failing test_fs_config_generator.py tests" am: f83ba4e8b1 am: cff9af302b
am: 43fa4a9985

Change-Id: Ifaaf914b18620f7ffeb975c5998b77c050a459d0
2019-02-13 21:10:45 -08:00
Tom Cherry
43fa4a9985 Merge "Fix failing test_fs_config_generator.py tests" am: f83ba4e8b1
am: cff9af302b

Change-Id: Idde025803213c7f952e326065647ae41d1b8350b
2019-02-13 20:58:38 -08:00
Tom Cherry
f83ba4e8b1 Merge "Fix failing test_fs_config_generator.py tests" 2019-02-14 02:18:11 +00:00
Bill Peckham
6453fe1984 Merge "Skip some build steps if not building system image." am: 4a3c68bffa am: 8a4041a18e
am: 36b230c394

Change-Id: Idc9c8e73f2b8cbc178a42281dcdc03387ce67adc
2019-02-13 16:58:56 -08:00
Bill Peckham
36b230c394 Merge "Skip some build steps if not building system image." am: 4a3c68bffa
am: 8a4041a18e

Change-Id: I17249226965c48c599da4a6f932e4d63b0c7a5d0
2019-02-13 15:59:50 -08:00
Bill Peckham
cc57de3256 Skip some build steps if not building system image.
tools/releasetools/add_img_to_target_files.py: This patch excludes the
inclusion of the system path into the target files if it does not exist (which
it will not if we are not building the system image).

Bug: 123430711
Test: Disable building system image, verify that target files builds without system.
Change-Id: Iaf964ede2b1df5ea4e004b572fd91187a366e75e
2019-02-13 22:57:14 +00:00
Tom Cherry
766adc9cbc Fix failing test_fs_config_generator.py tests
Also run pylint and yapf to fix the style issues.

Test: these same tests
Change-Id: I0a783f7a6f08a90f615d94e9d16da0f314b7813f
2019-02-13 14:34:42 -08:00
Tianjie Xu
34689e2412 Merge "Code improvement to adjusted the blocks size for care_map file" am: b8ac90803c am: 9cdba9ba97
am: 89527442c9

Change-Id: I560a1be990280565851b84c1558a7e5153b88eca
2019-02-13 12:37:38 -08:00
Tianjie Xu
89527442c9 Merge "Code improvement to adjusted the blocks size for care_map file" am: b8ac90803c
am: 9cdba9ba97

Change-Id: I67efdb6a6c8e186c706b35f0dc4984d2bafc7c99
2019-02-13 12:24:07 -08:00
Tianjie Xu
b8ac90803c Merge "Code improvement to adjusted the blocks size for care_map file" 2019-02-13 19:49:48 +00:00
Shashikant Baviskar
16a73897c3 Code improvement to adjusted the blocks size for care_map file
Bug: 123931528
Test: python -m unittest test_add_img_to_target_files
Change-Id: I589bc9681bccfa07588cab94f53f69d637d6f0f9
2019-02-13 18:34:50 +00:00
Bowgo Tsai
45db7cefb3 Support verifying system_other
This commit extracts the AVB key used to sign system_other.img into
system.img, for init to verify system_other's AVB metadata.

The extracted key will locate in:
    /system/etc/security/avb/system_other.avbpubkey

Bug: 123611926
Test: build and checks the following is generated
      $OUT/system/etc/security/avb/system_other.avbpubkey

Change-Id: Icdc703ff5a0d50f8140bb652507b9b4cbc8a2118
2019-02-13 17:00:49 +08:00
Tom Cherry
e43a7743f3 Merge "Remove TARGET_ANDROID_FILESYSTEM_CONFIG_H" am: 8bca10ade4 am: 1e29059140
am: 531ef2df70

Change-Id: Iab36b896d1854e4d35c01f086624db95b8933715
2019-02-12 13:46:43 -08:00
Tom Cherry
531ef2df70 Merge "Remove TARGET_ANDROID_FILESYSTEM_CONFIG_H" am: 8bca10ade4
am: 1e29059140

Change-Id: I1d7273bc93d8eab2903ad7478a033902162dd836
2019-02-12 13:42:10 -08:00
Tom Cherry
8bca10ade4 Merge "Remove TARGET_ANDROID_FILESYSTEM_CONFIG_H" 2019-02-12 21:10:41 +00:00
Steven Laver
1d44c50317 Merge "Allow properties to be derived from partition-specific properties" am: 0cf76f544b am: 4225bbcbbe
am: c1103c969e

Change-Id: Id00f6573b660dfa024056bacd3f13f97f6d50b8a
2019-02-12 09:00:33 -08:00
Steven Laver
c1103c969e Merge "Allow properties to be derived from partition-specific properties" am: 0cf76f544b
am: 4225bbcbbe

Change-Id: I2730b6ecd3197806290e9540d6f2fc3a07f510d2
2019-02-12 08:56:18 -08:00
Steven Laver
9e73e82a12 Allow properties to be derived from partition-specific properties
This change allows ro.product.[brand|device|manufacturer|model|name] and
ro.build.fingerprint to be derived at boot time (and in the OTA
generation scripts) from partition-specific properties.

Test: booted system image, verified properties
Test: booted recovery image, verified properties
Test: unpacked OTA package, verified build fingerprint
Bug: 120123525
Change-Id: Iadd230a0577f35c7c37b0f911e91a5c2863ed1fe
2019-02-11 23:03:00 +00:00
Tom Cherry
e0f3ed5cd0 Remove TARGET_ANDROID_FILESYSTEM_CONFIG_H
TARGET_FS_CONFIG_GEN has existed as the preferred mechanism for two
releases, so we finally deprecate TARGET_ANDROID_FILESYSTEM_CONFIG_H.

Test: build
Change-Id: I299a4d1d1d893ac16d6e6ce2ec4659bfcdc19095
2019-02-11 13:45:01 -08:00
Yifan Hong
b44e4bba79 Merge "Add kernel info to compatibility.zip" am: 5cc9230914 am: b35937ca55
am: fe4f46caca

Change-Id: Ic789ae1626efb4d94d8c35457ed0caad56c01cb1
2019-01-31 11:31:09 -08:00
Yifan Hong
fe4f46caca Merge "Add kernel info to compatibility.zip" am: 5cc9230914
am: b35937ca55

Change-Id: I396a27bddf635afba797816688bb31a6558d6881
2019-01-31 11:25:04 -08:00
Yifan Hong
5cc9230914 Merge "Add kernel info to compatibility.zip" 2019-01-31 19:06:19 +00:00
Bowgo Tsai
a42850e7bd Merge "DAP: building system_other.img for retrofit devices" am: aa615a1b2d am: 2b51826211
am: 3ea7740946

Change-Id: Ib455de577ea0ec33fcb6bfffac13295429c2152b
2019-01-30 15:13:11 -08:00
Bowgo Tsai
3ea7740946 Merge "DAP: building system_other.img for retrofit devices" am: aa615a1b2d
am: 2b51826211

Change-Id: I9217850fa149493ddaf535b77ac7dc87b12b318e
2019-01-30 15:02:58 -08:00
Yifan Hong
770ab053b0 Add kernel info to compatibility.zip
Add kernel configs / version to verified_assembled_vendor_manifest.xml
so that the kernel of the incoming package can be checked against
the framework. Previously, the running kernel was used instead.

Bug: 111125947
Test: test_extract_kernel
Test: manual OTA on Pixel 3 from build:
      Android P (kernel version 4.9.96)
      to ToT build:
      device kernel version = (manually modified) framework requirement = latest,
      PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS = true

Change-Id: Id524a58e94bdb6bba348ca461c9d33614ce451a9
2019-01-30 13:28:03 -08:00
Bowgo Tsai
867ab6606e DAP: building system_other.img for retrofit devices
For dynamic partitions in retrofit devices, system partition will be
a logical partition but system_other is not. However, current
build system use the same settings (logical) for both system.img and
system_other.img, leading AVB unable to locate the footer from the end
of system_other partition.

This commit support building system_other.img with correct partition size
while building system.img as a dynamic image.

Bug: 123506156
Test: check there is "system_other_size=2952790016" in file
      $OUT/obj/PACKAGING/system_other_intermediates/system_other_image_info.txt
Test: build system_other.img, then
      `simg2img $OUT/system_other.img system_other.img.raw`, checks the
      raw image size.

Change-Id: I748320a7770c694d06f06f4a35bfceb622849aa8
2019-01-30 09:58:07 +08:00
Tom Cherry
a7003a4737 Merge "Remove ro.expect.recovery_id" am: c683233b64 am: 2432b8116a
am: d81af0d11b

Change-Id: Ibaea15235670bc252ec8f3b7240f24c9064e41ea
2019-01-29 09:32:55 -08:00
Tom Cherry
d81af0d11b Merge "Remove ro.expect.recovery_id" am: c683233b64
am: 2432b8116a

Change-Id: I42316425c3466278ff22b2e687c6fa45980cece1
2019-01-29 09:27:09 -08:00
Tom Cherry
c683233b64 Merge "Remove ro.expect.recovery_id" 2019-01-29 17:07:51 +00:00
Yifan Hong
75b56f71b3 Merge "releasetools: Really allow removing partitions" am: 68e2dc2086 am: 230086552b
am: a442906386

Change-Id: I5f5b2ba26c726b0258ca96d6986bee5b71fb8bff
2019-01-29 00:07:12 -08:00
Yifan Hong
9de8d673d5 Merge "dynamic partition update order is deterministic." am: 47b53c4136 am: 983dd182c7
am: 52fb92e735

Change-Id: Ia4b31a6394c0a4f49bfcbfc1f4c19f4fc2838a1c
2019-01-28 23:05:00 -08:00
Yifan Hong
a442906386 Merge "releasetools: Really allow removing partitions" am: 68e2dc2086
am: 230086552b

Change-Id: I3ec32b1ea0346d16775790b715fe6c13883c71e6
2019-01-28 22:45:03 -08:00
Yifan Hong
52fb92e735 Merge "dynamic partition update order is deterministic." am: 47b53c4136
am: 983dd182c7

Change-Id: I6c145d56d8b31da607361d2f7f9808cecbd36d7d
2019-01-28 22:18:33 -08:00
Yifan Hong
bb2658d5e2 releasetools: Really allow removing partitions
- Add hashtree_info to EmptyImage so that BlockDifference.Compute()
can accept EmptyImage() as target image, which is the case when
a partition is removed.

- BlockDifference also checks source_info_dict to determine
whether a partition is dynamic. When a partition is removed,
its name does not appear in target_info_dict.

- Add tests to ensure DynamicPartitionDifference() still works.

Test: DynamicPartitionDifferenceTest
Test: test_blockimgdiff

Change-Id: Iadb1db075f5dc344db6d5ade358c83b01231e443
2019-01-28 11:10:48 -08:00
Tom Cherry
56ff89a90a Remove ro.expect.recovery_id
This is not used by anyone and the other half of the code to compare
against it is already functionally dead, so remove this.

Test: build
Change-Id: I44ed087cb7735bbc23e30b6c310c80eb3b7b6488
2019-01-28 10:56:37 -08:00
Yifan Hong
79997e5a18 dynamic partition update order is deterministic.
Use an OrderedDict.
Test: builds

Change-Id: Ic3782c1961f0c2a735540b054eb3cace720c50bd
2019-01-25 12:36:17 -08:00
Bowgo Tsai
e0fed5fcfd Merge "Sign system_other.img with AVB" am: d2da2ce398 am: f58452cade
am: eaf3071e8d

Change-Id: I4c204fb6e8d38671fcc33a38fb9dc72cc2a5093d
2019-01-23 22:33:21 -08:00
Bowgo Tsai
eaf3071e8d Merge "Sign system_other.img with AVB" am: d2da2ce398
am: f58452cade

Change-Id: I92200b8374ffb56568fb25d362b1327c587b4bbd
2019-01-23 21:55:03 -08:00
Treehugger Robot
d2da2ce398 Merge "Sign system_other.img with AVB" 2019-01-24 05:31:37 +00:00
Yifan Hong
8246143b15 Merge "Really support removing / adding partitions." am: 2c0a7bc56d am: ebd97b08f5
am: 498fbce890

Change-Id: Id7da403abf85713dccb20790649e4beb1cb92b0e
2019-01-23 17:10:35 -08:00
Yifan Hong
498fbce890 Merge "Really support removing / adding partitions." am: 2c0a7bc56d
am: ebd97b08f5

Change-Id: I004a23f429e434e1b7c14e7ef84959ef4ff8e779
2019-01-23 17:05:16 -08:00
Yifan Hong
2c0a7bc56d Merge "Really support removing / adding partitions." 2019-01-24 00:51:32 +00:00
Hridya Valsaraju
fd919808af Merge "Support including DTB image" am: 2463c3ab2a am: 0322d59b4b
am: 5c672336d9

Change-Id: If6bc1d216af259853acedd18ecf33c8a341fcbc0
2019-01-23 13:36:05 -08:00
Hridya Valsaraju
5c672336d9 Merge "Support including DTB image" am: 2463c3ab2a
am: 0322d59b4b

Change-Id: Id7dfd3b1c45026a04be228fcb7901bc72f8397d7
2019-01-23 13:30:21 -08:00
Treehugger Robot
2463c3ab2a Merge "Support including DTB image" 2019-01-23 20:56:55 +00:00
Hridya Valsaraju
9683b2f136 Support including DTB image
Bug: 111136242
Test: When BOARD_PREBUILT_DTB_DIR is set correctly,
generated $OUT/boot.img contains the DTB image.

Change-Id: I282e31b04cc60383377b9e9b54f8fe64a8140242
2019-01-23 09:14:55 -08:00
Bowgo Tsai
1e04bf7260 Sign system_other.img with AVB
Support signing system_other.img but shouldn't include it into the
top-level vbmeta.img. system_other verifiation will not be included
in /vbmeta chains and will be done separately.

Bug: 112103720
Test: avbtool info_image --image $OUT/system_other.img
Test: avbtool info_image --image $OUT/vbmeta.img, checks 'system_other' is NOT included.
Test: Checks $OUT/obj/PACKAGING/system_other_intermediates/system_other_image_info.txt
      See the following:
        avb_system_other_hashtree_enable=true
        avb_system_other_add_hashtree_footer_args=--rollback_index 1551744000
        avb_system_other_key_path=external/avb/test/data/testkey_rsa4096.pem
        avb_system_other_algorithm=SHA256_RSA4096

Change-Id: Ia152aaab1387dcf556a42222adb39ea76881263a
2019-01-23 15:17:41 +00:00
Logan Chien
63b91d92da Merge "Add prebuilt ELF binaries checker" am: f42823aa7c am: 84722816db
am: b6e0c786d3

Change-Id: I118a2ae4f4feaf7cad0f6a12fa51fd888f60eddc
2019-01-22 23:40:27 -08:00
Logan Chien
b6e0c786d3 Merge "Add prebuilt ELF binaries checker" am: f42823aa7c
am: 84722816db

Change-Id: Idce0bddf2c525dcd676972977fd674e4122a0c8e
2019-01-22 23:34:21 -08:00