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