public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Rodolfo Giometti <giometti@linux.it>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] AS option "allow_branch_to_undefined" removed into mips support
Date: Tue, 11 Oct 2005 16:20:23 +0200	[thread overview]
Message-ID: <20051011142023.GZ5000@enneenne.com> (raw)

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
 {

                 reply	other threads:[~2005-10-11 14:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051011142023.GZ5000@enneenne.com \
    --to=giometti@linux.it \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox