public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] Using fw_setenv to set negative numbers
@ 2019-06-05 15:57 Ken Sloat
  2019-06-05 16:20 ` Frank Wunderlich
  2019-06-05 16:21 ` Anatolij Gustschin
  0 siblings, 2 replies; 4+ messages in thread
From: Ken Sloat @ 2019-06-05 15:57 UTC (permalink / raw)
  To: u-boot

Hello,

I had a question regarding the use of fw_setenv. I am currently running U-Boot 2018.07

How can I set a negative number using the standard command call to fw_setenv?
For example, if want to set bootdelay to a value of -2 (boot without delay), I currently
cannot just say:
fw_setenv bootdelay -2

fw_setenv thinks 2 is an option I am trying to pass. What is the correct way to do this
(if any)? One work around is to place the name value pair in a script file and call it
With the --script option but was just wondering if there was direct way to accomplish
this. Otherwise, this might be a needed change in the future. 

Thanks,
Ken Sloat

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] Using fw_setenv to set negative numbers
  2019-06-05 15:57 [U-Boot] Using fw_setenv to set negative numbers Ken Sloat
@ 2019-06-05 16:20 ` Frank Wunderlich
  2019-06-05 16:21 ` Anatolij Gustschin
  1 sibling, 0 replies; 4+ messages in thread
From: Frank Wunderlich @ 2019-06-05 16:20 UTC (permalink / raw)
  To: u-boot

Hi,
have you tried quoting your value?

fw_setenv bootdelay "-2"
or
fw_setenv bootdelay '-2'

regards Frank

> Gesendet: Mittwoch, 05. Juni 2019 um 16:57 Uhr
> Von: "Ken Sloat" <KSloat@aampglobal.com>
> An: "u-boot at lists.denx.de" <u-boot@lists.denx.de>
> Cc: "Ken Sloat" <KSloat@aampglobal.com>
> Betreff: [U-Boot] Using fw_setenv to set negative numbers
>
> Hello,
>
> I had a question regarding the use of fw_setenv. I am currently running U-Boot 2018.07
>
> How can I set a negative number using the standard command call to fw_setenv?
> For example, if want to set bootdelay to a value of -2 (boot without delay), I currently
> cannot just say:
> fw_setenv bootdelay -2
>
> fw_setenv thinks 2 is an option I am trying to pass. What is the correct way to do this
> (if any)? One work around is to place the name value pair in a script file and call it
> With the --script option but was just wondering if there was direct way to accomplish
> this. Otherwise, this might be a needed change in the future.
>
> Thanks,
> Ken Sloat
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] Using fw_setenv to set negative numbers
  2019-06-05 15:57 [U-Boot] Using fw_setenv to set negative numbers Ken Sloat
  2019-06-05 16:20 ` Frank Wunderlich
@ 2019-06-05 16:21 ` Anatolij Gustschin
  2019-06-10 16:06   ` Ken Sloat
  1 sibling, 1 reply; 4+ messages in thread
From: Anatolij Gustschin @ 2019-06-05 16:21 UTC (permalink / raw)
  To: u-boot

On Wed, 5 Jun 2019 15:57:55 +0000
Ken Sloat KSloat at aampglobal.com wrote:
...
> How can I set a negative number using the standard command call to fw_setenv?
> For example, if want to set bootdelay to a value of -2 (boot without delay), I currently
> cannot just say:
> fw_setenv bootdelay -2

Try using "fw_setenv bootdelay -- -2" command, it should work.

--
Anatolij

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] Using fw_setenv to set negative numbers
  2019-06-05 16:21 ` Anatolij Gustschin
@ 2019-06-10 16:06   ` Ken Sloat
  0 siblings, 0 replies; 4+ messages in thread
From: Ken Sloat @ 2019-06-10 16:06 UTC (permalink / raw)
  To: u-boot

> -----Original Message-----
> From: Anatolij Gustschin <agust@denx.de>
> Sent: Wednesday, June 5, 2019 12:22 PM
> To: Ken Sloat <KSloat@aampglobal.com>
> Cc: u-boot at lists.denx.de
> Subject: Re: [U-Boot] Using fw_setenv to set negative numbers
> 
> [This is an EXTERNAL EMAIL]
> ________________________________
> 
> On Wed, 5 Jun 2019 15:57:55 +0000
> Ken Sloat KSloat at aampglobal.com wrote:
> ...
> > How can I set a negative number using the standard command call to
> fw_setenv?
> > For example, if want to set bootdelay to a value of -2 (boot without
> > delay), I currently cannot just say:
> > fw_setenv bootdelay -2
> 
> Try using "fw_setenv bootdelay -- -2" command, it should work.
> 
> --
> Anatolij 

Thanks Anatolij! This worked!

Sincerely,
Ken Sloat

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-06-10 16:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-05 15:57 [U-Boot] Using fw_setenv to set negative numbers Ken Sloat
2019-06-05 16:20 ` Frank Wunderlich
2019-06-05 16:21 ` Anatolij Gustschin
2019-06-10 16:06   ` Ken Sloat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox