build: allow changing kernel name in new image code

Necessary for targets using zImage or other kernel
image types.

Signed-off-by: Claudio Leite <leitec@staticky.com>

SVN-Revision: 44018
This commit is contained in:
Felix Fietkau 2015-01-18 00:34:57 +00:00
parent 632be658d5
commit 91ce10a184
1 changed files with 3 additions and 2 deletions

View File

@ -341,6 +341,7 @@ define Device/Init
KERNEL_INITRAMFS_PREFIX = $$(IMAGE_PREFIX)-initramfs KERNEL_INITRAMFS_PREFIX = $$(IMAGE_PREFIX)-initramfs
KERNEL_INITRAMFS_IMAGE = $$(KERNEL_INITRAMFS_PREFIX)$$(KERNEL_SUFFIX) KERNEL_INITRAMFS_IMAGE = $$(KERNEL_INITRAMFS_PREFIX)$$(KERNEL_SUFFIX)
KERNEL_INSTALL := KERNEL_INSTALL :=
KERNEL_NAME := vmlinux
KERNEL_SIZE := KERNEL_SIZE :=
FILESYSTEMS := $(TARGET_FILESYSTEMS) FILESYSTEMS := $(TARGET_FILESYSTEMS)
@ -362,7 +363,7 @@ define Device/Build/initramfs
$(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/$$(KERNEL_INITRAMFS_IMAGE) $(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/$$(KERNEL_INITRAMFS_IMAGE)
cp $$^ $$@ cp $$^ $$@
$(KDIR)/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/vmlinux-initramfs $(KDIR)/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/$$(KERNEL_NAME)-initramfs
@rm -f $$@ @rm -f $$@
$$(call concat_cmd,$$(KERNEL_INITRAMFS)) $$(call concat_cmd,$$(KERNEL_INITRAMFS))
endef endef
@ -378,7 +379,7 @@ define Device/Build/kernel
$$(_TARGET): $$(if $$(KERNEL_INSTALL),$(BIN_DIR)/$$(KERNEL_IMAGE)) $$(_TARGET): $$(if $$(KERNEL_INSTALL),$(BIN_DIR)/$$(KERNEL_IMAGE))
$(BIN_DIR)/$$(KERNEL_IMAGE): $(KDIR)/$$(KERNEL_IMAGE) $(BIN_DIR)/$$(KERNEL_IMAGE): $(KDIR)/$$(KERNEL_IMAGE)
cp $$^ $$@ cp $$^ $$@
$(KDIR)/$$(KERNEL_IMAGE): $(KDIR)/vmlinux $(KDIR)/$$(KERNEL_IMAGE): $(KDIR)/$$(KERNEL_NAME)
@rm -f $$@ @rm -f $$@
$$(call concat_cmd,$$(KERNEL)) $$(call concat_cmd,$$(KERNEL))
$$(if $$(KERNEL_SIZE),$$(call Device/Build/check_size,$$(KERNEL_SIZE))) $$(if $$(KERNEL_SIZE),$$(call Device/Build/check_size,$$(KERNEL_SIZE)))