[PATCH 1/5] of: Add support for linking device tree blobs into vmlinux
Sam Ravnborg
sam at ravnborg.org
Thu Nov 18 07:24:34 EST 2010
> > > +
> > > +DTC = $(objtree)/scripts/dtc/dtc
> > > +
> > > +quiet_cmd_dtc = DTC $@
> > Please avoid tabs in the output - all other uses spaces. (There is a tab between DTC and $@)
> >
> > > + cmd_dtc = $(DTC) -O dtb -o $(obj)/$*.dtb -b 0 $(DTS_FLAGS) $(src)/dts/$*.dts
> >
> > Looks strange. How about:
> > cmd_dtc = $(DTC) -O dtb -o $@ -b 0 $(DTS_FLAGS) $<
> >
> > Then you avoid the hardcoded path in the rule too.
> >
> >
> > > +
> > > +$(obj)/%.dtb: $(src)/dts/%.dts
> > > + $(call if_changed,dtc)
>
> The rule should be generic (not depend on the presence of a dts
> subdirectory. Basically, the .dtb really should be generated in the
> same directory as the .dts file. There is no reason for this rule to
> have special behaviour.
>
> >
> > This snippet belong in the file that uses this.
> > This is how we do for other rules like bzip etc.
>
> This rule is intended to be generic and usable anywhere in the tree.
I understand this.
But only few people will recognize this so they see something like this:
obj-y := foo.dtb.o
And they look for a file named foo.dtb.S or foo.dtb.c.
If we spell it out then we have a better chance to allow
people to understand the relation ships between the files.
If we really want to hide this in scipts/Makefile.* then Makefile.build
is the logical places to do so.
Makefile.lib is supposed to be stuff that is relavent for more than
one Makefile in scripts/* but it has unfortunately also grown
some of the boot support stuff.
Today there is a single rule related to _shipped files.
We should not fill it up with additional rules - put them
Makefile.build if we really want to avoid them in boot/Makefile.
Sam
More information about the Linuxppc-dev
mailing list