2008-05-19 19:34:31 +03:00
|
|
|
Index: linux-2.6.25.4/arch/cris/arch-v10/boot/Makefile
|
2008-05-03 18:51:16 +03:00
|
|
|
===================================================================
|
2008-05-19 19:34:31 +03:00
|
|
|
--- linux-2.6.25.4.orig/arch/cris/arch-v10/boot/Makefile
|
|
|
|
+++ linux-2.6.25.4/arch/cris/arch-v10/boot/Makefile
|
2008-05-03 18:51:16 +03:00
|
|
|
@@ -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
|
2008-05-19 19:34:31 +03:00
|
|
|
@@ -14,7 +14,6 @@ $(obj)/Image: vmlinux FORCE
|
2008-05-03 18:51:16 +03:00
|
|
|
|
|
|
|
$(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 $< $@
|
2008-05-19 19:34:31 +03:00
|
|
|
Index: linux-2.6.25.4/arch/cris/arch-v10/boot/compressed/Makefile
|
2008-05-03 18:51:16 +03:00
|
|
|
===================================================================
|
2008-05-19 19:34:31 +03:00
|
|
|
--- linux-2.6.25.4.orig/arch/cris/arch-v10/boot/compressed/Makefile
|
|
|
|
+++ linux-2.6.25.4/arch/cris/arch-v10/boot/compressed/Makefile
|
2008-05-03 20:38:13 +03:00
|
|
|
@@ -2,12 +2,11 @@
|
2008-05-03 18:51:16 +03:00
|
|
|
# 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
|
2008-05-03 20:38:13 +03:00
|
|
|
-OBJCOPY = objcopy-cris
|
|
|
|
+OBJCOPY = /usr/local/cris/objcopy-cris
|
|
|
|
OBJCOPYFLAGS = -O binary --remove-section=.bss
|
|
|
|
|
|
|
|
quiet_cmd_image = BUILD $@
|
2008-05-19 19:34:31 +03:00
|
|
|
@@ -22,10 +21,10 @@ $(obj)/decompress.bin: $(obj)/decompress
|
2008-05-03 18:51:16 +03:00
|
|
|
$(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)
|
2008-05-19 19:34:31 +03:00
|
|
|
Index: linux-2.6.25.4/arch/cris/arch-v10/boot/compressed/misc.c
|
2008-05-03 18:51:16 +03:00
|
|
|
===================================================================
|
2008-05-19 19:34:31 +03:00
|
|
|
--- linux-2.6.25.4.orig/arch/cris/arch-v10/boot/compressed/misc.c
|
|
|
|
+++ linux-2.6.25.4/arch/cris/arch-v10/boot/compressed/misc.c
|
2008-05-03 18:51:16 +03:00
|
|
|
@@ -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
|
|
|
|
*
|
|
|
|
*/
|
2008-05-19 19:34:31 +03:00
|
|
|
@@ -99,7 +99,7 @@ static void error(char *m);
|
2008-05-03 18:51:16 +03:00
|
|
|
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 */
|
|
|
|
|
2008-05-19 19:34:31 +03:00
|
|
|
@@ -139,7 +139,7 @@ static void gzip_release(void **ptr)
|
2008-05-03 18:51:16 +03:00
|
|
|
/* 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) {
|
2008-05-19 19:34:31 +03:00
|
|
|
@@ -209,9 +209,9 @@ flush_window()
|
2008-05-03 18:51:16 +03:00
|
|
|
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 */
|
|
|
|
}
|
2008-05-19 19:34:31 +03:00
|
|
|
@@ -257,14 +257,7 @@ decompress_kernel()
|
2008-05-03 18:51:16 +03:00
|
|
|
|
|
|
|
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");
|
|
|
|
}
|
2008-05-19 19:34:31 +03:00
|
|
|
Index: linux-2.6.25.4/arch/cris/arch-v10/mm/init.c
|
2008-05-03 20:38:13 +03:00
|
|
|
===================================================================
|
2008-05-19 19:34:31 +03:00
|
|
|
--- linux-2.6.25.4.orig/arch/cris/arch-v10/mm/init.c
|
|
|
|
+++ linux-2.6.25.4/arch/cris/arch-v10/mm/init.c
|
|
|
|
@@ -184,6 +184,9 @@ paging_init(void)
|
|
|
|
|
|
|
|
free_area_init_node(0, &contig_page_data, zones_size, PAGE_OFFSET >> PAGE_SHIFT, 0);
|
2008-05-03 20:38:13 +03:00
|
|
|
}
|
|
|
|
+void free_initrd_mem(unsigned long start, unsigned long end)
|
|
|
|
+{
|
|
|
|
+}
|
2008-05-19 19:34:31 +03:00
|
|
|
|
|
|
|
/* Initialize remaps of some I/O-ports. It is important that this
|
|
|
|
* is called before any driver is initialized.
|