PSA: New drivers need to be added to an all drivers list

23 views
Skip to first unread message

David Gilhooley

unread,
Aug 4, 2021, 4:50:57 PM8/4/21
to drive...@fuchsia.dev

If you don’t write drivers feel free to disregard this email.


Hello everyone! As part of an effort to make sure that current drivers do not bit-rot, we are requiring that all in-tree drivers are included in //build/drivers/all_drivers_list.txt and that they are also included in //bundles/drivers-build-only. Drivers that live in //vendor are excluded from this requirement.


We have populated these lists with all of the drivers in the tree already. If you are writing a new driver_module target then you will see an error when you build. The error will provide you with a command to update the //build/drivers/all_drivers_list.txt file. You will also see an error about your driver not appearing in //bundles/drivers-build-only. You will have to manually make sure that your driver is included in this group.


If your driver can only build for x64 then please add it to:

  //build/drivers/all_drivers_lists_x64.txt.


If your driver can only build for arm64 then please add it to:

  //build/drivers/all_drivers_lists_arm64.txt.


Please feel free to ask any questions about this transition! Thanks for reading and happy programming!


Best,

David


Extra Reading (Feel free to skip)

Why are we doing this? And why now?


Fuchsia programmers have written many drivers in the past. There are over 300 drivers in fuchsia.git today! At the same time, the Driver Framework has continued to evolve and make changes. As the Driver Framework team makes API changes, it can be hard to catch and update all of the drivers in the source code. There have been many drivers sitting in the source tree that are not included in any builds, and those drivers bit-rot over time to the point where they cannot build.


Having one target that builds all of the drivers is very helpful. It gives anyone working on the Driver Framework the confidence that they will not secretly break a little-used driver. It also gives driver authors the ability to quickly build all drivers for all platforms without having multiple builds.


For these benefits the Driver Framework is making sure that //bundles/drivers-build-only builds all the drivers under fuchsia.git. This will be especially important as the Driver Framework team works towards Drivers-As-Components and the stable Driver SDK. The Driver SDK will likely need several breaking changes as we work towards a stable Driver SDK, and so we will need these extra build rules in place to ensure that we don’t break anything.


Reply all
Reply to author
Forward
0 new messages