Skip to contentSkip to conversation

bootelf and command line arguments

U-Boot Thomas Dörfler 2 participants 2 messages Jul 18, 2009

lore
Share & tools
lore
#0 lore raw

Hello,

up to now I have worked in private with U-Boot and adapted it to a user-specific MPC5121e based board. We have worked out how we want to use U-Boot and soon would like to commit the board specific (and not so specific) source code changes and additions.

Now we have hit a strange point. the "bootelf" command obviously is prepared to pass argc/argv to the called program. But in its command list entry, the number of maximum arguments is limited to 2, which allows only the command itself and the address of the elf image in memory to be specified.

I have modified the maxargs field to be CONFIG_SYS_MAXARGS, which works fine. So my questions are:

- Is there any useful reason why the bootelf command is limited to maxargs=2?

- Would anybody mind if I commit a patch to change maxargs to CONFIG_SYS_MAXARGS?

wkr,
Thomas Doerfler.

Signature · 7 lines
--------------------------------------------
Embedded Brains GmbH
Thomas Doerfler        Obere Lagerstrasse 30
D-82178 Puchheim       Germany
email: Thomas.Doerfler at embedded-brains.de
Phone: +49-89-18908079-2
Fax:   +49-89-18908079-9
#1 lore raw

Dear Thomas D?rfler,

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

- Is there any useful reason why the bootelf command is limited to maxargs?

No. git blame shows that this entry has never been changed, so I guess it just went unnoticed so far.

Quoted 2 lines

- Would anybody mind if I commit a patch to change maxargs to CONFIG_SYS_MAXARGS?

No, on contrary - I consider this a bug fix.

I recommend to submit a (separate) patch for this ASAP so it can go in into the upcoming release.

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
"Anyone attempting to generate random numbers by deterministic  means
is, of course, living in a state of sin."          - John Von Neumann