rockbox/firmware/target
Michael McAllister 078a506dfd hibyr1: route ADB through the usb-mode setting
hibyr1 defines HAVE_USB_ADB so the USB mode setting offers an ADB
entry, but hiby_set_usb_mode() never handled USB_MODE_ADB (it fell
through to default), so selecting ADB did nothing.

Wire USB_MODE_ADB up to enable_adb(). It builds the adb function on
the gadget and hands the functionfs mount and adbd to the vendor
respawner /sbin/adbserver.sh, rather than mounting functionfs inline
(which the original code flagged as flaky); adbd binds the UDC itself,
so usb_enable() leaves the UDC alone in ADB mode. disable_adb() unlinks
the adb function and unmounts its functionfs but leaves the function in
place to be reused, matching how adbserver.sh cycles it, so re-enabling
adb never re-creates it.

The mass-storage LUN is removable, so the host clears its backing file
when it ejects the volume (Linux does this on unmount). Re-arm the LUN
in usb_enable() on each connect, so the disk is exported on every
insert and not only the first.

Assisted-by: Claude Opus 4.8

Change-Id: Ia8f119a1a599e6dd3c1219cb4e193c753725a06a
2026-07-12 11:19:40 -04:00
..
arm stm32h743: implement timer API 2026-07-11 17:23:36 -04:00
coldfire chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
hosted hibyr1: route ADB through the usb-mode setting 2026-07-12 11:19:40 -04:00
mips chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00