bootloader: Share definition of show_logo via common.h

rockbox-gerrit-noreply--- via rockbox-cvs <[email protected]>
Newsgroups gmane.comp.systems.archos.rockbox.cvs
Message-ID <[email protected]>
commit 7f0bc4bd952a3d45159c90b2b3d62e84b76f1f88
Author: Solomon Peachy <[email protected]>
Date:   Sat Jan 24 07:54:24 2026 -0500

    bootloader:  Share definition of show_logo via common.h
    
    For some reason it was locally defined everywhere.  Move a single
    definition into common.h instead.
    
    Change-Id: Ie2fad74acccd89e40fcbb0f47258d2e14e0f8285

diff --git a/bootloader/common.h b/bootloader/common.h
index 56cbbb335a..8b95c8e175 100644
--- a/bootloader/common.h
+++ b/bootloader/common.h
@@ -39,3 +39,4 @@ int load_raw_firmware(unsigned char* buf, char* firmware, int buffer_size);
 #ifdef ROCKBOX_HAS_LOGF
 void display_logf(void);
 #endif
+void show_logo(void);
diff --git a/bootloader/echoplayer.c b/bootloader/echoplayer.c
index e2491aa0d5..4032279630 100644
--- a/bootloader/echoplayer.c
+++ b/bootloader/echoplayer.c
@@ -33,8 +33,6 @@
 
 static bool is_usb_connected = false;
 
-extern void show_logo(void);
-
 static void demo_rtc(void)
 {
     int y = 0;
diff --git a/bootloader/gigabeat-s.c b/bootloader/gigabeat-s.c
index 499d9c218c..2829241b9b 100644
--- a/bootloader/gigabeat-s.c
+++ b/bootloader/gigabeat-s.c
@@ -43,9 +43,6 @@
 #include "lcd.h"
 #include "version.h"
 
-/* Show the Rockbox logo - in show_logo.c */
-extern void show_logo(void);
-
 #define TAR_CHUNK 512
 #define TAR_HEADER_SIZE 157
 
diff --git a/bootloader/lyre_proto1.c b/bootloader/lyre_proto1.c
index b76d0fb467..6ad095170c 100644
--- a/bootloader/lyre_proto1.c
+++ b/bootloader/lyre_proto1.c
@@ -23,9 +23,6 @@
 #include "../kernel-internal.h"
 #include "system.h"
 
-/* Show the Rockbox logo - in show_logo.c */
-extern void show_logo(void);
-
 int main(void)
 {
     /* Initialize Rockbox kernel */
diff --git a/bootloader/main-pp.c b/bootloader/main-pp.c
index 15f6ad4fb7..f2bfa48157 100644
--- a/bootloader/main-pp.c
+++ b/bootloader/main-pp.c
@@ -11,7 +11,7 @@
  *
  * Based on Rockbox iriver bootloader by Linus Nielsen Feltzing
  * and the ipodlinux bootloader by Daniel Palffy and Bernard Leach
- * 
+ *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
  * as published by the Free Software Foundation; either version 2
@@ -60,9 +60,6 @@
 void lcd_reset(void);
 #endif
 
-/* Show the Rockbox logo - in show_logo.c */
-extern void show_logo(void);
-
 /* Button definitions */
 #if CONFIG_KEYPAD == IRIVER_H10_PAD
 #define BOOTLOADER_BOOT_OF      BUTTON_LEFT
@@ -132,21 +129,21 @@ int load_mi4_part(unsigned char* buf, struct partinfo* pinfo,
     struct mi4header_t mi4header;
     struct ppmi_header_t ppmi_header;
     unsigned long sum;
-    
+
     /* Read header to find out how long the mi4 file is. */
     storage_read_sectors(IF_MD(0,) pinfo->start + PPMI_SECTOR_OFFSET,
                          PPMI_SECTORS, &ppmi_header);
-    
+
     /* The first four characters at 0x80000 (sector 1024) should be PPMI*/
     if( memcmp(ppmi_header.magic, "PPMI", 4) )
         return EFILE_NOT_FOUND;
-    
+
     printf("BL mi4 size: %x", ppmi_header.length);
-    
+
     /* Read mi4 header of the OF */
-    storage_read_sectors(IF_MD(0,) pinfo->start + PPMI_SECTOR_OFFSET + PPMI_SECTORS 
+    storage_read_sectors(IF_MD(0,) pinfo->start + PPMI_SECTOR_OFFSET + PPMI_SECTORS
                        + (ppmi_header.length/512), MI4_HEADER_SECTORS, &mi4header);
-    
+
     /* We don't support encrypted mi4 files yet */
     if( (mi4header.plaintext) != (mi4header.mi4size-MI4_HEADER_SIZE))
         return EINVALID_FORMAT;
@@ -178,14 +175,14 @@ int load_mi4_part(unsigned char* buf, struct partinfo* pinfo,
 
     if(sum != mi4header.crc32)
         return EBAD_CHKSUM;
-    
-#ifdef SANSA_E200    
+
+#ifdef SANSA_E200
     if (disable_rebuild)
     {
         char block[512];
-        
+
         printf("Disabling database rebuild");
-        
+
         storage_read_sectors(IF_MD(0,) pinfo->start + 0x3c08, 1, block);
         block[0xe1] = 0;
         storage_write_sectors(IF_MD(0,) pinfo->start + 0x3c08, 1, block);
@@ -206,7 +203,7 @@ static int handle_usb(int connect_timeout)
     struct queue_event ev;
     int usb = USB_EXTRACTED;
     long end_tick = 0;
-    
+
     if (!usb_plugged())
         return USB_EXTRACTED;
 
@@ -394,7 +391,7 @@ void* main(void)
         error(EDISK,num_partitions, true);
     }
 
-    /* Just list the first 2 partitions since we don't have any devices yet 
+    /* Just list the first 2 partitions since we don't have any devices yet
        that have more than that */
     for(i=0; i<NUM_PARTITIONS; i++)
     {
@@ -496,7 +493,7 @@ void* main(void)
 #endif
             goto main_exit;
         }
-        
+
         error(0, 0, true);
     }
 
diff --git a/bootloader/ondavx747.c b/bootloader/ondavx747.c
index ba169d7dfe..9309b78f88 100644
--- a/bootloader/ondavx747.c
+++ b/bootloader/ondavx747.c
@@ -39,7 +39,6 @@
 #include "adc.h"
 #include "version.h"
 
-extern void show_logo(void);
 extern void power_off(void);
 
 static void show_splash(int timeout, const char *msg)
diff --git a/bootloader/rk27xx.c b/bootloader/rk27xx.c
index 57e5868a87..69b7f6a0aa 100644
--- a/bootloader/rk27xx.c
+++ b/bootloader/rk27xx.c
@@ -32,8 +32,6 @@
  */
 #define LOAD_SIZE 0x700000
 
-extern void show_logo( void );
-
 /* This function setup bare minimum
  * and jumps to rom in order to activate
  * hardcoded rkusb mode
@@ -153,9 +151,9 @@ void main(void)
         error(EDISK, ret, true);
 
     loadbuffer = (unsigned char*)DRAM_ORIG; /* DRAM */
-   
+
     if (boot == rb)
-        snprintf(filename,sizeof(filename), BOOTDIR "/%s", BOOTFILE);    
+        snprintf(filename,sizeof(filename), BOOTDIR "/%s", BOOTFILE);
     else if (boot == of)
         snprintf(filename,sizeof(filename), BOOTDIR "/%s", "BASE.RKW");
 
@@ -170,7 +168,7 @@ void main(void)
 
         /* if we boot rockbox we shutdown on error
          * if we boot OF we fall back to rkusb mode on error
-         */        
+         */
         if (boot == rb)
         {
             power_off();
@@ -213,7 +211,7 @@ void main(void)
         lcd_update();
 
         enter_rkusb();
-    }   
+    }
 
     /* hang */
     while(1);
diff --git a/bootloader/sansaconnect.c b/bootloader/sansaconnect.c
index f154593818..65ca9ff3d7 100644
--- a/bootloader/sansaconnect.c
+++ b/bootloader/sansaconnect.c
@@ -215,8 +215,6 @@ static void handle_usb(int connect_timeout)
     usb_close();
 }
 
-extern void show_logo(void);
-
 void main(void)
 {
     unsigned char* loadbuffer;
diff --git a/bootloader/telechips.c b/bootloader/telechips.c
index c69a6da42c..2c5c919b1b 100644
--- a/bootloader/telechips.c
+++ b/bootloader/telechips.c
@@ -10,7 +10,7 @@
  * Copyright (C) 2007 by Dave Chapman
  *
  * Based on Rockbox iriver bootloader by Linus Nielsen Feltzing
- * 
+ *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
  * as published by the Free Software Foundation; either version 2
@@ -46,9 +46,6 @@
 #include "loader_strerror.h"
 #include "version.h"
 
-/* Show the Rockbox logo - in show_logo.c */
-extern void show_logo(void);
-
 /* Address to load main Rockbox image to */
 #define LOAD_ADDRESS 0x20000000 /* DRAM_START */
 
@@ -63,12 +60,12 @@ void show_debug_screen(void)
     int power_count = 0;
     int count = 0;
     bool do_power_off = false;
-    
+
     lcd_puts_scroll(0,0,"+++ this is a very very long line to test scrolling. ---");
     while (!do_power_off) {
         line = 1;
         button = button_get(false);
-        
+
         /* Power-off if POWER button has been held for a time
            This loop is currently running at about 100 iterations/second
          */
@@ -131,10 +128,10 @@ void* main(void)
 
     system_init();
     power_init();
-    
+
     kernel_init();
     enable_irq();
-    
+
     lcd_init();
 
     adc_init();
@@ -143,7 +140,7 @@ void* main(void)
 
     font_init();
     lcd_setfont(FONT_SYSFIXED);
-    
+
     show_logo();
 
     backlight_hw_on();
diff --git a/bootloader/xduoox3.c b/bootloader/xduoox3.c
index ac2d648e61..6c37b5afcc 100644
--- a/bootloader/xduoox3.c
+++ b/bootloader/xduoox3.c
@@ -45,7 +45,6 @@
 
 #define SHOW_LOGO
 
-extern void show_logo(void);
 extern void power_off(void);
 
 static int lcd_inited = 0;
-- 
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.