Skip to contentSkip to conversation

U-boot and linux command line parameters

U-Boot Mirek23 2 participants 6 messages May 24, 2009 – May 25, 2009

lore
Share & tools
lore

Mirek23

author
#0 lore raw

Dear All,

I use linux kernel 2.6.23 and u-boot 1.2.0 (on ppc405 virtex-4 ) for some time. All works fine when the
kernel together with initramfs is smaller than 8MB. If it is bigger than the kernel does not boot properly.

First of all I would like to know how the address for the linux command line parameters is "transferred" from u-boot to linux for ppc405 (virtex4 chip)? (via some registers or is it a fixed address in the memory ie. 8MB?) Does somebody know what should be changed, in the kernel, in order to move this limitation from 8MB to let say 12MB? I would be grateful for any hint.

Thanks in advance.
M.

Signature · 2 lines
View this message in context: http://www.nabble.com/U-boot-and-linux-command-line-parameters-tp23698396p23698396.html
Sent from the Uboot - Users mailing list archive at Nabble.com.
author
#1 lore raw

When studying the u-boot (1.2.0) source code I have found that it is register r6 and r7 which pass the location of the command line parameters and the
size.

The location of the parameters could be changed in u-boot according to the macro:
CFG_BOOTMAPSZ

There is however the message in all configuration files for u-boot that Linux can only map first initial 8MB
so it seems to be not possible to set CFG_BOOTMAPSZ to something higher than 8MB?

/*
* For booting Linux, the board info and command line data
* have to be in the first 8 MB of memory, since this is
* the maximum mapped by the Linux kernel during initialization. */
#define CFG_BOOTMAPSZ (8 << 20) /* Initial Memory map for
Linux */

Does somebody have an idea how to bypass this limitation in linux 2.6.23 or higher?

M.

Signature · 2 lines
View this message in context: http://www.nabble.com/U-boot-and-linux-command-line-parameters-tp23698396p23703431.html
Sent from the Uboot - Users mailing list [email protected].
#2 lore raw

Dear Mirek23,

Quoted 5 lines · In message <[email protected]> you wrote:

When studying the u-boot (1.2.0) source code I have found that it is register r6 and r7 which pass the location of the command line parameters and the
size.

This has also been pointed out on the ML in reply to your request.

It has also been pointed out that U-Boot 1.2.0 is very old. Please update and use recent code; we don't want to spend time on such obsolete code any more.

Best regards,

Wolfgang Denk

Signature · 6 lines
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
Of all possible committee reactions to any  given  agenda  item,  the
reaction  that will occur is the one which will liberate the greatest
amount of hot air.                                -- Thomas L. Martin
author
#3 lore raw

Dear Wolfgang,

In fact the problem which I have pointed out is not on the u-boot side but in linux kernel which
can only accept command line parameters in first 8MB of RAM.

Was this limitation somehow changed? Is there a different mechanism for passing command line parameters from u-boot to linux (in u-boot version 1.3.4 versus 1.2.0) (for ppc405 architecture).

Best Regards

Mirek

Signature · 2 lines
View this message in context: http://www.nabble.com/U-boot-and-linux-command-line-parameters-tp23698396p23704724.html
Sent from the Uboot - Users mailing list archive at Nabble.com.
#4 lore raw

Dear Mirek23,

Quoted 4 lines · In message <[email protected]> you wrote:

Was this limitation somehow changed? Is there a different mechanism for passing command line parameters from u-boot to linux (in u-boot version 1.3.4 versus 1.2.0) (for ppc405 architecture).

Current U-Boot and Linux versions use the device tree to pass such information.

And note that U-Boot 1.3.4 is pretty old, too. When I wrote "use recent code" I really meant it - i. e. use v2009.06-rc2 or at least v2009.03.

Best regards,

Wolfgang Denk

Signature · 5 lines
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
Cleverness and Style have no place in getting a project completed.
                                                  -- Tom Christiansen
author
#5 lore raw

Dear Wolfgang,

Thank you for your answer. I understand that it is best to use the latest version of u-boot and linux kernel but the pair u-boot 1.2.0 and linux 2.6.23 I can relay on. I have already tried in the past u-boot 1.3.4 and kernel 2.6.29 and I had the problem to get the IP address using the DHCP server (on the u-boot level).
I have given up with the newer version of u-boot and I am still using this what works for me.
(This is however a different subject)

As regards the limitation of 8MB I have done some experiments and it seems to be that it is not a problem any more. I have described that under the link:

http://www.nabble.com/U-boot-and-linux-command-line-parameters-td23698384.html

Basically the CFG_BOOTMAPSZ could be set to 16 MB:
#define CFG_BOOTMAPSZ (8 << 21) /* 16 MB */

Best Regards

Mirek

Signature · 2 lines
View this message in context: http://www.nabble.com/U-boot-and-linux-command-line-parameters-tp23698396p23712936.html
Sent from the Uboot - Users mailing list [email protected].