Merge "Add flag to disable super optimization" am: 90fc835d48
am: d61ce22b08
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2633939 Change-Id: Iad00d5fb9ed4c1d3820a5431fb5b0da4cbf3c043 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
79217e1af2
3 changed files with 12 additions and 0 deletions
|
@ -2191,6 +2191,7 @@ int FastBootTool::Main(int argc, char* argv[]) {
|
|||
{"cmdline", required_argument, 0, 0},
|
||||
{"disable-verification", no_argument, 0, 0},
|
||||
{"disable-verity", no_argument, 0, 0},
|
||||
{"disable-super-optimization", no_argument, 0, 0},
|
||||
{"force", no_argument, 0, 0},
|
||||
{"fs-options", required_argument, 0, 0},
|
||||
{"header-version", required_argument, 0, 0},
|
||||
|
@ -2228,6 +2229,8 @@ int FastBootTool::Main(int argc, char* argv[]) {
|
|||
g_disable_verification = true;
|
||||
} else if (name == "disable-verity") {
|
||||
g_disable_verity = true;
|
||||
} else if (name == "disable-super-optimization") {
|
||||
fp->should_optimize_flash_super = false;
|
||||
} else if (name == "force") {
|
||||
fp->force_flash = true;
|
||||
} else if (name == "fs-options") {
|
||||
|
|
|
@ -96,6 +96,7 @@ struct FlashingPlan {
|
|||
bool wants_set_active = false;
|
||||
bool skip_secondary = false;
|
||||
bool force_flash = false;
|
||||
bool should_optimize_flash_super = true;
|
||||
|
||||
std::string slot_override;
|
||||
std::string current_slot;
|
||||
|
|
|
@ -124,6 +124,10 @@ std::string FlashSuperLayoutTask::ToString() {
|
|||
|
||||
std::unique_ptr<FlashSuperLayoutTask> FlashSuperLayoutTask::Initialize(
|
||||
const FlashingPlan* fp, std::vector<ImageEntry>& os_images) {
|
||||
if (!fp->should_optimize_flash_super) {
|
||||
LOG(INFO) << "super optimization is disabled";
|
||||
return nullptr;
|
||||
}
|
||||
if (!supports_AB()) {
|
||||
LOG(VERBOSE) << "Cannot optimize flashing super on non-AB device";
|
||||
return nullptr;
|
||||
|
@ -188,6 +192,10 @@ std::unique_ptr<FlashSuperLayoutTask> FlashSuperLayoutTask::Initialize(
|
|||
|
||||
std::unique_ptr<FlashSuperLayoutTask> FlashSuperLayoutTask::InitializeFromTasks(
|
||||
const FlashingPlan* fp, std::vector<std::unique_ptr<Task>>& tasks) {
|
||||
if (!fp->should_optimize_flash_super) {
|
||||
LOG(INFO) << "super optimization is disabled";
|
||||
return nullptr;
|
||||
}
|
||||
if (!supports_AB()) {
|
||||
LOG(VERBOSE) << "Cannot optimize flashing super on non-AB device";
|
||||
return nullptr;
|
||||
|
|
Loading…
Reference in a new issue