mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-07 13:53:24 +00:00
xtensa: clean up bootable image build targets
Currently xtensa uses 'zImage' as a synonym of 'all', but in fact xtensa supports three targets: 'Image' (ELF image with reset vector), 'zImage' (compressed redboot image) and 'uImage' (U-Boot image). Provide separate 'Image', 'zImage' and 'uImage' make targets that only build corresponding image type. Make 'all' build all images appropriate for a platform. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
This commit is contained in:
parent
4ab18701c6
commit
9a736fcb09
@ -93,11 +93,7 @@ endif
|
|||||||
|
|
||||||
boot := arch/xtensa/boot
|
boot := arch/xtensa/boot
|
||||||
|
|
||||||
all: zImage
|
all Image zImage uImage: vmlinux
|
||||||
|
|
||||||
bzImage : zImage
|
|
||||||
|
|
||||||
zImage: vmlinux
|
|
||||||
$(Q)$(MAKE) $(build)=$(boot) $@
|
$(Q)$(MAKE) $(build)=$(boot) $@
|
||||||
|
|
||||||
%.dtb:
|
%.dtb:
|
||||||
@ -107,6 +103,8 @@ dtbs: scripts
|
|||||||
$(Q)$(MAKE) $(build)=$(boot)/dts
|
$(Q)$(MAKE) $(build)=$(boot)/dts
|
||||||
|
|
||||||
define archhelp
|
define archhelp
|
||||||
|
@echo '* Image - Kernel ELF image with reset vector'
|
||||||
@echo '* zImage - Compressed kernel image (arch/xtensa/boot/images/zImage.*)'
|
@echo '* zImage - Compressed kernel image (arch/xtensa/boot/images/zImage.*)'
|
||||||
|
@echo '* uImage - U-Boot wrapped image'
|
||||||
@echo ' dtbs - Build device tree blobs for enabled boards'
|
@echo ' dtbs - Build device tree blobs for enabled boards'
|
||||||
endef
|
endef
|
||||||
|
@ -21,14 +21,17 @@ subdir-y := lib
|
|||||||
|
|
||||||
# Subdirs for the boot loader(s)
|
# Subdirs for the boot loader(s)
|
||||||
|
|
||||||
bootdir-$(CONFIG_XTENSA_PLATFORM_ISS) += boot-elf
|
boot-$(CONFIG_XTENSA_PLATFORM_ISS) += Image
|
||||||
bootdir-$(CONFIG_XTENSA_PLATFORM_XT2000) += boot-redboot boot-elf boot-uboot
|
boot-$(CONFIG_XTENSA_PLATFORM_XT2000) += Image zImage uImage
|
||||||
bootdir-$(CONFIG_XTENSA_PLATFORM_XTFPGA) += boot-redboot boot-elf boot-uboot
|
boot-$(CONFIG_XTENSA_PLATFORM_XTFPGA) += Image zImage uImage
|
||||||
|
|
||||||
zImage Image: $(bootdir-y)
|
all: $(boot-y)
|
||||||
|
Image: boot-elf
|
||||||
|
zImage: boot-redboot
|
||||||
|
uImage: $(obj)/uImage
|
||||||
|
|
||||||
$(bootdir-y): $(addprefix $(obj)/,$(subdir-y)) \
|
boot-elf boot-redboot: $(addprefix $(obj)/,$(subdir-y)) \
|
||||||
$(addprefix $(obj)/,$(host-progs))
|
$(addprefix $(obj)/,$(host-progs))
|
||||||
$(Q)$(MAKE) $(build)=$(obj)/$@ $(MAKECMDGOALS)
|
$(Q)$(MAKE) $(build)=$(obj)/$@ $(MAKECMDGOALS)
|
||||||
|
|
||||||
OBJCOPYFLAGS = --strip-all -R .comment -R .note.gnu.build-id -O binary
|
OBJCOPYFLAGS = --strip-all -R .comment -R .note.gnu.build-id -O binary
|
||||||
@ -41,4 +44,10 @@ vmlinux.bin.gz: vmlinux.bin FORCE
|
|||||||
|
|
||||||
boot-elf: vmlinux.bin
|
boot-elf: vmlinux.bin
|
||||||
boot-redboot: vmlinux.bin.gz
|
boot-redboot: vmlinux.bin.gz
|
||||||
boot-uboot: vmlinux.bin.gz
|
|
||||||
|
UIMAGE_LOADADDR = $(CONFIG_KERNEL_LOAD_ADDRESS)
|
||||||
|
UIMAGE_COMPRESSION = gzip
|
||||||
|
|
||||||
|
$(obj)/uImage: vmlinux.bin.gz FORCE
|
||||||
|
$(call if_changed,uimage)
|
||||||
|
$(Q)$(kecho) ' Kernel: $@ is ready'
|
||||||
|
@ -31,4 +31,4 @@ $(obj)/../Image.elf: $(obj)/Image.o $(obj)/boot.lds
|
|||||||
-o $@ $(obj)/Image.o
|
-o $@ $(obj)/Image.o
|
||||||
$(Q)$(kecho) ' Kernel: $@ is ready'
|
$(Q)$(kecho) ' Kernel: $@ is ready'
|
||||||
|
|
||||||
zImage: $(obj)/../Image.elf
|
all Image: $(obj)/../Image.elf
|
||||||
|
@ -32,4 +32,4 @@ $(obj)/../zImage.redboot: $(obj)/zImage.elf
|
|||||||
$(Q)$(OBJCOPY) -S -O binary $< $@
|
$(Q)$(OBJCOPY) -S -O binary $< $@
|
||||||
$(Q)$(kecho) ' Kernel: $@ is ready'
|
$(Q)$(kecho) ' Kernel: $@ is ready'
|
||||||
|
|
||||||
zImage: $(obj)/../zImage.redboot
|
all zImage: $(obj)/../zImage.redboot
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
#
|
|
||||||
# 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 = $(CONFIG_KERNEL_LOAD_ADDRESS)
|
|
||||||
UIMAGE_COMPRESSION = gzip
|
|
||||||
|
|
||||||
$(obj)/../uImage: vmlinux.bin.gz FORCE
|
|
||||||
$(call if_changed,uimage)
|
|
||||||
$(Q)$(kecho) ' Kernel: $@ is ready'
|
|
||||||
|
|
||||||
zImage: $(obj)/../uImage
|
|
Loading…
Reference in New Issue
Block a user