Skip to content

main/postmarketos-initramfs: Add mass storage mode in debug-shell

Ion A requested to merge IonAgorria/pmaports:usbstorage into master

This MR enables to use debug-shell in configfs enabled devices to expose any file or device acting as a usb mass storage in the computer using a simple command.

A new init_functions.sh function setup_usb_mass_storage_configfs is added to setup mass storage device alongside with existing configfs network connection. The common UDC restart code is separated into setup_usb_configfs_udc. This function can be called several times to expose a different target or without arg to not expose any.

This new function is then callable from telnet debug-shell using setup_usb_storage /dev/DEVICE but other functionalities could be developed by calling the setup_usb_mass_storage_configfs function.

Merge request reports