Commit Graph

6 Commits (cd81d105d50d29dfa253c8659509e9e0272d9b32)

Author SHA1 Message Date
Hauke Mehrtens 8ef6240fa6 kernel: Add missing includes mtdsplit_*.c
This fixes the following compile problem with kernel 4.9 on lantiq:
drivers/mtd/mtdsplit/mtdsplit_uimage.c:244:34: error: array type has incomplete element type 'struct of_device_id'
 static const struct of_device_id mtdsplit_uimage_of_match_table[] = {
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/mtd/mtdsplit/mtdsplit_uimage.c:245:4: error: field name not in record or union initializer
  { .compatible = "denx,uimage" },

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Linus Walleij b907097291 kernel: mtdsplit: wrgg: Support big and little endian
The WRGG images exist in both big and little endian variants,
as can be seen from the image generator in
tools/firmware-utils/src/mkwrggimg.c, you either pass
the "-b" flag or not. The D-Link DIR-685 is using little
endian images so we need to support splitting these.

Detect endianness like this: if the kernel entity size
gets silly big (bigger than the flash memory) we are
probably using the wrong endianness.

Example: my kernel of 0x0067ff64 was switched around by
wrong endianness and detected as 0x64ff67a0 (the actual
size in swapped endianness + header 0xa0).

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years ago
Rafał Miłecki 2abb128f2e kernel: add DT binding support to the LZMA and WRG parsers
It allows specifying those parsers directly in the DT.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
George Hopkins 5c7a58764e kernel: mtdsplit: split by WRG header
Support splitting WRG images, which can be found in older
D-Link devices.

Signed-off-by: George Hopkins <george-hopkins@null.net>
6 years ago
Felix Fietkau 402193baa1 kernel: update mtdsplit for linux 4.9
add backport patches for older kernels

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Stijn Tintel 136319e72d kernel: mtdsplit: add support for WRGG images
Support splitting WRGG images, found in some D-Link devices (e.g.
DAP-2695).

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: John Crispin <john@phrozen.org>
8 years ago