[OpenWrt-Devel] [RFC] imx6: fix image build for Generic profile.
Yousong Zhou
yszhou4tech at gmail.com
Mon Sep 8 03:33:53 EDT 2014
Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
I do not own a board that can run imx6 target firmware, but this patch has
been compile tested by myself and aandrew in #openwrt.
target/linux/imx6/image/Makefile | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/target/linux/imx6/image/Makefile b/target/linux/imx6/image/Makefile
index 2e2e11b..391db78 100644
--- a/target/linux/imx6/image/Makefile
+++ b/target/linux/imx6/image/Makefile
@@ -13,14 +13,16 @@ endef
define Image/BuildKernel/Template
+ ifneq ($(1),)
$(CP) $(DTS_DIR)/$(1).dtb $(BIN_DIR)/$(IMG_PREFIX)-$(1).dtb
$(call Image/BuildKernel/MkFIT,$(1),$(KDIR)/zImage,$(BIN_DIR)/$(IMG_PREFIX)-$(1).dtb,none,0x10008000,0x10008000)
$(CP) $(KDIR)/fit-$(1).itb $(BIN_DIR)/$(IMG_PREFIX)-$(1)-fit-uImage.itb
- ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
+ ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
$(call Image/BuildKernel/MkFIT,$(1),$(KDIR)/zImage-initramfs,$(BIN_DIR)/$(IMG_PREFIX)-$(1).dtb,none,0x10008000,0x10008000,-initramfs)
$(CP) $(KDIR)/fit-$(1)-initramfs.itb $(BIN_DIR)/$(IMG_PREFIX)-$(1)-fit-uImage-initramfs.itb
+ endif
endif
$(CP) $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-zImage
@@ -71,10 +73,10 @@ endef
define Image/Build/squashfs
$(call prepare_generic_squashfs,$(KDIR)/root.$(1))
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).bin bs=128k conv=sync
- ( \
+ [ -f "$(BIN_DIR)/$(IMG_PREFIX)-$(call sanitize_profile_name)-fit-uImage.itb" ] && ( \
dd if=$(BIN_DIR)/$(IMG_PREFIX)-$(call sanitize_profile_name)-fit-uImage.itb bs=2048k conv=sync; \
dd if=$(KDIR)/root.$(1) bs=128k conv=sync; \
- ) > $(BIN_DIR)/$(IMG_PREFIX)-$(call sanitize_profile_name)-fit-$(1).bin
+ ) > $(BIN_DIR)/$(IMG_PREFIX)-$(call sanitize_profile_name)-fit-$(1).bin || true
endef
define Image/mkfs/targz
@@ -107,8 +109,8 @@ define Image/Build/ubi
endef
-Image/BuildKernel/Template/generic=$(call Image/BuildKernel/Template)
-Image/InstallKernel/Template/generic=$(call Image/InstallKernel/Template)
+Image/BuildKernel/Template/Generic=$(call Image/BuildKernel/Template)
+Image/InstallKernel/Template/Generic=$(call Image/InstallKernel/Template)
Image/BuildKernel/Template/IMX6DL_WANDBOARD=$(call Image/BuildKernel/Template,imx6dl-wandboard)
Image/InstallKernel/Template/IMX6DL_WANDBOARD=$(call Image/InstallKernel/Template,imx6dl-wandboard)
--
1.7.10.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list