This playbook offers guidelines, best practices, examples, and reference materials to help you migrate existing legacy DFv1 drivers, which are stored in the Fuchsia source repository (fuchsia.git
), to the new driver framework (DFv2).
Before you begin working on driver migration, review some of the key concepts related to DFv2 and familiarize yourself with your DFv1 driver's unit tests and integration tests.
DFv2 enables Fuchsia drivers to be fully user-space components. Like any other Fuchsia component, a DFv2 driver exposes and receives FIDL capabilities to and from other components and drivers in the system.
Notice the following key differences between DFv1 and DFv2:
DFv1: Drivers are not components. The Banjo protocol is used for driver-to-driver communication. Driver host interfaces or the DDK (Driver Development Kits) wrapper are used to manage the life cycle of drivers.
DFv2: Drivers are components. FIDL is used for all communication, including communication between drivers and non-drivers. The driver framework manages the life cycle of drivers.
For more information, see Comparison between DFv1 and DFv2.
Here is a list for the expected conditions of your driver after completing the DFv2 migration:
This playbook is designed to guide you through the migration tasks in a linear manner, which are divided into the following two phases:
However, keep in mind that depending on your driver‘s features or settings, you may need to complete additional tasks that aren’t covered in this playbook.
The following guides are added to support tasks that were previously missing in the playbook: