summaryrefslogtreecommitdiff
path: root/bootloader
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2008-03-25 19:43:08 +0000
committerJens Arnold <amiconn@rockbox.org>2008-03-25 19:43:08 +0000
commit9a7978aeabadc50c6049c5cd150b572ec9bd9e87 (patch)
tree2d22815d61277d495957ced0d1b25ceb19adac08 /bootloader
parent38ed90128439bd7cd20038a69032f1f3eddaca04 (diff)
Cabbiev2 gigabeat background: reduce WPS backdrop filesize by storing it as 24 bit BMP instead of unnecessary 32 bit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16802 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'bootloader')
-rw-r--r--bootloader/ipod.c64
1 files changed, 64 insertions, 0 deletions
diff --git a/bootloader/ipod.c b/bootloader/ipod.c
index b3ff7bcedb..bafcb4909d 100644
--- a/bootloader/ipod.c
+++ b/bootloader/ipod.c
@@ -56,6 +56,49 @@ unsigned char *loadbuffer = (unsigned char *)DRAM_START;
/* Bootloader version */
char version[] = APPSVERSION;
+struct sysinfo
+{
+ unsigned IsyS; /* == "IsyS" */
+ unsigned len;
+ char BoardHwName[16];
+ char pszSerialNumber[32];
+ char pu8FirewireGuid[16];
+ unsigned boardHwRev;
+ unsigned bootLoaderImageRev;
+ unsigned diskModeImageRev;
+ unsigned diagImageRev;
+ unsigned osImageRev;
+ unsigned iram_perhaps;
+ unsigned Flsh;
+ unsigned flash_zero;
+ unsigned flash_base;
+ unsigned flash_size;
+ unsigned flash_zero2;
+ unsigned Sdrm;
+ unsigned sdram_zero;
+ unsigned sdram_base;
+ unsigned sdram_size;
+ unsigned sdram_zero2;
+ unsigned Frwr;
+ unsigned frwr_zero;
+ unsigned frwr_base;
+ unsigned frwr_size;
+ unsigned frwr_zero2;
+ unsigned Iram;
+ unsigned iram_zero;
+ unsigned iram_base;
+ unsigned iram_size;
+ unsigned iram_zero2;
+ char pad7[120];
+ unsigned boardHwSwInterfaceRev;
+
+ /* added in V3 */
+ char HddFirmwareRev[10];
+ unsigned short RegionCode;
+ unsigned PolicyFlags;
+ char ModelNumStr[16];
+};
+
#define BUTTON_LEFT 1
#define BUTTON_MENU 2
#define BUTTON_RIGHT 3
@@ -220,6 +263,24 @@ void fatal_error(void)
}
+static struct sysinfo ** const sysinfo_ptr =
+#if CONFIG_CPU == PP5002 || CONFIG_CPU == PP5020
+ 0x40017f1c;
+#elif CONFIG_CPU == PP5022 || CONFIG_CPU == PP5024
+ 0x4001ff1c;
+#endif
+
+static unsigned ipod_get_hwrev_sysinfo(void)
+{
+ if ( (*sysinfo_ptr)->IsyS == *(unsigned *)"IsyS" )
+ {
+ if ((*sysinfo_ptr)->len == 0xf8)
+ return (*sysinfo_ptr)->sdram_zero2;
+ else
+ return (*sysinfo_ptr)->boardHwSwInterfaceRev;
+ }
+ return 0xffffffff; /* unknown */
+}
void* main(void)
{
@@ -270,6 +331,9 @@ void* main(void)
printf("Rockbox boot loader");
printf("Version: %s", version);
printf("IPOD version: 0x%08x", IPOD_HW_REVISION);
+
+ printf("SysI ptr: %08x", *sysinfo_ptr);
+ printf("SysI HWR: %08x", ipod_get_hwrev_sysinfo());
i=ata_init();
if (i==0) {