[ar71xx] add initial profiles
[openwrt.git] / target / linux / rdc / patches-2.6.25 / 600-x86_lzma.patch
1 --- a/scripts/Makefile.lib
2 +++ b/scripts/Makefile.lib
3 @@ -172,4 +172,9 @@
4 quiet_cmd_gzip = GZIP $@
5 cmd_gzip = gzip -f -9 < $< > $@
6
7 -
8 +# LZMA
9 +#
10 +quiet_cmd_lzma = LZMA $@
11 +cmd_lzma = bash -e scripts/lzma_kern $< $@ -lc7 -lp0 -pb0
12 +# to use lzmacomp,
13 +# cmd_lzma = lzmacomp $< 700 > $@
14 --- /dev/null
15 +++ b/scripts/lzma_kern
16 @@ -0,0 +1,4 @@
17 +get-size() { echo "$5" ;}
18 +printf -v len '%.8x' "$(get-size $(ls -l "$1"))"
19 +lzma e "$@"
20 +echo -ne "\x$(echo $len | cut -c 7,8)\x$(echo $len | cut -c 5,6)\x$(echo $len | cut -c 3,4)\x$(echo $len | cut -c 1,2)" >> "$2"
21 --- a/arch/x86/boot/compressed/Makefile
22 +++ b/arch/x86/boot/compressed/Makefile
23 @@ -4,7 +4,7 @@
24 # create a compressed vmlinux image from the original vmlinux
25 #
26
27 -targets := vmlinux vmlinux.bin vmlinux.bin.gz head_$(BITS).o misc.o piggy.o
28 +targets := vmlinux vmlinux.bin vmlinux.bin.lzma head_$(BITS).o lzma_misc.o piggy.o
29
30 KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2
31 KBUILD_CFLAGS += -fno-strict-aliasing -fPIC
32 @@ -18,7 +18,7 @@
33 LDFLAGS := -m elf_$(UTS_MACHINE)
34 LDFLAGS_vmlinux := -T
35
36 -$(obj)/vmlinux: $(src)/vmlinux_$(BITS).lds $(obj)/head_$(BITS).o $(obj)/misc.o $(obj)/piggy.o FORCE
37 +$(obj)/vmlinux: $(src)/vmlinux_$(BITS).lds $(obj)/head_$(BITS).o $(obj)/lzma_misc.o $(obj)/piggy.o FORCE
38 $(call if_changed,ld)
39 @:
40
41 @@ -44,11 +44,11 @@
42 $(call if_changed,relocbin)
43
44 ifdef CONFIG_RELOCATABLE
45 -$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin.all FORCE
46 - $(call if_changed,gzip)
47 +$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin.all FORCE
48 + $(call if_changed,lzma)
49 else
50 -$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
51 - $(call if_changed,gzip)
52 +$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
53 + $(call if_changed,lzma)
54 endif
55 LDFLAGS_piggy.o := -r --format binary --oformat elf32-i386 -T
56
57 @@ -60,5 +60,5 @@
58 endif
59
60
61 -$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.gz FORCE
62 +$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.lzma FORCE
63 $(call if_changed,ld)
This page took 0.041978 seconds and 5 git commands to generate.