Commit Graph

15 Commits

Author SHA1 Message Date
Jiyong Park e7569bc544 Merge "Add vbmeta module type" 2021-03-18 00:02:41 +00:00
Treehugger Robot ab534a3b5c Merge "bootimg signs image using verity_utils" 2021-03-17 23:37:04 +00:00
Jiyong Park 972e06c41f Add vbmeta module type
The module type is to create vbmeta image out of other partitions.

Bug: 180676957
Test: m microdroid_vbmeta microdroid_vbmeta_system
Inspect the built image using `avbtool info_image --image <image>`

Change-Id: Iac92e9ab1640dcd488af69842e09850a91262bf1
2021-03-16 11:34:11 +09:00
Jiyong Park ac4076de9d bootimg signs image using verity_utils
Previously, bootimg signed the image using avbtool. This didn't work
because avbtool always requires that the partition size is given via
'--partition_size' parameter. The partition size is hard to estimate
especially when the image is not for a real physical partition, but for
a logical partition in a composite image.

With this change, the signing of bootimg is done by verity_utils.py
which internally uses avbtool. The python script is capable of
calculating the minimum required partition size when the partition size
is not given.

In addition, this change adds 'partition_name' property to the
`android_filesystem` module type so that we can customize the partition
name field in the vbmeta descriptor.

Bug: 180676957
Test: m microdroid-boot-5.10
Change-Id: I2e4aa626cf06a2177b4a8d90ff9b9006d2927ae4
2021-03-16 00:34:57 +09:00
Jiyong Park ca5e611e0a Merge "bootimg supports v4 header" 2021-03-15 14:39:07 +00:00
Jooyung Han d0b3574072 Merge "Fix bootimg.cmdline to use ShellEscapeIncludingSpaces" 2021-03-12 09:10:22 +00:00
Jooyung Han 32cddd0ba5 Fix bootimg.cmdline to use ShellEscapeIncludingSpaces
bootimg.cmdline should be passed to mkbootimg's --cmdline flag as a
single argument. Because cmdline can have spaces we should escape it
with ShellEscapeIncludingSpaces rather than blindly putting double
qoutes with ShellEscape, which also puts single quotes when necessary.

Bug: 182092664
Test: m nothing && see build.ninja (microdroid's build commands)
Test: boot microdroid on VIM3L
Change-Id: I5d766bb0a816d829569c9ebfddf97c4f846f78f8
2021-03-12 14:38:46 +09:00
Jiyong Park b0eb3192c5 bootimg and logical_partition are OutputFileProducer
The two module types now implement OutputFileProducer so that we can add
them to the data dependencies of tests.

Bug: 181860941
Test: atest MicrodroidHostTestCase
Change-Id: If263fefb1e5cdb5b57c17eb389c6ecc11d8356f4
2021-03-09 20:31:51 +09:00
Jiyong Park 81aea9a0f2 bootimg supports v4 header
It's the latest version of android boot image header which supports
bootconfig. Bootconfig parameters are now passed via `bootconfig`
property.

Bug: 181936566
Test: m microdroid_boot

Change-Id: Iff8697434f7502fe56fca5bce5573e53f2f6ac60
2021-03-08 09:12:17 +09:00
Treehugger Robot 05785f0023 Merge "bootimg supports building (non-vendor) boot.img" 2021-02-22 23:53:15 +00:00
Treehugger Robot 277303f042 Merge "Add ctx to AndroidMkExtraEntriesFunc" 2021-02-22 22:40:31 +00:00
Colin Cross aa2555387d Add ctx to AndroidMkExtraEntriesFunc
Add a ctx parameter to AndroidMkExtraEntriesFunc to allow them to
access providers.

Test: m checkbuild
Change-Id: Id6becc1e425c3c3d8519248f8c0ce80777fac7cc
Merged-In: Id6becc1e425c3c3d8519248f8c0ce80777fac7cc
2021-02-19 23:05:40 +00:00
Jiyong Park 4bbd6cfcaf bootimg supports building (non-vendor) boot.img
Bug: 178562516
Test: m microdroid_boot-5.10
Change-Id: I120fc954eb00362bdd2c02e3f3ef147670c69d8f
2021-02-19 18:26:32 +09:00
Jiyong Park 1f55dbd0d6 boot_image modules inside APEX have correct names
This change fixed the problem that boot_image modules when installed to
an APEX get incorrect names like signed.img. The filename now is
"<modulename>.img" and can be overridden via the new `stem` property.

Bug: 178978059
Test: m
Change-Id: I1b25db04a4a2d888371b174c42f91a0cea87b877
2021-02-17 09:45:03 +09:00
Jiyong Park 1f7b93e976 Add bootimg module type
The new module type is to build the boot partition images. Boot
partition image consists of kernel, ramdisk, dtb, etc. which are
processed by the mkbootimg tool. There are two flavors of boot
partition: boot and vendor_boot. The choice is configured via the
'vendor_boot' property. Currently, only `vendor_boot: true` case is
supported.

But: 178978059
Test: m cf_bootimg-5.10
Change-Id: Iee689d9d666e8e6e5af7db02a76dd39d1e4d0e3a
2021-02-02 00:41:57 +09:00