[PATCH for next] 'bootz' command fails to load the zImage's header
Juergen Beisert
jbe at pengutronix.de
Fri Oct 14 08:11:28 EDT 2011
Running the 'bootz' command always fails with
could not read <some file>
due to it loads only a size of a pointer, instead of the size of the expected
header structure.
Signed-off-by: Juergen Beisert <jbe at pengutronix.de>
diff --git a/arch/arm/lib/bootz.c b/arch/arm/lib/bootz.c
index fc14487..9be615b 100644
--- a/arch/arm/lib/bootz.c
+++ b/arch/arm/lib/bootz.c
@@ -53,7 +53,7 @@ static int do_bootz(struct command *cmdtp, int argc, char *argv[])
if (!usemap) {
header = &__header;
- ret = read(fd, header, sizeof(header));
+ ret = read(fd, header, sizeof(*header));
if (ret < sizeof(*header)) {
printf("could not read %s\n", argv[1]);
goto err_out;
--
Pengutronix e.K. | Juergen Beisert |
Linux Solutions for Science and Industry | http://www.pengutronix.de/ |
More information about the barebox
mailing list