Skip to content

fix: don't expose eMMC as USB mass storage when no image is mounted#17

Merged
winstar0070 merged 1 commit intomainfrom
upstream/fix-emmc-mass-storage
Feb 19, 2026
Merged

fix: don't expose eMMC as USB mass storage when no image is mounted#17
winstar0070 merged 1 commit intomainfrom
upstream/fix-emmc-mass-storage

Conversation

@winstar0070
Copy link
Copy Markdown
Member

Summary

  • When usb.disk0 is empty, the USB gadget now reports "no media" instead of exposing /dev/mmcblk0p3
  • Prevents Legacy BIOS systems from hanging during boot when the raw eMMC partition was exposed as a USB disk
  • GetMountedImage API treats /dev/mmcblk0p3 as unmounted for backward compatibility

Cherry-picked from upstream PR sipeed#741 (author: @MagnaCapax)

Test plan

  • Verify Legacy BIOS systems no longer hang with NanoKVM connected
  • Verify image mount/unmount still works correctly
  • Verify GetMountedImage API returns empty string when no image mounted

When usb.disk0 is empty, no backing file is set instead of defaulting
to /dev/mmcblk0p3. This prevents Legacy BIOS systems from hanging
during boot when the raw eMMC partition was exposed as a USB disk.

Cherry-picked from: sipeed#741
Original author: MagnaCapax
@winstar0070 winstar0070 merged commit 52b404a into main Feb 19, 2026
@winstar0070 winstar0070 deleted the upstream/fix-emmc-mass-storage branch February 19, 2026 04:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants