On Thu, Apr 07, 2011 at 08:30:03AM +0100, Andy Green wrote:
On 04/04/2011 04:01 PM, Somebody in the thread at some point said:
Hi -
With 'make ARCH=arm dtb', it builds Device Tree Blobs for those boards enabled by build CONFIG.
index d51ab6c..7fd2af9 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -292,6 +292,9 @@ zinstall uinstall install: vmlinux %.dtb: $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@
+dtb:
- $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@
The version of this that went into linux-linaro-2.6.38 looks like this
X-Git-Url: http://git.linaro.org/gitweb?p=kernel%2Flinux-linaro-2.6.38.git%3Ba=blobdiff...
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index d51ab6c..1be856a 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -289,7 +289,7 @@ zImage Image xipImage bootpImage uImage: vmlinux zinstall uinstall install: vmlinux $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@
-%.dtb: +dtbs %.dtb: $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@
# We use MRPROPER_FILES and CLEAN_FILES now
On recent make, it breaks build of the kernel immediately:
/projects/linaro/linux-2.6/arch/arm/Makefile:292: *** mixed implicit and normal rules. Stop.
$ rpm -q make make-3.82-4.fc15.x86_64
''The previous behavior of mixing implicit and pattern rules in one line like that was never supported or documented, but due to a "hole" in the parser it worked for certain specific cases (for example, reversing that line so the pattern comes first would not work, nor would adding extra explicit targets after the pattern target).
In 3.82, the parser was tightened in this respect and that "hole" was closed, hence you see this error.''
http://www.mail-archive.com/bug-make@gnu.org/msg06220.html
I worked around it by changing the line back to just say
%.dtb:
but I don't know if that does what was actually intended the same; according to the linked make ml post it may need to be two clauses.
Thanks, Andy.
I just confirmed that make 3.81 works fine with the mixed rules, but 3.82 did fail for the exactly same reason you gave above.
Grant,
Should we break the mixed rules back to two separated rules to get the patch survive with make 3.82?