public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] U-Boot for IXP425 Little-endian
@ 2004-10-06 21:47 Herb Radford
  2004-10-07  7:14 ` Anders Larsen
  2004-10-08 19:16 ` Anders Grafstrom
  0 siblings, 2 replies; 4+ messages in thread
From: Herb Radford @ 2004-10-06 21:47 UTC (permalink / raw)
  To: u-boot

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
-------------- next part --------------

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.769 / Virus Database: 516 - Release Date: 9/24/2004

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot-Users] U-Boot for IXP425 Little-endian
  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
  1 sibling, 0 replies; 4+ messages in thread
From: Anders Larsen @ 2004-10-07  7:14 UTC (permalink / raw)
  To: u-boot

Herb Radford <herbr@magma.ca> schreibt:
>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?

It's been in U-Boot for more than a year!
Use board/ixdp425 (courtesy of Kyle Harris) as a base (and change it to
little-endian).

Cheers
 Anders

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot-Users] U-Boot for IXP425 Little-endian
@ 2004-10-07 12:07 Herb Radford
  0 siblings, 0 replies; 4+ messages in thread
From: Herb Radford @ 2004-10-07 12:07 UTC (permalink / raw)
  To: u-boot

Thanks, Anders but that's not what I asked.
I've looked at that target (it'll probably be my first target to try, I 
think I have access to one) but I wondered if the work had been done 
already or was in progress.
Is there another target which IXP425 little-endian?

Regards, Herb
-------------- next part --------------

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.769 / Virus Database: 516 - Release Date: 9/24/2004

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot-Users] U-Boot for IXP425 Little-endian
  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
  1 sibling, 0 replies; 4+ messages in thread
From: Anders Grafstrom @ 2004-10-08 19:16 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-10-08 19:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
  -- strict thread matches above, loose matches on Subject: below --
2004-10-07 12:07 Herb Radford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox