93e434c99d732280d6586fa745b4ec6c6c87ec54
[openwrt/svn-archive/archive.git] / target / linux / etrax / patches / 100-compile_fixes.patch
1 Index: linux-2.6.25/arch/cris/mm/init.c
2 ===================================================================
3 --- linux-2.6.25.orig/arch/cris/mm/init.c 2008-05-03 09:53:53.000000000 +0100
4 +++ linux-2.6.25/arch/cris/mm/init.c 2008-05-03 09:54:05.000000000 +0100
5 @@ -112,3 +112,7 @@
6 printk (KERN_INFO "Freeing unused kernel memory: %luk freed\n",
7 (unsigned long)((&__init_end - &__init_begin) >> 10));
8 }
9 +
10 +void free_initrd_mem(unsigned long start, unsigned long end)
11 +{
12 +}
13 Index: linux-2.6.25/arch/cris/boot/compressed/Makefile
14 ===================================================================
15 --- linux-2.6.25.orig/arch/cris/boot/compressed/Makefile 2008-05-03 10:00:53.000000000 +0100
16 +++ linux-2.6.25/arch/cris/boot/compressed/Makefile 2008-05-03 10:01:12.000000000 +0100
17 @@ -7,7 +7,7 @@
18 LD = ld-cris
19 ldflags-y += -T $(obj)/decompress.ld
20 OBJECTS = $(obj)/head.o $(obj)/misc.o
21 -OBJCOPY = objcopy-cris
22 +OBJCOPY = /usr/local/cris/objcopy-cris
23 OBJCOPYFLAGS = -O binary --remove-section=.bss
24
25 quiet_cmd_image = BUILD $@
26 Index: linux-2.6.25/arch/cris/boot/Makefile
27 ===================================================================
28 --- linux-2.6.25.orig/arch/cris/boot/Makefile 2008-04-17 03:49:44.000000000 +0100
29 +++ linux-2.6.25/arch/cris/boot/Makefile 2008-05-03 10:05:56.000000000 +0100
30 @@ -2,10 +2,10 @@
31 # arch/cris/arch-v10/boot/Makefile
32 #
33
34 -OBJCOPY = objcopy-cris
35 +OBJCOPY = /usr/local/cris/objcopy-cris
36 OBJCOPYFLAGS = -O binary --remove-section=.bss
37
38 -subdir- := compressed rescue
39 +subdir- := compressed
40 targets := Image
41
42 $(obj)/Image: vmlinux FORCE
43 @@ -14,7 +14,6 @@
44
45 $(obj)/compressed/vmlinux: $(obj)/Image FORCE
46 $(Q)$(MAKE) $(build)=$(obj)/compressed $@
47 - $(Q)$(MAKE) $(build)=$(obj)/rescue $(obj)/rescue/rescue.bin
48
49 $(obj)/zImage: $(obj)/compressed/vmlinux
50 @cp $< $@
51 Index: linux-2.6.25/arch/cris/boot/compressed/Makefile
52 ===================================================================
53 --- linux-2.6.25.orig/arch/cris/boot/compressed/Makefile 2008-05-03 10:01:12.000000000 +0100
54 +++ linux-2.6.25/arch/cris/boot/compressed/Makefile 2008-05-03 16:29:55.000000000 +0100
55 @@ -2,9 +2,8 @@
56 # arch/cris/arch-v10/boot/compressed/Makefile
57 #
58
59 -CC = gcc-cris -melf $(LINUXINCLUDE)
60 ccflags-y += -O2
61 -LD = ld-cris
62 +LD=/usr/local/cris/ld-cris
63 ldflags-y += -T $(obj)/decompress.ld
64 OBJECTS = $(obj)/head.o $(obj)/misc.o
65 OBJCOPY = /usr/local/cris/objcopy-cris
66 @@ -22,10 +21,10 @@
67 $(call if_changed,objcopy)
68
69 $(obj)/head.o: $(obj)/head.S .config
70 - @$(CC) -D__ASSEMBLY__ -traditional -c $< -o $@
71 + /usr/local/cris/gcc-cris -melf $(LINUXINCLUDE) -D__ASSEMBLY__ -traditional -c $< -o $@
72
73 $(obj)/misc.o: $(obj)/misc.c .config
74 - @$(CC) -D__KERNEL__ -c $< -o $@
75 + /usr/local/cris/gcc-cris -melf $(LINUXINCLUDE) -D__KERNEL__ -c $< -o $@
76
77 $(obj)/vmlinux: $(obj)/piggy.gz $(obj)/decompress.bin FORCE
78 $(call if_changed,image)
79 Index: linux-2.6.25/arch/cris/boot/compressed/misc.c
80 ===================================================================
81 --- linux-2.6.25.orig/arch/cris/boot/compressed/misc.c 2008-05-03 16:22:44.000000000 +0100
82 +++ linux-2.6.25/arch/cris/boot/compressed/misc.c 2008-05-03 16:23:26.000000000 +0100
83 @@ -5,7 +5,7 @@
84 * adapted for Linux.
85 *
86 * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994
87 - * puts by Nick Holloway 1993, better puts by Martin Mares 1995
88 + * putstr by Nick Holloway 1993, better putstr by Martin Mares 1995
89 * adaptation for Linux/CRIS Axis Communications AB, 1999
90 *
91 */
92 @@ -99,7 +99,7 @@
93 static void gzip_mark(void **);
94 static void gzip_release(void **);
95
96 -static void puts(const char *);
97 +static void putstr(const char *);
98
99 /* the "heap" is put directly after the BSS ends, at end */
100
101 @@ -139,7 +139,7 @@
102 /* decompressor info and error messages to serial console */
103
104 static void
105 -puts(const char *s)
106 +putstr(const char *s)
107 {
108 #ifndef CONFIG_ETRAX_DEBUG_PORT_NULL
109 while(*s) {
110 @@ -209,9 +209,9 @@
111 static void
112 error(char *x)
113 {
114 - puts("\n\n");
115 - puts(x);
116 - puts("\n\n -- System halted\n");
117 + putstr("\n\n");
118 + putstr(x);
119 + putstr("\n\n -- System halted\n");
120
121 while(1); /* Halt */
122 }
123 @@ -257,14 +257,7 @@
124
125 makecrc();
126
127 - __asm__ volatile ("move vr,%0" : "=rm" (revision));
128 - if (revision < 10)
129 - {
130 - puts("You need an ETRAX 100LX to run linux 2.6\n");
131 - while(1);
132 - }
133 -
134 - puts("Uncompressing Linux...\n");
135 + putstr("Uncompressing Linux...\n");
136 gunzip();
137 - puts("Done. Now booting the kernel.\n");
138 + putstr("Done. Now booting the kernel.\n");
139 }