From: Craig H. <cr...@gu...> - 2006-05-31 00:35:42
|
On May 30, 2006, at 7:05 AM, Simon de Bakker wrote: > Alexandre Pereira Nunes wrote: >> Simon de Bakker escreveu: >> >>> To test your u-boot from ram you probalbly want to #define >>> CONFIG_SKIP_LOWLEVEL_INIT and CONFIG_SKIP_RELOCATE_UBOOT. >>> Also you want to set TEXT_BASE to the memory location you load >>> the image >>> to. >>> >>> Chrs! >>> Simon >>> >>> >> >> For gumstix's default build, that's not necessary: if loading from >> flash, it relocates itself to ram, otherwise it runs from there. It >> works fine at least when loading it to 0xa2000000 (but I suspect it >> maybe position independent, or perhaps, it always relocates to a >> well-know address; All I know is that it runs fine for me on both >> scenarios). >> >> - Alexandre >> > > You can omit defining CONFIG_SKIP_RELOCATE_UBOOT, but it doesn't make > much sense to relocate while it is already loaded into ram. > CONFIG_SKIP_LOWLEVEL_INIT as it says make u-boot skip low level > initializations already done by 'real' u-boot. Apparently it works > without these but it seemed safer to me to do it the tidy way ;) And > when adding a menu option to kbuild it is just a matter of a simple > selection. I would say it's almost certainly safer *not* to change the defines, but just use the u-boot as is. It will relocate itself automatically to where the linker stuff expects it to be (ie from one part of RAM to another, where it should be). It will skip the low-level init stuff if it detects that it's already in RAM, rather than being loaded from flash -- so the skip low level thing is completely moot. Making changes in the configs for those 2 params just makes it more likely that you'll hose things in a way which turns your stix into a doorstop. Particularly if you go messing with TEXT_BASE and such stuff. C |