summaryrefslogtreecommitdiff
path: root/target/linux/ramips
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2013-06-27 19:58:31 +0000
committerFlorian Fainelli <florian@openwrt.org>2013-06-27 19:58:31 +0000
commit6a4f2922f6303a006d66b4bbb79541823b1c12b4 (patch)
treed3d9644c2a4a2e9b758bab9b84973e078143ed2c /target/linux/ramips
parenteab95ea46736f8359c5a19a612f0e39160cab80c (diff)
downloadmtk-20170518-6a4f2922f6303a006d66b4bbb79541823b1c12b4.zip
mtk-20170518-6a4f2922f6303a006d66b4bbb79541823b1c12b4.tar.gz
mtk-20170518-6a4f2922f6303a006d66b4bbb79541823b1c12b4.tar.bz2
targets: prepare for supporting normal and initramfs images
In order to support both normal images and initramfs, ensure that each target sets KERNELNAME properly so that the generic kernel building code can copy the corresponding files over $(KDIR) with the appropriate extension. Update the various paths to the kernel and wrapper images from $(LINUX_DIR)/arch/$(ARCH)/boot/$(foo) to $(KDIR)/$(foo). Signed-off-by: Florian Fainelli <florian@openwrt.org> SVN-Revision: 37049
Diffstat (limited to 'target/linux/ramips')
-rw-r--r--target/linux/ramips/image/Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile
index 5f2c311..4939469 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -19,8 +19,6 @@ VMLINUX:=$(IMG_PREFIX)-vmlinux
UIMAGE:=$(IMG_PREFIX)-uImage
ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
-VMLINUX:=$(IMG_PREFIX)-vmlinux-initramfs
-UIMAGE:=$(IMG_PREFIX)-uImage-initramfs
define Image/Build/Initramfs
$(call Image/Build/Profile/$(PROFILE),initramfs)
endef
@@ -541,6 +539,13 @@ define Image/BuildKernel
$(call CompressLzma,$(KDIR)/vmlinux,$(KDIR)/vmlinux.bin.lzma)
$(call MkImage,lzma,$(KDIR)/vmlinux.bin.lzma,$(KDIR)/uImage.lzma)
cp $(KDIR)/uImage.lzma $(BIN_DIR)/$(UIMAGE).bin
+ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
+ cp $(KDIR)/vmlinux-initramfs.elf $(BIN_DIR)/$(VMLINUX)-initramfs.elf
+ cp $(KDIR)/vmlinux-initramfs $(BIN_DIR)/$(VMLINUX)-initramfs.bin
+ $(call CompressLzma,$(KDIR)/vmlinux-initramfs,$(KDIR)/vmlinux-initramfs.bin.lzma)
+ $(call MkImage,lzma,$(KDIR)/vmlinux-initramfs.bin.lzma,$(KDIR)/uImage-initramfs.lzma)
+ cp $(KDIR)/uImage-initramfs.lzma $(BIN_DIR)/$(UIMAGE)-initramfs.bin
+endif
$(call Image/Build/Initramfs)
endef