Full support for Ginger Console
[linux-ginger.git] / arch / microblaze / boot / Makefile
blob21f13322a4cad74da687055e50eb840804dda78b
2 # arch/microblaze/boot/Makefile
5 obj-y += linked_dtb.o
7 targets := linux.bin linux.bin.gz simpleImage.%
9 OBJCOPYFLAGS_linux.bin := -O binary
11 # Where the DTS files live
12 dtstree := $(srctree)/$(src)/dts
14 # Ensure system.dtb exists
15 $(obj)/linked_dtb.o: $(obj)/system.dtb
17 # Generate system.dtb from $(DTB).dtb
18 ifneq ($(DTB),system)
19 $(obj)/system.dtb: $(obj)/$(DTB).dtb
20 $(call if_changed,cp)
21 endif
23 $(obj)/linux.bin: vmlinux FORCE
24 [ -n $(CONFIG_INITRAMFS_SOURCE) ] && [ ! -e $(CONFIG_INITRAMFS_SOURCE) ] && \
25 touch $(CONFIG_INITRAMFS_SOURCE) || echo "No CPIO image"
26 $(call if_changed,objcopy)
27 @echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
29 $(obj)/linux.bin.gz: $(obj)/linux.bin FORCE
30 $(call if_changed,gzip)
31 @echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
33 quiet_cmd_cp = CP $< $@$2
34 cmd_cp = cat $< >$@$2 || (rm -f $@ && echo false)
36 quiet_cmd_strip = STRIP $@
37 cmd_strip = $(STRIP) -K _start -K _end -K __log_buf -K _fdt_start vmlinux -o $@
39 $(obj)/simpleImage.%: vmlinux FORCE
40 $(call if_changed,cp,.unstrip)
41 $(call if_changed,strip)
42 @echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
44 # Rule to build device tree blobs
45 DTC = $(objtree)/scripts/dtc/dtc
47 # Rule to build device tree blobs
48 quiet_cmd_dtc = DTC $@
49 cmd_dtc = $(DTC) -O dtb -o $(obj)/$*.dtb -b 0 -p 1024 $(dtstree)/$*.dts
51 $(obj)/%.dtb: $(dtstree)/%.dts FORCE
52 $(call if_changed,dtc)
54 clean-kernel += linux.bin linux.bin.gz simpleImage.*
56 clean-files += *.dtb