All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] device tree compilation problems.
@ 2012-01-23  2:16 hanumant
  2012-01-23  7:09 ` Simon Glass
  0 siblings, 1 reply; 4+ messages in thread
From: hanumant @ 2012-01-23  2:16 UTC (permalink / raw)
  To: u-boot

Hi

    I am getting DTC when compiling dts file with CONFIG_OF_CONTROL.
The message says that it cannot find skeleton.dtsi though its placed
in the same directory as the dts file. I notice that if i remove this
line from the dts Makefile, the error disappears


  $(DT_BIN): $(TOPDIR)/board/$(VENDOR)/dts/$(DEVICE_TREE).dts
-       cat $< | $(CPP) -P $(DTS_CPPFLAGS) - >$@.tmp
-       $(DTC) -R 4 -p 0x1000 -O dtb -o ${DT_BIN} $@.tmp
-       rm $@.tmp
+       $(DTC) -R 4 -p 0x1000 -O dtb -o ${DT_BIN} $<

Has anyone faced this issue?

Thanks
Hanumant

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

* [U-Boot] device tree compilation problems.
  2012-01-23  2:16 [U-Boot] device tree compilation problems hanumant
@ 2012-01-23  7:09 ` Simon Glass
  2012-01-23  8:08   ` Wolfgang Denk
  0 siblings, 1 reply; 4+ messages in thread
From: Simon Glass @ 2012-01-23  7:09 UTC (permalink / raw)
  To: u-boot

Hi,

On Sun, Jan 22, 2012 at 6:16 PM, hanumant <hanumant07@gmail.com> wrote:
> Hi
>
> ? I am getting DTC when compiling dts file with CONFIG_OF_CONTROL.
> The message says that it cannot find skeleton.dtsi though its placed
> in the same directory as the dts file. I notice that if i remove this
> line from the dts Makefile, the error disappears
>
>
> ?$(DT_BIN): $(TOPDIR)/board/$(VENDOR)/dts/$(DEVICE_TREE).dts
> - ? ? ? cat $< | $(CPP) -P $(DTS_CPPFLAGS) - >$@.tmp
> - ? ? ? $(DTC) -R 4 -p 0x1000 -O dtb -o ${DT_BIN} $@.tmp
> - ? ? ? rm $@.tmp
> + ? ? ? $(DTC) -R 4 -p 0x1000 -O dtb -o ${DT_BIN} $<
>
> Has anyone faced this issue?

Not really, although I haven't used a skeleton file on mainline. One
thing to check is that you have a .dtsi extension.

The lines above are running the .dts file through the C proprocessor
to create a tmp file, which is then compiled. It is only really used
to get the name of the SOC's device tree include file - see the
definition of DTS_CPPFLAGS.

The tmp file should be in the same directory - check the file it
produces and see what is wrong with it. The reason for using a tmp
file is that people can check the resulting post-processed input to
dtc. I wonder if the # signs in the file are confusing the
preprocessor (at the time I wondered why they didn't). We should
perhaps add sed into the mix :-(

>
> Thanks
> Hanumant

Regards,
Simon

>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

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

* [U-Boot] device tree compilation problems.
  2012-01-23  7:09 ` Simon Glass
@ 2012-01-23  8:08   ` Wolfgang Denk
  2012-04-13 17:45     ` Simon Glass
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2012-01-23  8:08 UTC (permalink / raw)
  To: u-boot

Dear Simon Glass,

In message <CAPnjgZ3s2+w0PPyUh8c4JqgSEmSbZwWDeqBqUWKz_Bf1O0O6UQ@mail.gmail.com> you wrote:
> 
> >  $(DT_BIN): $(TOPDIR)/board/$(VENDOR)/dts/$(DEVICE_TREE).dts
> > -       cat $< | $(CPP) -P $(DTS_CPPFLAGS) - >$@.tmp
> > -       $(DTC) -R 4 -p 0x1000 -O dtb -o ${DT_BIN} $@.tmp
> > -       rm $@.tmp
...
> The lines above are running the .dts file through the C proprocessor
> to create a tmp file, which is then compiled. It is only really used
> to get the name of the SOC's device tree include file - see the
> definition of DTS_CPPFLAGS.

Is there actually any reason for the "cat" (the UUOCA seems to be
extinct these days, cf. http://partmaps.org/era/unix/award.html) and
the tmp file?

Why not rewriting as

	$(CPP) -P $(DTS_CPPFLAGS) < $< | \
	$(DTC) -R 4 -p 0x1000 -O dtb -o ${DT_BIN} -

?

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@denx.de
######## This message was made from 100% recycled electrons. ########

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

* [U-Boot] device tree compilation problems.
  2012-01-23  8:08   ` Wolfgang Denk
@ 2012-04-13 17:45     ` Simon Glass
  0 siblings, 0 replies; 4+ messages in thread
From: Simon Glass @ 2012-04-13 17:45 UTC (permalink / raw)
  To: u-boot

Hi Wolfgang,

On Mon, Jan 23, 2012 at 12:08 AM, Wolfgang Denk <wd@denx.de> wrote:
> Dear Simon Glass,
>
> In message <CAPnjgZ3s2+w0PPyUh8c4JqgSEmSbZwWDeqBqUWKz_Bf1O0O6UQ@mail.gmail.com> you wrote:
>>
>> > ?$(DT_BIN): $(TOPDIR)/board/$(VENDOR)/dts/$(DEVICE_TREE).dts
>> > - ? ? ? cat $< | $(CPP) -P $(DTS_CPPFLAGS) - >$@.tmp
>> > - ? ? ? $(DTC) -R 4 -p 0x1000 -O dtb -o ${DT_BIN} $@.tmp
>> > - ? ? ? rm $@.tmp
> ...
>> The lines above are running the .dts file through the C proprocessor
>> to create a tmp file, which is then compiled. It is only really used
>> to get the name of the SOC's device tree include file - see the
>> definition of DTS_CPPFLAGS.
>
> Is there actually any reason for the "cat" (the UUOCA seems to be
> extinct these days, cf. http://partmaps.org/era/unix/award.html) and
> the tmp file?
>
> Why not rewriting as
>
> ? ? ? ?$(CPP) -P $(DTS_CPPFLAGS) < $< | \
> ? ? ? ?$(DTC) -R 4 -p 0x1000 -O dtb -o ${DT_BIN} -

Any errors produce messages with line numbers, and it is nice for
people to be able to look up the file, go to the right line and see
what is actually being compiled. So that's why I did this - although I
certainly could use tee.

But instead I have been working on getting rid of the need for the CPP
step - the -i flag (include path) has now made it into dtc so before
long I will submit a patch to tidy up this logic and remove the
problem.

>
> ?

Regards,
Simon

>
> 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
> ######## This message was made from 100% recycled electrons. ########

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

end of thread, other threads:[~2012-04-13 17:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-23  2:16 [U-Boot] device tree compilation problems hanumant
2012-01-23  7:09 ` Simon Glass
2012-01-23  8:08   ` Wolfgang Denk
2012-04-13 17:45     ` Simon Glass

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.