From d4063409e157f9b0abe2e320468f81acc3ceb31a Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sun, 24 Nov 2013 23:45:03 +0100 Subject: [PATCH] software/bios: infer flash start from linker --- software/bios/main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/software/bios/main.c b/software/bios/main.c index 9c4d878d..922d3e2a 100644 --- a/software/bios/main.c +++ b/software/bios/main.c @@ -9,7 +9,6 @@ #include #include -#include #include #include "sdram.h" @@ -374,7 +373,7 @@ static void do_command(char *c) printf("Command not found\n"); } -extern unsigned int _edata; +extern unsigned int _ftext, _edata; static void crcbios(void) { @@ -389,7 +388,7 @@ static void crcbios(void) * We also use the address of _edata to know the length * of our code. */ - offset_bios = FLASH_OFFSET_BIOS; + offset_bios = (unsigned int)&_ftext; expected_crc = _edata; length = (unsigned int)&_edata - offset_bios; actual_crc = crc32((unsigned char *)offset_bios, length); -- 2.30.2