view · edit · print · history

Both of the distro modes (Be or Le) are built from the same source code, but the (compiled) image needs to match the CPU architecture (i.e., big or little endian).

You can test the endianness of your system with the following "c" code:

#include <stdio.h>

int main (int argc, char *argv[]) {
   unsigned char *c;
   unsigned int num = 0;
   c = (unsigned char *)&num;
   c[0] = 0x01;
   if (num == 0x01000000)
       printf ("BIG: 0x%08x (%i)\n", num, num);
       printf ("LITLE: 0x%08x (%i)\n", num, num);
   return (0);

more info at http://www.nslu2-linux.org/wiki/Info/EndianNess

view · edit · print · history · Last edited by wodell.
Based on work by wodell, marceln, and SyNko.
Originally by SyNko.
Page last modified on February 28, 2008, at 02:14 AM