mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* Changing the baudrate via barebox prompt
@ 2014-05-14  3:34 Fabio Estevam
  2014-05-14  4:59 ` Kevin Du Huanpeng
  0 siblings, 1 reply; 9+ messages in thread
From: Fabio Estevam @ 2014-05-14  3:34 UTC (permalink / raw)
  To: barebox

Hi,

I am running barebox on a mx6qsabresd board and would like to know if
there is a way to change the serial baudrate via barebox prompt.

Any suggestion?

Thanks,

Fabio Estevam

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: Changing the baudrate via barebox prompt
  2014-05-14  3:34 Changing the baudrate via barebox prompt Fabio Estevam
@ 2014-05-14  4:59 ` Kevin Du Huanpeng
  2014-05-14  5:32   ` Antony Pavlov
  0 siblings, 1 reply; 9+ messages in thread
From: Kevin Du Huanpeng @ 2014-05-14  4:59 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: barebox

yes,try
console.baundrate=9600
but you may have to check if your serial driver has support this

在 2014-5-14,上午11:34,Fabio Estevam <festevam@gmail.com> 写道:

> Hi,
> 
> I am running barebox on a mx6qsabresd board and would like to know if
> there is a way to change the serial baudrate via barebox prompt.
> 
> Any suggestion?
> 
> Thanks,
> 
> Fabio Estevam
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: Changing the baudrate via barebox prompt
  2014-05-14  4:59 ` Kevin Du Huanpeng
@ 2014-05-14  5:32   ` Antony Pavlov
  2014-05-14  6:09     ` Holger Schurig
  2014-05-14 12:32     ` Fabio Estevam
  0 siblings, 2 replies; 9+ messages in thread
From: Antony Pavlov @ 2014-05-14  5:32 UTC (permalink / raw)
  To: Kevin Du Huanpeng; +Cc: barebox

On Wed, 14 May 2014 12:59:53 +0800
Kevin Du Huanpeng <u74147@gmail.com> wrote:

> yes,try
> console.baundrate=9600
> but you may have to check if your serial driver has support this

cs0.baudrate=9600

use devinfo to see all available consoles (cs0, cs1 etc).

Also if you use advanced shell then use <tab> key, e.g.

cs<tab>.bau<tab>

> 在 2014-5-14,上午11:34,Fabio Estevam <festevam@gmail.com> 写道:
> 
> > Hi,
> > 
> > I am running barebox on a mx6qsabresd board and would like to know if
> > there is a way to change the serial baudrate via barebox prompt.
> > 
> > Any suggestion?
> > 
> > Thanks,
> > 
> > Fabio Estevam
> > 
> > _______________________________________________
> > barebox mailing list
> > barebox@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/barebox
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox


-- 
-- 
Best regards,
  Antony Pavlov

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: Changing the baudrate via barebox prompt
  2014-05-14  5:32   ` Antony Pavlov
@ 2014-05-14  6:09     ` Holger Schurig
  2014-05-14  7:20       ` Sascha Hauer
  2014-05-14 12:32     ` Fabio Estevam
  1 sibling, 1 reply; 9+ messages in thread
From: Holger Schurig @ 2014-05-14  6:09 UTC (permalink / raw)
  To: Antony Pavlov; +Cc: barebox

Hmm, any reason why csX.baudrate isn't listed under magicvars ?

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: Changing the baudrate via barebox prompt
  2014-05-14  6:09     ` Holger Schurig
@ 2014-05-14  7:20       ` Sascha Hauer
  2014-05-14  8:01         ` Holger Schurig
  0 siblings, 1 reply; 9+ messages in thread
From: Sascha Hauer @ 2014-05-14  7:20 UTC (permalink / raw)
  To: Holger Schurig; +Cc: barebox

On Wed, May 14, 2014 at 08:09:00AM +0200, Holger Schurig wrote:
> Hmm, any reason why csX.baudrate isn't listed under magicvars ?

These variables predate the magicvar support and nobody has ever added
it them to magicvar. It's not clear how we want to add these. Do we want
to add wildcards to the magicvar description (csX)? This gets incorrect
for some devices which can show up as mmcX or mciX depending on the way
they are registered. We could also attach the description to the device
parameter themselves which means we get descriptions for all parameters
actually registered, like

cs0.baudrate		Baudrate for the serial console
cs1.baudrate		Baudrate for the serial console
...

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: Changing the baudrate via barebox prompt
  2014-05-14  7:20       ` Sascha Hauer
@ 2014-05-14  8:01         ` Holger Schurig
  2014-05-14  8:10           ` Holger Schurig
  2014-05-14  8:16           ` Sascha Hauer
  0 siblings, 2 replies; 9+ messages in thread
From: Holger Schurig @ 2014-05-14  8:01 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Hmm, i thought more that "magicvars" could also iterate over the
devices and spits out their parameter. Internally, they are different,
but from a users perspective both things do something "magical": a
simple setting of a variable does some action.

Or am I'm mixing some things up?  After all I'm still not that deep
into barebox ...

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: Changing the baudrate via barebox prompt
  2014-05-14  8:01         ` Holger Schurig
@ 2014-05-14  8:10           ` Holger Schurig
  2014-05-14  8:16           ` Sascha Hauer
  1 sibling, 0 replies; 9+ messages in thread
From: Holger Schurig @ 2014-05-14  8:10 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Here's a WIP:

index d92788a..9e639bb 100644
--- a/commands/magicvar.c
+++ b/commands/magicvar.c
@@ -5,12 +5,22 @@
 static int do_magicvar(int argc, char *argv[])
 {
        struct magicvar *m;
+       struct device_d *dev;
+       struct param_d *param;

        for (m = &__barebox_magicvar_start;
                        m != &__barebox_magicvar_end;
                        m++)
                printf("%-32s %s\n", m->name, m->description);

+       for_each_device(dev) {
+               if (!strcmp("global", dev_name(dev)))
+                       continue;
+               list_for_each_entry(param, &dev->parameters, list) {
+                       printf("%s.%s\n", dev_name(dev), param->name);
+               }
+       }
+
        return 0;
 }


However, the output lacks descriptions:

barebox:/ magicvar
...
global.login.timeout             timeout to type the password
global.model                     Product name of this hardware
global.version                   The barebox version
net.nameserver
net.domainname
cs0.baudrate
cs0.active
cs1.baudrate
cs1.active
cs2.baudrate
cs2.active
cs3.baudrate
cs3.active
cs4.baudrate
cs4.active
eth0.ipaddr
eth0.serverip
eth0.gateway
eth0.netmask
eth0.ethaddr
mmc1.probe
mmc3.probe

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: Changing the baudrate via barebox prompt
  2014-05-14  8:01         ` Holger Schurig
  2014-05-14  8:10           ` Holger Schurig
@ 2014-05-14  8:16           ` Sascha Hauer
  1 sibling, 0 replies; 9+ messages in thread
From: Sascha Hauer @ 2014-05-14  8:16 UTC (permalink / raw)
  To: Holger Schurig; +Cc: barebox

On Wed, May 14, 2014 at 10:01:10AM +0200, Holger Schurig wrote:
> Hmm, i thought more that "magicvars" could also iterate over the
> devices and spits out their parameter. Internally, they are different,
> but from a users perspective both things do something "magical": a
> simple setting of a variable does some action.

Right now magicvars is just a compile time generated array of struct
magicvar. We could add a const char *description argument to the
dev_add_param_* functions for adding the descriptions to the parameters.

You can get the available parameters for a device with 'devinfo
<devname>', but currently there is no way to see all available
parameters for all devices. Also there can be no description attached
to a parameter. Adding this would indeed be valuable.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: Changing the baudrate via barebox prompt
  2014-05-14  5:32   ` Antony Pavlov
  2014-05-14  6:09     ` Holger Schurig
@ 2014-05-14 12:32     ` Fabio Estevam
  1 sibling, 0 replies; 9+ messages in thread
From: Fabio Estevam @ 2014-05-14 12:32 UTC (permalink / raw)
  To: Antony Pavlov; +Cc: barebox

On Wed, May 14, 2014 at 2:32 AM, Antony Pavlov <antonynpavlov@gmail.com> wrote:
> On Wed, 14 May 2014 12:59:53 +0800
> Kevin Du Huanpeng <u74147@gmail.com> wrote:
>
>> yes,try
>> console.baundrate=9600
>> but you may have to check if your serial driver has support this
>
> cs0.baudrate=9600
>
> use devinfo to see all available consoles (cs0, cs1 etc).

Thanks for your suggestion, Antony!

It works fine now.

Regards,

Fabio Estevam

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2014-05-14 12:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-14  3:34 Changing the baudrate via barebox prompt Fabio Estevam
2014-05-14  4:59 ` Kevin Du Huanpeng
2014-05-14  5:32   ` Antony Pavlov
2014-05-14  6:09     ` Holger Schurig
2014-05-14  7:20       ` Sascha Hauer
2014-05-14  8:01         ` Holger Schurig
2014-05-14  8:10           ` Holger Schurig
2014-05-14  8:16           ` Sascha Hauer
2014-05-14 12:32     ` Fabio Estevam

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