summaryrefslogtreecommitdiff
path: root/bootloader/gigabeat.c
diff options
context:
space:
mode:
Diffstat (limited to 'bootloader/gigabeat.c')
-rw-r--r--bootloader/gigabeat.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/bootloader/gigabeat.c b/bootloader/gigabeat.c
index fb03f0ea4d..d77021571a 100644
--- a/bootloader/gigabeat.c
+++ b/bootloader/gigabeat.c
@@ -41,6 +41,8 @@
41#include "power.h" 41#include "power.h"
42#include "file.h" 42#include "file.h"
43#include "common.h" 43#include "common.h"
44#include "rb-loader.h"
45#include "loader_strerror.h"
44#include "rbunicode.h" 46#include "rbunicode.h"
45#include "usb.h" 47#include "usb.h"
46#include "mmu-arm.h" 48#include "mmu-arm.h"
@@ -201,18 +203,15 @@ void main(void)
201 buffer_size = (unsigned char*)0x31400000 - loadbuffer; 203 buffer_size = (unsigned char*)0x31400000 - loadbuffer;
202 204
203 rc = load_firmware(loadbuffer, BOOTFILE, buffer_size); 205 rc = load_firmware(loadbuffer, BOOTFILE, buffer_size);
204 if(rc < 0) 206 if(rc <= EFILE_EMPTY)
205 error(EBOOTFILE, rc, true); 207 error(EBOOTFILE, rc, true);
206 208
207 storage_close(); 209 storage_close();
208 system_prepare_fw_start(); 210 system_prepare_fw_start();
209 211
210 if (rc == EOK) 212 commit_discard_idcache();
211 { 213 kernel_entry = (void*) loadbuffer;
212 commit_discard_idcache(); 214 rc = kernel_entry();
213 kernel_entry = (void*) loadbuffer;
214 rc = kernel_entry();
215 }
216 215
217#if 0 216#if 0
218 /* Halt */ 217 /* Halt */