Felix Fietkau wrote:
> Hinko Kočevar wrote:
>>> 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..
> I've fixed the bug, will commit in a minute. This small change was missing:

Great!
For me it still won't create correctly sized Image if OBJCOPYFLAGS are not set 
to:
-O binary -R .note -R .note.gnu.build-id -R .comment -R .bss -S

I've attached the patch that does that in arch/cris/Makefile instead of fixing 
each arch/cris/arch/*/Makefile that needs the correct OBJCOPYFLAGS. Also CC, LD 
and other variables can now be eliminated from those makefiles.

Here is a 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 -x '*.cmd' -urN linux-etrax/linux-2.6.25.4/arch/cris/Makefile linux-etrax.2/linux-2.6.25.4/arch/cris/Makefile
--- linux-etrax/linux-2.6.25.4/arch/cris/Makefile	2008-05-15 17:00:12.000000000 +0200
+++ linux-etrax.2/linux-2.6.25.4/arch/cris/Makefile	2008-06-10 09:34:57.000000000 +0200
@@ -33,7 +33,7 @@
 
 LD = $(CROSS_COMPILE)ld -mcrislinux
 
-OBJCOPYFLAGS := -O binary -R .note -R .comment -S
+OBJCOPYFLAGS := -O binary -R .note -R .note.gnu.build-id -R .comment -R .bss -S
 
 CPPFLAGS_vmlinux.lds = -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE)
 
diff -x '*.cmd' -urN linux-etrax/linux-2.6.25.4/arch/cris/arch-v10/boot/Makefile linux-etrax.2/linux-2.6.25.4/arch/cris/arch-v10/boot/Makefile
--- linux-etrax/linux-2.6.25.4/arch/cris/arch-v10/boot/Makefile	2008-06-10 09:36:59.000000000 +0200
+++ linux-etrax.2/linux-2.6.25.4/arch/cris/arch-v10/boot/Makefile	2008-06-10 09:47:10.000000000 +0200
@@ -2,8 +2,6 @@
 # arch/cris/arch-v10/boot/Makefile
 #
 
-OBJCOPYFLAGS = -O binary --remove-section=.bss
-
 subdir- := compressed rescue
 targets := Image
 
diff -x '*.cmd' -urN linux-etrax/linux-2.6.25.4/arch/cris/arch-v10/boot/compressed/Makefile linux-etrax.2/linux-2.6.25.4/arch/cris/arch-v10/boot/compressed/Makefile
--- linux-etrax/linux-2.6.25.4/arch/cris/arch-v10/boot/compressed/Makefile	2008-06-10 09:36:59.000000000 +0200
+++ linux-etrax.2/linux-2.6.25.4/arch/cris/arch-v10/boot/compressed/Makefile	2008-06-10 09:35:40.000000000 +0200
@@ -3,10 +3,8 @@
 #
 
 ccflags-y += -O2
-LD = $(CROSS_COMPILE)ld -m criself
 ldflags-y += -T $(obj)/decompress.ld
 OBJECTS = $(obj)/head.o $(obj)/misc.o
-OBJCOPYFLAGS = -O binary --remove-section=.bss
 
 quiet_cmd_image = BUILD   $@
 cmd_image = cat $(obj)/decompress.bin $(obj)/piggy.gz > $@
diff -x '*.cmd' -urN linux-etrax/linux-2.6.25.4/arch/cris/arch-v10/boot/rescue/Makefile linux-etrax.2/linux-2.6.25.4/arch/cris/arch-v10/boot/rescue/Makefile
--- linux-etrax/linux-2.6.25.4/arch/cris/arch-v10/boot/rescue/Makefile	2008-05-15 17:00:12.000000000 +0200
+++ linux-etrax.2/linux-2.6.25.4/arch/cris/arch-v10/boot/rescue/Makefile	2008-06-10 09:46:39.000000000 +0200
@@ -2,13 +2,9 @@
 # Makefile for rescue (bootstrap) code
 #
 
-CC = gcc-cris -mlinux $(LINUXINCLUDE)
 ccflags-y += -O2
 asflags-y += -traditional
-LD = gcc-cris -mlinux -nostdlib
 ldflags-y += -T $(obj)/rescue.ld
-OBJCOPY = objcopy-cris
-OBJCOPYFLAGS = -O binary --remove-section=.bss
 obj-$(CONFIG_ETRAX_AXISFLASHMAP) = head.o
 OBJECT := $(obj)/head.o
 
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to