This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ixp2400/flash endian problem


Aaron Richardson wrote:
I am trying to bring in the Intel code for the ixp2400 into the current version of redboot/ecos.

I should warn you that the Intel port is RHEPL'd and current RedBoot/eCos is GPL'd. Mixing code from both in one image may be legally problematic, and mixing it in the same file definitely is - they are legally incompatible licenses.


> I am having problems getting the flash to work
properly and I cannot track down the issue. I am basically getting the data out of the flash in a swapped endian form. I am using the current strata flash code. I have commented out the device check code in the init routine and hard coded the correct values for now. Here is what I get from fis:

RedBoot> fis list
Name              FLASH addr  Mem addr    Length      Entry point
BdeR              0x000000C4  0x00000000  0x00000400  0x00000000
tsySL me          0x0000FAC4  0x0000FAC4  0x00000200  0x00000000
BdeR toofnoc      0x00F0FDC4  0x00F0FDC4  0x00100000  0x00000000
 SIFeridrotc      0x0000FEC4  0x0000FEC4  0x00000200  0x00000000
bder-tookcab      0x000010C4  0x000010C4  0x00000400  0x00000000
RedBoot>

Intel is building with a compiler flag -mbig-endian and -D__ARMEB__. If I compile with these settings (and use their swap image program) I get the output above. However, If I remove both of these compiler options then I get the following:

RedBoot> fis list
Name              FLASH addr  Mem addr    Length      Entry point
RedBoot           0x000000C4  0x00000000  0x00000400  0x00000000
System Log        0x0000FAC4  0x0000FAC4  0x00000200  0x00000000
RedBoot config    0x00F0FDC4  0x00F0FDC4  0x00100000  0x00000000
FIS directory     0x0000FEC4  0x0000FEC4  0x00000200  0x00000000
redboot-backup    0x000010C4  0x000010C4  0x00000400  0x00000000

The names are not swapped any more, but the addresses are still munged. Any ideas on how to fix this?

At a guess it may be because the flash directory was written by the big-endian redboot. You might get more consistent results if the flash directory was written by the little-endian redboot.


Jifl
--
eCosCentric    http://www.eCosCentric.com/    The eCos and RedBoot experts
--[ "You can complain because roses have thorns, or you ]--
--[  can rejoice because thorns have roses." -Lincoln   ]-- Opinions==mine


-- Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]