forked from Minki/linux
1b4f9e2b0f
Using the common build support for built-in dtb files just requires adding a .dtb.o target to obj-y. This has the side effect that CONFIG_NIOS2_DTB_SOURCE should now be just the dts filename in arch/nios2/boot/dts/ directory. Before any path was supported, but if you want to build in your dtb to the kernel, it should be in the kernel tree. Cc: Ley Foon Tan <lftan@altera.com> Cc: nios2-dev@lists.rocketboards.org Signed-off-by: Rob Herring <robh@kernel.org>
40 lines
1.0 KiB
Makefile
40 lines
1.0 KiB
Makefile
#
|
|
# arch/nios2/boot/Makefile
|
|
#
|
|
# This file is subject to the terms and conditions of the GNU General Public
|
|
# License. See the file "COPYING" in the main directory of this archive
|
|
# for more details.
|
|
#
|
|
|
|
UIMAGE_LOADADDR = $(shell $(NM) vmlinux | awk '$$NF == "_stext" {print $$1}')
|
|
UIMAGE_ENTRYADDR = $(shell $(NM) vmlinux | awk '$$NF == "_start" {print $$1}')
|
|
UIMAGE_COMPRESSION = gzip
|
|
|
|
OBJCOPYFLAGS_vmlinux.bin := -O binary
|
|
|
|
targets += vmlinux.bin vmlinux.gz vmImage
|
|
|
|
$(obj)/vmlinux.bin: vmlinux FORCE
|
|
$(call if_changed,objcopy)
|
|
|
|
$(obj)/vmlinux.gz: $(obj)/vmlinux.bin FORCE
|
|
$(call if_changed,gzip)
|
|
|
|
$(obj)/vmImage: $(obj)/vmlinux.gz
|
|
$(call if_changed,uimage)
|
|
@$(kecho) 'Kernel: $@ is ready'
|
|
|
|
$(obj)/zImage: $(obj)/compressed/vmlinux FORCE
|
|
$(call if_changed,objcopy)
|
|
@$(kecho) 'Kernel: $@ is ready'
|
|
|
|
$(obj)/compressed/vmlinux: $(obj)/vmlinux.gz FORCE
|
|
$(Q)$(MAKE) $(build)=$(obj)/compressed $@
|
|
|
|
targets += $(dtb-y)
|
|
|
|
$(obj)/dtbs: $(addprefix $(obj)/, $(dtb-y))
|
|
|
|
install:
|
|
sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map "$(INSTALL_PATH)"
|