DFv1 drivers communicate with each other using the Banjo protocol. In DFv2, all communications occur over FIDL (Fuchsia Interface Definition Language) calls, for both drivers and non-drivers. So if your target driver for DFv1-to-DFv2 migration uses the Banjo protocol, you'll also need to migrate the driver to use FIDL to complete the migration.
Driver migration from Banjo to FIDL can be summarized as follows:
- Update the driver's
.fidl
file to create a new FIDL interface. - Update the driver's code to use the new interface.
- Build and test the driver using the new FIDL interface.
Before you start
Before you start jumping into the Banjo-to-FIDL migration tasks, check out the frequently asked questions page, which can help you identify special conditions or edge cases that may apply to your driver.
List of migration tasks
Banjo-to-FIDL migration tasks are:
- Update the DFv1 driver from Banjo to FIDL
- (Optional) Update the DFv1 driver to use the driver runtime
- (Optional) Update the DFv1 driver to use non-default dispatchers
- (Optional) Update the DFv1 driver to use two-way communication
- Update the DFv1 driver's unit tests to use FIDL
For more information and examples, see Additional resources.