view · edit · print · history

Moved here from WishList ...

Little Endian mode: Now that v1.5 of the NPE driver and access library has been released along with little endian mode support, it is possible to switch the NSLU2 over. This would save us a lot of work as ARM Linux and various other packages don't seem to have been tested properly on big endian architectures like the NSLU2 currently is. The problem is that we will have to replace RedBoot with a LE one or make a small loader stub which switches to LE mode and then loads the kernel after being called by the stock RedBoot.

[beewoolie] I believe that this task is easier than that. All we should have to do to execute the kernel in LE mode is a) compile it with an LE compiler and b) edit the head.S file and insert an instruction to clear the BigEndian control bit. In essence, we'd build an LE kernel and add a couple instructions to force the CPU into LE mode as soon as possible.
[tman] Hmm. If it really is that easy then it might be an idea to look into this for OpenSlug as currently we don't have open source replacements for some of the Linksys binaries. Once that hurdle is overcome, we can make Unslung little endian as well.
[alsagiac] IXP420 developer's manual says "due to the code written for the Network Processor Engines operation in little endian mode is not currently supported. The core must be set to big endian mode for proper operation". It unfortunately seems to be harder than expected...
UPDATE: the developer's manual, althought having a date of March 2005, seems to be out of date compared to programmer's manual V1.5 (November 2004) saying that NPE does support little endian (see following comment).
[tman] The IXP420 manual is old and hasn't been updated to reflect the fact that v1.5 of the NPE drivers does support little endian mode. Please read the paragraph regarding little endian mode again.
[slebetman] Uhh.. isn't it better for network devices to be running in big endian mode? Otherwise our poor slug will have to constantly htonl() - ntohl() numbers. Remember, TCP/IP is big endian.
[blaster8] Just to update this 'discussion', a little-endian Linux has been run on the NSLU2 - an install of Debian Linux. Most of the peripherals can be accessed in little-endian mode, for the others - well it isn't that CPU intensive to do byte-swapping (otherwise how would your old Pentium 66 have accessed a network?). The major blocker is that the Intel ethernet drivers do not yet work in little-endian mode on a 2.6 kernel. If this is fixed, a switch to little-endian mode could be considered by the dev team.
[fozzy] Could someone add how you can confirm a system is running BE or LE. I've upgraded to DebianSlug 3.10-beta, but it would be good to be able to interrogate the slug to confirm this.


For more technical explanation read the sacred wikipedia :: http://en.wikipedia.org/wiki/Endianness and this link:: http://www.gnu-pascal.de/gpc-es/Endianness.html#Endianness(approve sites)(approve sites)

redboot is in be mode so for le you need byteswipping (like debian-arm do) Le mode is more faster on run but have lacks on occidental language and network tcp (is in BE)

view · edit · print · history · Last edited by SyNko.
Based on work by SyNko, fozzy, Ramiro, and wiml.
Originally by wiml.
Page last modified on January 05, 2008, at 09:21 PM