1 Index: linux-2.6.25.4/arch/cris/arch-v10/boot/Makefile
2 ===================================================================
3 --- linux-2.6.25.4.orig/arch/cris/arch-v10/boot/Makefile 2008-06-06 20:20:55.000000000 +0100
4 +++ linux-2.6.25.4/arch/cris/arch-v10/boot/Makefile 2008-06-06 20:21:20.000000000 +0100
6 # arch/cris/arch-v10/boot/Makefile
9 -OBJCOPY = objcopy-cris
10 OBJCOPYFLAGS = -O binary --remove-section=.bss
12 subdir- := compressed rescue
15 $(obj)/compressed/vmlinux: $(obj)/Image FORCE
16 $(Q)$(MAKE) $(build)=$(obj)/compressed $@
17 - $(Q)$(MAKE) $(build)=$(obj)/rescue $(obj)/rescue/rescue.bin
19 $(obj)/zImage: $(obj)/compressed/vmlinux
21 Index: linux-2.6.25.4/arch/cris/arch-v10/boot/compressed/Makefile
22 ===================================================================
23 --- linux-2.6.25.4.orig/arch/cris/arch-v10/boot/compressed/Makefile 2008-06-06 20:20:55.000000000 +0100
24 +++ linux-2.6.25.4/arch/cris/arch-v10/boot/compressed/Makefile 2008-06-06 20:56:01.000000000 +0100
26 # arch/cris/arch-v10/boot/compressed/Makefile
29 -CC = gcc-cris -melf $(LINUXINCLUDE)
32 +LD = $(CROSS_COMPILE)ld -m criself
33 ldflags-y += -T $(obj)/decompress.ld
34 OBJECTS = $(obj)/head.o $(obj)/misc.o
35 -OBJCOPY = objcopy-cris
36 OBJCOPYFLAGS = -O binary --remove-section=.bss
38 quiet_cmd_image = BUILD $@
40 $(call if_changed,objcopy)
42 $(obj)/head.o: $(obj)/head.S .config
43 - @$(CC) -D__ASSEMBLY__ -traditional -c $< -o $@
44 + @$(CC) -D__ASSEMBLY__ -traditional -Wa,--em=criself -c $< -o $@
46 $(obj)/misc.o: $(obj)/misc.c .config
47 - @$(CC) -D__KERNEL__ -c $< -o $@
48 + @$(CC) -D__KERNEL__ -Wa,--em=criself -c $< -o $@
50 $(obj)/vmlinux: $(obj)/piggy.gz $(obj)/decompress.bin FORCE
51 $(call if_changed,image)
52 Index: linux-2.6.25.4/arch/cris/arch-v10/boot/compressed/misc.c
53 ===================================================================
54 --- linux-2.6.25.4.orig/arch/cris/arch-v10/boot/compressed/misc.c 2008-06-06 20:20:55.000000000 +0100
55 +++ linux-2.6.25.4/arch/cris/arch-v10/boot/compressed/misc.c 2008-06-06 21:02:10.000000000 +0100
59 * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994
60 - * puts by Nick Holloway 1993, better puts by Martin Mares 1995
61 + * putstr by Nick Holloway 1993, better putstr by Martin Mares 1995
62 * adaptation for Linux/CRIS Axis Communications AB, 1999
66 static void gzip_mark(void **);
67 static void gzip_release(void **);
69 -static void puts(const char *);
70 +static void putstr(const char *);
72 /* the "heap" is put directly after the BSS ends, at end */
75 -static long free_mem_ptr = (long)&end;
77 +static long free_mem_ptr = (long)&_end;
79 #include "../../../../../lib/inflate.c"
82 /* decompressor info and error messages to serial console */
86 +putstr(const char *s)
88 #ifndef CONFIG_ETRAX_DEBUG_PORT_NULL
96 - puts("\n\n -- System halted\n");
99 + putstr("\n\n -- System halted\n");
107 - __asm__ volatile ("move vr,%0" : "=rm" (revision));
110 - puts("You need an ETRAX 100LX to run linux 2.6\n");
114 - puts("Uncompressing Linux...\n");
115 + putstr("Uncompressing Linux...\n");
117 - puts("Done. Now booting the kernel.\n");
118 + putstr("Done. Now booting the kernel.\n");
120 Index: linux-2.6.25.4/arch/cris/arch-v10/mm/init.c
121 ===================================================================
122 --- linux-2.6.25.4.orig/arch/cris/arch-v10/mm/init.c 2008-06-06 20:20:55.000000000 +0100
123 +++ linux-2.6.25.4/arch/cris/arch-v10/mm/init.c 2008-06-06 20:21:20.000000000 +0100
126 free_area_init_node(0, &contig_page_data, zones_size, PAGE_OFFSET >> PAGE_SHIFT, 0);
128 +void free_initrd_mem(unsigned long start, unsigned long end)
132 /* Initialize remaps of some I/O-ports. It is important that this
133 * is called before any driver is initialized.
134 Index: linux-2.6.25.4/arch/cris/arch-v10/boot/compressed/head.S
135 ===================================================================
136 --- linux-2.6.25.4.orig/arch/cris/arch-v10/boot/compressed/head.S 2008-06-06 20:20:55.000000000 +0100
137 +++ linux-2.6.25.4/arch/cris/arch-v10/boot/compressed/head.S 2008-06-06 21:03:05.000000000 +0100
140 #define ASSEMBLER_MACROS_ONLY
141 #include <asm/arch/sv_addr_ag.h>
142 +#include <linux/autoconf.h>
144 #define RAM_INIT_MAGIC 0x56902387
145 #define COMMAND_LINE_MAGIC 0x87109563
156 ;; We need to initialze DRAM registers before we start using the DRAM
158 - cmp.d RAM_INIT_MAGIC, r8 ; Already initialized?
159 + cmp.d RAM_INIT_MAGIC, $r8 ; Already initialized?
160 beq dram_init_finished
165 ;; Initiate the PA and PB ports
167 - move.b CONFIG_ETRAX_DEF_R_PORT_PA_DATA, r0
168 - move.b r0, [R_PORT_PA_DATA]
169 + move.b CONFIG_ETRAX_DEF_R_PORT_PA_DATA, $r0
170 + move.b $r0, [R_PORT_PA_DATA]
172 - move.b CONFIG_ETRAX_DEF_R_PORT_PA_DIR, r0
173 - move.b r0, [R_PORT_PA_DIR]
174 + move.b CONFIG_ETRAX_DEF_R_PORT_PA_DIR, $r0
175 + move.b $r0, [R_PORT_PA_DIR]
177 - move.b CONFIG_ETRAX_DEF_R_PORT_PB_DATA, r0
178 - move.b r0, [R_PORT_PB_DATA]
179 + move.b CONFIG_ETRAX_DEF_R_PORT_PB_DATA, $r0
180 + move.b $r0, [R_PORT_PB_DATA]
182 - move.b CONFIG_ETRAX_DEF_R_PORT_PB_DIR, r0
183 - move.b r0, [R_PORT_PB_DIR]
184 + move.b CONFIG_ETRAX_DEF_R_PORT_PB_DIR, $r0
185 + move.b $r0, [R_PORT_PB_DIR]
187 ;; Setup the stack to a suitably high address.
188 ;; We assume 8 MB is the minimum DRAM in an eLinux
189 ;; product and put the sp at the top for now.
191 - move.d 0x40800000, sp
192 + move.d 0x40800000, $sp
194 ;; Figure out where the compressed piggyback image is
195 ;; in the flash (since we wont try to copy it to DRAM
196 ;; before unpacking). It is at _edata, but in flash.
197 ;; Use (_edata - basse) as offset to the current PC.
199 -basse: move.d pc, r5
200 - and.d 0x7fffffff, r5 ; strip any non-cache bit
201 - subq 2, r5 ; compensate for the move.d pc instr
202 - move.d r5, r0 ; save for later - flash address of 'basse'
204 - sub.d basse, r5 ; r5 = flash address of '_edata'
205 +basse: move.d $pc, $r5
206 + and.d 0x7fffffff, $r5 ; strip any non-cache bit
207 + subq 2, $r5 ; compensate for the move.d pc instr
208 + move.d $r5, $r0 ; save for later - flash address of 'basse'
210 + sub.d basse, $r5 ; r5 = flash address of '_edata'
212 ;; Copy text+data to DRAM
214 - move.d basse, r1 ; destination
215 - move.d _edata, r2 ; end destination
219 + move.d basse, $r1 ; destination
220 + move.d _edata, $r2 ; end destination
221 +1: move.w [$r0+], $r3
227 - move.d r5, [_input_data] ; for the decompressor
228 + move.d $r5, [input_data] ; for the decompressor
231 ;; Clear the decompressors BSS (between _edata and _end)
241 +1: move.w $r0, [$r1+]
246 ;; Save command line magic and address.
247 - move.d _cmd_line_magic, $r12
248 + move.d cmd_line_magic, $r12
250 - move.d _cmd_line_addr, $r12
251 + move.d cmd_line_addr, $r12
254 ;; Do the decompression and save compressed size in _inptr
256 - jsr _decompress_kernel
257 + jsr decompress_kernel
259 ;; Put start address of root partition in r9 so the kernel can use it
260 ;; when mounting from flash
262 - move.d [_input_data], r9 ; flash address of compressed kernel
263 - add.d [_inptr], r9 ; size of compressed kernel
264 + move.d [input_data], $r9 ; flash address of compressed kernel
265 + add.d [inptr], $r9 ; size of compressed kernel
267 ;; Restore command line magic and address.
268 - move.d _cmd_line_magic, $r10
269 + move.d cmd_line_magic, $r10
271 - move.d _cmd_line_addr, $r11
272 + move.d cmd_line_addr, $r11
275 ;; Enter the decompressed kernel
276 - move.d RAM_INIT_MAGIC, r8 ; Tell kernel that DRAM is initialized
277 + move.d RAM_INIT_MAGIC, $r8 ; Tell kernel that DRAM is initialized
278 jump 0x40004000 ; kernel is linked to this address
284 .dword 0 ; used by the decompressor
291 #include "../../lib/hw_settings.S"