* [U-Boot] quoting semicolons inside nested "run" scripts?
@ 2010-04-07 9:17 Joe Buehler
[not found] ` <20100407130419.5284E104D38D@gemini.denx.de>
0 siblings, 1 reply; 3+ messages in thread
From: Joe Buehler @ 2010-04-07 9:17 UTC (permalink / raw)
To: u-boot
I am having difficulties getting a semicolon into the LINUX kernel's
mtdparts command line parameter.
I want to do something like this:
bootcmd=run aaa
aaa=run bbb
bbb=run linux
linux=blah blah blah ${mtdparts}
mtdparts=mtdparts=blah1;blah2
I cannot figure out the quoting to get "blah2" passed to the kernel. I
have tried various things but it always gets stripped.
Joe Buehler
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] quoting semicolons inside nested "run" scripts?
[not found] ` <4BBC92EC.80104@cox.net>
@ 2010-04-07 14:39 ` Wolfgang Denk
2010-04-07 16:58 ` Joe Buehler
0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Denk @ 2010-04-07 14:39 UTC (permalink / raw)
To: u-boot
Dear Joe Buehler,
please keep the mailing list on Cc:
In message <4BBC92EC.80104@cox.net> you wrote:
>
> > What exactly is your problem? U-Boot is trying use the same quoting
> > rules as /bin/sh, so standard escaping with '\' or by enclosing the
> > variable devinitions in '...' works fine.
>
> To make it a bit more concrete, here is one attempt on my part:
>
> VadaTech AMC22x# printenv
> printenv
> baudrate=115200
> download_baudrate=115200
> bootloader_flash_update=protect off $(uboot_flash_addr)
> +$(uboot_flash_size);erase $(uboot_flash_addr) +$(uboot_flash_size);cp.b
> $(fileaddr) $(uboot_flash_addr) $(uboot_flash_size);run nuke_env
> burn_app=erase $(flash_unused_addr) +$(filesize);cp.b $(fileaddr)
> $(flash_unused_addr) $(filesize)
> bf=bootoct $(flash_unused_addr) forceboot numcores=$(numcores)
> nuke_env=protect off $(env_addr) +$(env_size); erase $(env_addr)
> +$(env_size)
...
That's really difficult to read as your mailer wrapped long lines so
it's pretty difficult to see where one definition ends and where the
next one starts. Please fix your mailer NOT to wrap linwes when
posting code like here.
> doboot=run bootlinnfs
> bootlinnfs=bootoctlinux 17c00000 mem=2048 coremask=0x003 root=/dev/nfs
> rw nfsroot=10.32.89.176:/QSCOPE1GIG2a
> ip=10.32.89.175:10.32.89.176:10.32.89.1:255.255.255.0:qscope_xx:mgmt0:off
> ${mtdparts}
> bootlindisk=bootoctlinux 17c00000 mem=2048 coremask=0x003 root=/dev/sda1
> rw ${mtdparts}
> bootqos=bootoct 18c00000 coremask=0xFFC heap=0x800000 stack=0x800000
...
> mtdparts=mtdparts=phys_mapped_flash:384K(uboot),128K(ubootenv),32256K(user);user_flash:16384K(kernel),16384K(spirentqos)
>
> Environment size: 1649/131068 bytes
> VadaTech AMC22x# run doboot
> run doboot
> argv[2]: mem=2048
> argv[3]: coremask=0x003
> argv[4]: root=/dev/nfs
> argv[5]: rw
> argv[6]: nfsroot=10.32.89.176:/QSCOPE1GIG2a
> argv[7]:
> ip=10.32.89.175:10.32.89.176:10.32.89.1:255.255.255.0:qscope_xx:mgmt0:off
> argv[8]: mtdparts=phys_mapped_flash:384K(uboot),128K(ubootenv),32256K(user)
> ELF file is 64 bit
> (rest omitted...)
Hm... it seems you are running some prorpietary code here. The
mainline version of U-Boot does not know any such commands as
"bootoctlinux" or "bootoct".
> The mtdparts argument to the kernel has been cut off at the semicolon.
> So what should I put in the value of the mtdparts environment variable
> so uboot does not eat the semicolon?
I'm sorry, but I don't know what sort of argument handling is
implemented in the "bootoctlinux" command, and if or how variable
sustitution is implemented on these arguments. Normally the
"mtdparts" settings are part of the "bootargs" variable that gets
passed to the Linux kernel.
As you are using unknown, proprietary code here there is little we can
do to help.
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
Der Dativ ist dem Genitiv sein Tod.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] quoting semicolons inside nested "run" scripts?
2010-04-07 14:39 ` Wolfgang Denk
@ 2010-04-07 16:58 ` Joe Buehler
0 siblings, 0 replies; 3+ messages in thread
From: Joe Buehler @ 2010-04-07 16:58 UTC (permalink / raw)
To: u-boot
As a workaround for my issue I just modified the MTD command line
parameter parser in the LINUX kernel to accept & as an alternative to ;.
Joe Buehler
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-04-07 16:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-07 9:17 [U-Boot] quoting semicolons inside nested "run" scripts? Joe Buehler
[not found] ` <20100407130419.5284E104D38D@gemini.denx.de>
[not found] ` <4BBC92EC.80104@cox.net>
2010-04-07 14:39 ` Wolfgang Denk
2010-04-07 16:58 ` Joe Buehler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox