diff options
author | Florian Fainelli <florian@openwrt.org> | 2013-09-26 19:16:19 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2013-09-26 19:16:19 +0000 |
commit | 9f4498ada7b29907580201be6841c21f65f8fb93 (patch) | |
tree | d510cba235f53a5a514b0f20d9cd5dec594a09f0 /target/linux/rb532/image/Makefile | |
parent | c2a4deeab862706c61a489a7b9b49e1845b754d2 (diff) | |
download | master-187ad058-9f4498ada7b29907580201be6841c21f65f8fb93.tar.gz master-187ad058-9f4498ada7b29907580201be6841c21f65f8fb93.tar.bz2 master-187ad058-9f4498ada7b29907580201be6841c21f65f8fb93.zip |
rb532: fix initramfs image creation (#14215)
Signed-off-by: Florian Fainelli <florian@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38219 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/rb532/image/Makefile')
-rw-r--r-- | target/linux/rb532/image/Makefile | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/target/linux/rb532/image/Makefile b/target/linux/rb532/image/Makefile index 5f421bbe28..c5b756cbe7 100644 --- a/target/linux/rb532/image/Makefile +++ b/target/linux/rb532/image/Makefile @@ -26,14 +26,20 @@ endef define Image/Prepare cat $(KDIR)/vmlinux | $(STAGING_DIR_HOST)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma $(MAKE) -C $(GENERIC_PLATFORM_DIR)/image/lzma-loader $(LOADER_MAKEOPTS) clean compile +ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y) + $(STAGING_DIR_HOST)/bin/patch-cmdline $(KDIR)/vmlinux-initramfs '$(strip $(call Image/cmdline/yaffs2)) ' + cat $(KDIR)/vmlinux-initramfs | $(STAGING_DIR_HOST)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux-initramfs.lzma + $(MAKE) -C $(GENERIC_PLATFORM_DIR)/image/lzma-loader $(LOADER_MAKEOPTS) clean compile + $(CP) $(KDIR)/loader.elf $(KDIR)/loader-initramfs.elf +endif endef VMLINUX:=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux-kernel define Image/BuildKernel $(CP) $(KDIR)/loader.elf $(VMLINUX) -ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) - $(CP) $(KDIR)/loader.elf $(BIN_DIR)/$(IMG_PREFIX)-vmlinux-initramfs +ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y) + $(CP) $(KDIR)/loader-initramfs.elf $(BIN_DIR)/$(IMG_PREFIX)-vmlinux-initramfs endif endef @@ -63,13 +69,4 @@ define Image/Build ./gen_image.sh $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).bin 4 $(BIN_DIR)/$(IMG_PREFIX)-$(1).kernel $(CONFIG_TARGET_ROOTFS_PARTSIZE) $(KDIR)/root.$(1) endef -ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) - define Image/Prepare - $(STAGING_DIR_HOST)/bin/patch-cmdline $(KDIR)/vmlinux-initramfs '$(strip $(call Image/cmdline/yaffs2)) ' - cat $(KDIR)/vmlinux-initramfs | $(STAGING_DIR_HOST)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux-initramfs.lzma - $(MAKE) -C $(GENERIC_PLATFORM_DIR)/image/lzma-loader $(LOADER_MAKEOPTS) clean compile - $(CP) $(KDIR)/loader.elf $(KDIR)/loader-initramfs.elf - endef -endif - $(eval $(call BuildImage)) |