diff options
Diffstat (limited to 'arch/microblaze/boot/Makefile')
-rw-r--r-- | arch/microblaze/boot/Makefile | 41 |
1 files changed, 39 insertions, 2 deletions
diff --git a/arch/microblaze/boot/Makefile b/arch/microblaze/boot/Makefile index c2bb043a029d..21f13322a4ca 100644 --- a/arch/microblaze/boot/Makefile +++ b/arch/microblaze/boot/Makefile | |||
@@ -2,10 +2,24 @@ | |||
2 | # arch/microblaze/boot/Makefile | 2 | # arch/microblaze/boot/Makefile |
3 | # | 3 | # |
4 | 4 | ||
5 | targets := linux.bin linux.bin.gz | 5 | obj-y += linked_dtb.o |
6 | |||
7 | targets := linux.bin linux.bin.gz simpleImage.% | ||
6 | 8 | ||
7 | OBJCOPYFLAGS_linux.bin := -O binary | 9 | OBJCOPYFLAGS_linux.bin := -O binary |
8 | 10 | ||
11 | # Where the DTS files live | ||
12 | dtstree := $(srctree)/$(src)/dts | ||
13 | |||
14 | # Ensure system.dtb exists | ||
15 | $(obj)/linked_dtb.o: $(obj)/system.dtb | ||
16 | |||
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 | ||
22 | |||
9 | $(obj)/linux.bin: vmlinux FORCE | 23 | $(obj)/linux.bin: vmlinux FORCE |
10 | [ -n $(CONFIG_INITRAMFS_SOURCE) ] && [ ! -e $(CONFIG_INITRAMFS_SOURCE) ] && \ | 24 | [ -n $(CONFIG_INITRAMFS_SOURCE) ] && [ ! -e $(CONFIG_INITRAMFS_SOURCE) ] && \ |
11 | touch $(CONFIG_INITRAMFS_SOURCE) || echo "No CPIO image" | 25 | touch $(CONFIG_INITRAMFS_SOURCE) || echo "No CPIO image" |
@@ -16,4 +30,27 @@ $(obj)/linux.bin.gz: $(obj)/linux.bin FORCE | |||
16 | $(call if_changed,gzip) | 30 | $(call if_changed,gzip) |
17 | @echo 'Kernel: $@ is ready' ' (#'`cat .version`')' | 31 | @echo 'Kernel: $@ is ready' ' (#'`cat .version`')' |
18 | 32 | ||
19 | clean-kernel += linux.bin linux.bin.gz | 33 | quiet_cmd_cp = CP $< $@$2 |
34 | cmd_cp = cat $< >$@$2 || (rm -f $@ && echo false) | ||
35 | |||
36 | quiet_cmd_strip = STRIP $@ | ||
37 | cmd_strip = $(STRIP) -K _start -K _end -K __log_buf -K _fdt_start vmlinux -o $@ | ||
38 | |||
39 | $(obj)/simpleImage.%: vmlinux FORCE | ||
40 | $(call if_changed,cp,.unstrip) | ||
41 | $(call if_changed,strip) | ||
42 | @echo 'Kernel: $@ is ready' ' (#'`cat .version`')' | ||
43 | |||
44 | # Rule to build device tree blobs | ||
45 | DTC = $(objtree)/scripts/dtc/dtc | ||
46 | |||
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 | ||
50 | |||
51 | $(obj)/%.dtb: $(dtstree)/%.dts FORCE | ||
52 | $(call if_changed,dtc) | ||
53 | |||
54 | clean-kernel += linux.bin linux.bin.gz simpleImage.* | ||
55 | |||
56 | clean-files += *.dtb | ||