Can a BPI-M2 Zero act as USB mouse and forward signals from bluetooth mouse / libinput driver?

Before I buy the BPI-M2 Zero, I would like to make sure that my idea is actually possible.

I would like to connect a Bluetooth trackpad to the M2 Zero, process its input via this patched libinput driver and then forward the mouse signals to USB, such that any computer would recognize a standard USB mouse.

  • Is that possible with the BPI-M2 Zero?
  • Would I need additional hardware? (e.g. serial cable, etc.)
  • What OS image would I use?
  • How do I activate the USB Gadget mode to make the M2 Zero be detected as USB mouse?

Any ideas or links to other projects would be very helpful for me! Thanks!