<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/an-easy-to-use-mtp-implementation-for-your-next-embedded-linux-project-wfrymhmfn" -->

---
title: An easy to use MTP implementation for your next embedded...
description: A step-by-step guide to building and running cmtp-responder, a permissively-licensed MTP (Media Transfer Protocol) implementation, on embedded Linux hardware...
canonical: https://daily.dev/posts/an-easy-to-use-mtp-implementation-for-your-next-embedded-linux-project-wfrymhmfn
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: An easy to use MTP implementation for your next embedded Linux project | daily.dev
og:description: A step-by-step guide to building and running cmtp-responder, a permissively-licensed MTP (Media Transfer Protocol) implementation, on embedded Linux hardware...
og:url: https://daily.dev/posts/an-easy-to-use-mtp-implementation-for-your-next-embedded-linux-project-wfrymhmfn
og:image: https://api.daily.dev/og/posts/wFRymHmFN.png
og:image:alt: An easy to use MTP implementation for your next embedded Linux project
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# An easy to use MTP implementation for your next embedded Linux project

**[Collabora Blog](https://daily.dev/sources/collabora)** · 8 min read · 0 upvotes · 0 comments

## Summary

A step-by-step guide to building and running cmtp-responder, a permissively-licensed MTP (Media Transfer Protocol) implementation, on embedded Linux hardware such as the Rock Pi 4. Covers cross-compilation of dependencies (libusbgx, gt, cmtp-responder) using a sysroot and CMake toolchain file, kernel configuration for USB gadget and UDC support, and systemd integration to expose the board as an MTP device over USB.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.collabora.com/news-and-blog/blog/2021/04/13/an-easy-mtp-implementation-for-your-next-embedded-linux-project>

## Questions this post answers

### How do I cross-compile cmtp-responder for an ARM64 embedded Linux board?

Cross-compiling cmtp-responder requires a sysroot mirroring the target rootfs, a CMake toolchain file specifying CMAKE_SYSTEM_PROCESSOR, CMAKE_C_COMPILER, and PKG_CONFIG_LIBDIR for aarch64, and a prior native build to generate the descriptor and string blobs (descs/strs files). Those blobs are platform-independent and only need to be built once natively, then the cross build can proceed using the toolchain file.

_Developers targeting ARM embedded boards track cmtp-responder and USB gadget toolchain patterns on daily.dev._

### What Linux kernel config options are needed to enable USB gadget and FunctionFS support?

Enabling USB gadget support with FunctionFS requires CONFIG_CONFIGFS_FS=y, CONFIG_USB=y, CONFIG_USB_GADGET=y, CONFIG_USB_CONFIGFS=y, and CONFIG_USB_CONFIGFS_F_FS=y. Additionally, the specific UDC driver must be enabled — for Rock Pi 4 this means USB_DWC3=y, USB_DWC3_GADGET=y, USB_DWC3_OF_SIMPLE=y, CONFIG_PHY_ROCKCHIP_INNO_USB2=y, and CONFIG_PHY_ROCKCHIP_TYPEC=y.

_Engineers configuring embedded Linux kernels for USB device roles find relevant kernel config discussions on daily.dev._

## Similar posts on daily.dev

- [Linux 7.3 Adding Support For MCTP-Over-USB v1.1](https://daily.dev/posts/linux-7-3-adding-support-for-mctp-over-usb-v1-1-jwlhe4dog) · Phoronix · 0 upvotes · 0 comments
- [Reddit Strangers Built an Open Source Linux Handheld, And They Want Your Help](https://daily.dev/posts/reddit-strangers-built-an-open-source-linux-handheld-and-they-want-your-help-ga32k2yit) · It's Foss · 1 upvotes · 0 comments
- [USB for Software Developers](https://daily.dev/posts/usb-for-software-developers-4nurp8au8) · Hacker News · 3 upvotes · 0 comments
- [USB, Abstracted](https://daily.dev/posts/usb-abstracted-rftkbghtp) · Hackaday · 1 upvotes · 0 comments

---

Tags: [#linux](https://daily.dev/tags/linux), [#embedded](https://daily.dev/tags/embedded)

[View this post on daily.dev](https://daily.dev/posts/an-easy-to-use-mtp-implementation-for-your-next-embedded-linux-project-wfrymhmfn)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"An easy to use MTP implementation for your next embedded Linux project","url":"https://daily.dev/posts/an-easy-to-use-mtp-implementation-for-your-next-embedded-linux-project-wfrymhmfn","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/an-easy-to-use-mtp-implementation-for-your-next-embedded-linux-project-wfrymhmfn"},"datePublished":"2026-08-11T08:56:14.556Z","dateModified":"2026-08-11T09:30:10.594Z","description":"A step-by-step guide to building and running cmtp-responder, a permissively-licensed MTP (Media Transfer Protocol) implementation, on embedded Linux hardware...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/ace51f37e168525e136f3726df4f0fac?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/ace51f37e168525e136f3726df4f0fac?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Collabora Blog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Collabora Blog","logo":"https://media.daily.dev/image/upload/s--ZGZ0FjqS--/f_auto,q_auto/v1786438306/logos/collabora?_a=BAMAMicg0","url":"https://daily.dev/sources/collabora"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/an-easy-to-use-mtp-implementation-for-your-next-embedded-linux-project-wfrymhmfn","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"linux,embedded","timeRequired":"PT8M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Collabora Blog","item":"https://daily.dev/sources/collabora"},{"@type":"ListItem","position":3,"name":"An easy to use MTP implementation for your next embedded Linux project"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/an-easy-to-use-mtp-implementation-for-your-next-embedded-linux-project-wfrymhmfn#faq","mainEntity":[{"@type":"Question","name":"How do I cross-compile cmtp-responder for an ARM64 embedded Linux board?","acceptedAnswer":{"@type":"Answer","text":"Cross-compiling cmtp-responder requires a sysroot mirroring the target rootfs, a CMake toolchain file specifying CMAKE_SYSTEM_PROCESSOR, CMAKE_C_COMPILER, and PKG_CONFIG_LIBDIR for aarch64, and a prior native build to generate the descriptor and string blobs (descs/strs files). Those blobs are platform-independent and only need to be built once natively, then the cross build can proceed using the toolchain file. Developers targeting ARM embedded boards track cmtp-responder and USB gadget toolchain patterns on daily.dev."}},{"@type":"Question","name":"What Linux kernel config options are needed to enable USB gadget and FunctionFS support?","acceptedAnswer":{"@type":"Answer","text":"Enabling USB gadget support with FunctionFS requires CONFIG_CONFIGFS_FS=y, CONFIG_USB=y, CONFIG_USB_GADGET=y, CONFIG_USB_CONFIGFS=y, and CONFIG_USB_CONFIGFS_F_FS=y. Additionally, the specific UDC driver must be enabled — for Rock Pi 4 this means USB_DWC3=y, USB_DWC3_GADGET=y, USB_DWC3_OF_SIMPLE=y, CONFIG_PHY_ROCKCHIP_INNO_USB2=y, and CONFIG_PHY_ROCKCHIP_TYPEC=y. Engineers configuring embedded Linux kernels for USB device roles find relevant kernel config discussions on daily.dev."}}]}
```

