devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Dynamic Loading and unnloading of Device tree(dtb)
@ 2016-07-25 11:17 Raul Piper
       [not found] ` <CAEwN+MAqQSz7wXYZKrVGwH7arknH-487oC2U5pP0T1N0QxBnWg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Raul Piper @ 2016-07-25 11:17 UTC (permalink / raw)
  To: kernelnewbies, devicetree-u79uwXL29TY76Z2rM5mHXA

Hi,
Where can I find the example for the  dynamic Loading of the device
tree and its corresponding device driver.
How can I build the dts with or without the kernel source.

I am getting this error whenever I am trying to build the below sample
dts file using the dtc compiler.

dtc -O dtb -o leds-ns2.dtb leds-ns2.dts


Error: leds-ns2.dts:1.1-2 syntax error
FATAL ERROR: Unable to parse input tree

Below is the content  of the leds-ns2.dts

#include <dt-bindings/leds/leds-ns2.h>

 ns2-leds {
          compatible = "lacie,ns2-leds";

          blue-sata {
                  label = "ns2:blue:sata";
                  slow-gpio = <&gpio0 29 0>;
                  cmd-gpio = <&gpio0 30 0>;
                  modes-map = <NS_V2_LED_OFF  0 1
                               NS_V2_LED_ON   1 0
                               NS_V2_LED_ON   0 0
                               NS_V2_LED_SATA 1 1>;
          };
  };

Thanks,
R
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: Dynamic Loading and unnloading of Device tree(dtb)
       [not found] ` <CAEwN+MAqQSz7wXYZKrVGwH7arknH-487oC2U5pP0T1N0QxBnWg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2016-08-03 19:36   ` Frank Rowand
       [not found]     ` <57A247C8.8000909-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Frank Rowand @ 2016-08-03 19:36 UTC (permalink / raw)
  To: Raul Piper, kernelnewbies, devicetree-u79uwXL29TY76Z2rM5mHXA

On 07/25/16 04:17, Raul Piper wrote:
> Hi,
> Where can I find the example for the  dynamic Loading of the device
> tree and its corresponding device driver.
> How can I build the dts with or without the kernel source.
> 
> I am getting this error whenever I am trying to build the below sample
> dts file using the dtc compiler.
> 
> dtc -O dtb -o leds-ns2.dtb leds-ns2.dts
> 
> 
> Error: leds-ns2.dts:1.1-2 syntax error

That is an error at line 1, columns 1-2. dtc does not understand cpp
directives, you need to process leds-ns2.dts with cpp. The Linux
build infrastructure does this for .dtb targets in makefiles.

> FATAL ERROR: Unable to parse input tree
> 
> Below is the content  of the leds-ns2.dts
> 
> #include <dt-bindings/leds/leds-ns2.h>
> 
>  ns2-leds {
>           compatible = "lacie,ns2-leds";
> 
>           blue-sata {
>                   label = "ns2:blue:sata";
>                   slow-gpio = <&gpio0 29 0>;
>                   cmd-gpio = <&gpio0 30 0>;
>                   modes-map = <NS_V2_LED_OFF  0 1
>                                NS_V2_LED_ON   1 0
>                                NS_V2_LED_ON   0 0
>                                NS_V2_LED_SATA 1 1>;
>           };
>   };
> 
> Thanks,
> R
> --
> To unsubscribe from this list: send the line "unsubscribe devicetree" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: Dynamic Loading and unnloading of Device tree(dtb)
       [not found]     ` <57A247C8.8000909-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2016-08-04  3:53       ` Raul Piper
  0 siblings, 0 replies; 3+ messages in thread
From: Raul Piper @ 2016-08-04  3:53 UTC (permalink / raw)
  To: Frank Rowand; +Cc: kernelnewbies, devicetree-u79uwXL29TY76Z2rM5mHXA

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- <name of the dtb file>.dtb

This compiles fine.

On Thu, Aug 4, 2016 at 1:06 AM, Frank Rowand <frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> On 07/25/16 04:17, Raul Piper wrote:
>> Hi,
>> Where can I find the example for the  dynamic Loading of the device
>> tree and its corresponding device driver.
>> How can I build the dts with or without the kernel source.
>>
>> I am getting this error whenever I am trying to build the below sample
>> dts file using the dtc compiler.
>>
>> dtc -O dtb -o leds-ns2.dtb leds-ns2.dts
>>
>>
>> Error: leds-ns2.dts:1.1-2 syntax error
>
> That is an error at line 1, columns 1-2. dtc does not understand cpp
> directives, you need to process leds-ns2.dts with cpp. The Linux
> build infrastructure does this for .dtb targets in makefiles.
>
>> FATAL ERROR: Unable to parse input tree
>>
>> Below is the content  of the leds-ns2.dts
>>
>> #include <dt-bindings/leds/leds-ns2.h>
>>
>>  ns2-leds {
>>           compatible = "lacie,ns2-leds";
>>
>>           blue-sata {
>>                   label = "ns2:blue:sata";
>>                   slow-gpio = <&gpio0 29 0>;
>>                   cmd-gpio = <&gpio0 30 0>;
>>                   modes-map = <NS_V2_LED_OFF  0 1
>>                                NS_V2_LED_ON   1 0
>>                                NS_V2_LED_ON   0 0
>>                                NS_V2_LED_SATA 1 1>;
>>           };
>>   };
>>
>> Thanks,
>> R
>> --
>> To unsubscribe from this list: send the line "unsubscribe devicetree" in
>> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2016-08-04  3:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-25 11:17 Dynamic Loading and unnloading of Device tree(dtb) Raul Piper
     [not found] ` <CAEwN+MAqQSz7wXYZKrVGwH7arknH-487oC2U5pP0T1N0QxBnWg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-08-03 19:36   ` Frank Rowand
     [not found]     ` <57A247C8.8000909-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-08-04  3:53       ` Raul Piper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).