move etrax generic files to specific kernel version
[openwrt/svn-archive/archive.git] / target / linux / etrax / patches-2.6.28 / 100-compile-fixes.patch
1 Index: linux-2.6.28/arch/cris/Makefile
2 ===================================================================
3 --- linux-2.6.28.orig/arch/cris/Makefile 2008-12-25 00:26:37.000000000 +0100
4 +++ linux-2.6.28/arch/cris/Makefile 2009-01-09 22:52:39.000000000 +0100
5 @@ -40,7 +40,7 @@
6
7 LD = $(CROSS_COMPILE)ld -mcrislinux
8
9 -OBJCOPYFLAGS := -O binary -R .note -R .comment -S
10 +OBJCOPYFLAGS := -O binary -R .bss -R .note -R .note.gnu.build-id -R .comment -S
11
12 CPPFLAGS_vmlinux.lds = -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE)
13
14 Index: linux-2.6.28/arch/cris/arch-v10/boot/Makefile
15 ===================================================================
16 --- linux-2.6.28.orig/arch/cris/arch-v10/boot/Makefile 2008-12-25 00:26:37.000000000 +0100
17 +++ linux-2.6.28/arch/cris/arch-v10/boot/Makefile 2009-01-09 22:52:39.000000000 +0100
18 @@ -13,7 +13,6 @@
19
20 $(obj)/compressed/vmlinux: $(obj)/Image FORCE
21 $(Q)$(MAKE) $(build)=$(obj)/compressed $@
22 - $(Q)$(MAKE) $(build)=$(obj)/rescue $(obj)/rescue/rescue.bin
23
24 $(obj)/zImage: $(obj)/compressed/vmlinux
25 @cp $< $@
26 Index: linux-2.6.28/arch/cris/arch-v10/boot/compressed/misc.c
27 ===================================================================
28 --- linux-2.6.28.orig/arch/cris/arch-v10/boot/compressed/misc.c 2008-12-25 00:26:37.000000000 +0100
29 +++ linux-2.6.28/arch/cris/arch-v10/boot/compressed/misc.c 2009-01-10 18:00:45.000000000 +0100
30 @@ -5,7 +5,7 @@
31 * adapted for Linux.
32 *
33 * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994
34 - * puts by Nick Holloway 1993, better puts by Martin Mares 1995
35 + * putstr by Nick Holloway 1993, better putstr by Martin Mares 1995
36 * adaptation for Linux/CRIS Axis Communications AB, 1999
37 *
38 */
39 @@ -102,7 +102,6 @@
40 static long bytes_out = 0;
41 static uch *output_data;
42 static unsigned long output_ptr = 0;
43 -static void puts(const char *);
44
45 /* the "heap" is put directly after the BSS ends, at end */
46
47 @@ -115,7 +114,7 @@
48 /* decompressor info and error messages to serial console */
49
50 static void
51 -puts(const char *s)
52 +putstr(const char *s)
53 {
54 #ifndef CONFIG_ETRAX_DEBUG_PORT_NULL
55 while (*s) {
56 @@ -188,9 +187,9 @@
57
58 static void error(char *x)
59 {
60 - puts("\n\n");
61 - puts(x);
62 - puts("\n\n -- System halted\n");
63 + putstr("\n\n");
64 + putstr(x);
65 + putstr("\n\n -- System halted\n");
66
67 while (1); /* Halt */
68 }
69 @@ -236,11 +235,11 @@
70
71 __asm__ volatile ("move $vr,%0" : "=rm" (revision));
72 if (revision < 10) {
73 - puts("You need an ETRAX 100LX to run linux 2.6\n");
74 + putstr("You need an ETRAX 100LX to run linux 2.6\n");
75 while (1);
76 }
77
78 - puts("Uncompressing Linux...\n");
79 + putstr("Uncompressing Linux...\n");
80 gunzip();
81 - puts("Done. Now booting the kernel.\n");
82 + putstr("Done. Now booting the kernel.\n");
83 }
84 Index: linux-2.6.28/arch/cris/arch-v10/mm/init.c
85 ===================================================================
86 --- linux-2.6.28.orig/arch/cris/arch-v10/mm/init.c 2008-12-25 00:26:37.000000000 +0100
87 +++ linux-2.6.28/arch/cris/arch-v10/mm/init.c 2009-01-09 22:52:39.000000000 +0100
88 @@ -184,6 +184,9 @@
89
90 free_area_init_node(0, zones_size, PAGE_OFFSET >> PAGE_SHIFT, 0);
91 }
92 +void free_initrd_mem(unsigned long start, unsigned long end)
93 +{
94 +}
95
96 /* Initialize remaps of some I/O-ports. It is important that this
97 * is called before any driver is initialized.