kernel: bump kernel 4.4 to 4.4.129 for 17.01
[openwrt/openwrt.git] / target / linux / brcm2708 / patches-4.4 / 0246-scripts-mkknlimg-Append-a-trailer-for-all-input.patch
1 From 4c9a54f3e2d0f73144e1837e2e7dde39447a40cb Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Mon, 18 Apr 2016 11:56:53 +0100
4 Subject: [PATCH] scripts/mkknlimg: Append a trailer for all input
5
6 Now that the firmware assumes an unsigned kernel is DT-capable, it is
7 helpful to be able to mark a kernel as being non-DT-capable.
8
9 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
10 ---
11 scripts/mkknlimg | 11 +++++------
12 1 file changed, 5 insertions(+), 6 deletions(-)
13
14 --- a/scripts/mkknlimg
15 +++ b/scripts/mkknlimg
16 @@ -98,7 +98,7 @@ my $append_trailer;
17 my $trailer;
18 my $kver = '?';
19
20 -$append_trailer = $dtok;
21 +$append_trailer = 1;
22
23 if ($res)
24 {
25 @@ -108,7 +108,6 @@ if ($res)
26
27 if ($flags & FLAG_PI)
28 {
29 - $append_trailer = 1;
30 $dtok ||= ($flags & FLAG_DTOK) != 0;
31 $is_270x ||= ($flags & FLAG_270X) != 0;
32 $is_283x ||= ($flags & FLAG_283X) != 0;
33 @@ -116,18 +115,18 @@ if ($res)
34 }
35 else
36 {
37 - print ("* This doesn't look like a Raspberry Pi kernel. In pass-through mode.\n");
38 + print ("* This doesn't look like a Raspberry Pi kernel.\n");
39 }
40 }
41 elsif (!$dtok)
42 {
43 - print ("* Is this a valid kernel? In pass-through mode.\n");
44 + print ("* Is this a valid kernel?\n");
45 }
46
47 if ($append_trailer)
48 {
49 printf("DT: %s\n", $dtok ? "y" : "n");
50 - printf("DDT: %s\n", $ddtk ? "y" : "n") if ($ddtk);
51 + printf("DDT: %s\n", $ddtk ? "y" : "n");
52 printf("270x: %s\n", $is_270x ? "y" : "n");
53 printf("283x: %s\n", $is_283x ? "y" : "n");
54
55 @@ -136,7 +135,7 @@ if ($append_trailer)
56 push @atoms, [ $trailer_magic, pack('V', 0) ];
57 push @atoms, [ 'KVer', $kver ];
58 push @atoms, [ 'DTOK', pack('V', $dtok) ];
59 - push @atoms, [ 'DDTK', pack('V', $ddtk) ] if ($ddtk);
60 + push @atoms, [ 'DDTK', pack('V', $ddtk) ];
61 push @atoms, [ '270X', pack('V', $is_270x) ];
62 push @atoms, [ '283X', pack('V', $is_283x) ];
63 push @atoms, [ '283x', pack('V', $is_283x && !$is_270x) ];