All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] dtb vs. kernel command line arguments
@ 2013-03-04 18:30 Curt Brune
  2013-03-05  0:03 ` Kim Phillips
  0 siblings, 1 reply; 7+ messages in thread
From: Curt Brune @ 2013-03-04 18:30 UTC (permalink / raw)
  To: u-boot

Hello -

I want to pass a number of arguments from u-boot to the booted kernel. 
The arguments are needed by user space applications, not the kernel.

I can think of two ways:

1. append args by setting "bootargs".
2. add nodes to the dtb before booting.

Is there a preferred way to pass information like this?

Like I said the arguments are not needed by the kernel device drivers, 
but by user space applications.

I like the structure of nodes in the dtb.

Cheers,
Curt

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

* [U-Boot] dtb vs. kernel command line arguments
  2013-03-04 18:30 [U-Boot] dtb vs. kernel command line arguments Curt Brune
@ 2013-03-05  0:03 ` Kim Phillips
  2013-03-05 19:16   ` Simon Glass
       [not found]   ` <20130304180323.80ef2597c60455f3a358bd79-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
  0 siblings, 2 replies; 7+ messages in thread
From: Kim Phillips @ 2013-03-05  0:03 UTC (permalink / raw)
  To: u-boot

On Mon, 4 Mar 2013 10:30:45 -0800
Curt Brune <curt@cumulusnetworks.com> wrote:

> Hello -
> 
> I want to pass a number of arguments from u-boot to the booted kernel. 
> The arguments are needed by user space applications, not the kernel.
> 
> I can think of two ways:
> 
> 1. append args by setting "bootargs".
> 2. add nodes to the dtb before booting.
> 
> Is there a preferred way to pass information like this?
> 
> Like I said the arguments are not needed by the kernel device drivers, 
> but by user space applications.
> 
> I like the structure of nodes in the dtb.

please don't dual-purpose device trees as a mechanism of getting
arguments through the kernel into userspace - device trees strictly
describe the hardware.

btw, this question would be more appropriately posted on
devicetree-discuss (in case you have more).

Kim

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

* [U-Boot] dtb vs. kernel command line arguments
  2013-03-05  0:03 ` Kim Phillips
@ 2013-03-05 19:16   ` Simon Glass
  2013-03-05 19:33     ` Tom Rini
  2013-03-05 20:48     ` Wolfgang Denk
       [not found]   ` <20130304180323.80ef2597c60455f3a358bd79-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
  1 sibling, 2 replies; 7+ messages in thread
From: Simon Glass @ 2013-03-05 19:16 UTC (permalink / raw)
  To: u-boot

Hi Kim,

On Mon, Mar 4, 2013 at 4:03 PM, Kim Phillips <kim.phillips@freescale.com> wrote:
> On Mon, 4 Mar 2013 10:30:45 -0800
> Curt Brune <curt@cumulusnetworks.com> wrote:
>
>> Hello -
>>
>> I want to pass a number of arguments from u-boot to the booted kernel.
>> The arguments are needed by user space applications, not the kernel.
>>
>> I can think of two ways:
>>
>> 1. append args by setting "bootargs".
>> 2. add nodes to the dtb before booting.
>>
>> Is there a preferred way to pass information like this?
>>
>> Like I said the arguments are not needed by the kernel device drivers,
>> but by user space applications.
>>
>> I like the structure of nodes in the dtb.
>
> please don't dual-purpose device trees as a mechanism of getting
> arguments through the kernel into userspace - device trees strictly
> describe the hardware.

That's certainly the primary purpose, but it is also true that the
device tree is a convenient way to pass things to the kernel. It is in
fact becoming the only way on ARM systems. We certainly use it to pass
general information to the kernel, for example the command line.

Regards,
Simon

>
> btw, this question would be more appropriately posted on
> devicetree-discuss (in case you have more).
>
> Kim
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

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

* [U-Boot] dtb vs. kernel command line arguments
  2013-03-05 19:16   ` Simon Glass
@ 2013-03-05 19:33     ` Tom Rini
  2013-03-05 20:48     ` Wolfgang Denk
  1 sibling, 0 replies; 7+ messages in thread
From: Tom Rini @ 2013-03-05 19:33 UTC (permalink / raw)
  To: u-boot

On Tue, Mar 05, 2013 at 11:16:17AM -0800, Simon Glass wrote:
> Hi Kim,
> 
> On Mon, Mar 4, 2013 at 4:03 PM, Kim Phillips <kim.phillips@freescale.com> wrote:
> > On Mon, 4 Mar 2013 10:30:45 -0800
> > Curt Brune <curt@cumulusnetworks.com> wrote:
> >
> >> Hello -
> >>
> >> I want to pass a number of arguments from u-boot to the booted kernel.
> >> The arguments are needed by user space applications, not the kernel.
> >>
> >> I can think of two ways:
> >>
> >> 1. append args by setting "bootargs".
> >> 2. add nodes to the dtb before booting.
> >>
> >> Is there a preferred way to pass information like this?
> >>
> >> Like I said the arguments are not needed by the kernel device drivers,
> >> but by user space applications.
> >>
> >> I like the structure of nodes in the dtb.
> >
> > please don't dual-purpose device trees as a mechanism of getting
> > arguments through the kernel into userspace - device trees strictly
> > describe the hardware.
> 
> That's certainly the primary purpose, but it is also true that the
> device tree is a convenient way to pass things to the kernel. It is in
> fact becoming the only way on ARM systems. We certainly use it to pass
> general information to the kernel, for example the command line.

And there, historically, is the answer.  You pass it in via the
command line and parse that at run-time.  So you can use that existing
part of the device tree.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130305/b8b2d60d/attachment.pgp>

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

* [U-Boot] dtb vs. kernel command line arguments
  2013-03-05 19:16   ` Simon Glass
  2013-03-05 19:33     ` Tom Rini
@ 2013-03-05 20:48     ` Wolfgang Denk
  1 sibling, 0 replies; 7+ messages in thread
From: Wolfgang Denk @ 2013-03-05 20:48 UTC (permalink / raw)
  To: u-boot

Dear Simon,

In message <CAPnjgZ3APwSJZV7zPe+b8A58zu-dxHdRGLcyiWHCm6dqQyFH3g@mail.gmail.com> you wrote:
> 
> > please don't dual-purpose device trees as a mechanism of getting
> > arguments through the kernel into userspace - device trees strictly
> > describe the hardware.
> 
> That's certainly the primary purpose, but it is also true that the
> device tree is a convenient way to pass things to the kernel. It is in
> fact becoming the only way on ARM systems. We certainly use it to pass
> general information to the kernel, for example the command line.

I think Kim is right in pointing out that this was given the name
DEVICE tree for a reason - it's not being called "general purpose
information tree".

You may be right that it's a convenient way to pass information to the
kernel - ut note that the original question said: "The arguments are
needed by user space applications, not the kernel."  I think using the
kernel command line here ins more appropriate.

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
"An organization dries up if you don't challenge it with growth."
       - Mark Shepherd, former President and CEO of Texas Instruments

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

* Re: [U-Boot] dtb vs. kernel command line arguments
  2013-03-05  0:03 ` Kim Phillips
@ 2013-04-15 13:37       ` Grant Likely
       [not found]   ` <20130304180323.80ef2597c60455f3a358bd79-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
  1 sibling, 0 replies; 7+ messages in thread
From: Grant Likely @ 2013-04-15 13:37 UTC (permalink / raw)
  To: Kim Phillips, Curt Brune
  Cc: u-boot-0aAXYlwwYIKGBzrmiIFOJg,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ

On Mon, 4 Mar 2013 18:03:23 -0600, Kim Phillips <kim.phillips-KZfg59tc24xl57MIdRCFDg@public.gmane.org> wrote:
> On Mon, 4 Mar 2013 10:30:45 -0800
> Curt Brune <curt-qUQiAmfTcIp+XZJcv9eMoEEOCMrvLtNR@public.gmane.org> wrote:
> 
> > Hello -
> > 
> > I want to pass a number of arguments from u-boot to the booted kernel. 
> > The arguments are needed by user space applications, not the kernel.
> > 
> > I can think of two ways:
> > 
> > 1. append args by setting "bootargs".
> > 2. add nodes to the dtb before booting.
> > 
> > Is there a preferred way to pass information like this?
> > 
> > Like I said the arguments are not needed by the kernel device drivers, 
> > but by user space applications.
> > 
> > I like the structure of nodes in the dtb.
> 
> please don't dual-purpose device trees as a mechanism of getting
> arguments through the kernel into userspace - device trees strictly
> describe the hardware.

Why not? The chosen node in particular is for software configuration. I
don't have any problem with passing U-Boot extra data through the chosen
node. Just don't go crazy and please document it.

g.

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

* [U-Boot] dtb vs. kernel command line arguments
@ 2013-04-15 13:37       ` Grant Likely
  0 siblings, 0 replies; 7+ messages in thread
From: Grant Likely @ 2013-04-15 13:37 UTC (permalink / raw)
  To: u-boot

On Mon, 4 Mar 2013 18:03:23 -0600, Kim Phillips <kim.phillips@freescale.com> wrote:
> On Mon, 4 Mar 2013 10:30:45 -0800
> Curt Brune <curt@cumulusnetworks.com> wrote:
> 
> > Hello -
> > 
> > I want to pass a number of arguments from u-boot to the booted kernel. 
> > The arguments are needed by user space applications, not the kernel.
> > 
> > I can think of two ways:
> > 
> > 1. append args by setting "bootargs".
> > 2. add nodes to the dtb before booting.
> > 
> > Is there a preferred way to pass information like this?
> > 
> > Like I said the arguments are not needed by the kernel device drivers, 
> > but by user space applications.
> > 
> > I like the structure of nodes in the dtb.
> 
> please don't dual-purpose device trees as a mechanism of getting
> arguments through the kernel into userspace - device trees strictly
> describe the hardware.

Why not? The chosen node in particular is for software configuration. I
don't have any problem with passing U-Boot extra data through the chosen
node. Just don't go crazy and please document it.

g.

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

end of thread, other threads:[~2013-04-15 13:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-04 18:30 [U-Boot] dtb vs. kernel command line arguments Curt Brune
2013-03-05  0:03 ` Kim Phillips
2013-03-05 19:16   ` Simon Glass
2013-03-05 19:33     ` Tom Rini
2013-03-05 20:48     ` Wolfgang Denk
     [not found]   ` <20130304180323.80ef2597c60455f3a358bd79-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2013-04-15 13:37     ` Grant Likely
2013-04-15 13:37       ` Grant Likely

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.