Merge "Unconditionally put u-boot.env in the assembly directory."
diff --git a/host/commands/assemble_cvd/boot_config.cc b/host/commands/assemble_cvd/boot_config.cc
index 55cf70d..181a111 100644
--- a/host/commands/assemble_cvd/boot_config.cc
+++ b/host/commands/assemble_cvd/boot_config.cc
@@ -59,9 +59,9 @@
bool InitBootloaderEnvPartition(const vsoc::CuttlefishConfig& config,
- const std::string& uboot_env_path,
const std::string& boot_env_image_path) {
auto tmp_boot_env_image_path = boot_env_image_path + ".tmp";
+ auto uboot_env_path = config.AssemblyPath("u-boot.env");
if(!WriteEnvironment(config, uboot_env_path)) {
LOG(ERROR) << "Unable to write out plaintext env '" << uboot_env_path << ".'";
return false;
diff --git a/host/commands/assemble_cvd/boot_config.h b/host/commands/assemble_cvd/boot_config.h
index 53d021f..a7b6a12 100644
--- a/host/commands/assemble_cvd/boot_config.h
+++ b/host/commands/assemble_cvd/boot_config.h
@@ -19,5 +19,4 @@
#include <host/libs/config/cuttlefish_config.h>
bool InitBootloaderEnvPartition(const vsoc::CuttlefishConfig& config,
- const std::string& uboot_env_path,
const std::string& boot_env_image_path);
diff --git a/host/commands/assemble_cvd/flags.cc b/host/commands/assemble_cvd/flags.cc
index fb284c6..988c821 100644
--- a/host/commands/assemble_cvd/flags.cc
+++ b/host/commands/assemble_cvd/flags.cc
@@ -104,8 +104,6 @@
DEFINE_string(misc_image, "",
"Location of the misc partition image. If the image does not "
"exist, a blank new misc partition image is created.");
-DEFINE_string(uboot_env, "",
- "Location of the u-boot.env.");
DEFINE_string(boot_env_image, "",
"Location of the boot environment image. If the image does not "
"exist, a default boot environment image is created.");
@@ -255,9 +253,6 @@
SetCommandLineOptionWithMode("vendor_boot_image",
default_vendor_boot_image.c_str(),
google::FlagSettingMode::SET_FLAGS_DEFAULT);
- std::string default_uboot_env = FLAGS_system_image_dir + "/u-boot.env";
- SetCommandLineOptionWithMode("uboot_env", default_uboot_env.c_str(),
- google::FlagSettingMode::SET_FLAGS_DEFAULT);
std::string default_boot_env_image = FLAGS_system_image_dir + "/env.img";
SetCommandLineOptionWithMode("boot_env_image", default_boot_env_image.c_str(),
google::FlagSettingMode::SET_FLAGS_DEFAULT);
@@ -1020,7 +1015,7 @@
}
// Create boot_config if necessary
- if (!InitBootloaderEnvPartition(*config, FLAGS_uboot_env, FLAGS_boot_env_image)) {
+ if (!InitBootloaderEnvPartition(*config, FLAGS_boot_env_image)) {
exit(cvd::kCuttlefishConfigurationInitError);
}