
13 Feb
2008
13 Feb
'08
9:22 p.m.
Kumar Gala wrote: [...]
- The load_image routine (and consequently imload commad) will not
work when the image is stored in Data Flash.
what's the issue here?
Please have a look at code under CONFIG_HAS_DATAFLASH in get_kernel() (formerly in do_bootm()), especially the read_dataflash() function. The issue is that you have to copy data from Data Flash in a specific way in order to have random access to it. So for example this line in your code: type_name = image_get_type_name (image_get_type (hdr)); will effectively try to access hdr->ih_type, which will not work when hdr is an address in Data Flash.
Just to be clear, at a quick glance, I assume load_image will work ok from do_bootm() but not from do_imload(). (since do_bootm is calling get_kernel).
Correct.
Regards, Bartlomiej