linux/arch/arm/boot/compressed
Nicolas Pitre 9696fcae92 ARM: 8079/1: zImage: identify kernel endianness
With patch #8067/1 ("zImage: ensure header in LE format for BE8 kernels")
applied, it is no longer possible to determine the endianness of a compiled
kernel image.  This normally shouldn't matter to the boot environment,
except for those cases where the selection of a ramdisk or root filesystem
with a matching endianness has to be automated.

Let's add a flag to the zImage header indicating the actual endianness.
Four bytes from offset 0x30 can be interpreted as follows:

	04 03 02 01	big endian kernel

	01 02 03 04	little endian kernel

Anything else should be interpreted as "unknown", in which case it is
most likely that patch #8067/1 was not applied either and the zImage
magic number at offset 0x24 could be used instead to determine
endianness. No zImage before this patch ever produced 0x01020304 nor
0x04030201 at offset 0x30 so there is no confusion possible.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-07-18 12:29:08 +01:00
..
.gitignore ARM: simplify generation of compressed vmlinux.lds file 2014-07-01 15:01:51 +01:00
atags_to_fdt.c ARM: 8025/1: Get rid of meminfo 2014-06-01 01:17:12 +01:00
big-endian.S
debug.S ARM: 7737/1: fix kernel decompressor compilation error with CONFIG_DEBUG_SEMIHOSTING 2013-06-05 23:32:24 +01:00
decompress.c arm: add support for LZ4-compressed kernel 2013-07-09 10:33:30 -07:00
head-sa1100.S ARM: 7743/1: compressed/head.S: work around new binutils warning 2013-06-05 23:32:27 +01:00
head-sharpsl.S Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
head-shmobile.S ARM: shmobile: Update romImage to relocate appended DTB 2013-07-17 10:04:36 +09:00
head-xscale.S ARM: remove ixp23xx and ixp2000 platforms 2012-04-06 08:26:18 -05:00
head.S ARM: 8079/1: zImage: identify kernel endianness 2014-07-18 12:29:08 +01:00
libfdt_env.h ARM: zImage: allow supplementing appended DTB with traditional ATAG data 2011-09-14 13:51:59 -04:00
ll_char_wr.S
Makefile ARM: simplify generation of compressed vmlinux.lds file 2014-07-01 15:01:51 +01:00
misc.c stackprotector: Introduce CONFIG_CC_STACKPROTECTOR_STRONG 2013-12-20 09:38:40 +01:00
mmcif-sh7372.c mmc: sdhi, mmcif: zboot: Correct clock disable logic 2011-08-08 16:38:04 +09:00
piggy.gzip.S arm: add support for LZO-compressed kernels 2010-01-11 09:34:05 -08:00
piggy.lz4.S arm: add support for LZ4-compressed kernel 2013-07-09 10:33:30 -07:00
piggy.lzma.S ARM: 6026/1: ARM: Add support for LZMA-compressed kernel images 2010-04-14 12:05:36 +01:00
piggy.lzo.S arm: add support for LZO-compressed kernels 2010-01-11 09:34:05 -08:00
piggy.xzkern.S ARM: 7001/2: Wire up support for the XZ decompressor 2012-03-24 09:38:52 +00:00
sdhi-sh7372.c mmc: sdhi, mmcif: zboot: Correct clock disable logic 2011-08-08 16:38:04 +09:00
sdhi-shmobile.c ARM: 6886/1: mmc, Add zboot from eSD support for SuperH Mobile ARM 2011-06-29 10:00:52 +01:00
sdhi-shmobile.h ARM: 6886/1: mmc, Add zboot from eSD support for SuperH Mobile ARM 2011-06-29 10:00:52 +01:00
string.c ARM: zImage: gather some string functions into string.c 2011-09-14 13:51:58 -04:00
vmlinux.lds.S ARM: simplify generation of compressed vmlinux.lds file 2014-07-01 15:01:51 +01:00