最終更新:2022-08-24 (水) 19:36:15 (626d)
FunctionFS
Top / FunctionFS
Function Filesystem
Linux 2.6.35~ (2010/08/01)
概要
- The Function Filesystem (FunctionFS) lets one create USB composite functions in user space in the same way GadgetFS lets one create USB gadgets in user space.
- This allows creation of composite gadgets such that some of the functions are implemented in kernel space (for instance Ethernet, serial or mass storage) and other are implemented in user space.
- 使い方はGadgetFSと同じ。カーネルに実装されているファンクションと独自の実装を同時に動かすことができる。
ドキュメント
資料
.config
モジュール
- g_eth_ffs?
例
$ insmod g_ffs.ko idVendor=<ID> iSerialNumber=<string> functions=mtp,hid $ mkdir /dev/ffs-mtp && mount -t functionfs mtp /dev/ffs-mtp $ ( cd /dev/ffs-mtp && mtp-daemon ) & $ mkdir /dev/ffs-hid && mount -t functionfs hid /dev/ffs-hid $ ( cd /dev/ffs-hid && hid-daemon ) &
- mount <デバイスファイル> <マウントポイント>
使い方
- Usage:
- open ep0 file
- Write function descriptors
- Write function strings
- Open epXX (if any)
- Read events from ep0
- …(Protocol specific)
モジュール
メモ
- $CONFIGFS_ROOT/usb_gadget/gadget/functionfs/ffs.ptp
.config
依存
- CONFIG_USB_LIBCOMPOSITE
- CONFIG_USB_F_FS
- CONFIG_USB_FUNCTIONFS_GENERIC? if !(CONFIG_USB_FUNCTIONFS_ETH? || CONFIG_USB_FUNCTIONFS_RNDIS?)
カーネルモジュール
マウント
mount -t functionfs mtp /dev/ffs-mtp mount -t functionfs hid /dev/ffs-hid