[U-Boot] Kernel copy from NOR to RAM

Hi guys,
I'm using OMAP-L138 (ARM based) with NOR flash and I'll like to know in which file uboot copies kernel from NOR to RAM?
Thanks
Nicolas

Le 23/08/2010 16:48, Nicolas Luna a écrit :
Hi guys,
I'm using OMAP-L138 (ARM based) with NOR flash and I'll like to know in which file uboot copies kernel from NOR to RAM?
Thanks
Nicolas
Nicolas,
Your question, as it is expressed, does not make much sense to me. What kind of 'file' are you talking about exactly? and what kernel to you mean? the Linux kernel?
Amicalement,

Ok
I would like to improve the copy of linux kernel from NOR to RAM. I would like to replace the current copy and use EDMA instead. I traced the uboot code but I can't find in which file (uboot source code) the copy (from NOR to RAM) takes place.
Thanks.
Regards, Nicolas
On Mon, Aug 23, 2010 at 11:04 AM, Albert ARIBAUD albert.aribaud@free.frwrote:
Le 23/08/2010 16:48, Nicolas Luna a écrit :
Hi guys,
I'm using OMAP-L138 (ARM based) with NOR flash and I'll like to know in which file uboot copies kernel from NOR to RAM?
Thanks
Nicolas
Nicolas,
Your question, as it is expressed, does not make much sense to me. What kind of 'file' are you talking about exactly? and what kernel to you mean? the Linux kernel?
Amicalement,
Albert. _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

On Mon, Aug 23, 2010 at 10:14 AM, Nicolas Luna luna.id@gmail.com wrote:
Ok
I would like to improve the copy of linux kernel from NOR to RAM. I would like to replace the current copy and use EDMA instead. I traced the uboot code but I can't find in which file (uboot source code) the copy (from NOR to RAM) takes place.
usually is done with the command cp -> copy command - as this is usually a memory to memory copy operation.
Thanks.
Regards, Nicolas
On Mon, Aug 23, 2010 at 11:04 AM, Albert ARIBAUD albert.aribaud@free.frwrote:
please stop top posting..
Regards, Nishanth Menon

Well I mean at the boot time not in uboot prompt.
Regards, Nicolas
On Mon, Aug 23, 2010 at 11:16 AM, Nishanth Menon menon.nishanth@gmail.comwrote:
On Mon, Aug 23, 2010 at 10:14 AM, Nicolas Luna luna.id@gmail.com wrote:
Ok
I would like to improve the copy of linux kernel from NOR to RAM. I would like to replace the current copy and use EDMA instead. I traced the uboot code but I can't find in which file (uboot source code) the copy (from
NOR
to RAM) takes place.
usually is done with the command cp -> copy command - as this is usually a memory to memory copy operation.
Thanks.
Regards, Nicolas
On Mon, Aug 23, 2010 at 11:04 AM, Albert ARIBAUD <albert.aribaud@free.fr wrote:
please stop top posting..
Regards, Nishanth Menon

On 2010/08/23 5:19 PM, Nicolas Luna wrote:
Well I mean at the boot time not in uboot prompt.
Regards, Nicolas
The cp command may be executed as part of the automatic boot script. Alternatively, the bootm command may perform the copy from NOR to RAM automatically as part of the boot sequence.
Take a look at cmd_bootm.c.
It may be platform dependent, though. What architecture are you working with?
Rogan

Hi Nicolas,
I'm using OMAP-L138 (ARM based) with NOR flash and I'll like to know in which file uboot copies kernel from NOR to RAM?
This will be the UBL which runs before U-Boot gets a chance to run. Just before Stefano Babic's work on the dm365 platform all davinci U-Boot ports configured CONFIG_SKIP_LOWLEVEL_INIT and thus relied on being loaded by some other entity into RAM to the link address specified during compilation. In such setups U-Boot is actually a payload in an AIS image.
There is some documentation out there on the web ([1], esp. [2]) - if you have further questions, go ahead ;)
Cheers Detlev
[1] http://processors.wiki.ti.com/index.php/Category:OMAPL1 [2] http://processors.wiki.ti.com/index.php/Serial_Boot_and_Flash_Loading_Utilit...

In fact I'm using OMAPL138 platform and I think that it is not UBL that is copying kernel under that platform.
I have been able to find the kernel image relocation in cmd_bootm.c but that is not the inital copy.
I added printf/puts into the code to find where exactly it happens and my last print before the copy is displayed from
file: hush.c function: static int run_pipe_real(struct pipe *pi) line: rcode = (cmdtp->cmd) (cmdtp, flag,child->argc-i,&child->argv[i]);
This is a function pointer and I just don't know where it jumps and it's what I trying to find.
Any idea?
Thanks
Nicolas
On Mon, Aug 23, 2010 at 11:28 AM, Detlev Zundel dzu@denx.de wrote:
Hi Nicolas,
I'm using OMAP-L138 (ARM based) with NOR flash and I'll like to know in which file uboot copies kernel from NOR to RAM?
This will be the UBL which runs before U-Boot gets a chance to run. Just before Stefano Babic's work on the dm365 platform all davinci U-Boot ports configured CONFIG_SKIP_LOWLEVEL_INIT and thus relied on being loaded by some other entity into RAM to the link address specified during compilation. In such setups U-Boot is actually a payload in an AIS image.
There is some documentation out there on the web ([1], esp. [2]) - if you have further questions, go ahead ;)
Cheers Detlev
[1] http://processors.wiki.ti.com/index.php/Category:OMAPL1 [2] http://processors.wiki.ti.com/index.php/Serial_Boot_and_Flash_Loading_Utilit...
-- Deutsches Grundgesetz Artikel 21 Absatz 1: Die Parteien wirken bei der politischen Willensbildung des Volkes mit. Ihre Gründung ist frei. Ihre innere Ordnung muß demokratischen Grundsätzen ent- sprechen. Sie müssen über die Herkunft und Verwendung ihrer Mittel sowie über ihr Vermögen öffentlich Rechenschaft geben. -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu@denx.de

Nicolas Luna wrote:
In fact I'm using OMAPL138 platform and I think that it is not UBL that is copying kernel under that platform.
The UBL set up the processor in a fixed way, and have no knowledge about the kernel. It loads u-boot, and the kernel is copied inside u-boot.
I added printf/puts into the code to find where exactly it happens and my last print before the copy is displayed from
file: hush.c function: static int run_pipe_real(struct pipe *pi) line: rcode = (cmdtp->cmd) (cmdtp, flag,child->argc-i,&child->argv[i]);
This is a function pointer and I just don't know where it jumps and it's what I trying to find.
Of course, you find only the point where the shell starts the function executing a command. However, as already reported, you have to take a look to the "cp" command, whose function do_mem_cp is in common/cmd_mem.c.
Best regards, Stefano Babic
participants (6)
-
Albert ARIBAUD
-
Detlev Zundel
-
Nicolas Luna
-
Nishanth Menon
-
Rogan Dawes
-
Stefano Babic