diff options
author | Felix Fietkau <nbd@openwrt.org> | 2015-11-07 12:51:24 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2015-11-07 12:51:24 +0000 |
commit | 142a5d2615748e9fe9ced29ba3f7074ff7ebae60 (patch) | |
tree | be47eba1468a26e8f42b75543b9e62477c197bee /include/image.mk | |
parent | 824b82a20184ec1ecda1c5c541738644d45b4c02 (diff) | |
download | master-187ad058-142a5d2615748e9fe9ced29ba3f7074ff7ebae60.tar.gz master-187ad058-142a5d2615748e9fe9ced29ba3f7074ff7ebae60.tar.bz2 master-187ad058-142a5d2615748e9fe9ced29ba3f7074ff7ebae60.zip |
include/image.mk: introduce KERNEL_INITRAMFS_NAME variable
In case if we're interested in generation of non-binary images
(for example if we want images to be valid .elfs - and that's what we
want for ARC now) we have to instruct Device/Build/initramfs target to
use input file with some extension (in case of ARC it will be
essentially .elf).
Otherwise default binary vmlinux-initramfs (without extension) is used and
resulting images then are binaries instead of elfs.
Now having KERNEL_INITRAMFS_NAME variable it's possible to substitute
default $$(KERNEL_NAME)-initramfs with preferred option like
$$(KERNEL_NAME)-initramfs.elf.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Felix Fietkau <nbd@openwrt.org>
Cc: John Crispin <blogic@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47403 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'include/image.mk')
-rw-r--r-- | include/image.mk | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/image.mk b/include/image.mk index 43980bc394..5cd0d2302b 100644 --- a/include/image.mk +++ b/include/image.mk @@ -432,6 +432,7 @@ define Device/Init KERNEL_IMAGE = $$(KERNEL_PREFIX)$$(KERNEL_SUFFIX) KERNEL_INITRAMFS_PREFIX = $$(IMAGE_PREFIX)-initramfs KERNEL_INITRAMFS_IMAGE = $$(KERNEL_INITRAMFS_PREFIX)$$(KERNEL_SUFFIX) + KERNEL_INITRAMFS_NAME = $$(KERNEL_NAME)-initramfs KERNEL_INSTALL := KERNEL_NAME := vmlinux KERNEL_SIZE := @@ -458,11 +459,11 @@ define Device/Build/initramfs $(call Device/Export,$(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE),$(1)) $$(_TARGET): $(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE) - $(KDIR)/$$(KERNEL_NAME)-initramfs: image_prepare + $(KDIR)/$$(KERNEL_INITRAMFS_NAME): image_prepare $(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE) cp $$^ $$@ - $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/$$(KERNEL_NAME)-initramfs + $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/$$(KERNEL_INITRAMFS_NAME) @rm -f $$@ $$(call concat_cmd,$$(KERNEL_INITRAMFS)) endef |