[U-Boot] quoting semicolons inside nested "run" scripts?
Wolfgang Denk
wd at denx.de
Wed Apr 7 16:39:51 CEST 2010
Dear Joe Buehler,
please keep the mailing list on Cc:
In message <4BBC92EC.80104 at 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.
More information about the U-Boot
mailing list