2009-03-27 14:25:51 +01:00
#
# arch/microblaze/boot/Makefile
#
2009-09-14 15:15:49 +02:00
obj-y += linked_dtb.o
targets := linux.bin linux.bin.gz simpleImage.%
2009-03-27 14:25:51 +01:00
2012-03-05 15:53:19 +01:00
OBJCOPYFLAGS := -R .note -R .comment -R .note.gnu.build-id -O binary
2009-03-27 14:25:51 +01:00
2009-09-14 15:15:49 +02:00
# Ensure system.dtb exists
$(obj)/linked_dtb.o : $( obj ) /system .dtb
# Generate system.dtb from $(DTB).dtb
i f n e q ( $( DTB ) , s y s t e m )
$(obj)/system.dtb : $( obj ) /$( DTB ) .dtb
$( call if_changed,cp)
e n d i f
2009-03-27 14:25:51 +01:00
$(obj)/linux.bin : vmlinux FORCE
$( call if_changed,objcopy)
2009-10-14 17:38:26 +02:00
$( call if_changed,uimage)
2009-03-27 14:25:51 +01:00
@echo 'Kernel: $@ is ready' ' (#' ` cat .version` ')'
$(obj)/linux.bin.gz : $( obj ) /linux .bin FORCE
$( call if_changed,gzip)
@echo 'Kernel: $@ is ready' ' (#' ` cat .version` ')'
2009-09-14 15:15:49 +02:00
quiet_cmd_cp = CP $< $@ $2
cmd_cp = cat $< >$@ $2 || ( rm -f $@ && echo false )
quiet_cmd_strip = STRIP $@
2010-07-28 09:29:11 +02:00
cmd_strip = $( STRIP) -K microblaze_start -K _end -K __log_buf \
2010-07-28 07:58:06 +02:00
-K _fdt_start vmlinux -o $@
2009-09-14 15:15:49 +02:00
2012-03-16 15:03:55 -06:00
UIMAGE_IN = $@
UIMAGE_OUT = $@ .ub
UIMAGE_LOADADDR = $( CONFIG_KERNEL_BASE_ADDR)
2009-10-14 17:38:26 +02:00
2009-09-14 15:15:49 +02:00
$(obj)/simpleImage.% : vmlinux FORCE
$( call if_changed,cp,.unstrip)
2009-10-14 17:38:26 +02:00
$( call if_changed,objcopy)
$( call if_changed,uimage)
2009-09-14 15:15:49 +02:00
$( call if_changed,strip)
@echo 'Kernel: $@ is ready' ' (#' ` cat .version` ')'
# Rule to build device tree blobs
2010-12-22 11:57:29 -08:00
DTC_FLAGS := -p 1024
2009-09-14 15:15:49 +02:00
2010-12-22 11:57:29 -08:00
$(obj)/%.dtb : $( src ) /dts /%.dts FORCE
2012-01-09 11:38:15 -07:00
$( call if_changed_dep,dtc)
2009-09-14 15:15:49 +02:00
2010-03-17 16:06:03 +08:00
clean-files += *.dtb simpleImage.*.unstrip linux.bin.ub