target: linux: patches: Drop initramfs startup hack
[openadk.git] / target / linux / patches / 3.16.85 / mkpiggy.patch
blob751678b741fb35c73b458c0452b57679de565496
1 diff -Nur linux-3.13.3.orig/arch/x86/boot/compressed/mkpiggy.c linux-3.13.3/arch/x86/boot/compressed/mkpiggy.c
2 --- linux-3.13.3.orig/arch/x86/boot/compressed/mkpiggy.c 2014-02-13 23:00:14.000000000 +0100
3 +++ linux-3.13.3/arch/x86/boot/compressed/mkpiggy.c 2014-02-17 11:09:06.000000000 +0100
4 @@ -29,7 +29,14 @@
5 #include <stdio.h>
6 #include <string.h>
7 #include <inttypes.h>
8 -#include <tools/le_byteshift.h>
10 +static uint32_t getle32(const void *p)
12 + const uint8_t *cp = p;
14 + return (uint32_t)cp[0] + ((uint32_t)cp[1] << 8) +
15 + ((uint32_t)cp[2] << 16) + ((uint32_t)cp[3] << 24);
18 int main(int argc, char *argv[])
20 @@ -63,7 +70,7 @@
23 ilen = ftell(f);
24 - olen = get_unaligned_le32(&olen);
25 + olen = getle32(&olen);
28 * Now we have the input (compressed) and output (uncompressed)