All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] AS option "allow_branch_to_undefined" removed into mips support
@ 2005-10-11 14:20 Rodolfo Giometti
  0 siblings, 0 replies; only message in thread
From: Rodolfo Giometti @ 2005-10-11 14:20 UTC (permalink / raw)
  To: u-boot

Hello,

the attached patch agaist u-boot-1.1.3 (thanks to Tim Braun
<tim.braun@librestream.com>) allow to remove the mips(el)-linux-as
option named "allow_branch_to_undefined". I tested it with GNU
assembler version 2.16.1.

Also it fixes endianness support and adds support for toolchains named
mips-linux- or mipsel-linux- (the former still untested).

Ciao,

Rodolfo

-- 

GNU/Linux Solutions                  e-mail:    giometti at linux.it
Linux Device Driver                             giometti at enneenne.com
Embedded Systems                     home page: giometti.enneenne.com
UNIX programming                     phone:     +39 349 2432127
-------------- next part --------------
Index: cpu/mips/config.mk
===================================================================
RCS file: /home/develop/cvs_private/uboot-mips-exadron/cpu/mips/config.mk,v
retrieving revision 1.2
diff -u -r1.2 config.mk
--- a/cpu/mips/config.mk	16 Sep 2005 15:07:21 -0000	1.2
+++ b/cpu/mips/config.mk	11 Oct 2005 14:09:42 -0000
@@ -26,17 +26,24 @@
 if [ "$v" -lt "14" ]; then \
 	echo "-mcpu=4kc"; \
 else \
-	echo "-march=4kc -mtune=4kc -Wa,-allow_branch_to_undefined"; \
+	echo "-march=4kc -mtune=4kc"; \
 fi)
 
-ifneq (,$(findstring 4KCle,$(CROSS_COMPILE)))
-MIPSCFLAGS += -EL
-endif
-ifneq (,$(findstring mipsel,$(CROSS_COMPILE)))
-MIPSLDFLAGS += -EL
-endif
-
 MIPSCFLAGS += -mabicalls
 
+ifneq (,$(findstring 4KC,$(CROSS_COMPILE)))
+  ifneq (,$(findstring 4KCle,$(CROSS_COMPILE)))
+  MIPSCFLAGS += -EL
+  else
+  MIPSCFLAGS += -EB
+  endif
+else  # mips-linux- or mipsel-linux-
+  ifneq (,$(findstring mipsel,$(CROSS_COMPILE)))
+  MIPSLDFLAGS += -EL
+  else
+  MIPSLDFLAGS += -EB
+  endif
+endif
+
 PLATFORM_CPPFLAGS += $(MIPSCFLAGS)
 PLATFORM_LDFLAGS += $(MIPSLDFLAGS)
Index: cpu/mips/start.S
===================================================================
RCS file: /home/develop/cvs_private/uboot-mips-exadron/cpu/mips/start.S,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 start.S
--- a/cpu/mips/start.S	16 Sep 2005 12:14:19 -0000	1.1.1.1
+++ b/cpu/mips/start.S	11 Oct 2005 14:09:42 -0000
@@ -234,21 +234,38 @@
 	li	t0, CONF_CM_UNCACHED
 	mtc0	t0, CP0_CONFIG
 
+	/* Initialize GOT pointer.
+	 */
+	bal	1f
+	nop
+	.extern _GLOBAL_OFFSET_TABLE_
+	.word	_GLOBAL_OFFSET_TABLE_
+	.word	. - 4
+1:
+	move	gp, ra
+	lw	t1, 0(ra)
+	lw	t2, 4(ra)
+	sub	t1, t2
+	add	gp, t1  # calculate current location of offset table
+
 #ifdef CONFIG_INCA_IP
 	/* Disable INCA-IP Watchdog.
 	 */
-	bal	disable_incaip_wdt
+	la	t9, disable_incaip_wdt
+	jalr	t9
 	nop
 #endif
 
 	/* Initialize any external memory.
 	 */
-	bal	lowlevel_init
+	la	t9, lowlevel_init
+	jalr	t9
 	nop
 
 	/* Initialize caches...
 	 */
-	bal	mips_cache_reset
+	la	t9, mips_cache_reset
+	jalr	t9
 	nop
 
 	/* ... and enable them.
@@ -260,21 +277,13 @@
 	/* Set up temporary stack.
 	 */
 	li	a0, CFG_INIT_SP_OFFSET
-	bal	mips_cache_lock
+	la	t9, mips_cache_lock
+	jalr	t9
 	nop
 
 	li	t0, CFG_SDRAM_BASE + CFG_INIT_SP_OFFSET
 	la	sp, 0(t0)
 
-	/* Initialize GOT pointer.
-	 */
-	bal	1f
-	nop
-	.word	_GLOBAL_OFFSET_TABLE_ - 1f + 4
-1:
-	move	gp, ra
-	lw	t1, 0(ra)
-	add	gp, t1
 	la	t9, board_init_f
 	j	t9
 	nop
Index: examples/mips.lds
===================================================================
RCS file: /home/develop/cvs_private/uboot-mips-exadron/examples/mips.lds,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- a/examples/mips.lds	16 Sep 2005 12:14:21 -0000	1.1
+++ b/examples/mips.lds	16 Sep 2005 15:05:08 -0000	1.2
@@ -24,7 +24,7 @@
 /*
 OUTPUT_FORMAT("elf32-bigmips", "elf32-bigmips", "elf32-bigmips")
 */
-OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradbigmips")
+OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradlittlemips")
 OUTPUT_ARCH(mips)
 SECTIONS
 {

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-10-11 14:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-11 14:20 [U-Boot-Users] [PATCH] AS option "allow_branch_to_undefined" removed into mips support Rodolfo Giometti

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.