]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blob - arch/microblaze/boot/Makefile
Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
[mirror_ubuntu-zesty-kernel.git] / arch / microblaze / boot / Makefile
1 #
2 # arch/microblaze/boot/Makefile
3 #
4
5 obj-y += linked_dtb.o
6
7 targets := linux.bin linux.bin.gz simpleImage.%
8
9 OBJCOPYFLAGS := -R .note -R .comment -R .note.gnu.build-id -O binary
10
11 # Ensure system.dtb exists
12 $(obj)/linked_dtb.o: $(obj)/system.dtb
13
14 # Generate system.dtb from $(DTB).dtb
15 ifneq ($(DTB),system)
16 $(obj)/system.dtb: $(obj)/$(DTB).dtb
17 $(call if_changed,cp)
18 endif
19
20 $(obj)/linux.bin: vmlinux FORCE
21 $(call if_changed,objcopy)
22 $(call if_changed,uimage)
23 @echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
24
25 $(obj)/linux.bin.gz: $(obj)/linux.bin FORCE
26 $(call if_changed,gzip)
27 @echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
28
29 quiet_cmd_cp = CP $< $@$2
30 cmd_cp = cat $< >$@$2 || (rm -f $@ && echo false)
31
32 quiet_cmd_strip = STRIP $@
33 cmd_strip = $(STRIP) -K microblaze_start -K _end -K __log_buf \
34 -K _fdt_start vmlinux -o $@
35
36 UIMAGE_IN = $@
37 UIMAGE_OUT = $@.ub
38 UIMAGE_LOADADDR = $(CONFIG_KERNEL_BASE_ADDR)
39
40 $(obj)/simpleImage.%: vmlinux FORCE
41 $(call if_changed,cp,.unstrip)
42 $(call if_changed,objcopy)
43 $(call if_changed,uimage)
44 $(call if_changed,strip)
45 @echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
46
47
48 # Rule to build device tree blobs
49 DTC_FLAGS := -p 1024
50
51 $(obj)/%.dtb: $(src)/dts/%.dts FORCE
52 $(call if_changed_dep,dtc)
53
54 clean-files += *.dtb simpleImage.*.unstrip linux.bin.ub