From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bartlomiej Sieka Date: Wed, 13 Feb 2008 21:22:52 +0100 Subject: [U-Boot-Users] [PATCH] Add 'imload' command In-Reply-To: References: <47B2C244.1050500@semihalf.com> <4268AEEB-CDE1-4110-A979-5D0FBD64B079@kernel.crashing.org> <47B34B23.3040706@semihalf.com> Message-ID: <47B3519C.2020909@semihalf.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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