
On 30 Νοε 2006, at 12:24 ΠΜ, Wolfgang Denk wrote:
In message 22F4C253-E248-41BC-8DEA-76635842B8E6@embeddedalley.com you wrote:
This is not the u-boot environment - it is the RedBoot environment. I am using the RedBoot environment (which is Read-Only) for copying environment variables. Some very important variables are stored there like the ethernet MAC addresses & the ip address.
What this command does is copy the RedBoot config variable to the u- boot ethaddr.
Maybe you could perform a single read and create corresponding entries in the U-Boot environment?
It would be more complicated really. Each board will need to do it's own thing differently. You would end with a single function doing it with a number of defines for each different board.
Just to make things clear, this is not supposed to be used normally in u-boot; it is targetted for specific boards that need to migrate smoothly to u-boot. There is no cost for other boards.
I have to admit that I don't like this. I'd rathwer see you using the standard bootm command, and have the necessary adaption done there based on the image type (which should indicate that thgis is a RB image). You have a lot of #ifdef's there anyway.
Tried it, didn't work. The amount of defines was getting obscene. As an added bonus the registers used to pass control to the kernel are different, plus you really need to disable the MMU & the caches the way that RedBot does it.
Well, maybe you can branch to a different function to handle this?
Isn't this exactly the same? How would I do that in bootm? I'd use an environment variable to call the different function.
End up with almost the same function & crapping all over bootm.
If anything should be cleaned up is bootm to be split in different functions for the normal & OF case.
IMHO of-course.
Also, please cleanup your code (indentation by TABs, trailing white space, C++ comments, line length).
Some files were copied verbatim from RedBoot sources, so they are bound to be like this. I've been told that Lattice modifies the FPGA loader regurally, so I tried to keep the original formatting.
I expected something like this.
Vendor code = ahem, interesting code :(
Best regards,
Wolfgang Denk
-- Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de Immortality consists largely of boredom. -- Zefrem Cochrane, "Metamorphosis", stardate 3219.8
Regards
Pantelis