X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fopenwrt.git;a=blobdiff_plain;f=target%2Flinux%2Fimx6%2Fimage%2FMakefile;h=f13412f1e3002f41053419a7952c77b20d0940c6;hp=86e3308c79fb934d3fc2bcceb2b7407b34687deb;hb=36c6ba3735f06f435af66175ace0dd192601ac85;hpb=e7ec7a08aae0afb1064d1bf26a9cd6fe1e64d516 diff --git a/target/linux/imx6/image/Makefile b/target/linux/imx6/image/Makefile index 86e3308c79..f13412f1e3 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 @@ -22,7 +22,7 @@ define Build/boot-overlay $(foreach dts,$(DEVICE_DTS), \ $(CP) \ - $(LINUX_DIR)/arch/$(ARCH)/boot/dts/$(dts).dtb \ + $(DTS_DIR)/$(dts).dtb \ $@.boot/$(IMG_PREFIX)-$(dts).dtb; \ ln -sf \ $(IMG_PREFIX)-$(dts).dtb \ @@ -34,7 +34,7 @@ define Build/boot-overlay $@.boot/6x_bootscript-$(DEVICE_NAME) $(STAGING_DIR_HOST)/bin/mkfs.ubifs \ - --space-fixup --force-compr=zlib --squash-uids \ + --space-fixup --compr=zlib --squash-uids \ $(MKUBIFS_OPTS) -c 8124 \ -o $@.boot.ubifs -d $@.boot @@ -51,6 +51,45 @@ define Build/bootfs.tar.gz -czvf $@ . endef +define Build/boot-scr + mkimage -A arm -O linux -T script -C none -a 0 -e 0 \ + -n '$(DEVICE_ID) OpenWrt bootscript' \ + -d ./bootscript-$(DEVICE_NAME) \ + $(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 ################################################# @@ -65,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 @@ -78,6 +116,8 @@ define Device/ventana imx6dl-gw54xx \ imx6dl-gw551x \ imx6dl-gw552x \ + imx6dl-gw553x \ + imx6dl-gw5904 \ imx6q-gw51xx \ imx6q-gw52xx \ imx6q-gw53xx \ @@ -85,16 +125,16 @@ define Device/ventana imx6q-gw5400-a \ imx6q-gw551x \ imx6q-gw552x \ - imx6q-gw553x - DEVICE_PACKAGES := kmod-thermal-imx kmod-sky2 kmod-usb-chipidea-imx kmod-usb-mxs-phy \ - kmod-sound-core kmod-sound-soc-imx kmod-sound-soc-imx-sgtl5000 \ + imx6q-gw553x \ + imx6q-gw5904 + DEVICE_PACKAGES := kmod-sky2 kmod-sound-core kmod-sound-soc-imx kmod-sound-soc-imx-sgtl5000 \ kmod-can kmod-can-flexcan kmod-can-raw \ kmod-hwmon-gsc \ - kmod-leds-gpio kmod-pps-gpio kmod-gw16083 \ + kmod-leds-gpio kmod-pps-gpio \ kobs-ng KERNEL += | boot-overlay IMAGES := nand.ubi bootfs.tar.gz - UBINIZE_OPTS := + 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 @@ -103,6 +143,7 @@ define Device/ventana BLOCKSIZE := 128k MKUBIFS_OPTS := -m $$(PAGESIZE) -e 124KiB endef +TARGET_DEVICES += ventana define Device/ventana-large $(Device/ventana) @@ -113,15 +154,26 @@ define Device/ventana-large BLOCKSIZE := 256k MKUBIFS_OPTS := -m $$(PAGESIZE) -e 248KiB endef +TARGET_DEVICES += ventana-large define Device/wandboard DEVICE_TITLE := Wandboard Dual DEVICE_DTS := imx6dl-wandboard - DEVICE_PACKAGES := kmod-thermal-imx kmod-usb-chipidea-imx kmod-usb-mxs-phy endef - -TARGET_DEVICES += \ - ventana ventana-large \ - wandboard +TARGET_DEVICES += wandboard + +define Device/cubox-i + KERNEL := kernel-bin | install-dtb + UBOOT := mx6cuboxi + BOOT_SCRIPT = bootscript-cubox + DEVICE_NAME := cubox + DEVICE_TITLE := SolidRun CuBox-i + DEVICE_PACKAGES := kmod-drm-imx kmod-drm-imx-hdmi kmod-usb-hid + 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 $(eval $(call BuildImage))