summaryrefslogtreecommitdiffstats
path: root/bootloader/gigabeat-s.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2008-02-08 02:20:05 +0000
committerMichael Sevakis <jethead71@rockbox.org>2008-02-08 02:20:05 +0000
commita07c034de77e9159cf5d9501c75ea1f0165b6a13 (patch)
tree4a563faa46f15d67787759e66fa578a6da65273e /bootloader/gigabeat-s.c
parent7667a865ff06565a2a7f91ccde0120cd2e0c977e (diff)
downloadrockbox-a07c034de77e9159cf5d9501c75ea1f0165b6a13.tar.gz
rockbox-a07c034de77e9159cf5d9501c75ea1f0165b6a13.tar.bz2
rockbox-a07c034de77e9159cf5d9501c75ea1f0165b6a13.zip
Gigabeat S: Interrupt enabled bootloader. Miscellaneous integration changes.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16243 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'bootloader/gigabeat-s.c')
-rw-r--r--bootloader/gigabeat-s.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/bootloader/gigabeat-s.c b/bootloader/gigabeat-s.c
index a4e6391c7e..f3e2917131 100644
--- a/bootloader/gigabeat-s.c
+++ b/bootloader/gigabeat-s.c
@@ -52,16 +52,27 @@ char buf[MAX_PATH];
char basedir[] = "/Content/0b00/00/"; /* Where files sent via MTP are stored */
char model[5];
int (*kernel_entry)(void);
+extern void reference_system_c(void);
+
+/* Dummy stub that creates C references for C functions only used by
+ assembly - never called */
+void reference_files(void)
+{
+ reference_system_c();
+}
void main(void)
{
lcd_clear_display();
printf("Hello world!");
- printf("Gigabeat S Rockbox Bootloader v.00000002");
+ printf("Gigabeat S Rockbox Bootloader v.00000003");
+ system_init();
kernel_init();
printf("kernel init done");
int rc;
+ set_interrupt_status(IRQ_FIQ_ENABLED, IRQ_FIQ_STATUS);
+
rc = ata_init();
if(rc)
{
@@ -109,11 +120,13 @@ void main(void)
printf("Loading firmware");
unsigned char *loadbuffer = (unsigned char *)0x0;
- int buffer_size = 1024*1024;
+ int buffer_size = 31*1024*1024;
rc = load_firmware(loadbuffer, buf, buffer_size);
if(rc < 0)
- error(buf, rc);
+ error((int)buf, rc);
+
+ system_prepare_fw_start();
if (rc == EOK)
{