mrobe500: Allow bootloader build without HAVE_BOOTLOADER_USB_MODE

rockbox-gerrit-noreply--- via rockbox-cvs <[email protected]>
Newsgroups gmane.comp.systems.archos.rockbox.cvs
Message-ID <[email protected]>
commit 9057154fff7e3eb8799ff6bd1b903e7c8e8adb86
Author: Solomon Peachy <[email protected]>
Date:   Sat Feb 7 10:48:22 2026 -0500

    mrobe500: Allow bootloader build without HAVE_BOOTLOADER_USB_MODE
    
    I'm leaving it enabled because that's clearly the intent
    of the bootloader, but at least there's now an easy path to disabling it
    if so desired.
    
    Change-Id: I4f4ecc9a453d376f92e411e0544b587fe4b4c864

diff --git a/bootloader/mrobe500.c b/bootloader/mrobe500.c
index 245bd51c9b..57356ab71d 100644
--- a/bootloader/mrobe500.c
+++ b/bootloader/mrobe500.c
@@ -61,7 +61,9 @@ void main(void)
     backlight_init();
     font_init();
     button_init();
+#ifdef HAVE_BOOTLOADER_USB_MODE
     usb_init();
+#endif
 
 
     power_init();
@@ -79,6 +81,7 @@ void main(void)
     printf("Rockbox boot loader");
     printf("Version %s", rbversion);
 
+#ifdef HAVE_BOOTLOADER_USB_MODE
     /* Enter USB mode without USB thread */
     if(usb_detect() == USB_INSERTED)
     {
@@ -104,6 +107,7 @@ void main(void)
         reset_screen();
         lcd_update();
     }
+#endif
 
     sleep(50);
 
diff --git a/firmware/SOURCES b/firmware/SOURCES
index 7d1b582c64..fbd92742ba 100644
--- a/firmware/SOURCES
+++ b/firmware/SOURCES
@@ -1302,7 +1302,9 @@ target/arm/tms320dm320/mrobe-500/lcd-remote-mr500.c
 target/arm/tms320dm320/mrobe-500/pcm-mr500.c
 target/arm/tms320dm320/mrobe-500/powermgmt-mr500.c
 target/arm/tms320dm320/mrobe-500/power-mr500.c
+#if !defined(BOOTLOADER) || defined(HAVE_BOOTLOADER_USB_MODE)
 target/arm/tms320dm320/mrobe-500/usb-mr500.c
+#endif
 #endif /* MROBE_500 */
 
 #if defined(CREATIVE_ZEN) || defined(CREATIVE_ZENXFI) || defined(CREATIVE_ZENMOZAIC) \
-- 
rockbox-cvs mailing list
[email protected]
https://lists.haxx.se/mailman/listinfo/rockbox-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.