dtb vs. kernel command line arguments
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
Quoted 10 lines · On Mon, 4 Mar 2013 10:30:45 -0800 Curt Brune <[email protected]> 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.
Quoted 6 lines
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
Hi Kim,
Quoted 15 lines · Kim Phillips
Quoted 12 lines · On Mon, 4 Mar 2013 10:30:45 -0800 Curt Brune <[email protected]> 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?
Quoted 8 lines
Quoted 4 lines
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
Quoted 10 lines
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
Quoted 23 lines · Simon Glass
Hi Kim,
Quoted 20 lines · Kim Phillips
Quoted 16 lines · On Mon, 4 Mar 2013 10:30:45 -0800 Curt Brune <[email protected]> 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.
Quoted 8 lines
Quoted 3 lines
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.
Signature · 8 lines
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>
Dear Simon,
Quoted 9 lines · In message <CAPnjgZ3APwSJZV7zPe+b8A58zu-dxHdRGLcyiWHCm6dqQyFH3g@mail.gmail.com>…
Quoted 4 lines
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
Signature · 5 lines
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 InstrumentsA message that is not in the archive (sent off-list or not yet received): 20130304180323.80ef2597c60455f3a358bd79-KZfg59tc24xl57MIdRCFDg@public.gmane.org
Quoted 15 lines · Kim Phillips
Quoted 12 lines · On Mon, 4 Mar 2013 10:30:45 -0800 Curt Brune…
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?
Quoted 8 lines
Quoted 4 lines
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.