Final updates to default configuration of ps3 petitboot sub-target
[openwrt.git] / target / linux / rdc / patches-2.6.24 / 600-x86_lzma.patch
1 --- a/scripts/Makefile.lib
2 +++ b/scripts/Makefile.lib
3 @@ -166,4 +166,9 @@ cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS)
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_32
22 +++ b/arch/x86/boot/compressed/Makefile_32
23 @@ -4,8 +4,8 @@
24 # create a compressed vmlinux image from the original vmlinux
25 #
26
27 -targets := vmlinux vmlinux.bin vmlinux.bin.gz head_32.o misc_32.o piggy.o \
28 - vmlinux.bin.all vmlinux.relocs
29 +targets := vmlinux vmlinux.bin vmlinux.bin.lzma head_32.o piggy.o \
30 + vmlinux.bin.all vmlinux.relocs lzma_misc.o
31 EXTRA_AFLAGS := -traditional
32
33 LDFLAGS_vmlinux := -T
34 @@ -17,7 +17,7 @@ KBUILD_CFLAGS := -m32 -D__KERNEL__ $(LI
35 $(call cc-option,-fno-stack-protector)
36 LDFLAGS := -m elf_i386
37
38 -$(obj)/vmlinux: $(src)/vmlinux_32.lds $(obj)/head_32.o $(obj)/misc_32.o $(obj)/piggy.o FORCE
39 +$(obj)/vmlinux: $(src)/vmlinux_32.lds $(obj)/head_32.o $(obj)/lzma_misc.o $(obj)/piggy.o FORCE
40 $(call if_changed,ld)
41 @:
42
43 @@ -37,14 +37,14 @@ $(obj)/vmlinux.bin.all: $(vmlinux.bin.al
44 $(call if_changed,relocbin)
45
46 ifdef CONFIG_RELOCATABLE
47 -$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin.all FORCE
48 - $(call if_changed,gzip)
49 +$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin.all FORCE
50 + $(call if_changed,lzma)
51 else
52 -$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
53 - $(call if_changed,gzip)
54 +$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
55 + $(call if_changed,lzma)
56 endif
57
58 LDFLAGS_piggy.o := -r --format binary --oformat elf32-i386 -T
59
60 -$(obj)/piggy.o: $(src)/vmlinux_32.scr $(obj)/vmlinux.bin.gz FORCE
61 +$(obj)/piggy.o: $(src)/vmlinux_32.scr $(obj)/vmlinux.bin.lzma FORCE
62 $(call if_changed,ld)
This page took 0.071003 seconds and 5 git commands to generate.