Hinko Kočevar wrote:
> Next I've tried out binutils 2.17 - the result is the same!
> ...
>   LD      vmlinux
>   SYSMAP  System.map
>   OBJCOPY arch/cris/boot/Image
>   Kernel: arch/cris/boot/Image is ready
>   GZIP    arch/cris/boot/compressed/piggy.gz
>   LD      arch/cris/boot/compressed/decompress.o
> cris-linux-uclibc-ld: arch/cris/boot/compressed/head.o: uses non-prefixed 
> symbols, but writing file with _-prefixed symbols
> cris-linux-uclibc-ld: failed to merge target specific data of file 
> arch/cris/boot/compressed/head.o
> cris-linux-uclibc-ld: arch/cris/boot/compressed/misc.o: uses non-prefixed 
> symbols, but writing file with _-prefixed symbols
> cris-linux-uclibc-ld: failed to merge target specific data of file 
> arch/cris/boot/compressed/misc.o
> make[7]: *** [arch/cris/boot/compressed/decompress.o] Error 1
> make[6]: *** [arch/cris/boot/compressed/vmlinux] Error 2
> make[5]: *** [zImage] Error 2
> make[5]: Leaving directory 
> `/work/stage/openwrt2/build_dir/linux-etrax/linux-2.6.25.4'
> make[4]: *** 
> [/work/stage/openwrt2/build_dir/linux-etrax/linux-2.6.25.4/.image] Error 2
> make[4]: Leaving directory `/work/stage/openwrt2/target/linux/etrax'
> make[3]: *** [install] Error 2
> make[3]: Leaving directory `/work/stage/openwrt2/target/linux'
> make[2]: *** [target/linux/install] Error 2
> make[2]: Leaving directory `/work/stage/openwrt2'
> make[1]: *** [/work/stage/openwrt2/staging_dir/cris/stamp/.target_install] 
> Error 2
> make[1]: Leaving directory `/work/stage/openwrt2'
> 
> 
> I've confirmed that the 610-cris_target.patch actually applied to 2.18 and 
> 2.17... weird.
> 

Success with binutils 2.17 and the attached patch.

I haven't compared your patch and the one attached here, but I think they 
should be pretty musch the same - but I can't compile the kernel with your 
patch..

Regards,
Hinko

-- 
ČETRTA POT, d.o.o., Kranj
Planina 3
4000 Kranj
Slovenia, Europe
Tel. +386 (0) 4 280 66 03
E-mail: [EMAIL PROTECTED]
Http: www.cetrtapot.si

diff --git a/arch/cris/arch-v10/boot/Makefile b/arch/cris/arch-v10/boot/Makefile
index 20c83a5..34cbd0e 100644
--- a/arch/cris/arch-v10/boot/Makefile
+++ b/arch/cris/arch-v10/boot/Makefile
@@ -2,10 +2,10 @@
 # arch/cris/arch-v10/boot/Makefile
 #
 
-OBJCOPY = objcopy-cris
-OBJCOPYFLAGS = -O binary --remove-section=.bss
+#OBJCOPY = objcopy-cris
+#OBJCOPYFLAGS = -O binary --remove-section=.bss
 
-subdir- := compressed rescue
+subdir- := compressed
 targets := Image
 
 $(obj)/Image: vmlinux FORCE
@@ -14,7 +14,6 @@ $(obj)/Image: vmlinux FORCE
 
 $(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 $< $@
diff --git a/arch/cris/arch-v10/boot/compressed/Makefile b/arch/cris/arch-v10/boot/compressed/Makefile
index 4a031cb..d01e4d2 100644
--- a/arch/cris/arch-v10/boot/compressed/Makefile
+++ b/arch/cris/arch-v10/boot/compressed/Makefile
@@ -2,13 +2,9 @@
 # arch/cris/arch-v10/boot/compressed/Makefile
 #
 
-CC = gcc-cris -melf $(LINUXINCLUDE)
 ccflags-y += -O2
-LD = ld-cris
 ldflags-y += -T $(obj)/decompress.ld
 OBJECTS = $(obj)/head.o $(obj)/misc.o
-OBJCOPY = objcopy-cris
-OBJCOPYFLAGS = -O binary --remove-section=.bss
 
 quiet_cmd_image = BUILD   $@
 cmd_image = cat $(obj)/decompress.bin $(obj)/piggy.gz > $@
@@ -22,10 +18,10 @@ $(obj)/decompress.bin: $(obj)/decompress.o FORCE
 	$(call if_changed,objcopy)
 
 $(obj)/head.o: $(obj)/head.S .config
-	@$(CC) -D__ASSEMBLY__ -traditional -c $< -o $@
+	@$(CC) -Wa,--underscore -D__ASSEMBLY__ -c $< -o $@
 
 $(obj)/misc.o: $(obj)/misc.c .config
-	@$(CC) -D__KERNEL__ -c $< -o $@
+	@$(CC) -Wa,--underscore -D__KERNEL__ -c $< -o $@
 
 $(obj)/vmlinux: $(obj)/piggy.gz $(obj)/decompress.bin FORCE
 	$(call if_changed,image)
diff --git a/arch/cris/arch-v10/boot/compressed/head.S b/arch/cris/arch-v10/boot/compressed/head.S
index 610bdb2..429906c 100644
--- a/arch/cris/arch-v10/boot/compressed/head.S
+++ b/arch/cris/arch-v10/boot/compressed/head.S
@@ -10,13 +10,14 @@
 
 #define ASSEMBLER_MACROS_ONLY
 #include <asm/arch/sv_addr_ag.h>
+#include <linux/autoconf.h>
 
 #define RAM_INIT_MAGIC 0x56902387
 #define COMMAND_LINE_MAGIC 0x87109563
 
 	;; Exported symbols
 	
-	.globl	_input_data
+	.globl	input_data
 
 	
 	.text
@@ -76,7 +77,7 @@ basse:	move.d	pc, r5
 	bcs	1b
 	nop
 
-	move.d	r5, [_input_data] ; for the decompressor
+	move.d	r5, [input_data] ; for the decompressor
 
 
 	;; Clear the decompressors BSS (between _edata and _end)
@@ -97,13 +98,13 @@ basse:	move.d	pc, r5
 	
 	;; Do the decompression and save compressed size in _inptr
 
-	jsr	_decompress_kernel
+	jsr	decompress_kernel
 	
 	;; Put start address of root partition in r9 so the kernel can use it
 	;; when mounting from flash
 
-	move.d	[_input_data], r9	; flash address of compressed kernel
-	add.d	[_inptr], r9		; size of compressed kernel
+	move.d	[input_data], r9	; flash address of compressed kernel
+	add.d	[inptr], r9		; size of compressed kernel
 
 	;; Restore command line magic and address.
 	move.d  _cmd_line_magic, $r10
@@ -117,7 +118,7 @@ basse:	move.d	pc, r5
 	
 	.data
 
-_input_data:
+input_data:
 	.dword	0		; used by the decompressor
 _cmd_line_magic:
 	.dword 0
diff --git a/arch/cris/arch-v10/boot/compressed/misc.c b/arch/cris/arch-v10/boot/compressed/misc.c
index 9a43ab1..e746518 100644
--- a/arch/cris/arch-v10/boot/compressed/misc.c
+++ b/arch/cris/arch-v10/boot/compressed/misc.c
@@ -99,12 +99,12 @@ static void error(char *m);
 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 */
   
-extern int end;
-static long free_mem_ptr = (long)&end;
+extern int _end;
+static long free_mem_ptr = (long)&_end;
  
 #include "../../../../../lib/inflate.c"
 
@@ -139,7 +139,7 @@ static void gzip_release(void **ptr)
 /* 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 @@ flush_window()
 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 @@ decompress_kernel()
 
 	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");
 }
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to