[U-Boot-Users] U-Boot for IXP425 Little-endian

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

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

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
participants (3)
-
Anders Grafstrom
-
Anders Larsen
-
Herb Radford