]> nv-tegra.nvidia Code Review - linux-2.6.git/blob - arch/microblaze/boot/Makefile
Merge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/linville...
[linux-2.6.git] / arch / microblaze / boot / Makefile
1 #
2 # arch/microblaze/boot/Makefile
3 #
4
5 MKIMAGE := $(srctree)/scripts/mkuboot.sh
6
7 obj-y += linked_dtb.o
8
9 targets := linux.bin linux.bin.gz simpleImage.%
10
11 OBJCOPYFLAGS := -O binary
12
13 # Where the DTS files live
14 dtstree         := $(srctree)/$(src)/dts
15
16 # Ensure system.dtb exists
17 $(obj)/linked_dtb.o: $(obj)/system.dtb
18
19 # Generate system.dtb from $(DTB).dtb
20 ifneq ($(DTB),system)
21 $(obj)/system.dtb: $(obj)/$(DTB).dtb
22         $(call if_changed,cp)
23 endif
24
25 $(obj)/linux.bin: vmlinux FORCE
26         [ -n $(CONFIG_INITRAMFS_SOURCE) ] && [ ! -e $(CONFIG_INITRAMFS_SOURCE) ] && \
27         touch $(CONFIG_INITRAMFS_SOURCE) || echo "No CPIO image"
28         $(call if_changed,objcopy)
29         $(call if_changed,uimage)
30         @echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
31
32 $(obj)/linux.bin.gz: $(obj)/linux.bin FORCE
33         $(call if_changed,gzip)
34         @echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
35
36 quiet_cmd_cp = CP      $< $@$2
37         cmd_cp = cat $< >$@$2 || (rm -f $@ && echo false)
38
39 quiet_cmd_strip = STRIP   $@
40       cmd_strip = $(STRIP) -K _start -K _end -K __log_buf -K _fdt_start vmlinux -o $@
41
42 quiet_cmd_uimage = UIMAGE  $@.ub
43       cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A microblaze -O linux -T kernel \
44                    -C none -n 'Linux-$(KERNELRELEASE)' \
45                    -a $(CONFIG_KERNEL_BASE_ADDR) -e $(CONFIG_KERNEL_BASE_ADDR) \
46                    -d $@ $@.ub
47
48 $(obj)/simpleImage.%: vmlinux FORCE
49         $(call if_changed,cp,.unstrip)
50         $(call if_changed,objcopy)
51         $(call if_changed,uimage)
52         $(call if_changed,strip)
53         @echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
54
55 # Rule to build device tree blobs
56 DTC = $(objtree)/scripts/dtc/dtc
57
58 # Rule to build device tree blobs
59 quiet_cmd_dtc = DTC     $@
60         cmd_dtc = $(DTC) -O dtb -o $(obj)/$*.dtb -b 0 -p 1024 $(dtstree)/$*.dts
61
62 $(obj)/%.dtb: $(dtstree)/%.dts FORCE
63         $(call if_changed,dtc)
64
65 clean-kernel += linux.bin linux.bin.gz simpleImage.*
66
67 clean-files += *.dtb simpleImage.*.unstrip