Default rpiboot mass-storage payload fails on CM4 eMMC writes; explicit -d mass-storage-gadget64 works
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- raspberry-pi, shell
- Domain
- embedded-iot, tooling
Research direction
Start with the default payload used by ./rpiboot -v and compare it with mass-storage-gadget64/boot.img, config.txt, and bootfiles.bin, especially the listed boot_ramdisk=1 and uart_2ndstage=1 settings. Reproduce the CM4 eMMC write test, then verify that the default payload behaves like the explicit mass-storage-gadget64 payload without causing the USB device to disconnect.
Written by the indexing model from the issue text.
Description
Describe the bug
Hardware:
- Raspberry Pi Compute Module 4 with 16 GB eMMC
- Raspberry Pi Compute Module 4 IO Board
- Host: Linux Mint
- Also reproduced on a Windows 11 PC
- Different USB cables and USB ports tested
usbboot:
- local build
- build-date: 2026/08/12
- pkg-version: local 87d6e032
Problem:
When starting rpiboot without specifying a directory:
sudo ./rpiboot -v
the CM4 eMMC appears as:
/dev/sdb
30535680 512-byte logical blocks
Write Protect is off
Reading works, but writing causes the USB mass-storage device
to disappear. For example:
sudo dd if=/dev/zero of=/dev/sdb bs=1M count=100 conv=fsync
results in USB errors such as:
device descriptor read/64, error -110
Device not responding to setup address
device not accepting address ..., error -71
USB disconnect
device offline error, dev sdb
A read test worked:
sudo dd if=/dev/sdb of=/dev/null bs=4M count=100
419430400 bytes ... 10.3 MB/s
However, explicitly using the current mass-storage-gadget64
directory fixes the problem:
sudo ./rpiboot -d ./mass-storage-gadget64 -v
With this payload:
sudo dd if=/dev/zero of=/dev/sdb bs=4096 count=1 oflag=direct
works.
A larger test also succeeds:
sudo dd if=/dev/zero of=/dev/sdb bs=1M count=1024 oflag=direct
1073741824 bytes ... 24.9 MB/s
The RPi Imager then also works normally.
The explicit payload contains:
mass-storage-gadget64/boot.img
mass-storage-gadget64/config.txt
mass-storage-gadget64/bootfiles.bin
The config contains:
boot_ramdisk=1
uart_2ndstage=1
It looks like the default/embedded mass-storage-gadget payload
may differ from the current mass-storage-gadget64 payload, and
the former has a write-path problem on CM4 eMMC.
Steps to reproduce the behaviour
./rpiboot
→ eMMC reads OK
→ eMMC writes cause USB disconnect
./rpiboot -d ./mass-storage-gadget64
→ eMMC reads OK
→ eMMC writes work normally (~25 MB/s)
Device(s)
Raspberry Pi CM4
Compute Module IO board.
- Raspberry Pi Compute Module 4 with 16 GB eMMC
- Raspberry Pi Compute Module 4 IO Board
RPIBOOT logs
No response
Kernel logs
No response
Device UART logs
No response
- Dominant language
- Shell
- Stars
- 1.3k
- Forks
- 313
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from raspberrypi/usbboot
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
raspberrypi/usbboot#397 ·
-
awaiting update
Difficulty 4/5 3-5 days Newbie friendliness 35/100
raspberrypi/usbboot#390 · 13 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
raspberrypi/usbboot#389 · 23 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
raspberrypi/usbboot#387 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
raspberrypi/usbboot#386 · 2 comments ·
All issues in raspberrypi/usbboot
Similar issues
-
Update Vish to 1.1.5 Openpackage-update
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
oSoWoSo/vOid_Community_repOsitory#144 · 1 comment ·
-
help wanted new command
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
tldr-pages/tldr#24151 ·
-
PacReq: Rune IDE Openpackage request
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
pacstall/pacstall-programs#9402 ·
-
[BUG] ci: the first prefetch-images.sh call runs before shard.txt exists, so it is always a no-op Openbug github-actions
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
update-request
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
msys2/MINGW-packages#31768 ·