aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/imx6/image/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/imx6/image/Makefile')
-rw-r--r--target/linux/imx6/image/Makefile45
1 files changed, 41 insertions, 4 deletions
diff --git a/target/linux/imx6/image/Makefile b/target/linux/imx6/image/Makefile
index 540692d817..b6885eff60 100644
--- a/target/linux/imx6/image/Makefile
+++ b/target/linux/imx6/image/Makefile
@@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/image.mk
# Images
#################################################
-DEVICE_VARS += MKUBIFS_OPTS
+DEVICE_VARS += MKUBIFS_OPTS UBOOT BOOT_SCRIPT
define Build/boot-overlay
rm -rf $@.boot
@@ -58,6 +58,38 @@ define Build/boot-scr
$(BIN_DIR)/boot.scr
endef
+define Build/imx6-sdcard
+ rm -rf $@.boot
+ mkdir -p $@.boot
+
+ $(CP) $(STAGING_DIR_IMAGE)/$(UBOOT)-u-boot.img $@.boot/u-boot.img
+ $(CP) $(IMAGE_KERNEL) $@.boot/uImage
+
+ $(foreach dts,$(DEVICE_DTS), \
+ $(CP) \
+ $(DTS_DIR)/$(dts).dtb \
+ $@.boot/;
+ )
+
+ mkimage -A arm -O linux -T script -C none -a 0 -e 0 \
+ -n '$(DEVICE_ID) OpenWrt bootscript' \
+ -d $(BOOT_SCRIPT) \
+ $@.boot/boot.scr
+
+ cp $@ $@.fs
+
+ $(SCRIPT_DIR)/gen_image_generic.sh $@ \
+ $(CONFIG_TARGET_KERNEL_PARTSIZE) \
+ $@.boot \
+ $(CONFIG_TARGET_ROOTFS_PARTSIZE) \
+ $@.fs \
+ 1024
+
+ dd if=$(STAGING_DIR_IMAGE)/$(UBOOT)-SPL of=$@ bs=1024 seek=1 conv=notrunc
+
+ rm -rf $@.boot $@.fs
+endef
+
#################################################
# Devices
#################################################
@@ -72,7 +104,6 @@ define Device/Default
KERNEL_NAME := zImage
KERNEL_PREFIX := $$(IMAGE_PREFIX)
KERNEL := kernel-bin | uImage none
- IMAGE_NAME = $$(IMAGE_PREFIX)-$$(1).$$(2)
IMAGES :=
endef
@@ -103,6 +134,7 @@ define Device/ventana
kobs-ng
KERNEL += | boot-overlay
IMAGES := nand.ubi bootfs.tar.gz
+ IMAGE_NAME = $$(IMAGE_PREFIX)-$$(1).$$(2)
UBINIZE_PARTS = boot=$$(KDIR_KERNEL_IMAGE).boot.ubifs=15
IMAGE/nand.ubi := append-ubi
IMAGE/bootfs.tar.gz := bootfs.tar.gz | install-dtb
@@ -131,11 +163,16 @@ endef
TARGET_DEVICES += wandboard
define Device/cubox-i
- KERNEL := kernel-bin | install-dtb | boot-scr
+ KERNEL := kernel-bin | install-dtb
+ UBOOT := mx6cuboxi
+ BOOT_SCRIPT = bootscript-cubox
DEVICE_NAME := cubox
DEVICE_TITLE := SolidRun CuBox-i
DEVICE_PACKAGES := u-boot-mx6cuboxi kmod-drm-imx kmod-drm-imx-hdmi kmod-usb-hid
- DEVICE_DTS := imx6q-cubox-i imx6dl-cubox-i
+ DEVICE_DTS := imx6q-cubox-i imx6dl-cubox-i imx6q-hummingboard imx6dl-hummingboard
+ IMAGES := combined.bin
+ FILESYSTEMS := squashfs
+ IMAGE/combined.bin := append-rootfs | pad-extra 128k | imx6-sdcard
endef
TARGET_DEVICES += cubox-i