| RFC-0081: fastboot boot ||
|---|---|
| Status | Accepted |
| Areas | - General |
| Description | Replace Zedboot based netbooting flows with fastboot boot |
| Gerrit change | - [498344](https://fuchsia-review.googlesource.com/c/fuchsia/+/498344) |
| Authors | - [andresoportus@google.com](https://fuchsia-review.googlesource.com/q/owner:andresoportus@google.com) |
| Reviewers | - [amituttam@](https://fuchsia-review.googlesource.com/q/owner:amituttam@) - [boetger@google.com](https://fuchsia-review.googlesource.com/q/owner:boetger@google.com) - [bradenkell@google.com](https://fuchsia-review.googlesource.com/q/owner:bradenkell@google.com) - [cpu@google.com](https://fuchsia-review.googlesource.com/q/owner:cpu@google.com) - [curtisgalloway@google.com](https://fuchsia-review.googlesource.com/q/owner:curtisgalloway@google.com) - [dpursell@google.com](https://fuchsia-review.googlesource.com/q/owner:dpursell@google.com) - [raggi@google.com](https://fuchsia-review.googlesource.com/q/owner:raggi@google.com) - [tkilbourn@google.com](https://fuchsia-review.googlesource.com/q/owner:tkilbourn@google.com) - [travisg@google.com](https://fuchsia-review.googlesource.com/q/owner:travisg@google.com) - [alizhang@google.com](https://fuchsia-review.googlesource.com/q/owner:alizhang@google.com) |
| Date submitted (year-month-day) | 2021-03-09 |
| Date reviewed (year-month-day) | 2021-03-25 |

[Edit this RFC](https://ci.android.com/edit?repo=fuchsia/fuchsia/main&file=docs/contribute/governance/rfcs/0081_fastboot_boot.md)
[Edit RFC metadata](https://ci.android.com/edit?repo=fuchsia/fuchsia/main&file=docs/contribute/governance/rfcs/_rfcs.yaml&searchAndJump=-+name:+'RFC-0081')

## Summary

This document proposes deprecating RAM loading via Zedboot's
netsvc. Instead, it proposes replacing the netsvc based RAM loading
flows with flows based on `fastboot boot`.

## Motivation

Without netsvc RAM loading we can avoid the duplication of this
functionality between Zedboot and bootloaders. This RFC is inline with
RFC [Deprecate Zedboot-based paving for provisioning
devices](https://fuchsia.dev/docs/contribute/governance/rfcs/0075_deprecate_zedboot_paving),
converging around the use of fastboot instead of Zedboot, allowing for
the eventual deprecation and removal of Zedboot.

## Background

Netsvc RAM loading is commonly used for bringup workflows using
Zedboot. However bootloaders supporting `fastboot boot` already
provide this functionality, e.g. RAM loading a build deployed to a
device via the network, and also provide RAM loading via USB. Zedboot
was initially developed as a simple networking alternative to using
bootloaders because UEFI bootloaders vary in quality and in some
fastboot would not be reliable enough. This is less of a problem for
targets currently supported by Fuchsia with good enough support or
support in the works
(e.g. <https://fxbug.dev/42137791>). Platforms where
fastboot is not available have the backup option of flashing Fuchsia
to a USB device and booting from it.

## Design

Fastboot is a mature mechansim and in use in Android
devices. Bootloaders that support Fuchsia MUST follow the [fastboot
protocol](https://android.googlesource.com/platform/system/core/+/refs/heads/master/fastboot).

## Implementation

- Bootloaders will need to be updated for example, Gigaboot will need to be modified to implement `fastboot boot` <https://fxbug.dev/42137791>.
- fx scripts will need to be updated to redirect `fx netboot` users to `fastboot boot` (we likely want to wrap these flows in an fx/ffx helper command to make it as straightforward as possible).
- Infra will need to be transitioned to fastboot <https://fxbug.dev/42124288>.
- Zedboot deprecation as described in RFC [Deprecate Zedboot-based
  paving for provisioning
  devices](https://fuchsia.dev/docs/contribute/governance/rfcs/0075_deprecate_zedboot_paving).

## Backwards Compatibility

Once fx scripts are updated and Zedboot is removed, there will be no
backward compatibility with netsvc.

## Security and Privacy considerations

`fastboot boot` will be supported in unlocked "dev" bootloaders.
`fastboot boot` support for locked bootloaders and unlocked "prod"
bootloaders is under consideration but not defined in this RFC.

## Documentation

Documentation for developer workflows will need to be updated to
reflect the new `fasboot boot` based flows.

## Drawbacks, alternatives, and unknowns

A drawback is that this creates a commitment to support fastboot in
other Fuchsia bootloaders besides those that already support it. This
means, as new boards are brought up in Fuchsia, fastboot support is
required during early bringup. This includes support for `fastboot
boot` on Gigaboot bootloaders used on Intel NUCs
(<https://fxbug.dev/42137791>) and on coreboot based
systems like Pixelbooks.

## Prior art and references

Fastboot is a mature mechansim and in use in Android devices.
[](https://issues.fuchsia.dev/issues/new?component=1439230&template=1881640&description=Issue+on:+https://fuchsia.dev/docs/contribute/governance/rfcs/0081_fastboot_boot.md "Report a bug or suggest improvements on this page") [](https://cs.opensource.google/fuchsia/fuchsia/+/main:docs/contribute/governance/rfcs/0081_fastboot_boot.md "View the source code of this page") [](https://ci.android.com/edit?repo=fuchsia/fuchsia/main&file=docs/contribute/governance/rfcs/0081_fastboot_boot.md&cloneRepo=fuchsia/fuchsia:refs/heads/main&fullPath=fuchsia/docs/contribute/governance/rfcs/0081_fastboot_boot.md "Edit the source code of this page")