* [U-Boot] howto deal with nested $() in bootenv?
@ 2010-03-04 15:08 Arno Steffen
2010-03-04 16:11 ` Wolfgang Denk
0 siblings, 1 reply; 4+ messages in thread
From: Arno Steffen @ 2010-03-04 15:08 UTC (permalink / raw)
To: u-boot
To set my uboot environment (2008-10) I upload a script to uboot
set serverip 192.168.90.230
a) set bootargs_nfs mem=128M console=ttyS2,115200n8 noinitrd rw
root=/dev/nfs nfsroot=$(serverip):/opt/rootfs, nolock
b) set bootargs_nfs mem=128M console=ttyS2,115200n8 noinitrd rw
root=/dev/nfs nfsroot=\$(serverip):/opt/rootfs, nolock
set boot_nfs tftpboot 0x80000000 spv/uImage\; set bootargs
\$(bootargs_nfs)\; run addip\; bootm 0x80000000
I case a) the serverip while loading will inserted fix in bootargs_nfs
In case b) the serverip will not replaced so that the kernel get a
$(serverip) part of command line.
How to change this above, so that I can later change serverip without
changing anything else?
Regards
Arno
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] howto deal with nested $() in bootenv?
2010-03-04 15:08 [U-Boot] howto deal with nested $() in bootenv? Arno Steffen
@ 2010-03-04 16:11 ` Wolfgang Denk
2010-03-05 7:36 ` Arno Steffen
0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2010-03-04 16:11 UTC (permalink / raw)
To: u-boot
Dear Arno Steffen,
In message <804f0d21003040708h672d4814m6e1c4d5f32ea9c47@mail.gmail.com> you wrote:
> To set my uboot environment (2008-10) I upload a script to uboot
...
> I case a) the serverip while loading will inserted fix in bootargs_nfs
> In case b) the serverip will not replaced so that the kernel get a
> $(serverip) part of command line.
>
> How to change this above, so that I can later change serverip without
> changing anything else?
Please RTFM, thsi specific use case is explaind in detaiul there. See
especially section "7.4. Boot Arguments Unleashed" at
http://www.denx.de/wiki/view/DULG/LinuxBootArgs
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
I have often regretted my speech, never my silence.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] howto deal with nested $() in bootenv?
2010-03-04 16:11 ` Wolfgang Denk
@ 2010-03-05 7:36 ` Arno Steffen
2010-03-05 11:50 ` Wolfgang Denk
0 siblings, 1 reply; 4+ messages in thread
From: Arno Steffen @ 2010-03-05 7:36 UTC (permalink / raw)
To: u-boot
Dear Wolfgang,
I read that chapter and changed to
set bootargs_nfs 'setenv bootargs mem=128M console=ttyS2,115200n8
noinitrd rw root=/dev/nfs nfsroot=${serverip}:/opt/rootfs, nolock'
set boot_nfs 'run bootargs_nfs addip; printenv bootargs; tftpboot
0x80000000 uImage; bootm 0x80000000'
set bootcmd run boot_nfs
The result keeps the same. For some strange reason I can see the
result of printenv command, that I inserted for debug purposes. The
serverip is not replaced.
What is working is executing to type
"run bootargs_nfs addip" as a single command line
"print bootargs" than returns the correct:
bootargs=mem=128M console=ttyS2,115200n8 noinitrd rw root=/dev/nfs nfsroot=192.1
68.90.230:/opt/rootfs, nolock ip=192.168.90.202:192.168.90.230:192.168.90.1:255.
255.255.0::eth0:on
This single line seems to be executed in a different way?!
Best regards
Arno
2010/3/4 Wolfgang Denk <wd@denx.de>:
> Dear Arno Steffen,
>
> In message <804f0d21003040708h672d4814m6e1c4d5f32ea9c47@mail.gmail.com> you wrote:
>> To set my uboot environment (2008-10) I upload a script to uboot
> ...
>> I case a) the serverip while loading will inserted fix in bootargs_nfs
>> In case b) the serverip will not replaced so that the kernel get a
>> $(serverip) part of command line.
>>
>> How to change this above, so that I can later change serverip without
>> changing anything else?
>
> Please RTFM, thsi specific use case is explaind in detaiul there. See
> especially section "7.4. Boot Arguments Unleashed" at
> http://www.denx.de/wiki/view/DULG/LinuxBootArgs
>
> 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
> I have often regretted my speech, never my silence.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] howto deal with nested $() in bootenv?
2010-03-05 7:36 ` Arno Steffen
@ 2010-03-05 11:50 ` Wolfgang Denk
0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2010-03-05 11:50 UTC (permalink / raw)
To: u-boot
Dear Arno Steffen,
In message <804f0d21003042336t222c9e65v18ab2f193ff3e81@mail.gmail.com> you wrote:
>
> I read that chapter and changed to
> set bootargs_nfs 'setenv bootargs mem=128M console=ttyS2,115200n8
> noinitrd rw root=/dev/nfs nfsroot=${serverip}:/opt/rootfs, nolock'
> set boot_nfs 'run bootargs_nfs addip; printenv bootargs; tftpboot
> 0x80000000 uImage; bootm 0x80000000'
> set bootcmd run boot_nfs
>
> The result keeps the same. For some strange reason I can see the
> result of printenv command, that I inserted for debug purposes. The
> serverip is not replaced.
> What is working is executing to type
>
> "run bootargs_nfs addip" as a single command line
> "print bootargs" than returns the correct:
> bootargs=mem=128M console=ttyS2,115200n8 noinitrd rw root=/dev/nfs > nfsroot=192.1
> 68.90.230:/opt/rootfs, nolock ip=192.168.90.202:192.168.90.230:192.168.90> .1:255.
> 255.255.0::eth0:on
>
> This single line seems to be executed in a different way?!
This most probably means that the "serverip" which does not get
substituted is not the "serverip" you tink it is, i. e. eventually it
contains some non-printing characters or control sequences. I
recommend to re-enter the complete variable definition. Do not copy &
paste, but re-type it from scratch. Then test again.
You can also run "md" on the sector where your environment is stored,
and check what's actually stored there.
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
I haven't lost my mind -- it's backed up on tape somewhere.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-03-05 11:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-04 15:08 [U-Boot] howto deal with nested $() in bootenv? Arno Steffen
2010-03-04 16:11 ` Wolfgang Denk
2010-03-05 7:36 ` Arno Steffen
2010-03-05 11:50 ` Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox