[U-Boot-Users] [PATCH] Add 'imload' command
Kumar Gala
galak at kernel.crashing.org
Thu Feb 14 04:54:45 CET 2008
On Feb 13, 2008, at 7:13 PM, Grant Likely wrote:
> On Feb 13, 2008 12:55 PM, Bartlomiej Sieka <tur at semihalf.com> wrote:
>> Kumar Gala wrote:
>>>
>>> On Feb 13, 2008, at 4:11 AM, Bartlomiej Sieka wrote:
>>>
>>>> Kumar Gala wrote:
>>>>> 'imload' provides a more direct means to load from an image file.
>>>>> Also created a load_image routine out of the code in do_bootm()
>>>>> that
>>>>> is shared between do_bootm() and do_imload().
>>>>> Signed-off-by: Kumar Gala <galak at kernel.crashing.org>
>>>>> ---
>>>>> Note, this is against the u-boot-testing new-image branch.
>>>>
>>>> Thanks.
>>>>
>>>> Two comments:
>>>> - 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.
>
> Ugh, please don't continue down that path. Dataflash is a serial
> flash technology, but the driver pretends that it is memory mapped.
> It is not a good abstraction that I really think needs to be removed.
> I don't think it is a good idea to add that mis-feature into new
> commands.
agreed. I don't plan on supporting it.
- k
More information about the U-Boot
mailing list