提交 300db34a 编写于 作者: S Stephen Warren 提交者: Rob Herring

microblaze: use new common dtc rule

The current rules have the .dtb files build in a different directory
from the .dts files. This patch changes microblaze to use the generic dtb
rule which builds .dtb files in the same directory as the source .dts.

This requires moving parts of arch/microblaze/boot/Makefile into newly
created arch/microblaze/boot/dts/Makefile, and updating
arch/microblaze/Makefile to call the new Makefile. linked_dtb.S is also
moved into boot/dts/ since it's used by rules that were moved.

Cc: Michal Simek <monstr@monstr.eu>
Cc: microblaze-uclinux@itee.uq.edu.au
Signed-off-by: NStephen Warren <swarren@nvidia.com>
Signed-off-by: NRob Herring <rob.herring@calxeda.com>
上级 1020e29c
...@@ -57,7 +57,7 @@ boot := arch/microblaze/boot ...@@ -57,7 +57,7 @@ boot := arch/microblaze/boot
DTB:=$(subst simpleImage.,,$(filter simpleImage.%, $(MAKECMDGOALS))) DTB:=$(subst simpleImage.,,$(filter simpleImage.%, $(MAKECMDGOALS)))
ifneq ($(DTB),) ifneq ($(DTB),)
core-y += $(boot)/ core-y += $(boot)/dts/
endif endif
# defines filename extension depending memory management type # defines filename extension depending memory management type
......
...@@ -2,21 +2,10 @@ ...@@ -2,21 +2,10 @@
# arch/microblaze/boot/Makefile # arch/microblaze/boot/Makefile
# #
obj-y += linked_dtb.o
targets := linux.bin linux.bin.gz simpleImage.% targets := linux.bin linux.bin.gz simpleImage.%
OBJCOPYFLAGS := -R .note -R .comment -R .note.gnu.build-id -O binary OBJCOPYFLAGS := -R .note -R .comment -R .note.gnu.build-id -O binary
# Ensure system.dtb exists
$(obj)/linked_dtb.o: $(obj)/system.dtb
# Generate system.dtb from $(DTB).dtb
ifneq ($(DTB),system)
$(obj)/system.dtb: $(obj)/$(DTB).dtb
$(call if_changed,cp)
endif
$(obj)/linux.bin: vmlinux FORCE $(obj)/linux.bin: vmlinux FORCE
$(call if_changed,objcopy) $(call if_changed,objcopy)
$(call if_changed,uimage) $(call if_changed,uimage)
...@@ -45,10 +34,4 @@ $(obj)/simpleImage.%: vmlinux FORCE ...@@ -45,10 +34,4 @@ $(obj)/simpleImage.%: vmlinux FORCE
@echo 'Kernel: $@ is ready' ' (#'`cat .version`')' @echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
# Rule to build device tree blobs clean-files += simpleImage.*.unstrip linux.bin.ub
DTC_FLAGS := -p 1024
$(obj)/%.dtb: $(src)/dts/%.dts FORCE
$(call if_changed_dep,dtc)
clean-files += *.dtb simpleImage.*.unstrip linux.bin.ub
#
# arch/microblaze/boot/Makefile
#
obj-y += linked_dtb.o
# Ensure system.dtb exists
$(obj)/linked_dtb.o: $(obj)/system.dtb
# Generate system.dtb from $(DTB).dtb
ifneq ($(DTB),system)
$(obj)/system.dtb: $(obj)/$(DTB).dtb
$(call if_changed,cp)
endif
quiet_cmd_cp = CP $< $@$2
cmd_cp = cat $< >$@$2 || (rm -f $@ && echo false)
# Rule to build device tree blobs
DTC_FLAGS := -p 1024
clean-files += *.dtb
.section __fdt_blob,"a" .section __fdt_blob,"a"
.incbin "arch/microblaze/boot/system.dtb" .incbin "arch/microblaze/boot/dts/system.dtb"
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册