diff options
author | Jörg Hohensohn <hohensoh@rockbox.org> | 2005-08-31 23:50:40 +0000 |
---|---|---|
committer | Jörg Hohensohn <hohensoh@rockbox.org> | 2005-08-31 23:50:40 +0000 |
commit | 977aa614ba4d6a5515a8b0bb8353772f7e883397 (patch) | |
tree | 07cce2faffc3dd6cc5dbc253280930163259fdab | |
parent | 24f7c207a589dc8af10dd07c8abcfb05221349d7 (diff) | |
download | rockbox-977aa614ba4d6a5515a8b0bb8353772f7e883397.tar.gz rockbox-977aa614ba4d6a5515a8b0bb8353772f7e883397.zip |
we have to use the new ROMbox link address here, too
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7437 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | flash/make_firmware/make_firmware.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/flash/make_firmware/make_firmware.c b/flash/make_firmware/make_firmware.c index ffc366fe5e..05cb3322ea 100644 --- a/flash/make_firmware/make_firmware.c +++ b/flash/make_firmware/make_firmware.c | |||
@@ -169,10 +169,17 @@ UINT32 PlaceImage(char* filename, UINT32 pos, UINT8* pFirmware, UINT32 limit) | |||
169 | 169 | ||
170 | if (ucl_header[12] == 0x2B) // uncompressed means "ROMbox", for direct flash execution | 170 | if (ucl_header[12] == 0x2B) // uncompressed means "ROMbox", for direct flash execution |
171 | { | 171 | { |
172 | UINT8 start_addr[4]; | ||
172 | UINT8 reset_vec[4]; | 173 | UINT8 reset_vec[4]; |
174 | fread(start_addr, 1, sizeof(start_addr), pFile); // read the link address from image | ||
173 | fread(reset_vec, 1, sizeof(reset_vec), pFile); // read the reset vector from image | 175 | fread(reset_vec, 1, sizeof(reset_vec), pFile); // read the reset vector from image |
174 | fseek(pFile, 0-sizeof(reset_vec), SEEK_CUR); // wind back | 176 | fseek(pFile, 0-sizeof(start_addr)-sizeof(reset_vec), SEEK_CUR); // wind back |
175 | load_addr = FLASH_START + pos + 16; // behind 16 byte header | 177 | load_addr = Read32(start_addr); |
178 | if (load_addr != FLASH_START + pos + 16) // behind 16 byte header | ||
179 | { | ||
180 | printf("Error: Rombox .ucl file is linked to 0x%08X instead of 0x%08X\n", load_addr, FLASH_START + pos + 16); | ||
181 | exit(11); | ||
182 | } | ||
176 | exec_addr = Read32(reset_vec); | 183 | exec_addr = Read32(reset_vec); |
177 | } | 184 | } |
178 | } | 185 | } |