Author: nbd
Date: 2015-11-07 13:51:24 +0100 (Sat, 07 Nov 2015)
New Revision: 47403

Modified:
   trunk/include/image.mk
Log:
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 <[email protected]>
Cc: Felix Fietkau <[email protected]>
Cc: John Crispin <[email protected]>

Modified: trunk/include/image.mk
===================================================================
--- trunk/include/image.mk      2015-11-07 12:12:08 UTC (rev 47402)
+++ trunk/include/image.mk      2015-11-07 12:51:24 UTC (rev 47403)
@@ -432,6 +432,7 @@
   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 @@
   $(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
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to