Module g_mass_storage missing on Rock Pi 4C+

Hi,

I’m trying to build a piSCSI storage device to use as a backup device for our playstation.

What I need is access to the overlay to enable OTG as a peripheral device and a g_mass_storage module.

But it can’t be found in any of the following distributions. Either the OTG overlay is missing or the g_mass_storage module:

  • Official Debian CLI
  • Armbian
  • OpenWRT

When I try to activate the iSCSI storage device for USB on Debian, I get the following error:
modprobe: FATAL: Module g_mass_storage not found in directory /lib/modules/5.10.110-38-rockchip

How can I get this g_mass_storage installed?

Is there nobody who can be of help? I just bought Rock Pi 4B as the one mentioned in the blog. But I can’t find the g_mass_storage either in any distribution.

I spent a lot of time with Armbian. There the g_mass_storage is available. But can’t be used because of missing UDC: UDC core: g_mass_storage: couldn’t find an available UDC.

How do I get that working?

Hi @EckisWelt.
You can compile a kernel with g_mass_storage yourself: https://radxa-repo.github.io/bsp/getting_started.html. Write CONFIG_USB_MASS_STORAGE=y to the corresponding kconfig.conf: https://radxa-repo.github.io/bsp/profile/kconfig.conf.html and build it.

Hi @ChenJaly

Thanks for pointing out to the most recent library. I’ve stumbled upon a lot of old resources and descriptions.

I have now build a custom kernel with bsp and got the following results:

  • linux-headers
  • linux-image
  • linux-libc
  • u-boot

I haven’t found a proper guide telling me how to install these deb files. In the forum I found also questions about what to do which weren’t answered. Would you mind explaining me, how to install these artefacts on my RockPi4 running your latest Debian CLI image from 2023 (which is updated through APT).

Upload linux-headers and linux-image to your rock 4 and install them with comand: dpkg -i <deb>.

Hi @ChenJaly

Thanks for your help. I was successful in using g_mass_storage.

In the end I used libcomposite and swapped for it. I wrote a little guide how to turn the Rock Pi 4b+ USB 3 OTG on and use it as storage device for my PS5 saving data on my NAS on iSCSI (https://github.com/EckisWelt/piscsi).

In the end the solution is very lean and easy :slight_smile: (but finding it is difficult)

1 Like

Good jobs!!!:grinning::grinning::grinning::grinning: