Mercurial > hg > aboriginal
annotate sources/patches/linux-outoutdamnperl.patch @ 1717:086e1ff5dd19 draft
Bump to 3.18 kernel with yet another perl removal patch.
author | Rob Landley <rob@landley.net> |
---|---|
date | Tue, 30 Dec 2014 14:54:17 -0600 |
parents | |
children | 78050a31d1ee |
rev | line source |
---|---|
1717
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
1 Commit e6023367d779 added perl back to the kernel build. KILL IT WITH FIRE. |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
2 |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
3 --- linux/arch/x86/boot/compressed/Makefile |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
4 +++ linux/arch/x86/boot/compressed/Makefile |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
5 @@ -89,8 +76,10 @@ |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
6 suffix-$(CONFIG_KERNEL_LZO) := lzo |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
7 suffix-$(CONFIG_KERNEL_LZ4) := lz4 |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
8 |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
9 -RUN_SIZE = $(shell $(OBJDUMP) -h vmlinux | \ |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
10 - perl $(srctree)/arch/x86/tools/calc_run_size.pl) |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
11 +RUN_SIZE = $(shell NUM='\([0-9a-fA-F]*[ \t]*\)'; objdump -h vmlinux | \ |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
12 +sed -n 's/^[ \t0-9]*.b[sr][sk][ \t]*'"$$NUM$$NUM$$NUM$$NUM"'.*/\1\4/p' | \ |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
13 +xargs | while read a b c d; do [ "$$b" != "$$d" ] && exit 1; \ |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
14 +expr $(printf "%d + %d + %d" 0x$$a 0x$$b 0x$$c); done) |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
15 quiet_cmd_mkpiggy = MKPIGGY $@ |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
16 cmd_mkpiggy = $(obj)/mkpiggy $< $(RUN_SIZE) > $@ || ( rm -f $@ ; false ) |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
17 |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
18 --- linux/arch/x86/tools/calc_run_size.pl |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
19 +++ /dev/null |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
20 @@ -1,39 +0,0 @@ |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
21 -#!/usr/bin/perl |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
22 -# |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
23 -# Calculate the amount of space needed to run the kernel, including room for |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
24 -# the .bss and .brk sections. |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
25 -# |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
26 -# Usage: |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
27 -# objdump -h a.out | perl calc_run_size.pl |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
28 -use strict; |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
29 - |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
30 -my $mem_size = 0; |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
31 -my $file_offset = 0; |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
32 - |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
33 -my $sections=" *[0-9]+ \.(?:bss|brk) +"; |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
34 -while (<>) { |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
35 - if (/^$sections([0-9a-f]+) +(?:[0-9a-f]+ +){2}([0-9a-f]+)/) { |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
36 - my $size = hex($1); |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
37 - my $offset = hex($2); |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
38 - $mem_size += $size; |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
39 - if ($file_offset == 0) { |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
40 - $file_offset = $offset; |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
41 - } elsif ($file_offset != $offset) { |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
42 - # BFD linker shows the same file offset in ELF. |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
43 - # Gold linker shows them as consecutive. |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
44 - next if ($file_offset + $mem_size == $offset + $size); |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
45 - |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
46 - printf STDERR "file_offset: 0x%lx\n", $file_offset; |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
47 - printf STDERR "mem_size: 0x%lx\n", $mem_size; |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
48 - printf STDERR "offset: 0x%lx\n", $offset; |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
49 - printf STDERR "size: 0x%lx\n", $size; |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
50 - |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
51 - die ".bss and .brk are non-contiguous\n"; |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
52 - } |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
53 - } |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
54 -} |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
55 - |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
56 -if ($file_offset == 0) { |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
57 - die "Never found .bss or .brk file offset\n"; |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
58 -} |
086e1ff5dd19
Bump to 3.18 kernel with yet another perl removal patch.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
59 -printf("%d\n", $mem_size + $file_offset); |