summaryrefslogtreecommitdiff
path: root/target/linux/mvebu
diff options
context:
space:
mode:
authorflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-06-27 19:58:31 +0000
committerflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-06-27 19:58:31 +0000
commit40b6cba8e4c4f053cd423a38e29c06fd2a27cb21 (patch)
treeffba1790b89941519ddb5acc2bf8f55df6b65529 /target/linux/mvebu
parent56630ce61e5d3774a7f3d62de80a77c460df2776 (diff)
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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37049 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/mvebu')
-rw-r--r--target/linux/mvebu/image/Makefile22
1 files changed, 11 insertions, 11 deletions
diff --git a/target/linux/mvebu/image/Makefile b/target/linux/mvebu/image/Makefile
index bc2dbf6025..af29c2baae 100644
--- a/target/linux/mvebu/image/Makefile
+++ b/target/linux/mvebu/image/Makefile
@@ -15,9 +15,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) \
@@ -25,14 +22,10 @@ define Image/Build/MkuImage
endef
define Image/Build/DTB
- cp $(KDIR)/zImage $(KDIR)/zImage-$(1);
- cat $(LINUX_DIR)/arch/$(ARCH)/boot/dts/$(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$(2)-$(1);
+ cat $(LINUX_DIR)/arch/$(ARCH)/boot/dts/$(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/BuildKernel
@@ -44,9 +37,16 @@ define Image/Build/squashfs
$(STAGING_DIR_HOST)/bin/padjffs2 $(KDIR)/root.squashfs 128
endef
+define Image/Build/Initramfs
+ $(foreach dtb,$(TARGET_DTBS),$(call Image/Build/DTB,$(dtb),-initramfs))
+endef
+
define Image/Build
$(call Image/Build/$(1))
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
+ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
+ $(call Image/Build/Initramfs)
+endif
endef
$(eval $(call BuildImage))