diff options
author | Florian Fainelli <florian@openwrt.org> | 2013-06-27 19:58:31 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2013-06-27 19:58:31 +0000 |
commit | 6a4f2922f6303a006d66b4bbb79541823b1c12b4 (patch) | |
tree | d3d9644c2a4a2e9b758bab9b84973e078143ed2c /target/linux/ar71xx | |
parent | eab95ea46736f8359c5a19a612f0e39160cab80c (diff) | |
download | mtk-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/ar71xx')
-rw-r--r-- | target/linux/ar71xx/image/Makefile | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index 24c0a00..84a3783 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -58,15 +58,6 @@ fs_64k:=64k fs_64kraw:=64kraw fs_128k:=128k fs_256k:=256k -ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y) - fs_squash:=initramfs - fs_64k:=initramfs - fs_64kraw:=initramfs - fs_128k:=initramfs - fs_256k:=initramfs - VMLINUX:=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux-initramfs - UIMAGE:=$(BIN_DIR)/$(IMG_PREFIX)-uImage-initramfs -endif define CompressLzma $(STAGING_DIR_HOST)/bin/lzma e $(1) -lc1 -lp2 -pb2 $(3) $(2) @@ -200,6 +191,15 @@ define Image/BuildKernel $(call MkuImage,gzip,,$(KDIR)/vmlinux.bin.gz,$(UIMAGE)-gzip.bin) $(call MkuImage,lzma,,$(KDIR)/vmlinux.bin.lzma,$(UIMAGE)-lzma.bin) cp $(KDIR)/loader-generic.elf $(VMLINUX)-lzma.elf +ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) + cp $(KDIR)/vmlinux-initramfs.elf $(VMLINUX)-initramfs.elf + cp $(KDIR)/vmlinux-initramfs $(VMLINUX)-initramfs.bin + dd if=$(KDIR)/vmlinux-initramfs.bin.lzma of=$(VMLINUX)-initramfs.lzma bs=65536 conv=sync + dd if=$(KDIR)/vmlinux-initramfs.bin.gz of=$(VMLINUX)-initramfs.gz bs=65536 conv=sync + $(call MkuImage,gzip,,$(KDIR)/vmlinux-initramfs.bin.gz,$(UIMAGE)-initramfs-gzip.bin) + $(call MkuImage,lzma,,$(KDIR)/vmlinux-initramfs.bin.lzma,$(UIMAGE)-initramfs-lzma.bin) + cp $(KDIR)/loader-generic.elf $(VMLINUX)-initramfs-lzma.elf +endif -mkdir -p $(KDIR_TMP) $(call Image/Build/Initramfs) endef @@ -1030,6 +1030,10 @@ endef define Image/Prepare gzip -9 -c $(KDIR)/vmlinux > $(KDIR)/vmlinux.bin.gz $(call CompressLzma,$(KDIR)/vmlinux,$(KDIR)/vmlinux.bin.lzma) +ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) + gzip -9 -c $(KDIR)/vmlinux-initramfs > $(KDIR)/vmlinux-initramfs.bin.gz + $(call CompressLzma,$(KDIR)/vmlinux-initramfs,$(KDIR)/vmlinux-initramfs.bin.lzma) +endif $(call Image/BuildLoader,generic,elf) $(call Image/Build/Profile/$(if $(CONFIG_IB),Default,$(PROFILE)),loader) endef |