Please enable javascript, or click here to visit my ecommerce web site powered by Shopify.
Jump to: navigation, search

Rock3/dev/radxa-e25-ums

< Rock3‎ | dev
Revision as of 09:28, 7 November 2022 by Alvin (Talk | contribs)

  ROCK 3 >  Development >  Radxa E25 as USB Mass Storage

Description

This guide describes how to setup USB Mass Storage on Radxa E25.

Requirement

  • Radxa E25
  • Ubuntu PC or Windows PC
  • USB Male A to A cable

Enable USB mass storage on Radxa E25

  • Step 1: Disable amlogic-adbd service. It will interfere with USB mass storage mode:
rock@radxa-e25:~$ sudo systemctl disable rockchip-adbd
  • Step 2: Reboot the device:
rock@radxa-e25:~$ sudo reboot
  • Step 3: Create a file backing for mass storage, and format it in FAT32:
rock@radxa-e25:~$ sudo dd if=/dev/zero of=/home/rock/share bs=1M count=512 status=progress # Create a 512M file as /home/rock/share
rock@radxa-e25:~$ sudo apt-get install dosfstools # dosfstools contains mkfs.fat
rock@radxa-e25:~$ sudo mkfs.fat /home/rock/share -F 32 -I
  • Step 4: Enable USB mass storage on our backing file and create test.txt file:
rock@radxa-e25:~$ sudo modprobe g_mass_storage file=/home/rock/share stall=0 removable=1
rock@radxa-e25:~$ sudo mount /home/rock/share /mnt/
rock@radxa-e25:~$ sudo touch  /mnt/test.txt
rock@radxa-e25:~$ echo "hello radxa" | sudo tee /mnt/test.txt
hello radxa
rock@radxa-e25:~$ cat /mnt/test.txt
hello radxa

Accessing storage device from PC

Run the command on Radxa E25,

sudo modprobe g_mass_storage file=/home/rock/share stall=0 removable=1

a new USB storage device will be detected on your host computer.

Test

Example.png