mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-20 16:30:53 +00:00
e339364514
All ARCHs have the same definition of MKIMAGE. Move it to Makefile.lib to avoid duplication. All ARCHs have similar definitions of cmd_uimage. Place a sufficiently parameterized version in Makefile.lib to avoid duplication. Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Acked-by: Nicolas Pitre <nico@linaro.org> Tested-by: Mike Frysinger <vapier@gentoo.org> [Blackfin] Tested-by: Michal Simek <monstr@monstr.eu> [Microblaze] Tested-by: Guan Xuetao <gxt@mprc.pku.edu.cn> [unicore32] Signed-off-by: Michal Marek <mmarek@suse.cz>
72 lines
2.1 KiB
Makefile
72 lines
2.1 KiB
Makefile
#
|
|
# arch/blackfin/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.
|
|
#
|
|
|
|
targets := vmImage vmImage.bin vmImage.bz2 vmImage.gz vmImage.lzma vmImage.lzo vmImage.xip
|
|
extra-y += vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma vmlinux.bin.lzo vmlinux.bin.xip
|
|
|
|
ifeq ($(CONFIG_RAMKERNEL),y)
|
|
UIMAGE_LOADADDR = $(CONFIG_BOOT_LOAD)
|
|
else # CONFIG_ROMKERNEL must be set
|
|
UIMAGE_LOADADDR = $(CONFIG_ROM_BASE)
|
|
endif
|
|
UIMAGE_ENTRYADDR = $(shell $(NM) vmlinux | awk '$$NF == "__start" {print $$1}')
|
|
UIMAGE_NAME = '$(CPU_REV)-$(KERNELRELEASE)'
|
|
UIMAGE_OPTS-$(CONFIG_ROMKERNEL) += -x
|
|
|
|
$(obj)/vmlinux.bin: vmlinux FORCE
|
|
$(call if_changed,objcopy)
|
|
|
|
$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
|
|
$(call if_changed,gzip)
|
|
|
|
$(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE
|
|
$(call if_changed,bzip2)
|
|
|
|
$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
|
|
$(call if_changed,lzma)
|
|
|
|
$(obj)/vmlinux.bin.lzo: $(obj)/vmlinux.bin FORCE
|
|
$(call if_changed,lzo)
|
|
|
|
# The mkimage tool wants 64bytes prepended to the image
|
|
quiet_cmd_mk_bin_xip = BIN $@
|
|
cmd_mk_bin_xip = ( printf '%64s' | tr ' ' '\377' ; cat $< ) > $@
|
|
$(obj)/vmlinux.bin.xip: $(obj)/vmlinux.bin FORCE
|
|
$(call if_changed,mk_bin_xip)
|
|
|
|
$(obj)/vmImage.bin: $(obj)/vmlinux.bin
|
|
$(call if_changed,uimage,none)
|
|
|
|
$(obj)/vmImage.bz2: $(obj)/vmlinux.bin.bz2
|
|
$(call if_changed,uimage,bzip2)
|
|
|
|
$(obj)/vmImage.gz: $(obj)/vmlinux.bin.gz
|
|
$(call if_changed,uimage,gzip)
|
|
|
|
$(obj)/vmImage.lzma: $(obj)/vmlinux.bin.lzma
|
|
$(call if_changed,uimage,lzma)
|
|
|
|
$(obj)/vmImage.lzo: $(obj)/vmlinux.bin.lzo
|
|
$(call if_changed,uimage,lzo)
|
|
|
|
$(obj)/vmImage.xip: $(obj)/vmlinux.bin.xip
|
|
$(call if_changed,uimage,none)
|
|
|
|
suffix-y := bin
|
|
suffix-$(CONFIG_KERNEL_GZIP) := gz
|
|
suffix-$(CONFIG_KERNEL_BZIP2) := bz2
|
|
suffix-$(CONFIG_KERNEL_LZMA) := lzma
|
|
suffix-$(CONFIG_KERNEL_LZO) := lzo
|
|
suffix-$(CONFIG_ROMKERNEL) := xip
|
|
|
|
$(obj)/vmImage: $(obj)/vmImage.$(suffix-y)
|
|
@ln -sf $(notdir $<) $@
|
|
|
|
install:
|
|
sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map "$(INSTALL_PATH)"
|