1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-15 19:23:01 +03:00
mobile-nixos/modules/stage-1/tasks
Samuel Dionne-Riel a96c2b845c boot/init: Add support for FunctionFS on GadgetFS
FunctionFS on GadgetFS requires this to happen in order:

 - (1) preparing the gadget
 - (2) preparing the function
 - (3) mounting the functionfs
 - (4) starting the daemon
 - (5) enabling the device

Doing any of these steps in the wrong order *will* fail. You cannot
mount functionfs if the function name hasn't been allocated yet. You
cannot start the daemon without functionfs being mounted. You cannot
enable the device without the daemon running on the USB endpoints.

This is why the GadgetFS stuff here *has* to know about mounting the
filesystem and starting the daemon.

In fact, the generic library to be written to handle USB gadget mode
**will** have to have that knowledge!

The added TODOs are to be done when extracting as a standalone library.
2021-01-27 22:16:55 -05:00
..
dhcpd-task.rb initrd-network: Port to a boot/init task 2020-02-03 16:19:10 -05:00
usb-gadget-task.rb boot/init: Add support for FunctionFS on GadgetFS 2021-01-27 22:16:55 -05:00