All pastes #1970749 Raw Edit

ipodnano2g.c

public text v1 · immutable
#1970749 ·published 2010-10-23 10:20 UTC
rendered paste body
Index: ipodnano2g.c
===================================================================
--- ipodnano2g.c	(revision 26286)
+++ ipodnano2g.c	(working copy)
@@ -44,6 +44,7 @@
 #include "power.h"
 #include "file.h"
 #include "common.h"
+#include "version.h"
 
 /* Safety measure - maximum allowed firmware image size. 
    The largest known current (October 2009) firmware is about 6.2MB so 
@@ -54,9 +55,6 @@
 /* The buffer to load the firmware into - use an uncached alias of 0x08000000 */
 unsigned char *loadbuffer = (unsigned char *)0x48000000;
 
-/* Bootloader version */
-char version[] = APPSVERSION;
-
 extern int line;
 
 void fatal_error(void)
@@ -84,10 +82,6 @@
     }
 }
 
-/* aes_decrypt() and readfw() functions taken from iLoader.
-   (C) Michael Sparmann and licenced under GPL v2 or later. 
-*/
-
 static void aes_decrypt(void* data, uint32_t size)
 {
     uint32_t ptr, i;
@@ -198,9 +192,9 @@
     lcd_set_background(LCD_BLACK);
     lcd_clear_display();
 
-//    button_init();
+    button_init();
 
-    btn=0; /* TODO */
+    btn = button_status();
 
     /* Enable bootloader messages */
     if (btn==BUTTON_RIGHT)
@@ -209,7 +203,7 @@
     lcd_setfont(FONT_SYSFIXED);
 
     printf("Rockbox boot loader");
-    printf("Version: %s", version);
+    printf("Version: " RBVERSION);
 
     i = storage_init();