Even though build_image uses logger but there was no way to configure it
and even -v (verbose) didn't work.
common.ParseOptions() parses common arguments (e.g. -v -h --logfile).
Bug: n/a
Test: m
Test: build_image -v ... should print logs
Change-Id: I45a61ada9c6a5a616f05d3214e185d08b0f1c152
add_img_to_target_files.py will re-make image and build a new
signed vbmeta.img with new images in target-file.
We need to add vendor_kernel_boot into AVB signing list and make it
support that image.
Test: make dist -j110 and check vbmeta.img
Bug: 214409109
Signed-off-by: Lucas Wei <lucaswei@google.com>
Change-Id: Id07433f3dc33f95e2edd49de890f1e098cb9ef31
GKI targets, e.g., `gki_arm64` or `gki_x86_64` have only
boot-*.img files without a ramdisk. It has no other images,
e.g., init_boot.img, system.img, etc.
The current build system assumes that the ramdisk is either
in a boot.img or in a init_boot.img, which is not true for
those GKI targets. Adding a new flag to support building
boot-*.img without a ramdisk while not building an init_boot.img.
Bug: 220834917
Test: build and `unpack_bootimg`
Change-Id: I789343c3e3d9ff0c36c0e19680a9792bd31a1c9f
Add vendor_kernel_boot image for vendors whose bootloader support
extra first stage booting kernel modules ramdisks. This benefit
kernel repo to build kernel-artifacts only image without Andorid
artifacts dependency.
Bug: 214409109
Signed-off-by: Lucas Wei <lucaswei@google.com>
Change-Id: If07218b86a7751b3d452a172610af960f5f9ec74
Right now they're named ro.bootimage.* which is really confusing.
Change it so that if generic ramdisk is in boot.img, then name the
properties as ro.bootimage.*, otherwise if generic ramdisk is in
init_boot.img, then name the prop as ro.init_boot.*.
Bug: 211823573
Test: m dist
Change-Id: Icff3c7be04b9a3c6490fbf49ba4f05565b029890
gki_arm64 is a special target to build multiple GKI boot-*.img
files. It has neither system.img nor vbmeta.img. Skips checking
system.img and vbmeta.img in this case.
Bug: 223078405
Test: validate_target_files signed-gki_arm64-target_files-8277156.zip
Change-Id: I9d3c102c11787cf70c1e1fc8e6a552f8fd19ff72
This will be used in the following change to split
merge_target_files into a collection of smaller
more-focused scripts.
Bug: 221858722
Test: m otatools; Use to create merged builds
Change-Id: Ie01dac81c5f9f28f1e0fe037259eabd2478e60b6
In https://r.android.com/1991151 we removed an extra call to
AddCareMapForAbOta() from generate_care_map(), since
AddCareMapForAbOta() is already called by add_img_to_target_files.
However, when add_img_to_target_files generated care_map.pb it
didn't have the proper partition *_image_size values set for
images copied directly from the input target files packages.
This was because the generate_care_map() function, which sets
those *_image_size values, was executed after add_img_to_target_files.
At best this meant that care_map.pb was missing some information.
At worst, care_map.pb is missing entirely (when all images are
copied instead of regenerated).
This change:
- Renames generate_care_map() to set_copied_image_size_props()
and simplifies the logic a bit.
- Calls set_copied_image_size_props() before calling
add_img_to_target_files. Now, add_img_to_target_files will
have all necessary *_image_size values to perform the
META/care_map.pb generation step.
Bug: 187432243
Bug: 221858722
Bug: 223198503
Test: Use to create a merged build that does not regenerate any images.
Observe that META/care_map.pb is now generated as expected.
Change-Id: I1b3c8636be8cbe203222e60b1272a5e11f68589b
Use function LoadDictionaryFromFile(), instead of
LoadDictionaryFromLines(). Makes codes conciser.
Signed-off-by: jiajia tang <tangjiajia@xiaomi.com>
Change-Id: I15d6d4281a03be8a2f6f855054b1e4c1c3010fcd
EROFS images by default will only work on newer kernels. Old versions of
5.4 and 4.19 need an extra flag to mkfs.erofs.
Add BUILD_EROFS_USE_LEGACY_COMPRESSION to force this flag.
Bug: 222373106
Test: build with BUILD_EROFS_USE_LEGACY_COMPRESSION enabled
Change-Id: I3818e14356beaa11073c6b9fea6a6ad999bba4aa
When testing on cuttlefish, space consumption isn't a concern, so
compression can be disabled to save time. We also want to test the
non-compressed code path, as we expect some OEMs to use userspace COW
w/o compression.
If no --vabc_compression_param option specified to
ota_from_target_files, we will use the compression algo specified in
target_files's dynamic_partition_info.txt.
Bug: 219966986
Test: th
Change-Id: Ie18064b15938550ad6fb4efc86fc100c12321dc0
These wrapper scripts are difficult to maintain and there's not really
any value add. The argument strings don't match and every new build flag
has to be connected in an extra place.
Bug: 222715577
Test: make with EROFS enabled
Change-Id: Ie0e51cc30aa08b004d5d8345a2a2d885e193ffa9
Summary of changes:
- Rename extract_items args to be more generic.
- For many other functions, replace large argument lists with
the OPTIONS shared object.
- Rename process_* functions to merge_* to be more clear about
the purpose of the function.
- Remove verbose code in merge_ab_partitions_txt().
- Extract certain logic from merge_misc_info_txt() and place it
into other existing functions: dynamic partition and selinux
keys are now processed in their own functions.
- Remove verbose code in merge_package_keys_txt().
- Remove verbose code in create_file_contexts_copies().
- Handle extracting from META directly in merge_meta_files(),
rather than doing this extraction in create_merged_package()
- Storing the set of framework and vendor partitions in OPTIONS
so it can be reused by multiple functions without needing to
be parsed again.
Bug: 221858722
Test: atest test_merge_target_files
Test: Use merge_target_files to merge some builds
Change-Id: I8aa429c8fbb05223127b116aab84b2678ac264a8
Includes more folks to increase "bus factor" for these files,
as well as including the merge test.
Change-Id: I8a5e8d1600fd4e03f75338193609f496a964f790