Michal Simek | 5f8ffb5 | 2009-03-27 14:25:51 +0100 | [diff] [blame] | 1 | # |
| 2 | # arch/microblaze/boot/Makefile |
| 3 | # |
| 4 | |
Michal Simek | f05131c | 2009-09-14 15:15:49 +0200 | [diff] [blame] | 5 | obj-y += linked_dtb.o |
| 6 | |
| 7 | targets := linux.bin linux.bin.gz simpleImage.% |
Michal Simek | 5f8ffb5 | 2009-03-27 14:25:51 +0100 | [diff] [blame] | 8 | |
Michal Simek | 00708d4 | 2012-03-05 15:53:19 +0100 | [diff] [blame] | 9 | OBJCOPYFLAGS := -R .note -R .comment -R .note.gnu.build-id -O binary |
Michal Simek | 5f8ffb5 | 2009-03-27 14:25:51 +0100 | [diff] [blame] | 10 | |
Michal Simek | f05131c | 2009-09-14 15:15:49 +0200 | [diff] [blame] | 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 | |
Michal Simek | 5f8ffb5 | 2009-03-27 14:25:51 +0100 | [diff] [blame] | 20 | $(obj)/linux.bin: vmlinux FORCE |
Michal Simek | 5f8ffb5 | 2009-03-27 14:25:51 +0100 | [diff] [blame] | 21 | $(call if_changed,objcopy) |
Michal Simek | 6a8dfe1 | 2009-10-14 17:38:26 +0200 | [diff] [blame] | 22 | $(call if_changed,uimage) |
Michal Simek | 5f8ffb5 | 2009-03-27 14:25:51 +0100 | [diff] [blame] | 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 | |
Michal Simek | f05131c | 2009-09-14 15:15:49 +0200 | [diff] [blame] | 29 | quiet_cmd_cp = CP $< $@$2 |
| 30 | cmd_cp = cat $< >$@$2 || (rm -f $@ && echo false) |
| 31 | |
| 32 | quiet_cmd_strip = STRIP $@ |
Michal Simek | ca28b51 | 2010-07-28 09:29:11 +0200 | [diff] [blame] | 33 | cmd_strip = $(STRIP) -K microblaze_start -K _end -K __log_buf \ |
Michal Simek | 61b403a | 2010-07-28 07:58:06 +0200 | [diff] [blame] | 34 | -K _fdt_start vmlinux -o $@ |
Michal Simek | f05131c | 2009-09-14 15:15:49 +0200 | [diff] [blame] | 35 | |
Stephen Warren | e339364 | 2012-03-16 15:03:55 -0600 | [diff] [blame] | 36 | UIMAGE_IN = $@ |
| 37 | UIMAGE_OUT = $@.ub |
| 38 | UIMAGE_LOADADDR = $(CONFIG_KERNEL_BASE_ADDR) |
Michal Simek | 6a8dfe1 | 2009-10-14 17:38:26 +0200 | [diff] [blame] | 39 | |
Michal Simek | f05131c | 2009-09-14 15:15:49 +0200 | [diff] [blame] | 40 | $(obj)/simpleImage.%: vmlinux FORCE |
| 41 | $(call if_changed,cp,.unstrip) |
Michal Simek | 6a8dfe1 | 2009-10-14 17:38:26 +0200 | [diff] [blame] | 42 | $(call if_changed,objcopy) |
| 43 | $(call if_changed,uimage) |
Michal Simek | f05131c | 2009-09-14 15:15:49 +0200 | [diff] [blame] | 44 | $(call if_changed,strip) |
| 45 | @echo 'Kernel: $@ is ready' ' (#'`cat .version`')' |
| 46 | |
Michal Simek | f05131c | 2009-09-14 15:15:49 +0200 | [diff] [blame] | 47 | |
| 48 | # Rule to build device tree blobs |
Dirk Brandewie | 710fc04 | 2010-12-22 11:57:29 -0800 | [diff] [blame] | 49 | DTC_FLAGS := -p 1024 |
Michal Simek | f05131c | 2009-09-14 15:15:49 +0200 | [diff] [blame] | 50 | |
Dirk Brandewie | 710fc04 | 2010-12-22 11:57:29 -0800 | [diff] [blame] | 51 | $(obj)/%.dtb: $(src)/dts/%.dts FORCE |
Stephen Warren | 7c43185 | 2012-01-09 11:38:15 -0700 | [diff] [blame] | 52 | $(call if_changed_dep,dtc) |
Michal Simek | f05131c | 2009-09-14 15:15:49 +0200 | [diff] [blame] | 53 | |
Arun Bhanu | 8a8804f | 2010-03-17 16:06:03 +0800 | [diff] [blame] | 54 | clean-files += *.dtb simpleImage.*.unstrip linux.bin.ub |