1 diff -urN linux-2.6.25.7/arch/cris/Makefile linux-2.6.25.7.cris/arch/cris/Makefile
2 --- linux-2.6.25.7/arch/cris/Makefile 2008-06-16 22:24:36.000000000 +0200
3 +++ linux-2.6.25.7.cris/arch/cris/Makefile 2008-06-24 13:22:48.000000000 +0200
6 LD = $(CROSS_COMPILE)ld -mcrislinux
8 -OBJCOPYFLAGS := -O binary -R .note -R .comment -S
9 +OBJCOPYFLAGS := -O binary -R .bss -R .note -R .note.gnu.build-id -R .comment -S
11 CPPFLAGS_vmlinux.lds = -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE)
13 diff -urN linux-2.6.25.7/arch/cris/arch-v10/boot/Makefile linux-2.6.25.7.cris/arch/cris/arch-v10/boot/Makefile
14 --- linux-2.6.25.7/arch/cris/arch-v10/boot/Makefile 2008-06-16 22:24:36.000000000 +0200
15 +++ linux-2.6.25.7.cris/arch/cris/arch-v10/boot/Makefile 2008-06-24 13:23:03.000000000 +0200
17 # arch/cris/arch-v10/boot/Makefile
20 -OBJCOPY = objcopy-cris
21 -OBJCOPYFLAGS = -O binary --remove-section=.bss
23 subdir- := compressed rescue
28 $(obj)/compressed/vmlinux: $(obj)/Image FORCE
29 $(Q)$(MAKE) $(build)=$(obj)/compressed $@
30 - $(Q)$(MAKE) $(build)=$(obj)/rescue $(obj)/rescue/rescue.bin
32 $(obj)/zImage: $(obj)/compressed/vmlinux
34 diff -urN linux-2.6.25.7/arch/cris/arch-v10/boot/compressed/Makefile linux-2.6.25.7.cris/arch/cris/arch-v10/boot/compressed/Makefile
35 --- linux-2.6.25.7/arch/cris/arch-v10/boot/compressed/Makefile 2008-06-16 22:24:36.000000000 +0200
36 +++ linux-2.6.25.7.cris/arch/cris/arch-v10/boot/compressed/Makefile 2008-06-24 13:23:14.000000000 +0200
38 # arch/cris/arch-v10/boot/compressed/Makefile
41 -CC = gcc-cris -melf $(LINUXINCLUDE)
44 ldflags-y += -T $(obj)/decompress.ld
45 OBJECTS = $(obj)/head.o $(obj)/misc.o
46 -OBJCOPY = objcopy-cris
47 -OBJCOPYFLAGS = -O binary --remove-section=.bss
49 quiet_cmd_image = BUILD $@
50 cmd_image = cat $(obj)/decompress.bin $(obj)/piggy.gz > $@
52 $(call if_changed,objcopy)
54 $(obj)/head.o: $(obj)/head.S .config
55 - @$(CC) -D__ASSEMBLY__ -traditional -c $< -o $@
56 + @$(CC) -Iinclude -D__ASSEMBLY__ -traditional -Wa,--em=criself -c $< -o $@
58 $(obj)/misc.o: $(obj)/misc.c .config
59 - @$(CC) -D__KERNEL__ -c $< -o $@
60 + @$(CC) -Iinclude -D__KERNEL__ -Wa,--em=criself -c $< -o $@
62 $(obj)/vmlinux: $(obj)/piggy.gz $(obj)/decompress.bin FORCE
63 $(call if_changed,image)
64 diff -urN linux-2.6.25.7/arch/cris/arch-v10/boot/compressed/decompress.ld linux-2.6.25.7.cris/arch/cris/arch-v10/boot/compressed/decompress.ld
65 --- linux-2.6.25.7/arch/cris/arch-v10/boot/compressed/decompress.ld 2008-06-16 22:24:36.000000000 +0200
66 +++ linux-2.6.25.7.cris/arch/cris/arch-v10/boot/compressed/decompress.ld 2008-06-24 12:57:25.000000000 +0200
68 -OUTPUT_FORMAT(elf32-us-cris)
69 +OUTPUT_FORMAT(elf32-cris)
73 diff -urN linux-2.6.25.7/arch/cris/arch-v10/boot/compressed/head.S linux-2.6.25.7.cris/arch/cris/arch-v10/boot/compressed/head.S
74 --- linux-2.6.25.7/arch/cris/arch-v10/boot/compressed/head.S 2008-06-16 22:24:36.000000000 +0200
75 +++ linux-2.6.25.7.cris/arch/cris/arch-v10/boot/compressed/head.S 2008-06-24 13:24:50.000000000 +0200
78 #define ASSEMBLER_MACROS_ONLY
79 #include <asm/arch/sv_addr_ag.h>
80 +#include <linux/autoconf.h>
82 #define RAM_INIT_MAGIC 0x56902387
83 #define COMMAND_LINE_MAGIC 0x87109563
94 ;; We need to initialze DRAM registers before we start using the DRAM
96 - cmp.d RAM_INIT_MAGIC, r8 ; Already initialized?
97 + cmp.d RAM_INIT_MAGIC, $r8 ; Already initialized?
98 beq dram_init_finished
103 ;; Initiate the PA and PB ports
105 - move.b CONFIG_ETRAX_DEF_R_PORT_PA_DATA, r0
106 - move.b r0, [R_PORT_PA_DATA]
107 + move.b CONFIG_ETRAX_DEF_R_PORT_PA_DATA, $r0
108 + move.b $r0, [R_PORT_PA_DATA]
110 - move.b CONFIG_ETRAX_DEF_R_PORT_PA_DIR, r0
111 - move.b r0, [R_PORT_PA_DIR]
112 + move.b CONFIG_ETRAX_DEF_R_PORT_PA_DIR, $r0
113 + move.b $r0, [R_PORT_PA_DIR]
115 - move.b CONFIG_ETRAX_DEF_R_PORT_PB_DATA, r0
116 - move.b r0, [R_PORT_PB_DATA]
117 + move.b CONFIG_ETRAX_DEF_R_PORT_PB_DATA, $r0
118 + move.b $r0, [R_PORT_PB_DATA]
120 - move.b CONFIG_ETRAX_DEF_R_PORT_PB_DIR, r0
121 - move.b r0, [R_PORT_PB_DIR]
122 + move.b CONFIG_ETRAX_DEF_R_PORT_PB_DIR, $r0
123 + move.b $r0, [R_PORT_PB_DIR]
125 ;; Setup the stack to a suitably high address.
126 ;; We assume 8 MB is the minimum DRAM in an eLinux
127 ;; product and put the sp at the top for now.
129 - move.d 0x40800000, sp
130 + move.d 0x40800000, $sp
132 ;; Figure out where the compressed piggyback image is
133 ;; in the flash (since we wont try to copy it to DRAM
134 ;; before unpacking). It is at _edata, but in flash.
135 ;; Use (_edata - basse) as offset to the current PC.
137 -basse: move.d pc, r5
138 - and.d 0x7fffffff, r5 ; strip any non-cache bit
139 - subq 2, r5 ; compensate for the move.d pc instr
140 - move.d r5, r0 ; save for later - flash address of 'basse'
142 - sub.d basse, r5 ; r5 = flash address of '_edata'
143 +basse: move.d $pc, $r5
144 + and.d 0x7fffffff, $r5 ; strip any non-cache bit
145 + subq 2, $r5 ; compensate for the move.d pc instr
146 + move.d $r5, $r0 ; save for later - flash address of 'basse'
148 + sub.d basse, $r5 ; r5 = flash address of '_edata'
150 ;; Copy text+data to DRAM
152 - move.d basse, r1 ; destination
153 - move.d _edata, r2 ; end destination
157 + move.d basse, $r1 ; destination
158 + move.d _edata, $r2 ; end destination
159 +1: move.w [$r0+], $r3
165 - move.d r5, [_input_data] ; for the decompressor
166 + move.d $r5, [input_data] ; for the decompressor
169 ;; Clear the decompressors BSS (between _edata and _end)
179 +1: move.w $r0, [$r1+]
184 ;; Save command line magic and address.
185 - move.d _cmd_line_magic, $r12
186 + move.d cmd_line_magic, $r12
188 - move.d _cmd_line_addr, $r12
189 + move.d cmd_line_addr, $r12
192 ;; Do the decompression and save compressed size in _inptr
194 - jsr _decompress_kernel
195 + jsr decompress_kernel
197 ;; Put start address of root partition in r9 so the kernel can use it
198 ;; when mounting from flash
200 - move.d [_input_data], r9 ; flash address of compressed kernel
201 - add.d [_inptr], r9 ; size of compressed kernel
202 + move.d [input_data], $r9 ; flash address of compressed kernel
203 + add.d [inptr], $r9 ; size of compressed kernel
205 ;; Restore command line magic and address.
206 - move.d _cmd_line_magic, $r10
207 + move.d cmd_line_magic, $r10
209 - move.d _cmd_line_addr, $r11
210 + move.d cmd_line_addr, $r11
213 ;; Enter the decompressed kernel
214 - move.d RAM_INIT_MAGIC, r8 ; Tell kernel that DRAM is initialized
215 + move.d RAM_INIT_MAGIC, $r8 ; Tell kernel that DRAM is initialized
216 jump 0x40004000 ; kernel is linked to this address
222 .dword 0 ; used by the decompressor
229 #include "../../lib/hw_settings.S"
230 diff -urN linux-2.6.25.7/arch/cris/arch-v10/boot/compressed/misc.c linux-2.6.25.7.cris/arch/cris/arch-v10/boot/compressed/misc.c
231 --- linux-2.6.25.7/arch/cris/arch-v10/boot/compressed/misc.c 2008-06-16 22:24:36.000000000 +0200
232 +++ linux-2.6.25.7.cris/arch/cris/arch-v10/boot/compressed/misc.c 2008-06-24 12:57:25.000000000 +0200
236 * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994
237 - * puts by Nick Holloway 1993, better puts by Martin Mares 1995
238 + * putstr by Nick Holloway 1993, better putstr by Martin Mares 1995
239 * adaptation for Linux/CRIS Axis Communications AB, 1999
243 static void gzip_mark(void **);
244 static void gzip_release(void **);
246 -static void puts(const char *);
247 +static void putstr(const char *);
249 /* the "heap" is put directly after the BSS ends, at end */
252 -static long free_mem_ptr = (long)&end;
254 +static long free_mem_ptr = (long)&_end;
256 #include "../../../../../lib/inflate.c"
259 /* decompressor info and error messages to serial console */
263 +putstr(const char *s)
265 #ifndef CONFIG_ETRAX_DEBUG_PORT_NULL
273 - puts("\n\n -- System halted\n");
276 + putstr("\n\n -- System halted\n");
284 - __asm__ volatile ("move vr,%0" : "=rm" (revision));
287 - puts("You need an ETRAX 100LX to run linux 2.6\n");
291 - puts("Uncompressing Linux...\n");
292 + putstr("Uncompressing Linux...\n");
294 - puts("Done. Now booting the kernel.\n");
295 + putstr("Done. Now booting the kernel.\n");
297 diff -urN linux-2.6.25.7/arch/cris/arch-v10/mm/init.c linux-2.6.25.7.cris/arch/cris/arch-v10/mm/init.c
298 --- linux-2.6.25.7/arch/cris/arch-v10/mm/init.c 2008-06-16 22:24:36.000000000 +0200
299 +++ linux-2.6.25.7.cris/arch/cris/arch-v10/mm/init.c 2008-06-24 12:57:25.000000000 +0200
302 free_area_init_node(0, &contig_page_data, zones_size, PAGE_OFFSET >> PAGE_SHIFT, 0);
304 +void free_initrd_mem(unsigned long start, unsigned long end)
308 /* Initialize remaps of some I/O-ports. It is important that this
309 * is called before any driver is initialized.