summaryrefslogtreecommitdiff
path: root/scripts/coccicheck
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2016-05-10 22:50:03 (GMT)
committerRalf Baechle <ralf@linux-mips.org>2016-05-13 13:30:25 (GMT)
commit8f4703aa4df758def78e9a39cc5d1ff73c3ef51f (patch)
treeaa0b9a748a012065c48978b482dc9abdff1734df /scripts/coccicheck
parentb47208091291ea2990b69eb59c72d04c7161303e (diff)
downloadlinux-8f4703aa4df758def78e9a39cc5d1ff73c3ef51f.tar.xz
MIPS: Octeon: detect and fix byte swapped initramfs
Octeon machines support running in little endian mode. U-Boot usually runs in big endian-mode. Therefore the initramfs is loaded in big endian mode, and the kernel later tries to access it in little endian mode. This patch fixes that by detecting byte swapped initramfs using either the CPIO header or the header from standard compression methods, and byte swaps it if needed. It first checks that the header doesn't match in the native endianness to avoid false detections. It uses the kernel decompress library so that we don't have to maintain the list of magics if some decompression methods are added to the kernel. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Acked-by: David Daney <david.daney@cavium.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13219/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'scripts/coccicheck')
0 files changed, 0 insertions, 0 deletions