summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2017-02-06 11:18:07 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2017-02-08 12:03:20 +0100
commit857f69ba8c66e3b4834bcaafd373a83043629326 (patch)
tree9f72ddcb01875d0ed9d46f74dc6c90e05ba50171 /drivers
parentf7165017f41fab86c1dd97e40de2355fc64dde2f (diff)
downloadbarebox-857f69ba8c66e3b4834bcaafd373a83043629326.tar.gz
barebox-857f69ba8c66e3b4834bcaafd373a83043629326.tar.xz
ARM: start: Fix image size calculation
In barebox_non_pbl_start() we do not run at the address we are linked at, so we must read linker variables using ld_var(). Since ld_var() current is not available on arm64 we create two zero sized arrays, one at the begin of the image and one at the end. The difference between both is the image size we are looking for. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/nand/nand_s3c24xx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/nand/nand_s3c24xx.c b/drivers/mtd/nand/nand_s3c24xx.c
index 83d45172b1..df22735488 100644
--- a/drivers/mtd/nand/nand_s3c24xx.c
+++ b/drivers/mtd/nand/nand_s3c24xx.c
@@ -614,7 +614,7 @@ void __nand_boot_init s3c24x0_nand_load_image(void *dest, int size, int page)
void __nand_boot_init nand_boot(void)
{
void *dest = _text;
- int size = ld_var(_barebox_image_size);
+ int size = barebox_image_size;
int page = 0;
s3c24x0_nand_load_image(dest, size, page);