From: Eugene Surovegin <ebs@ebshome.net>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] MIPS build environment
Date: Sat, 29 Jan 2005 16:20:30 -0800 [thread overview]
Message-ID: <20050130002030.GA24482@gate.ebshome.net> (raw)
In-Reply-To: <e7af2eca2d0ca4432255ff965eb51330@embeddededge.com>
On Fri, Jan 28, 2005 at 06:13:23PM -0800, Dan Malek wrote:
> Unless I'm doing something wrong, I also have
> to use binutils with the 'allow_branch_to_undefined'
> patch.
Hmm, why do you need this?
The only problematic place IIRC is in start.S which is trivially
fixable without any additional toolchain patches or hacks like
"mips_allow_branch_to_undefined". Just move initialization of GOT
pointer right after CONFIG0 and use la/jalr instead of bal when
calling memsetup, mips_cache_reset etc. This is what I did for MVL 3.1
based MIPS toolchain.
As a side note, "Setup temporary stack" is completely bogus and isn't
needed, at least for 4kc which has a write-through dcache (4kc is the
only MIPS arch currently supported, btw).
--
Eugene
-------------- next part --------------
--- start.S 2004-02-06 17:27:17.000000000 -0800
+++ start.S~jalr 2005-01-29 16:13:18.000000000 -0800
@@ -234,21 +234,35 @@
li t0, CONF_CM_UNCACHED
mtc0 t0, CP0_CONFIG
+ /* Initialize GOT pointer.
+ */
+ bal 1f
+ nop
+ .word _GLOBAL_OFFSET_TABLE_ - 1f + 4
+1:
+ move gp, ra
+ lw t1, 0(ra)
+ add gp, t1
+
+
#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 memsetup
+ la t9, memsetup
+ jalr t9
nop
/* Initialize caches...
*/
- bal mips_cache_reset
+ la t9, mips_cache_reset
+ jalr t9
nop
/* ... and enable them.
@@ -260,21 +274,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
next prev parent reply other threads:[~2005-01-30 0:20 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-29 2:13 [U-Boot-Users] MIPS build environment Dan Malek
2005-01-29 10:36 ` Thomas Sailer
2005-01-29 17:08 ` Wolfgang Denk
2005-01-29 23:54 ` Thomas Sailer
2005-01-30 1:22 ` Wolfgang Denk
2005-01-29 17:03 ` Wolfgang Denk
2005-01-30 0:20 ` Eugene Surovegin [this message]
2005-01-30 1:24 ` Wolfgang Denk
2005-01-30 1:43 ` Eugene Surovegin
2005-01-30 4:40 ` Dan Malek
2005-01-30 9:18 ` Wolfgang Denk
2005-01-30 10:33 ` Eugene Surovegin
2005-01-30 9:13 ` Wolfgang Denk
2005-01-30 10:26 ` Eugene Surovegin
2005-09-24 23:16 ` Wolfgang Denk
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=20050130002030.GA24482@gate.ebshome.net \
--to=ebs@ebshome.net \
--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