From: Anders Grafstrom <grfstrm@users.sourceforge.net>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] U-Boot for IXP425 Little-endian
Date: Fri, 08 Oct 2004 21:16:35 +0200 [thread overview]
Message-ID: <4166E793.1080001@users.sourceforge.net> (raw)
In-Reply-To: <6.1.1.1.0.20041006174114.0295ab50@mail.magma.ca>
Herb Radford wrote:
> I'm going to be using an IXP425 for u-boot and a kernel but in order to
> re-use existing software I want to use BOTH u-boot and the kernel in
> little-endian.
> Is there someone who has done this for this target or is working on it?
> I'll do it myself, but I thought I'd ask first.
>
> Regards, Herb
I'd also like to see little-endian U-boot for IXDP425.
I think you need B0 stepping silicon.
The BYTE_SWAP_EN bit in EXP_CNFG1 needs to be set if I'm not mistaken.
Without it you get messed up flash accesses.
I have not been able to go all the way yet since I got A0 silicon.
But these patches might get you started.
Apply and build with: make LITTLE_ENDIAN=y
You probably need to swap the endianess of the little-endian u-boot.bin
when doing the switch from a big-endian U-boot to little-endian U-boot.
/Anders
diff -uprN -X nodiff u-boot_cvs/board/ixdp425/u-boot.lds u-boot/board/ixdp425/u-boot.lds
--- u-boot_cvs/board/ixdp425/u-boot.lds 2004-10-08 18:59:54.239024000 +0200
+++ u-boot/board/ixdp425/u-boot.lds 2004-10-07 21:21:26.000000000 +0200
@@ -21,7 +21,7 @@
* MA 02111-1307 USA
*/
-OUTPUT_FORMAT("elf32-bigarm", "elf32-bigarm", "elf32-bigarm")
+OUTPUT_FORMAT("elf32-bigarm", "elf32-bigarm", "elf32-littlearm")
OUTPUT_ARCH(arm)
ENTRY(_start)
SECTIONS
diff -uprN -X nodiff u-boot_cvs/cpu/ixp/config.mk u-boot/cpu/ixp/config.mk
--- u-boot_cvs/cpu/ixp/config.mk 2003-10-14 21:43:56.000000000 +0200
+++ u-boot/cpu/ixp/config.mk 2004-10-07 21:24:44.000000000 +0200
@@ -22,9 +22,16 @@
# MA 02111-1307 USA
#
-BIG_ENDIAN = y
+ifdef LITTLE_ENDIAN
+PLATFORM_RELFLAGS += -mlittle-endian
+PLATFORM_LDFLAGS += -EL
+else
+BIG_ENDIAN=y
+PLATFORM_RELFLAGS += -mbig-endian
+PLATFORM_LDFLAGS += -EB
+endif
PLATFORM_RELFLAGS += -fno-strict-aliasing -fno-common -ffixed-r8 \
- -mshort-load-bytes -msoft-float -mbig-endian
+ -mshort-load-bytes -msoft-float
-PLATFORM_CPPFLAGS += -mbig-endian -mapcs-32 -march=armv4 -mtune=strongarm1100
+PLATFORM_CPPFLAGS += -mapcs-32 -march=armv4 -mtune=strongarm1100
diff -uprN -X nodiff u-boot_cvs/cpu/ixp/start.S u-boot/cpu/ixp/start.S
--- u-boot_cvs/cpu/ixp/start.S 2004-06-09 02:11:02.000000000 +0200
+++ u-boot/cpu/ixp/start.S 2004-10-07 20:53:13.000000000 +0200
@@ -130,8 +130,13 @@ FIQ_STACK_START:
/****************************************************************************/
reset:
+#ifdef __ARMEB__
/* disable mmu, set big-endian */
mov r0, #0xf8
+#else
+ /* disable mmu, set little-endian */
+ mov r0, #0x78
+#endif
mcr p15, 0, r0, c1, c0, 0
CPWAIT r0
next prev parent reply other threads:[~2004-10-08 19:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-06 21:47 [U-Boot-Users] U-Boot for IXP425 Little-endian Herb Radford
2004-10-07 7:14 ` Anders Larsen
2004-10-08 19:16 ` Anders Grafstrom [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-10-07 12:07 Herb Radford
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=4166E793.1080001@users.sourceforge.net \
--to=grfstrm@users.sourceforge.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