public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] Doubt regarding bootm in Uboot
@ 2007-08-06  4:59 Yasothabalan
  2007-08-06  5:32 ` Grant Likely
  0 siblings, 1 reply; 10+ messages in thread
From: Yasothabalan @ 2007-08-06  4:59 UTC (permalink / raw)
  To: u-boot


Hi all,    

 

I want to know how to transfer the control from Uboot to Linux Kernel. I
am using MPC5200B powerpc and ICECUBE board.

Where exactly the Linux Kernel should be loaded?

 

In cmd_bootm.c file,

 

U_BOOT_CMD(

            bootm,  CFG_MAXARGS,           1,         do_bootm,

            "bootm   - boot application image from memory\n",

            "[addr [arg ...]]\n    - boot application image stored in
memory\n"

            "\tpassing arguments 'arg ...'; when booting a Linux
kernel,\n"

            "\t'arg' can be the address of an initrd image\n"

#ifdef CONFIG_OF_FLAT_TREE

            "\tWhen booting a Linux kernel which requires a flat
device-tree\n"

            "\ta third argument is required which is the address of the
of the\n"

            "\tdevice-tree blob. To boot that kernel without an initrd
image,\n"

            "\tuse a '-' for the second argument. If you do not pass a
third\n"

            "\ta bd_info struct will be passed instead\n"

#endif

);

 

What do these lines signify? 

 

For what U_BOOT_CMD is used? I have read the source code fully. 

Please get me some idea.

 

 

 

 

 

 

Regards,

Yasotha Balan R



DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have 
received this email in error please delete it and notify the sender immediately. Before opening any mail and 
attachments please check them for viruses and defect.

-----------------------------------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20070806/9a432a0d/attachment.htm 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot-Users] Doubt regarding bootm in Uboot
  2007-08-06  4:59 [U-Boot-Users] Doubt regarding bootm in Uboot Yasothabalan
@ 2007-08-06  5:32 ` Grant Likely
  2007-08-06  6:39   ` Yasothabalan
  2007-08-06  6:41   ` [U-Boot-Users] Doubt regarding bootm in Uboot Wolfgang Denk
  0 siblings, 2 replies; 10+ messages in thread
From: Grant Likely @ 2007-08-06  5:32 UTC (permalink / raw)
  To: u-boot

On 8/5/07, Yasothabalan Ramaswamy-TLS,Chennai <yasothabalanr@hcl.in> wrote:
> Hi all,
>
> I want to know how to transfer the control from Uboot to Linux Kernel. I am using MPC5200B powerpc and ICECUBE board.
>
> Where exactly the Linux Kernel should be loaded?

Wherever you want to load it.  u-boot will relocate it to the correct
location after uncompressing the kernel uImage file.

>
>
>
> In cmd_bootm.c file,
<snip>
> What do these lines signify?

There are 2 different directories in the Linux kernel source tree
which can be used to build a powerpc kernel; arch/ppc and
arch/powerpc.  arch/ppc is obsolete and slowly all board support in
arch/ppc is moving over to arch/powerpc (support for mpc5200 is
currently in both trees).

BTW, for new designs, you should be using arch/powerpc (by setting
ARCH=powerpc in the environment when building the kernel)

One significant difference between arch/ppc and arch/powerpc is how
the bootloader communicates with the kernel for embedded platforms.
In arch/ppc, u-boot passes data via a static structure which has no
standard format as is prone to breakage.  In arch/powerpc, the
bootloader instead passes a device tree blob which does have a
standard format, and is much less prone to breakage.

So, when booting your Linux kernel that was built with ARCH=powerpc,
you should pass three parameters to the bootm command.
1. address of the kernel
2. address of the (or '-' if you don't have one)
3. address of the device tree

You can generate a device tree blob (.dtb file) by compiling the dts
file for your board with the device tree compiler (dtc).  The
Lite5200B device tree is in the kernel source tree in the directory
arch/powerpc/boot/dts.

Side note: you're email client is sending mail in HTML, not plain
ASCII text.  Etiquette on this list is for ASCII email only.

Cheers,
g.



-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely at secretlab.ca
(403) 399-0195

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot-Users] Doubt regarding bootm in Uboot
  2007-08-06  5:32 ` Grant Likely
@ 2007-08-06  6:39   ` Yasothabalan
  2007-08-06 11:13     ` Wolfgang Denk
  2007-08-07  7:55     ` [U-Boot-Users] Linux hangs just at the beginning raul.moreno at telvent.abengoa.com
  2007-08-06  6:41   ` [U-Boot-Users] Doubt regarding bootm in Uboot Wolfgang Denk
  1 sibling, 2 replies; 10+ messages in thread
From: Yasothabalan @ 2007-08-06  6:39 UTC (permalink / raw)
  To: u-boot


Thanks Grant.

After loading Uboot, we will get Uboot command. 

I will copy the kernel image to tftpboot directory.
And I will pass the command,

run tftp_nfs

to boot the kernel.


My question is after Uboot gets loaded, the control has to be
transferred directly to the kernel, without waiting in the UBOOT prompt.

So now after Uboot gets loaded, kernel should be loaded directly, where
I have to modify in the Uboot code for this could be done.

Note my question is how to transfer control directly to kernel from
Uboot. I should not get Uboot prompt, directly I should get the kernel
prompt.

Thanks,
Yaso.

-----Original Message-----
From: glikely@secretlab.ca [mailto:glikely at secretlab.ca] On Behalf Of
Grant Likely
Sent: Monday, August 06, 2007 11:03 AM
To: Yasothabalan Ramaswamy-TLS,Chennai
Cc: u-boot-users at lists.sourceforge.net
Subject: Re: [U-Boot-Users] Doubt regarding bootm in Uboot

On 8/5/07, Yasothabalan Ramaswamy-TLS,Chennai <yasothabalanr@hcl.in>
wrote:
> Hi all,
>
> I want to know how to transfer the control from Uboot to Linux Kernel.
I am using MPC5200B powerpc and ICECUBE board.
>
> Where exactly the Linux Kernel should be loaded?

Wherever you want to load it.  u-boot will relocate it to the correct
location after uncompressing the kernel uImage file.

>
>
>
> In cmd_bootm.c file,
<snip>
> What do these lines signify?

There are 2 different directories in the Linux kernel source tree
which can be used to build a powerpc kernel; arch/ppc and
arch/powerpc.  arch/ppc is obsolete and slowly all board support in
arch/ppc is moving over to arch/powerpc (support for mpc5200 is
currently in both trees).

BTW, for new designs, you should be using arch/powerpc (by setting
ARCH=powerpc in the environment when building the kernel)

One significant difference between arch/ppc and arch/powerpc is how
the bootloader communicates with the kernel for embedded platforms.
In arch/ppc, u-boot passes data via a static structure which has no
standard format as is prone to breakage.  In arch/powerpc, the
bootloader instead passes a device tree blob which does have a
standard format, and is much less prone to breakage.

So, when booting your Linux kernel that was built with ARCH=powerpc,
you should pass three parameters to the bootm command.
1. address of the kernel
2. address of the (or '-' if you don't have one)
3. address of the device tree

You can generate a device tree blob (.dtb file) by compiling the dts
file for your board with the device tree compiler (dtc).  The
Lite5200B device tree is in the kernel source tree in the directory
arch/powerpc/boot/dts.

Side note: you're email client is sending mail in HTML, not plain
ASCII text.  Etiquette on this list is for ASCII email only.

Cheers,
g.



-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely at secretlab.ca
(403) 399-0195

DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender immediately. Before opening any mail and 
attachments please check them for viruses and defect.

-----------------------------------------------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot-Users] Doubt regarding bootm in Uboot
  2007-08-06  5:32 ` Grant Likely
  2007-08-06  6:39   ` Yasothabalan
@ 2007-08-06  6:41   ` Wolfgang Denk
  1 sibling, 0 replies; 10+ messages in thread
From: Wolfgang Denk @ 2007-08-06  6:41 UTC (permalink / raw)
  To: u-boot

In message <fa686aa40708052232w52f693d9o2a92ecdab67b3833@mail.gmail.com> you wrote:
> 
> Wherever you want to load it.  u-boot will relocate it to the correct
> location after uncompressing the kernel uImage file.

Strictly speaking, U-boot *copies* the kernel to the correct  address
("relocate"  has  a  somewhat  different  meaning);  also, it does so
*while* uncompressing it, not after.

> So, when booting your Linux kernel that was built with ARCH=powerpc,
> you should pass three parameters to the bootm command.
> 1. address of the kernel
> 2. address of the (or '-' if you don't have one)

... address of the initial ramdisk image (or ...

> 3. address of the device tree


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"We all agree on the necessity of compromise. We just can't agree  on
when it's necessary to compromise."
                - Larry Wall in  <1991Nov13.194420.28091@netlabs.com>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot-Users] Doubt regarding bootm in Uboot
  2007-08-06  6:39   ` Yasothabalan
@ 2007-08-06 11:13     ` Wolfgang Denk
  2007-08-07  7:55     ` [U-Boot-Users] Linux hangs just at the beginning raul.moreno at telvent.abengoa.com
  1 sibling, 0 replies; 10+ messages in thread
From: Wolfgang Denk @ 2007-08-06 11:13 UTC (permalink / raw)
  To: u-boot

In message <CE54F2377C0FB8439A290BF5A88BF13D058234A5@CHN-HCLT-EVS01.HCLT.CORP.HCL.IN> you wrote:
> 
> My question is after Uboot gets loaded, the control has to be
> transferred directly to the kernel, without waiting in the UBOOT prompt.

OK.

> So now after Uboot gets loaded, kernel should be loaded directly, where
> I have to modify in the Uboot code for this could be done.

You don't have to modify anything. Just adjust the environment
variable settings as needed (bootdelay).

PLEASE READ THE MANUAL and the DOCUMENTATION in doc/

> Note my question is how to transfer control directly to kernel from
> Uboot. I should not get Uboot prompt, directly I should get the kernel
> prompt.

From kernel to U-Boot? That's done by a reset.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"There are three principal ways to lose money: wine, women,  and  en-
gineers.  While  the first two are more pleasant, the third is by far
the more certain."                      -- Baron Rothschild, ca. 1800

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot-Users] Linux hangs just at the beginning
  2007-08-06  6:39   ` Yasothabalan
  2007-08-06 11:13     ` Wolfgang Denk
@ 2007-08-07  7:55     ` raul.moreno at telvent.abengoa.com
  2007-08-08 16:54       ` Detlev Zundel
  1 sibling, 1 reply; 10+ messages in thread
From: raul.moreno at telvent.abengoa.com @ 2007-08-07  7:55 UTC (permalink / raw)
  To: u-boot

Hello,
U-Boot is already running in my board. I configured the Flash, SDRAM, SRAM,
FEC (ethernet) and console. Apparently all is working and I can trace the
code just before the call in order to transfer the control to Linux, that
is:
      (* kernel) (kbd, initrd_start, initrd_end, cmd_start, cmd_end);
There it is supposed the U-Boot finishes its operation and then the Liinux
kernel takes the control, but it hangs.
I did the Linux image with entry address and load address 0x0. U-Boot can
check the Multi-image correctly.
So I don't know where the problem is. I think the problem is in the Linux
image, not in U-Boot, I can not assure it.
I can't trace the Linux booting because it hans at the beginning, even the
console is not initialized.

Could anybody help me?

One question more,  I wouldn't have to configure the memories again, I
mean, Linux doesn't participate in the configuration of the memories
because U-Boot has already done, right?

Thanks,

Ra?l Moreno

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot-Users] Linux hangs just at the beginning
  2007-08-07  7:55     ` [U-Boot-Users] Linux hangs just at the beginning raul.moreno at telvent.abengoa.com
@ 2007-08-08 16:54       ` Detlev Zundel
  2007-08-09  7:22         ` raul.moreno at telvent.abengoa.com
  0 siblings, 1 reply; 10+ messages in thread
From: Detlev Zundel @ 2007-08-08 16:54 UTC (permalink / raw)
  To: u-boot

Hi Raul,

> U-Boot is already running in my board. I configured the Flash, SDRAM, SRAM,
> FEC (ethernet) and console. Apparently all is working and I can trace the
> code just before the call in order to transfer the control to Linux, that
> is:
>       (* kernel) (kbd, initrd_start, initrd_end, cmd_start, cmd_end);

Congrats.

> There it is supposed the U-Boot finishes its operation and then the Liinux
> kernel takes the control, but it hangs.

Are you sure it hangs or is it just that you don't see any output?
Are you sure you are passing a correct console parameter to Linux?
Search the archives, many people (including myself) already considered
a perfectly working Linux kernel to be dead just because they did not
see any console output...

> I did the Linux image with entry address and load address 0x0. U-Boot can
> check the Multi-image correctly.
> So I don't know where the problem is. I think the problem is in the Linux
> image, not in U-Boot, I can not assure it.
> I can't trace the Linux booting because it hans at the beginning, even the
> console is not initialized.

Hook up a debugger if at all possible.

> One question more,  I wouldn't have to configure the memories again, I
> mean, Linux doesn't participate in the configuration of the memories
> because U-Boot has already done, right?

If the parameter passing between U-Boot and the kernel works, then
yes, this is correct.

By the way, what kernel version on what arch are you trying to boot?

Cheers
  Detlev

-- 
"Win32 sucks so hard it could pull matter out of a Black Hole."
                                          -- Pohl Longsine
--
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 at denx.de

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot-Users] Linux hangs just at the beginning
  2007-08-08 16:54       ` Detlev Zundel
@ 2007-08-09  7:22         ` raul.moreno at telvent.abengoa.com
  2007-08-09 11:42           ` Wolfgang Denk
  2007-08-10 10:19           ` Detlev Zundel
  0 siblings, 2 replies; 10+ messages in thread
From: raul.moreno at telvent.abengoa.com @ 2007-08-09  7:22 UTC (permalink / raw)
  To: u-boot

Hi Detlev,

you were right. I can't debug, but I followed the code writing in a memory
buffer and it doesn't hang, but the output display is not working.

I understand now that the problem is in the Linux kernel (version 2.6.15,
for U-boot I am using 1.1.6) because the command "bdinfo" shows me the
parameters and all is OK. I thought I would need to initialize the console
because U-Boot has already done.
I know my problem is now out of the reach of this mailing-list, but anyway,
I would appreciate if you could tell me where and when I should initialize
the console in the Linux kernel (in my case I am using a MPC866 and the
console is on the SCM1).

Thanks,

Ra?l Moreno



Detlev Zundel <dzu@denx.de>
Detlev Zundel
08/08/2007 18:54
                                                                                                                       
 Para:   raul.moreno at telvent.abengoa.com                                                                               
                                                                                                                       
 cc:     u-boot-users at lists.sourceforge.net                                                                            
                                                                                                                       
 Asunto: Re: [U-Boot-Users] Linux hangs just at the beginning                                                          
                                                                                                                       





Hi Raul,

> U-Boot is already running in my board. I configured the Flash, SDRAM,
SRAM,
> FEC (ethernet) and console. Apparently all is working and I can trace the
> code just before the call in order to transfer the control to Linux, that
> is:
>       (* kernel) (kbd, initrd_start, initrd_end, cmd_start, cmd_end);

Congrats.

> There it is supposed the U-Boot finishes its operation and then the
Liinux
> kernel takes the control, but it hangs.

Are you sure it hangs or is it just that you don't see any output?
Are you sure you are passing a correct console parameter to Linux?
Search the archives, many people (including myself) already considered
a perfectly working Linux kernel to be dead just because they did not
see any console output...

> I did the Linux image with entry address and load address 0x0. U-Boot can
> check the Multi-image correctly.
> So I don't know where the problem is. I think the problem is in the Linux
> image, not in U-Boot, I can not assure it.
> I can't trace the Linux booting because it hans at the beginning, even
the
> console is not initialized.

Hook up a debugger if at all possible.

> One question more,  I wouldn't have to configure the memories again, I
> mean, Linux doesn't participate in the configuration of the memories
> because U-Boot has already done, right?

If the parameter passing between U-Boot and the kernel works, then
yes, this is correct.

By the way, what kernel version on what arch are you trying to boot?

Cheers
  Detlev

--
"Win32 sucks so hard it could pull matter out of a Black Hole."
                                          -- Pohl Longsine
--
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 at denx.de

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot-Users] Linux hangs just at the beginning
  2007-08-09  7:22         ` raul.moreno at telvent.abengoa.com
@ 2007-08-09 11:42           ` Wolfgang Denk
  2007-08-10 10:19           ` Detlev Zundel
  1 sibling, 0 replies; 10+ messages in thread
From: Wolfgang Denk @ 2007-08-09 11:42 UTC (permalink / raw)
  To: u-boot

Dear Ra?l,

in message <OFC666EFF8.F4A30E4D-ONC1257332.00268D39-C1257332.002880CD@abengoa.com> you wrote:
> 
> I know my problem is now out of the reach of this mailing-list, but anyway,
> I would appreciate if you could tell me where and when I should initialize
> the console in the Linux kernel (in my case I am using a MPC866 and the
> console is on the SCM1).

Did you try consulting the FAQ at http://www.denx.de/wiki/DULG/Faq ?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
What we anticipate seldom occurs;  what  we  least  expect  generally
happens.                                          - Bengamin Disraeli

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot-Users] Linux hangs just at the beginning
  2007-08-09  7:22         ` raul.moreno at telvent.abengoa.com
  2007-08-09 11:42           ` Wolfgang Denk
@ 2007-08-10 10:19           ` Detlev Zundel
  1 sibling, 0 replies; 10+ messages in thread
From: Detlev Zundel @ 2007-08-10 10:19 UTC (permalink / raw)
  To: u-boot

Hi Raul,

> I understand now that the problem is in the Linux kernel (version 2.6.15,
> for U-boot I am using 1.1.6) because the command "bdinfo" shows me the
> parameters and all is OK.

And you are sure that your kernel sees the same info?  "bdinfo" shows
you the U-Boot side of the story.  One *very good* reason of moving to
flat device trees is not being bitten by non-matching C header files.

> I thought I would need to initialize the console because U-Boot has
> already done.  I know my problem is now out of the reach of this
> mailing-list, but anyway, I would appreciate if you could tell me
> where and when I should initialize the console in the Linux kernel
> (in my case I am using a MPC866 and the console is on the SCM1).

When your kernel correctly supports the SMC1, it is only a question of
using "console=ttyCPM1,${baudrate}" (maybe adjust the 1 regarding
actual SMC/SCC support in your kernel).

Cheers
  Detlev

-- 
The 82558 B-step and later generation devices do not maintain a link
in D3 if PME is disabled or if the device does not have power.
                                        -- Intel documentation
--
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 at denx.de

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-08-10 10:19 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-06  4:59 [U-Boot-Users] Doubt regarding bootm in Uboot Yasothabalan
2007-08-06  5:32 ` Grant Likely
2007-08-06  6:39   ` Yasothabalan
2007-08-06 11:13     ` Wolfgang Denk
2007-08-07  7:55     ` [U-Boot-Users] Linux hangs just at the beginning raul.moreno at telvent.abengoa.com
2007-08-08 16:54       ` Detlev Zundel
2007-08-09  7:22         ` raul.moreno at telvent.abengoa.com
2007-08-09 11:42           ` Wolfgang Denk
2007-08-10 10:19           ` Detlev Zundel
2007-08-06  6:41   ` [U-Boot-Users] Doubt regarding bootm in Uboot Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox