[fastboot] Remove fastboot flash behavior
We will migrate to a stable Zedboot that is distributed via a separate
process in order to simplify the standardize the common path.
Continue will be removed in a future CL as well once the all devices
idle in Zedboot by default.
Bug: IN-571
Bug: IN-876
Bug: IN-975
Change-Id: I2d2d280d63fbe6356274f19052e905403cc0c380
diff --git a/botanist/zedboot.go b/botanist/zedboot.go
index 0b75240..054f591 100644
--- a/botanist/zedboot.go
+++ b/botanist/zedboot.go
@@ -10,12 +10,9 @@
"fuchsia.googlesource.com/tools/fastboot"
)
-// FastbootToZedboot uses fastboot to flash and boot into Zedboot.
+// FastbootToZedboot uses fastboot to boot into Zedboot.
func FastbootToZedboot(ctx context.Context, fastbootTool, zirconRPath string) error {
- f := fastboot.Fastboot{fastbootTool}
- if _, err := f.Flash(ctx, "boot", zirconRPath); err != nil {
- return fmt.Errorf("failed to flash the fastboot device: %v", err)
- }
+ f := fastboot.Fastboot{ToolPath: fastbootTool}
if _, err := f.Continue(ctx); err != nil {
return fmt.Errorf("failed to boot the device with \"fastboot continue\": %v", err)
}
diff --git a/fastboot/fastboot.go b/fastboot/fastboot.go
index 67c6b41..592247c 100644
--- a/fastboot/fastboot.go
+++ b/fastboot/fastboot.go
@@ -37,8 +37,3 @@
func (f *Fastboot) Continue(ctx context.Context) ([]byte, error) {
return f.exec(ctx, "continue")
}
-
-// Flash is equivalent to the command "fastboot flash <partition> <image>".
-func (f *Fastboot) Flash(ctx context.Context, partition string, image string) ([]byte, error) {
- return f.exec(ctx, "flash", partition, image)
-}