diff options
author | Chad Reynolds <chadreynolds@google.com> | 2024-04-12 12:10:26 -0700 |
---|---|---|
committer | Chad Reynolds <chadreynolds@google.com> | 2024-04-18 17:44:09 -0700 |
commit | 74304d79edc6f049ffcae49ed2f80873e037dd91 (patch) | |
tree | 384cc53240206a860e3d7ffdea44aa918e799b39 | |
parent | 4e685778edd8caa263eb7db13df68f0db55d0e64 (diff) | |
download | cuttlefish-74304d79edc6f049ffcae49ed2f80873e037dd91.tar.gz |
Expand the list of vendor images
The added images should also come from the vendor side for mixed builds.
Changing constant name from "default" to "vendor" for naming to be more
clear about what identifies these sets of files.
Bug: 322887496
Test: m
Test: # see bug for discussions about which images should come from
which side in the mixed build case
Test: # particularly the image comparison sheet linked in #14
Change-Id: I0287744f64b48fa23c7cd20c30af7c309257ca11
-rw-r--r-- | host/commands/assemble_cvd/super_image_mixer.cc | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/host/commands/assemble_cvd/super_image_mixer.cc b/host/commands/assemble_cvd/super_image_mixer.cc index f8ebf7f38..8f445310a 100644 --- a/host/commands/assemble_cvd/super_image_mixer.cc +++ b/host/commands/assemble_cvd/super_image_mixer.cc @@ -20,6 +20,8 @@ #include <algorithm> #include <array> #include <memory> +#include <string> +#include <unordered_set> #include <android-base/strings.h> #include <android-base/logging.h> @@ -30,6 +32,7 @@ #include "common/libs/utils/files.h" #include "common/libs/utils/subprocess.h" #include "host/commands/assemble_cvd/misc_info.h" +#include "host/libs/config/config_utils.h" #include "host/libs/config/cuttlefish_config.h" #include "host/libs/config/fetcher_config.h" @@ -88,19 +91,24 @@ std::string TargetFilesZip(const FetcherConfig& fetcher_config, } constexpr char kMiscInfoPath[] = "META/misc_info.txt"; -constexpr std::array kDefaultTargetImages = { +constexpr std::array kVendorTargetImages = { "IMAGES/boot.img", + "IMAGES/dtbo.img", + "IMAGES/init_boot.img", "IMAGES/odm.img", "IMAGES/odm_dlkm.img", "IMAGES/recovery.img", + "IMAGES/system_dlkm.img", "IMAGES/userdata.img", "IMAGES/vbmeta.img", + "IMAGES/vbmeta_system_dlkm.img", + "IMAGES/vbmeta_vendor.img", + "IMAGES/vbmeta_vendor_dlkm.img", "IMAGES/vendor.img", "IMAGES/vendor_dlkm.img", - "IMAGES/vbmeta_vendor_dlkm.img", - "IMAGES/system_dlkm.img", + "IMAGES/vendor_kernel_boot.img", }; -constexpr std::array kDefaultTargetBuildProp = { +constexpr std::array kVendorTargetBuildProps = { "ODM/build.prop", "ODM/etc/build.prop", "VENDOR/build.prop", @@ -188,7 +196,7 @@ Result<void> CombineTargetZipFiles(const std::string& default_target_zip, continue; } else if (!android::base::EndsWith(name, ".img")) { continue; - } else if (!Contains(kDefaultTargetImages, name)) { + } else if (!Contains(kVendorTargetImages, name)) { continue; } LOG(INFO) << "Writing " << name; @@ -198,7 +206,7 @@ Result<void> CombineTargetZipFiles(const std::string& default_target_zip, for (const auto& name : default_target_contents) { if (!android::base::EndsWith(name, "build.prop")) { continue; - } else if (!Contains(kDefaultTargetBuildProp, name)) { + } else if (!Contains(kVendorTargetBuildProps, name)) { continue; } FindImports(&default_target_archive, name); @@ -212,7 +220,7 @@ Result<void> CombineTargetZipFiles(const std::string& default_target_zip, continue; } else if (!android::base::EndsWith(name, ".img")) { continue; - } else if (Contains(kDefaultTargetImages, name)) { + } else if (Contains(kVendorTargetImages, name)) { continue; } LOG(INFO) << "Writing " << name; @@ -222,7 +230,7 @@ Result<void> CombineTargetZipFiles(const std::string& default_target_zip, for (const auto& name : system_target_contents) { if (!android::base::EndsWith(name, "build.prop")) { continue; - } else if (Contains(kDefaultTargetBuildProp, name)) { + } else if (Contains(kVendorTargetBuildProps, name)) { continue; } FindImports(&system_target_archive, name); |