[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101117202434.GA20441@merkur.ravnborg.org>
Date: Wed, 17 Nov 2010 21:24:34 +0100
From: Sam Ravnborg <sam@...nborg.org>
To: Grant Likely <grant.likely@...retlab.ca>
Cc: dirk.brandewie@...il.com, Michal Marek <mmarek@...e.cz>,
devicetree-discuss@...ts.ozlabs.org, sodaville@...utronix.de,
arjan@...ux.intel.com, linuxppc-dev@...ts.ozlabs.org,
microblaze-uclinux@...e.uq.edu.au, linux-arch@...r.kernel.org,
linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/5] of: Add support for linking device tree blobs into
vmlinux
> > > +
> > > +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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists