2009-03-27 21:25:51 +08:00
|
|
|
#
|
|
|
|
# arch/microblaze/boot/Makefile
|
|
|
|
#
|
|
|
|
|
2009-10-14 23:38:26 +08:00
|
|
|
MKIMAGE := $(srctree)/scripts/mkuboot.sh
|
|
|
|
|
2009-09-14 21:15:49 +08:00
|
|
|
obj-y += linked_dtb.o
|
|
|
|
|
|
|
|
targets := linux.bin linux.bin.gz simpleImage.%
|
2009-03-27 21:25:51 +08:00
|
|
|
|
2009-10-14 23:38:26 +08:00
|
|
|
OBJCOPYFLAGS := -O binary
|
2009-03-27 21:25:51 +08:00
|
|
|
|
2009-09-14 21:15:49 +08:00
|
|
|
# Where the DTS files live
|
|
|
|
dtstree := $(srctree)/$(src)/dts
|
|
|
|
|
|
|
|
# Ensure system.dtb exists
|
|
|
|
$(obj)/linked_dtb.o: $(obj)/system.dtb
|
|
|
|
|
|
|
|
# Generate system.dtb from $(DTB).dtb
|
|
|
|
ifneq ($(DTB),system)
|
|
|
|
$(obj)/system.dtb: $(obj)/$(DTB).dtb
|
|
|
|
$(call if_changed,cp)
|
|
|
|
endif
|
|
|
|
|
2009-03-27 21:25:51 +08:00
|
|
|
$(obj)/linux.bin: vmlinux FORCE
|
|
|
|
$(call if_changed,objcopy)
|
2009-10-14 23:38:26 +08:00
|
|
|
$(call if_changed,uimage)
|
2009-03-27 21:25:51 +08: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 21:15:49 +08:00
|
|
|
quiet_cmd_cp = CP $< $@$2
|
|
|
|
cmd_cp = cat $< >$@$2 || (rm -f $@ && echo false)
|
|
|
|
|
|
|
|
quiet_cmd_strip = STRIP $@
|
2010-07-28 13:58:06 +08:00
|
|
|
cmd_strip = $(STRIP) -K _start -K _end -K __log_buf \
|
|
|
|
-K _fdt_start vmlinux -o $@
|
2009-09-14 21:15:49 +08:00
|
|
|
|
2009-10-14 23:38:26 +08:00
|
|
|
quiet_cmd_uimage = UIMAGE $@.ub
|
2010-07-28 13:58:06 +08:00
|
|
|
cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A microblaze -O linux -T kernel \
|
|
|
|
-C none -n 'Linux-$(KERNELRELEASE)' \
|
|
|
|
-a $(CONFIG_KERNEL_BASE_ADDR) -e $(CONFIG_KERNEL_BASE_ADDR) \
|
|
|
|
-d $@ $@.ub
|
2009-10-14 23:38:26 +08:00
|
|
|
|
2009-09-14 21:15:49 +08:00
|
|
|
$(obj)/simpleImage.%: vmlinux FORCE
|
|
|
|
$(call if_changed,cp,.unstrip)
|
2009-10-14 23:38:26 +08:00
|
|
|
$(call if_changed,objcopy)
|
|
|
|
$(call if_changed,uimage)
|
2009-09-14 21:15:49 +08:00
|
|
|
$(call if_changed,strip)
|
|
|
|
@echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
|
|
|
|
|
|
|
|
# Rule to build device tree blobs
|
|
|
|
DTC = $(objtree)/scripts/dtc/dtc
|
|
|
|
|
|
|
|
# Rule to build device tree blobs
|
|
|
|
quiet_cmd_dtc = DTC $@
|
|
|
|
cmd_dtc = $(DTC) -O dtb -o $(obj)/$*.dtb -b 0 -p 1024 $(dtstree)/$*.dts
|
|
|
|
|
|
|
|
$(obj)/%.dtb: $(dtstree)/%.dts FORCE
|
|
|
|
$(call if_changed,dtc)
|
|
|
|
|
2010-03-17 16:06:03 +08:00
|
|
|
clean-files += *.dtb simpleImage.*.unstrip linux.bin.ub
|