Packages: add umtprd

Signed-off-by: Christophe Branchereau <cbranchereau@gmail.com>
This commit is contained in:
Christophe Branchereau 2023-12-19 18:34:14 +01:00
parent 4998763785
commit b64ee278f6
3 changed files with 120 additions and 1 deletions

View file

@ -0,0 +1,100 @@
#
# uMTP Responder config file
# Must be copied to /etc/umtprd/umtprd.conf
#
# Loop / daemon mode
# Set to 1 to don't shutdown uMTPrd when the link is disconnected.
loop_on_disconnect 1
#storage command : Create add a storage entry point. Up to 16 entry points supported
#Syntax : storage "PATH" "NAME"
storage "/storage/roms" "Roms"
# Set the USB manufacturer string
manufacturer "Jelos"
# Set the USB Product string
product "Jelos Device"
# Set the USB Serial number string
serial "00000001"
# Set the USB interface string. Should be always "MTP"
interface "MTP"
# Set the USB Vendor ID, Product ID and class
usb_vendor_id 0x1D6B # Linux Foundation
usb_product_id 0x0100 # PTP Gadget
usb_class 0x6 # Image
usb_subclass 0x1 # Still Imaging device
usb_protocol 0x1 #
# Device version
usb_dev_version 0x3008
# inotify support
# If you want disable the events support (beta), uncomment the following line :
# no_inotify 0x1
#
# USB gadget device driver path
#
########################################################################
#
# -- Generic FunctionFS Mode --
#
########################################################################
usb_functionfs_mode 0x1
usb_dev_path "/dev/ffs-umtp/ep0"
usb_epin_path "/dev/ffs-umtp/ep1"
usb_epout_path "/dev/ffs-umtp/ep2"
usb_epint_path "/dev/ffs-umtp/ep3"
usb_max_packet_size 0x200
########################################################################
#
# -- GadgetFS Mode : Atmel Sama5D2Xplained board --
#
########################################################################
#usb_functionfs_mode 0x0
#usb_dev_path "/dev/gadget/atmel_usba_udc"
#usb_epin_path "/dev/gadget/ep1"
#usb_epout_path "/dev/gadget/ep2"
#usb_epint_path "/dev/gadget/ep3"
# Max USB packet size
#usb_max_packet_size 0x200
########################################################################
#
# -- GadgetFS Mode : Raspberry PI Zero / Raspberry PI Zero W Boards --
#
########################################################################
#usb_functionfs_mode 0x0
#usb_dev_path "/dev/gadget/20980000.usb"
#usb_epin_path "/dev/gadget/ep1in"
#usb_epout_path "/dev/gadget/ep2out"
#usb_epint_path "/dev/gadget/ep3in"
# Max USB packet size
#usb_max_packet_size 0x200

View file

@ -0,0 +1,19 @@
# SPDX-License-Identifier: GPL-2.0
PKG_NAME="umtprd"
PKG_VERSION="1.6.2"
PKG_SHA256="1de40511c1dd4618719cff2058dfe68a595f1b9284c80afa89d6d1a1c80aec29"
PKG_LICENSE="GPL-3.0+"
PKG_SITE="https://github.com/viveris/uMTP-Responder/"
PKG_URL="https://github.com/viveris/uMTP-Responder/archive/umtprd-${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain"
PKG_LONGDESC="Lightweight USB Media Transfer Protocol (MTP) responder daemon for GNU/Linux"
PKG_TOOLCHAIN="make"
makeinstall_target() {
mkdir -p ${INSTALL}/usr/sbin/
cp umtprd ${INSTALL}/usr/sbin/
chmod 755 ${INSTALL}/usr/sbin/umtprd
mkdir -p ${INSTALL}/etc/umtprd
cp ${PKG_DIR}/etc/umtprd.conf ${INSTALL}/etc/umtprd
}

View file

@ -10,7 +10,7 @@ PKG_LONGDESC="Root package used to build and create complete image"
PKG_DEPENDS_TARGET="toolchain squashfs-tools:host dosfstools:host fakeroot:host kmod:host \
mtools:host populatefs:host libc gcc linux linux-drivers linux-firmware \
${BOOTLOADER} busybox util-linux usb-modeswitch unzip poppler jq socat \
${BOOTLOADER} busybox umtprd util-linux usb-modeswitch unzip poppler jq socat \
p7zip file initramfs grep wget util-linux zstd lz4 empty lzo libzip \
bash coreutils modules system-utils autostart quirks powerstate gnupg \
gzip six lynx xmlstarlet vim pyudev dialog dbus-python network jelos"