162306a36Sopenharmony_ci#
262306a36Sopenharmony_ci# arch/nios2/boot/Makefile
362306a36Sopenharmony_ci#
462306a36Sopenharmony_ci# This file is subject to the terms and conditions of the GNU General Public
562306a36Sopenharmony_ci# License.  See the file "COPYING" in the main directory of this archive
662306a36Sopenharmony_ci# for more details.
762306a36Sopenharmony_ci#
862306a36Sopenharmony_ci
962306a36Sopenharmony_ciUIMAGE_LOADADDR = $(shell $(NM) vmlinux | awk '$$NF == "_stext" {print $$1}')
1062306a36Sopenharmony_ciUIMAGE_ENTRYADDR = $(shell $(NM) vmlinux | awk '$$NF == "_start" {print $$1}')
1162306a36Sopenharmony_ciUIMAGE_COMPRESSION = gzip
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ciOBJCOPYFLAGS_vmlinux.bin := -O binary
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_citargets += vmlinux.bin vmlinux.gz vmImage
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_ci$(obj)/vmlinux.bin: vmlinux FORCE
1862306a36Sopenharmony_ci	$(call if_changed,objcopy)
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ci$(obj)/vmlinux.gz: $(obj)/vmlinux.bin FORCE
2162306a36Sopenharmony_ci	$(call if_changed,gzip)
2262306a36Sopenharmony_ci
2362306a36Sopenharmony_ci$(obj)/vmImage: $(obj)/vmlinux.gz FORCE
2462306a36Sopenharmony_ci	$(call if_changed,uimage)
2562306a36Sopenharmony_ci	@$(kecho) 'Kernel: $@ is ready'
2662306a36Sopenharmony_ci
2762306a36Sopenharmony_ci$(obj)/zImage: $(obj)/compressed/vmlinux FORCE
2862306a36Sopenharmony_ci	$(call if_changed,objcopy)
2962306a36Sopenharmony_ci	@$(kecho) 'Kernel: $@ is ready'
3062306a36Sopenharmony_ci
3162306a36Sopenharmony_ci$(obj)/compressed/vmlinux: $(obj)/vmlinux.gz FORCE
3262306a36Sopenharmony_ci	$(Q)$(MAKE) $(build)=$(obj)/compressed $@
33