diff options
author | Antony Pavlov <antonynpavlov@gmail.com> | 2016-05-20 08:25:51 +0300 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2016-05-23 09:33:21 +0200 |
commit | fc71878c1f96cf0ee1737c57092849328f662c5a (patch) | |
tree | a4d84d78cc092a1b1707d1317ea652f137bb97ba /scripts/socfpga_mkimage.c | |
parent | b2b000699b3e0f17e5f209ed8e1dd7f0437fb34b (diff) | |
download | barebox-fc71878c1f96cf0ee1737c57092849328f662c5a.tar.gz barebox-fc71878c1f96cf0ee1737c57092849328f662c5a.tar.xz |
imd: make it work on big-endian machines
The commit
commit 5e335773e0814173b40873a891964a7858d64688
Author: Sascha Hauer <s.hauer@pengutronix.de>
Date: Tue Mar 29 10:06:46 2016 +0200
imd: use struct imd_header * as argument
introduces additional imd type checks like this
if (!imd_is_string(imd->type))
return NULL;
These checks work incorrectly on any big-endian machine
because the imd->type field needs addition conversion
to little-endian byteorder before use.
Here is the imd command output on big-endian qemu-malta:
barebox:/ imd /dev/nor0.barebox
release: <NULL>
build: <NULL>
This patch fixes the problem by adding necessary conversion
via imd_read_type().
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'scripts/socfpga_mkimage.c')
0 files changed, 0 insertions, 0 deletions