Make system-as-root a phone specific thing
BUG: 110695415
Test: Build and boot auto
Change-Id: I52e396578261b5feb8949ee797d6d6e3d3422208
diff --git a/host/commands/launch/main.cc b/host/commands/launch/main.cc
index 264c37b..1a2cffe 100644
--- a/host/commands/launch/main.cc
+++ b/host/commands/launch/main.cc
@@ -142,8 +142,7 @@
DEFINE_string(wifi_tap_name, GetPerInstanceDefault("awifi"),
"The name of the tap interface to use for wifi");
// TODO(b/72969289) This should be generated
-DEFINE_string(dtb, vsoc::DefaultHostArtifactsPath("config/cuttlefish.dtb"),
- "Path to the cuttlefish.dtb file");
+DEFINE_string(dtb, "", "Path to the cuttlefish.dtb file");
constexpr char kDefaultUuidPrefix[] = "699acfc4-c8c4-11e7-882b-5065f31dc1";
DEFINE_string(uuid, vsoc::GetPerInstanceDefault(kDefaultUuidPrefix).c_str(),
@@ -442,6 +441,13 @@
FLAGS_initrd.clear();
}
}
+ if (FLAGS_dtb.empty()) {
+ if (FLAGS_initrd.empty()) {
+ FLAGS_dtb = DefaultHostArtifactsPath("config/system-root.dtb");
+ } else {
+ FLAGS_dtb = DefaultHostArtifactsPath("config/initrd-root.dtb");
+ }
+ }
if (FLAGS_cache_image.empty()) {
FLAGS_cache_image = FLAGS_system_image_dir + "/cache.img";
}