1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 16:52:14 +02:00

image: Correct the OS location code to work on sandbox

A recent change broke the 'bootm' command on sandbox. The root cause is
using a pointer as an address. Conversion from pointer to address needs to
use map_to_sysmem() so that sandbox can do the right thing. The problem was
pre-existing but uncovered by a recent commit.

Fix this. Also move fit_get_end() to the C file to avoid needing to include
mapmem.h (and thus asm/io.h) everywhere.

Fixes: 1fec3c5d (common/image.c: Make boot_get_ramdisk() perform a check for Android images)

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2016-02-24 09:14:42 -07:00
parent 24862c640e
commit 7a80de4641
3 changed files with 7 additions and 5 deletions

View File

@@ -851,6 +851,11 @@ static int fit_image_hash_get_ignore(const void *fit, int noffset, int *ignore)
return 0;
}
ulong fit_get_end(const void *fit)
{
return map_to_sysmem((void *)(fit + fdt_totalsize(fit)));
}
/**
* fit_set_timestamp - set node timestamp property
* @fit: pointer to the FIT format image header