Difference between revisions of "Rock3/dev/radxa-e25-ums"
Line 11: | Line 11: | ||
* Ubuntu PC or Windows PC | * Ubuntu PC or Windows PC | ||
* USB Male A to A cable | * USB Male A to A cable | ||
+ | |||
+ | ===Modify the kernel configuration=== | ||
+ | * | ||
=== Enable USB mass storage on Radxa E25 === | === Enable USB mass storage on Radxa E25 === | ||
Line 47: | Line 50: | ||
===Test=== | ===Test=== | ||
− | [[File: | + | [[File:E25_USB_Storage_Test.png | 700px]] |
Revision as of 09:44, 7 November 2022
ROCK 3 > Development > Radxa E25 as USB Mass Storage
Contents
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
Modify the kernel configuration
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.