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/mcs814x/image | |
parent | eab95ea46736f8359c5a19a612f0e39160cab80c (diff) | |
download | upstream-6a4f2922f6303a006d66b4bbb79541823b1c12b4.tar.gz upstream-6a4f2922f6303a006d66b4bbb79541823b1c12b4.tar.bz2 upstream-6a4f2922f6303a006d66b4bbb79541823b1c12b4.zip |
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/mcs814x/image')
-rw-r--r-- | target/linux/mcs814x/image/Makefile | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/target/linux/mcs814x/image/Makefile b/target/linux/mcs814x/image/Makefile index 7386db0766..1c814fa4fd 100644 --- a/target/linux/mcs814x/image/Makefile +++ b/target/linux/mcs814x/image/Makefile @@ -14,9 +14,6 @@ LOADADDR:=0x00008000 JFFS2_BLOCKSIZE = 128k UIMAGE:=$(BIN_DIR)/$(IMG_PREFIX)-uImage -ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y) - UIMAGE:=$(BIN_DIR)/$(IMG_PREFIX)-uImage-initramfs -endif define Image/Build/MkuImage mkimage -A arm -O linux -T kernel -a $(LOADADDR) -C none -e $(LOADADDR) \ @@ -24,14 +21,10 @@ define Image/Build/MkuImage endef define Image/Build/DTB - cp $(KDIR)/zImage $(KDIR)/zImage-$(1); - cat $(LINUX_DIR)/arch/$(ARCH)/boot/$(1).dtb >> $(KDIR)/zImage-$(1); - $(call Image/Build/MkuImage,$(KDIR)/zImage-$(1),$(KDIR)/uImage-$(1)) - cp $(KDIR)/uImage-$(1) $(UIMAGE)-$(1); -endef - -define Image/Prepare - cp $(LINUX_DIR)/arch/$(ARCH)/boot/zImage $(KDIR)/zImage + cp $(KDIR)/zImage$(2) $(KDIR)/zImage-$(1); + cat $(LINUX_DIR)/arch/$(ARCH)/boot/$(1).dtb >> $(KDIR)/zImage$(2)-$(1); + $(call Image/Build/MkuImage,$(KDIR)/zImage$(2)-$(1),$(KDIR)/uImage$(2)-$(1)) + cp $(KDIR)/uImage$(2)-$(1) $(UIMAGE)$(2)-$(1); endef define Image/Build/Profile/dLAN_USB_Extender @@ -42,7 +35,10 @@ endef define Image/BuildKernel $(foreach dtb,$(TARGET_DTBS),$(call Image/Build/DTB,$(dtb))) - $(call Image/Build/Initramfs) +endef + +define Image/Build/Initramfs + $(foreach dtb,$(TARGET_DTBS),$(call Image/Build/DTB,$(dtb),-initramfs)) endef define Image/Build/squashfs @@ -53,6 +49,9 @@ define Image/Build $(call Image/Build/$(1)) dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync $(call Image/Build/Profile/$(PROFILE),$(1)) +ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) + $(call Image/Build/Initramfs) +endif endef $(eval $(call BuildImage)) |