BOARD:=imx
BOARDNAME:=NXP i.MX
FEATURES:=audio display fpu gpio pcie rtc usb usbgadget squashfs targz nand ubifs boot-part rootfs-part
-CPU_TYPE:=cortex-a9
-CPU_SUBTYPE:=neon
+SUBTARGETS:=cortexa9
KERNEL_PATCHVER:=5.4
KERNEL_TESTING_PATCHVER:=5.10
+++ /dev/null
-#
-# Copyright (C) 2013-2015 OpenWrt.org
-#
-
-. /lib/functions/uci-defaults.sh
-
-board=$(board_name)
-
-board_config_update
-
-case "$board" in
-gw,imx6dl-gw51xx |\
-gw,imx6dl-gw52xx |\
-gw,imx6dl-gw5904 |\
-gw,imx6dl-gw5907 |\
-gw,imx6dl-gw5910 |\
-gw,imx6dl-gw5912 |\
-gw,imx6dl-gw5913 |\
-gw,imx6q-gw51xx |\
-gw,imx6q-gw52xx |\
-gw,imx6q-gw5904 |\
-gw,imx6q-gw5907 |\
-gw,imx6q-gw5910 |\
-gw,imx6q-gw5912 |\
-gw,imx6q-gw5913 |\
-solidrun,cubox-i/dl |\
-solidrun,cubox-i/q )
- ucidef_set_interface_lan 'eth0'
- ;;
-gw,imx6dl-gw53xx |\
-gw,imx6dl-gw54xx |\
-gw,imx6dl-gw552x |\
-gw,imx6q-gw53xx |\
-gw,imx6q-gw5400-a |\
-gw,imx6q-gw54xx |\
-gw,imx6q-gw552x )
- ucidef_set_interfaces_lan_wan 'eth0' 'eth1'
- ;;
-wand,imx6dl-wandboard )
- ucidef_set_interface_wan 'eth0'
- ;;
-esac
-
-board_config_flush
-
-exit 0
+++ /dev/null
-#
-# Copyright (C) 2010-2013 OpenWrt.org
-#
-
-rootpartuuid() {
- local cmdline=$(cat /proc/cmdline)
- local bootpart=${cmdline##*root=}
- bootpart=${bootpart%% *}
- local uuid=${bootpart#PARTUUID=}
- echo ${uuid%-02}
-}
-
-bootdev_from_uuid() {
- blkid | grep "PTUUID=\"$(rootpartuuid)\"" | cut -d : -f1
-}
-
-bootpart_from_uuid() {
- blkid | grep $(rootpartuuid)-01 | cut -d : -f1
-}
-
-rootpart_from_uuid() {
- blkid | grep $(rootpartuuid)-02 | cut -d : -f1
-}
-
-apalis_mount_boot() {
- mkdir -p /boot
- [ -f /boot/uImage ] || {
- mount -o rw,noatime $(bootpart_from_uuid) /boot > /dev/null
- }
-}
+++ /dev/null
-. /lib/imx.sh
-. /lib/functions.sh
-. /lib/upgrade/common.sh
-
-move_config() {
- local board=$(board_name)
-
- case "$board" in
- toradex,apalis_imx6q-eval |\
- toradex,apalis_imx6q-ixora |\
- toradex,apalis_imx6q-ixora-v1.1 )
- if [ -b $(bootpart_from_uuid) ]; then
- apalis_mount_boot
- [ -f "/boot/$BACKUP_FILE" ] && mv -f "/boot/$BACKUP_FILE" /
- umount /boot
- fi
- ;;
- esac
-}
-
-boot_hook_add preinit_mount_root move_config
+++ /dev/null
-#
-# Copyright (C) 2010-2015 OpenWrt.org
-#
-
-. /lib/imx.sh
-
-RAMFS_COPY_BIN='blkid jffs2reset'
-
-enable_image_metadata_check() {
- case "$(board_name)" in
- toradex,apalis_imx6q-eval |\
- toradex,apalis_imx6q-ixora |\
- toradex,apalis_imx6q-ixora-v1.1 )
- REQUIRE_IMAGE_METADATA=1
- ;;
- esac
-}
-enable_image_metadata_check
-
-apalis_copy_config() {
- apalis_mount_boot
- cp -af "$UPGRADE_BACKUP" "/boot/$BACKUP_FILE"
- sync
- umount /boot
-}
-
-apalis_do_upgrade() {
- apalis_mount_boot
- get_image "$1" | tar Oxf - sysupgrade-apalis/kernel > /boot/uImage
- get_image "$1" | tar Oxf - sysupgrade-apalis/root > $(rootpart_from_uuid)
- sync
- umount /boot
-}
-
-platform_check_image() {
- local board=$(board_name)
-
- case "$board" in
- gw,imx6dl-gw51xx |\
- gw,imx6dl-gw52xx |\
- gw,imx6dl-gw53xx |\
- gw,imx6dl-gw54xx |\
- gw,imx6dl-gw551x |\
- gw,imx6dl-gw552x |\
- gw,imx6dl-gw553x |\
- gw,imx6dl-gw5904 |\
- gw,imx6dl-gw5907 |\
- gw,imx6dl-gw5910 |\
- gw,imx6dl-gw5912 |\
- gw,imx6dl-gw5913 |\
- gw,imx6q-gw51xx |\
- gw,imx6q-gw52xx |\
- gw,imx6q-gw53xx |\
- gw,imx6q-gw5400-a |\
- gw,imx6q-gw54xx |\
- gw,imx6q-gw551x |\
- gw,imx6q-gw552x |\
- gw,imx6q-gw553x |\
- gw,imx6q-gw5904 |\
- gw,imx6q-gw5907 |\
- gw,imx6q-gw5910 |\
- gw,imx6q-gw5912 |\
- gw,imx6q-gw5913 )
- nand_do_platform_check $board $1
- return $?;
- ;;
- toradex,apalis_imx6q-eval |\
- toradex,apalis_imx6q-ixora |\
- toradex,apalis_imx6q-ixora-v1.1 )
- return 0
- ;;
- esac
-
- echo "Sysupgrade is not yet supported on $board."
- return 1
-}
-
-platform_do_upgrade() {
- local board=$(board_name)
-
- case "$board" in
- gw,imx6dl-gw51xx |\
- gw,imx6dl-gw52xx |\
- gw,imx6dl-gw53xx |\
- gw,imx6dl-gw54xx |\
- gw,imx6dl-gw551x |\
- gw,imx6dl-gw552x |\
- gw,imx6dl-gw553x |\
- gw,imx6dl-gw5904 |\
- gw,imx6dl-gw5907 |\
- gw,imx6dl-gw5910 |\
- gw,imx6dl-gw5912 |\
- gw,imx6dl-gw5913 |\
- gw,imx6q-gw51xx |\
- gw,imx6q-gw52xx |\
- gw,imx6q-gw53xx |\
- gw,imx6q-gw5400-a |\
- gw,imx6q-gw54xx |\
- gw,imx6q-gw551x |\
- gw,imx6q-gw552x |\
- gw,imx6q-gw553x |\
- gw,imx6q-gw5904 |\
- gw,imx6q-gw5907 |\
- gw,imx6q-gw5910 |\
- gw,imx6q-gw5912 |\
- gw,imx6q-gw5913 )
- nand_do_upgrade "$1"
- ;;
- toradex,apalis_imx6q-eval |\
- toradex,apalis_imx6q-ixora |\
- toradex,apalis_imx6q-ixora-v1.1 )
- apalis_do_upgrade "$1"
- ;;
- esac
-}
-
-platform_copy_config() {
- local board=$(board_name)
-
- case "$board" in
- toradex,apalis_imx6q-eval |\
- toradex,apalis_imx6q-ixora |\
- toradex,apalis_imx6q-ixora-v1.1 )
- apalis_copy_config
- ;;
- esac
-}
-
-platform_pre_upgrade() {
- local board=$(board_name)
-
- case "$board" in
- toradex,apalis_imx6q-eval |\
- toradex,apalis_imx6q-ixora |\
- toradex,apalis_imx6q-ixora-v1.1 )
- [ -z "$UPGRADE_BACKUP" ] && {
- jffs2reset -y
- umount /overlay
- }
- ;;
- esac
-}
-CONFIG_AHCI_IMX=y
CONFIG_ALIGNMENT_TRAP=y
CONFIG_ARCH_32BIT_OFF_T=y
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
CONFIG_ARM=y
CONFIG_ARM_ARCH_TIMER=y
CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
-CONFIG_ARM_CPU_SUSPEND=y
CONFIG_ARM_CRYPTO=y
CONFIG_ARM_ERRATA_754322=y
CONFIG_ARM_ERRATA_764369=y
CONFIG_ARM_ERRATA_775420=y
CONFIG_ARM_ERRATA_814220=y
-CONFIG_ARM_GIC=y
CONFIG_ARM_HAS_SG_CHAIN=y
CONFIG_ARM_HEAVY_MB=y
-CONFIG_ARM_IMX6Q_CPUFREQ=y
# CONFIG_ARM_IMX_CPUFREQ_DT is not set
CONFIG_ARM_L1_CACHE_SHIFT=6
CONFIG_ARM_L1_CACHE_SHIFT_6=y
CONFIG_ASSOCIATIVE_ARRAY=y
CONFIG_ATA=y
CONFIG_ATAGS=y
+# CONFIG_ATA_SFF is not set
CONFIG_AUTO_ZRELADDR=y
CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
CONFIG_BLK_DEV_LOOP=y
-CONFIG_BLK_MQ_PCI=y
CONFIG_BLK_PM=y
CONFIG_BLK_SCSI_REQUEST=y
CONFIG_CACHE_L2X0=y
CONFIG_CLKDEV_LOOKUP=y
CONFIG_CLKSRC_IMX_GPT=y
CONFIG_CLKSRC_MMIO=y
-CONFIG_CLK_IMX6Q=y
-CONFIG_CLK_IMX6SL=y
-CONFIG_CLK_IMX6SX=y
# CONFIG_CLK_IMX8MM is not set
# CONFIG_CLK_IMX8MN is not set
# CONFIG_CLK_IMX8MP is not set
# CONFIG_CLK_IMX8MQ is not set
CONFIG_CLONE_BACKWARDS=y
CONFIG_CLZ_TAB=y
-CONFIG_CMDLINE="pci=nomsi"
-CONFIG_CMDLINE_EXTEND=y
CONFIG_COMMON_CLK=y
CONFIG_COMPAT_32BIT_TIME=y
CONFIG_CPUFREQ_DT=y
CONFIG_DMA_REMAP=y
CONFIG_DMA_VIRTUAL_CHANNELS=y
CONFIG_DTC=y
-CONFIG_E1000E=y
CONFIG_EDAC_ATOMIC_SCRUB=y
CONFIG_EDAC_SUPPORT=y
CONFIG_ENCRYPTED_KEYS=y
CONFIG_EXTRA_FIRMWARE="imx/sdma/sdma-imx6q.bin"
CONFIG_EXTRA_FIRMWARE_DIR="firmware"
CONFIG_F2FS_FS=y
-CONFIG_FEC=y
+# CONFIG_FEC is not set
CONFIG_FIXED_PHY=y
CONFIG_FIX_EARLYCON_MEM=y
-CONFIG_FSL_GUTS=y
CONFIG_FS_ENCRYPTION=y
CONFIG_FS_ENCRYPTION_ALGS=y
CONFIG_FS_IOMAP=y
CONFIG_GENERIC_GETTIMEOFDAY=y
CONFIG_GENERIC_IDLE_POLL_SETUP=y
CONFIG_GENERIC_IRQ_CHIP=y
-CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
CONFIG_GENERIC_IRQ_SHOW=y
CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
-CONFIG_GENERIC_MSI_IRQ=y
-CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
CONFIG_GENERIC_PCI_IOMAP=y
CONFIG_GENERIC_PINCONF=y
CONFIG_GENERIC_PINCTRL_GROUPS=y
# CONFIG_GIANFAR is not set
CONFIG_GLOB=y
CONFIG_GPIOLIB=y
-CONFIG_GPIOLIB_IRQCHIP=y
CONFIG_GPIO_GENERIC=y
CONFIG_GPIO_MXC=y
-CONFIG_GPIO_PCA953X=y
-CONFIG_GPIO_PCA953X_IRQ=y
CONFIG_GRO_CELLS=y
CONFIG_HANDLE_DOMAIN_IRQ=y
CONFIG_HARDEN_BRANCH_PREDICTOR=y
CONFIG_HAVE_SMP=y
CONFIG_HWMON=y
CONFIG_HW_RANDOM=y
-CONFIG_HW_RANDOM_IMX_RNGC=y
CONFIG_HZ_FIXED=0
CONFIG_HZ_PERIODIC=y
CONFIG_I2C=y
CONFIG_IMX_SDMA=y
CONFIG_IMX_THERMAL=y
# CONFIG_IMX_WEIM is not set
-# CONFIG_INITRAMFS_FORCE is not set
CONFIG_INITRAMFS_SOURCE=""
CONFIG_IO_URING=y
CONFIG_IRQCHIP=y
CONFIG_LOCK_SPIN_ON_OWNER=y
CONFIG_LZO_COMPRESS=y
CONFIG_LZO_DECOMPRESS=y
-CONFIG_MARVELL_PHY=y
CONFIG_MDIO_BUS=y
CONFIG_MDIO_DEVICE=y
CONFIG_MDIO_DEVRES=y
CONFIG_MEMFD_CREATE=y
CONFIG_MFD_SYSCON=y
-CONFIG_MICREL_PHY=y
CONFIG_MIGHT_HAVE_CACHE_L2X0=y
CONFIG_MIGRATION=y
CONFIG_MMC=y
CONFIG_MMC_CQHCI=y
# CONFIG_MMC_MXC is not set
CONFIG_MMC_SDHCI=y
-CONFIG_MMC_SDHCI_ESDHC_IMX=y
-CONFIG_MMC_SDHCI_IO_ACCESSORS=y
-CONFIG_MMC_SDHCI_OF_ESDHC=y
-# CONFIG_MMC_SDHCI_PCI is not set
+# CONFIG_MMC_SDHCI_ESDHC_IMX is not set
CONFIG_MMC_SDHCI_PLTFM=y
CONFIG_MODULES_USE_ELF_REL=y
CONFIG_MPILIB=y
CONFIG_NEON=y
CONFIG_NET_DEVLINK=y
CONFIG_NET_DSA=y
-# CONFIG_NET_DSA_MSCC_FELIX is not set
-CONFIG_NET_DSA_MV88E6XXX=y
-CONFIG_NET_DSA_MV88E6XXX_GLOBAL2=y
CONFIG_NET_DSA_TAG_DSA=y
CONFIG_NET_DSA_TAG_EDSA=y
CONFIG_NET_FLOW_LIMIT=y
CONFIG_OUTER_CACHE_SYNC=y
CONFIG_PADATA=y
CONFIG_PAGE_OFFSET=0x80000000
-CONFIG_PCI=y
-CONFIG_PCIEAER=y
-CONFIG_PCIEPORTBUS=y
-CONFIG_PCIE_DW=y
-CONFIG_PCIE_DW_HOST=y
-CONFIG_PCIE_PME=y
-CONFIG_PCI_DOMAINS=y
-CONFIG_PCI_DOMAINS_GENERIC=y
-CONFIG_PCI_IMX6=y
-CONFIG_PCI_MSI=y
-CONFIG_PCI_MSI_IRQ_DOMAIN=y
CONFIG_PERF_USE_VMALLOC=y
CONFIG_PGTABLE_LEVELS=2
CONFIG_PHYLIB=y
CONFIG_PHYLINK=y
CONFIG_PINCTRL=y
-CONFIG_PINCTRL_IMX=y
-CONFIG_PINCTRL_IMX6Q=y
-CONFIG_PINCTRL_IMX6SL=y
-CONFIG_PINCTRL_IMX6SX=y
# CONFIG_PINCTRL_IMX8MM is not set
# CONFIG_PINCTRL_IMX8MN is not set
# CONFIG_PINCTRL_IMX8MP is not set
CONFIG_PL310_ERRATA_769419=y
CONFIG_PM=y
CONFIG_PM_CLK=y
-CONFIG_PM_GENERIC_DOMAINS=y
-CONFIG_PM_GENERIC_DOMAINS_OF=y
CONFIG_PM_OPP=y
CONFIG_PPS=y
CONFIG_PTP_1588_CLOCK=y
CONFIG_RD_LZO=y
CONFIG_RD_XZ=y
CONFIG_REGMAP=y
-CONFIG_REGMAP_I2C=y
CONFIG_REGMAP_MMIO=y
CONFIG_REGULATOR=y
-CONFIG_REGULATOR_ANATOP=y
CONFIG_REGULATOR_FIXED_VOLTAGE=y
-CONFIG_REGULATOR_LTC3676=y
-CONFIG_REGULATOR_PFUZE100=y
CONFIG_RESET_CONTROLLER=y
CONFIG_RFS_ACCEL=y
CONFIG_RPS=y
CONFIG_RTC_CLASS=y
# CONFIG_RTC_DRV_CMOS is not set
-CONFIG_RTC_DRV_DS1307=y
-CONFIG_RTC_DRV_DS1672=y
# CONFIG_RTC_DRV_IMXDI is not set
# CONFIG_RTC_DRV_MXC is not set
# CONFIG_RTC_DRV_MXC_V2 is not set
CONFIG_RTC_I2C_AND_SPI=y
CONFIG_RWSEM_SPIN_ON_OWNER=y
-CONFIG_SATA_HOST=y
CONFIG_SCSI=y
-CONFIG_SENSORS_AD7418=y
CONFIG_SERIAL_8250_FSL=y
CONFIG_SERIAL_IMX=y
CONFIG_SERIAL_IMX_CONSOLE=y
# CONFIG_SOC_IMX50 is not set
# CONFIG_SOC_IMX51 is not set
# CONFIG_SOC_IMX53 is not set
-CONFIG_SOC_IMX6=y
-CONFIG_SOC_IMX6Q=y
-CONFIG_SOC_IMX6SL=y
+# CONFIG_SOC_IMX6Q is not set
+# CONFIG_SOC_IMX6SL is not set
# CONFIG_SOC_IMX6SLL is not set
-CONFIG_SOC_IMX6SX=y
+# CONFIG_SOC_IMX6SX is not set
# CONFIG_SOC_IMX6UL is not set
# CONFIG_SOC_IMX7D is not set
# CONFIG_SOC_IMX7ULP is not set
-CONFIG_AHCI_IMX=y
CONFIG_ALIGNMENT_TRAP=y
CONFIG_ARCH_32BIT_OFF_T=y
CONFIG_ARCH_CLOCKSOURCE_DATA=y
CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y
CONFIG_ARM=y
-CONFIG_ARM_CPU_SUSPEND=y
CONFIG_ARM_CRYPTO=y
CONFIG_ARM_ERRATA_754322=y
CONFIG_ARM_ERRATA_764369=y
CONFIG_ARM_ERRATA_775420=y
CONFIG_ARM_ERRATA_814220=y
-CONFIG_ARM_GIC=y
CONFIG_ARM_HAS_SG_CHAIN=y
CONFIG_ARM_HEAVY_MB=y
-CONFIG_ARM_IMX6Q_CPUFREQ=y
# CONFIG_ARM_IMX_CPUFREQ_DT is not set
CONFIG_ARM_L1_CACHE_SHIFT=6
CONFIG_ARM_L1_CACHE_SHIFT_6=y
CONFIG_ASSOCIATIVE_ARRAY=y
CONFIG_ATA=y
CONFIG_ATAGS=y
+# CONFIG_ATA_SFF is not set
CONFIG_AUTO_ZRELADDR=y
CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
CONFIG_BLK_DEV_LOOP=y
-CONFIG_BLK_MQ_PCI=y
CONFIG_BLK_PM=y
CONFIG_BLK_SCSI_REQUEST=y
CONFIG_CACHE_L2X0=y
CONFIG_CLKSRC_MMIO=y
CONFIG_CLONE_BACKWARDS=y
CONFIG_CLZ_TAB=y
-CONFIG_CMDLINE="pci=nomsi"
-CONFIG_CMDLINE_EXTEND=y
CONFIG_COMMON_CLK=y
CONFIG_COMPAT_32BIT_TIME=y
CONFIG_CPUFREQ_DT=y
CONFIG_DMA_REMAP=y
CONFIG_DMA_VIRTUAL_CHANNELS=y
CONFIG_DTC=y
-CONFIG_E1000E=y
CONFIG_EDAC_ATOMIC_SCRUB=y
CONFIG_EDAC_SUPPORT=y
CONFIG_ENCRYPTED_KEYS=y
CONFIG_EXTRA_FIRMWARE="imx/sdma/sdma-imx6q.bin"
CONFIG_EXTRA_FIRMWARE_DIR="firmware"
CONFIG_F2FS_FS=y
-CONFIG_FEC=y
+# CONFIG_FEC is not set
CONFIG_FIXED_PHY=y
CONFIG_FIX_EARLYCON_MEM=y
-CONFIG_FSL_GUTS=y
CONFIG_FS_ENCRYPTION=y
CONFIG_FS_IOMAP=y
CONFIG_FS_MBCACHE=y
CONFIG_GENERIC_EARLY_IOREMAP=y
CONFIG_GENERIC_IDLE_POLL_SETUP=y
CONFIG_GENERIC_IRQ_CHIP=y
-CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
CONFIG_GENERIC_IRQ_SHOW=y
CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
-CONFIG_GENERIC_MSI_IRQ=y
-CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
CONFIG_GENERIC_PCI_IOMAP=y
CONFIG_GENERIC_PINCONF=y
CONFIG_GENERIC_PINCTRL_GROUPS=y
# CONFIG_GIANFAR is not set
CONFIG_GLOB=y
CONFIG_GPIOLIB=y
-CONFIG_GPIOLIB_IRQCHIP=y
CONFIG_GPIO_GENERIC=y
CONFIG_GPIO_MXC=y
-CONFIG_GPIO_PCA953X=y
-CONFIG_GPIO_PCA953X_IRQ=y
CONFIG_GRO_CELLS=y
CONFIG_HANDLE_DOMAIN_IRQ=y
CONFIG_HARDEN_BRANCH_PREDICTOR=y
CONFIG_IMX_SDMA=y
CONFIG_IMX_THERMAL=y
# CONFIG_IMX_WEIM is not set
-# CONFIG_INITRAMFS_FORCE is not set
CONFIG_INITRAMFS_SOURCE=""
CONFIG_IO_URING=y
CONFIG_IRQCHIP=y
CONFIG_IRQ_DOMAIN=y
-CONFIG_IRQ_DOMAIN_HIERARCHY=y
CONFIG_IRQ_FORCED_THREADING=y
CONFIG_IRQ_WORK=y
CONFIG_JBD2=y
CONFIG_LOCK_SPIN_ON_OWNER=y
CONFIG_LZO_COMPRESS=y
CONFIG_LZO_DECOMPRESS=y
-CONFIG_MARVELL_PHY=y
CONFIG_MDIO_BUS=y
CONFIG_MDIO_DEVICE=y
CONFIG_MEMFD_CREATE=y
CONFIG_MFD_SYSCON=y
-CONFIG_MICREL_PHY=y
CONFIG_MIGHT_HAVE_CACHE_L2X0=y
CONFIG_MIGRATION=y
CONFIG_MMC=y
CONFIG_MMC_CQHCI=y
# CONFIG_MMC_MXC is not set
CONFIG_MMC_SDHCI=y
-CONFIG_MMC_SDHCI_ESDHC_IMX=y
-CONFIG_MMC_SDHCI_IO_ACCESSORS=y
-CONFIG_MMC_SDHCI_OF_ESDHC=y
-# CONFIG_MMC_SDHCI_PCI is not set
+# CONFIG_MMC_SDHCI_ESDHC_IMX is not set
CONFIG_MMC_SDHCI_PLTFM=y
CONFIG_MODULES_USE_ELF_REL=y
CONFIG_MPILIB=y
CONFIG_NEON=y
CONFIG_NET_DEVLINK=y
CONFIG_NET_DSA=y
-CONFIG_NET_DSA_MV88E6XXX=y
-CONFIG_NET_DSA_MV88E6XXX_GLOBAL2=y
CONFIG_NET_DSA_TAG_DSA=y
CONFIG_NET_DSA_TAG_EDSA=y
CONFIG_NET_FLOW_LIMIT=y
CONFIG_OUTER_CACHE_SYNC=y
CONFIG_PADATA=y
CONFIG_PAGE_OFFSET=0x80000000
-CONFIG_PCI=y
-CONFIG_PCIEAER=y
-CONFIG_PCIEPORTBUS=y
-CONFIG_PCIE_DW=y
-CONFIG_PCIE_DW_HOST=y
-CONFIG_PCIE_PME=y
-CONFIG_PCI_DOMAINS=y
-CONFIG_PCI_DOMAINS_GENERIC=y
-CONFIG_PCI_IMX6=y
-CONFIG_PCI_MSI=y
-CONFIG_PCI_MSI_IRQ_DOMAIN=y
CONFIG_PERF_USE_VMALLOC=y
CONFIG_PGTABLE_LEVELS=2
CONFIG_PHYLIB=y
CONFIG_PHYLINK=y
CONFIG_PINCTRL=y
-CONFIG_PINCTRL_IMX=y
-CONFIG_PINCTRL_IMX6Q=y
-CONFIG_PINCTRL_IMX6SL=y
-CONFIG_PINCTRL_IMX6SX=y
CONFIG_PL310_ERRATA_769419=y
CONFIG_PM=y
CONFIG_PM_CLK=y
-CONFIG_PM_GENERIC_DOMAINS=y
-CONFIG_PM_GENERIC_DOMAINS_OF=y
CONFIG_PM_OPP=y
CONFIG_PPS=y
CONFIG_PTP_1588_CLOCK=y
CONFIG_RD_XZ=y
CONFIG_REFCOUNT_FULL=y
CONFIG_REGMAP=y
-CONFIG_REGMAP_I2C=y
CONFIG_REGMAP_MMIO=y
CONFIG_REGULATOR=y
-CONFIG_REGULATOR_ANATOP=y
CONFIG_REGULATOR_FIXED_VOLTAGE=y
-CONFIG_REGULATOR_LTC3676=y
-CONFIG_REGULATOR_PFUZE100=y
CONFIG_RESET_CONTROLLER=y
CONFIG_RFS_ACCEL=y
CONFIG_RPS=y
CONFIG_RTC_CLASS=y
# CONFIG_RTC_DRV_CMOS is not set
-CONFIG_RTC_DRV_DS1307=y
-CONFIG_RTC_DRV_DS1672=y
# CONFIG_RTC_DRV_IMXDI is not set
# CONFIG_RTC_DRV_MXC is not set
# CONFIG_RTC_DRV_MXC_V2 is not set
CONFIG_RTC_I2C_AND_SPI=y
CONFIG_RWSEM_SPIN_ON_OWNER=y
CONFIG_SCSI=y
-CONFIG_SENSORS_AD7418=y
# CONFIG_SENSORS_DRIVETEMP is not set
CONFIG_SERIAL_8250_FSL=y
CONFIG_SERIAL_IMX=y
# CONFIG_SOC_IMX50 is not set
# CONFIG_SOC_IMX51 is not set
# CONFIG_SOC_IMX53 is not set
-CONFIG_SOC_IMX6=y
-CONFIG_SOC_IMX6Q=y
-CONFIG_SOC_IMX6SL=y
+# CONFIG_SOC_IMX6Q is not set
+# CONFIG_SOC_IMX6SL is not set
# CONFIG_SOC_IMX6SLL is not set
-CONFIG_SOC_IMX6SX=y
+# CONFIG_SOC_IMX6SX is not set
# CONFIG_SOC_IMX6UL is not set
# CONFIG_SOC_IMX7D is not set
# CONFIG_SOC_IMX7ULP is not set
--- /dev/null
+#
+# Copyright (C) 2013-2015 OpenWrt.org
+#
+
+. /lib/functions/uci-defaults.sh
+
+board=$(board_name)
+
+board_config_update
+
+case "$board" in
+gw,imx6dl-gw51xx |\
+gw,imx6dl-gw52xx |\
+gw,imx6dl-gw5904 |\
+gw,imx6dl-gw5907 |\
+gw,imx6dl-gw5910 |\
+gw,imx6dl-gw5912 |\
+gw,imx6dl-gw5913 |\
+gw,imx6q-gw51xx |\
+gw,imx6q-gw52xx |\
+gw,imx6q-gw5904 |\
+gw,imx6q-gw5907 |\
+gw,imx6q-gw5910 |\
+gw,imx6q-gw5912 |\
+gw,imx6q-gw5913 |\
+solidrun,cubox-i/dl |\
+solidrun,cubox-i/q )
+ ucidef_set_interface_lan 'eth0'
+ ;;
+gw,imx6dl-gw53xx |\
+gw,imx6dl-gw54xx |\
+gw,imx6dl-gw552x |\
+gw,imx6q-gw53xx |\
+gw,imx6q-gw5400-a |\
+gw,imx6q-gw54xx |\
+gw,imx6q-gw552x )
+ ucidef_set_interfaces_lan_wan 'eth0' 'eth1'
+ ;;
+wand,imx6dl-wandboard )
+ ucidef_set_interface_wan 'eth0'
+ ;;
+esac
+
+board_config_flush
+
+exit 0
--- /dev/null
+#
+# Copyright (C) 2010-2013 OpenWrt.org
+#
+
+rootpartuuid() {
+ local cmdline=$(cat /proc/cmdline)
+ local bootpart=${cmdline##*root=}
+ bootpart=${bootpart%% *}
+ local uuid=${bootpart#PARTUUID=}
+ echo ${uuid%-02}
+}
+
+bootdev_from_uuid() {
+ blkid | grep "PTUUID=\"$(rootpartuuid)\"" | cut -d : -f1
+}
+
+bootpart_from_uuid() {
+ blkid | grep $(rootpartuuid)-01 | cut -d : -f1
+}
+
+rootpart_from_uuid() {
+ blkid | grep $(rootpartuuid)-02 | cut -d : -f1
+}
+
+apalis_mount_boot() {
+ mkdir -p /boot
+ [ -f /boot/uImage ] || {
+ mount -o rw,noatime $(bootpart_from_uuid) /boot > /dev/null
+ }
+}
--- /dev/null
+. /lib/imx.sh
+. /lib/functions.sh
+. /lib/upgrade/common.sh
+
+move_config() {
+ local board=$(board_name)
+
+ case "$board" in
+ toradex,apalis_imx6q-eval |\
+ toradex,apalis_imx6q-ixora |\
+ toradex,apalis_imx6q-ixora-v1.1 )
+ if [ -b $(bootpart_from_uuid) ]; then
+ apalis_mount_boot
+ [ -f "/boot/$BACKUP_FILE" ] && mv -f "/boot/$BACKUP_FILE" /
+ umount /boot
+ fi
+ ;;
+ esac
+}
+
+boot_hook_add preinit_mount_root move_config
--- /dev/null
+#
+# Copyright (C) 2010-2015 OpenWrt.org
+#
+
+. /lib/imx.sh
+
+RAMFS_COPY_BIN='blkid jffs2reset'
+
+enable_image_metadata_check() {
+ case "$(board_name)" in
+ toradex,apalis_imx6q-eval |\
+ toradex,apalis_imx6q-ixora |\
+ toradex,apalis_imx6q-ixora-v1.1 )
+ REQUIRE_IMAGE_METADATA=1
+ ;;
+ esac
+}
+enable_image_metadata_check
+
+apalis_copy_config() {
+ apalis_mount_boot
+ cp -af "$UPGRADE_BACKUP" "/boot/$BACKUP_FILE"
+ sync
+ umount /boot
+}
+
+apalis_do_upgrade() {
+ apalis_mount_boot
+ get_image "$1" | tar Oxf - sysupgrade-apalis/kernel > /boot/uImage
+ get_image "$1" | tar Oxf - sysupgrade-apalis/root > $(rootpart_from_uuid)
+ sync
+ umount /boot
+}
+
+platform_check_image() {
+ local board=$(board_name)
+
+ case "$board" in
+ gw,imx6dl-gw51xx |\
+ gw,imx6dl-gw52xx |\
+ gw,imx6dl-gw53xx |\
+ gw,imx6dl-gw54xx |\
+ gw,imx6dl-gw551x |\
+ gw,imx6dl-gw552x |\
+ gw,imx6dl-gw553x |\
+ gw,imx6dl-gw5904 |\
+ gw,imx6dl-gw5907 |\
+ gw,imx6dl-gw5910 |\
+ gw,imx6dl-gw5912 |\
+ gw,imx6dl-gw5913 |\
+ gw,imx6q-gw51xx |\
+ gw,imx6q-gw52xx |\
+ gw,imx6q-gw53xx |\
+ gw,imx6q-gw5400-a |\
+ gw,imx6q-gw54xx |\
+ gw,imx6q-gw551x |\
+ gw,imx6q-gw552x |\
+ gw,imx6q-gw553x |\
+ gw,imx6q-gw5904 |\
+ gw,imx6q-gw5907 |\
+ gw,imx6q-gw5910 |\
+ gw,imx6q-gw5912 |\
+ gw,imx6q-gw5913 )
+ nand_do_platform_check $board $1
+ return $?;
+ ;;
+ toradex,apalis_imx6q-eval |\
+ toradex,apalis_imx6q-ixora |\
+ toradex,apalis_imx6q-ixora-v1.1 )
+ return 0
+ ;;
+ esac
+
+ echo "Sysupgrade is not yet supported on $board."
+ return 1
+}
+
+platform_do_upgrade() {
+ local board=$(board_name)
+
+ case "$board" in
+ gw,imx6dl-gw51xx |\
+ gw,imx6dl-gw52xx |\
+ gw,imx6dl-gw53xx |\
+ gw,imx6dl-gw54xx |\
+ gw,imx6dl-gw551x |\
+ gw,imx6dl-gw552x |\
+ gw,imx6dl-gw553x |\
+ gw,imx6dl-gw5904 |\
+ gw,imx6dl-gw5907 |\
+ gw,imx6dl-gw5910 |\
+ gw,imx6dl-gw5912 |\
+ gw,imx6dl-gw5913 |\
+ gw,imx6q-gw51xx |\
+ gw,imx6q-gw52xx |\
+ gw,imx6q-gw53xx |\
+ gw,imx6q-gw5400-a |\
+ gw,imx6q-gw54xx |\
+ gw,imx6q-gw551x |\
+ gw,imx6q-gw552x |\
+ gw,imx6q-gw553x |\
+ gw,imx6q-gw5904 |\
+ gw,imx6q-gw5907 |\
+ gw,imx6q-gw5910 |\
+ gw,imx6q-gw5912 |\
+ gw,imx6q-gw5913 )
+ nand_do_upgrade "$1"
+ ;;
+ toradex,apalis_imx6q-eval |\
+ toradex,apalis_imx6q-ixora |\
+ toradex,apalis_imx6q-ixora-v1.1 )
+ apalis_do_upgrade "$1"
+ ;;
+ esac
+}
+
+platform_copy_config() {
+ local board=$(board_name)
+
+ case "$board" in
+ toradex,apalis_imx6q-eval |\
+ toradex,apalis_imx6q-ixora |\
+ toradex,apalis_imx6q-ixora-v1.1 )
+ apalis_copy_config
+ ;;
+ esac
+}
+
+platform_pre_upgrade() {
+ local board=$(board_name)
+
+ case "$board" in
+ toradex,apalis_imx6q-eval |\
+ toradex,apalis_imx6q-ixora |\
+ toradex,apalis_imx6q-ixora-v1.1 )
+ [ -z "$UPGRADE_BACKUP" ] && {
+ jffs2reset -y
+ umount /overlay
+ }
+ ;;
+ esac
+}
--- /dev/null
+CONFIG_AHCI_IMX=y
+CONFIG_ARM_CPU_SUSPEND=y
+CONFIG_ARM_GIC=y
+CONFIG_ARM_IMX6Q_CPUFREQ=y
+CONFIG_ATA_SFF=y
+CONFIG_BLK_MQ_PCI=y
+CONFIG_CMDLINE="pci=nomsi"
+CONFIG_CMDLINE_EXTEND=y
+CONFIG_E1000E=y
+CONFIG_FEC=y
+CONFIG_FSL_GUTS=y
+CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
+CONFIG_GENERIC_MSI_IRQ=y
+CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
+CONFIG_GPIOLIB_IRQCHIP=y
+CONFIG_GPIO_PCA953X=y
+CONFIG_GPIO_PCA953X_IRQ=y
+# CONFIG_INITRAMFS_FORCE is not set
+CONFIG_IRQ_DOMAIN_HIERARCHY=y
+CONFIG_MARVELL_PHY=y
+CONFIG_MICREL_PHY=y
+CONFIG_MMC_SDHCI_ESDHC_IMX=y
+CONFIG_MMC_SDHCI_IO_ACCESSORS=y
+CONFIG_MMC_SDHCI_OF_ESDHC=y
+# CONFIG_MMC_SDHCI_PCI is not set
+CONFIG_NET_DSA_MV88E6XXX=y
+CONFIG_NET_DSA_MV88E6XXX_GLOBAL2=y
+CONFIG_PCI=y
+CONFIG_PCIEAER=y
+CONFIG_PCIEPORTBUS=y
+CONFIG_PCIE_DW=y
+CONFIG_PCIE_DW_HOST=y
+CONFIG_PCIE_PME=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_DOMAINS_GENERIC=y
+CONFIG_PCI_IMX6=y
+CONFIG_PCI_MSI=y
+CONFIG_PCI_MSI_IRQ_DOMAIN=y
+CONFIG_PINCTRL_IMX=y
+CONFIG_PINCTRL_IMX6Q=y
+CONFIG_PINCTRL_IMX6SL=y
+CONFIG_PINCTRL_IMX6SX=y
+CONFIG_PM_GENERIC_DOMAINS=y
+CONFIG_PM_GENERIC_DOMAINS_OF=y
+CONFIG_REGMAP_I2C=y
+CONFIG_REGULATOR_ANATOP=y
+CONFIG_REGULATOR_LTC3676=y
+CONFIG_REGULATOR_PFUZE100=y
+CONFIG_RTC_DRV_DS1307=y
+CONFIG_RTC_DRV_DS1672=y
+CONFIG_SENSORS_AD7418=y
+CONFIG_SOC_IMX6=y
+CONFIG_SOC_IMX6Q=y
+CONFIG_SOC_IMX6SL=y
+CONFIG_SOC_IMX6SX=y
--- /dev/null
+BOARDNAME:=NXP i.MX with Cortex-A9
+CPU_TYPE:=cortex-a9
+CPU_SUBTYPE:=neon
+
+define Target/Description
+ Build firmware images for NXP i.MX (Cortex-A9) based boards.
+endef
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
-#################################################
-# Images
-#################################################
-
-DEVICE_VARS += MKUBIFS_OPTS UBOOT
-
-define Build/boot-overlay
- rm -rf $@.boot
- mkdir -p $@.boot
-
- $(CP) $@ $@.boot/$(IMG_PREFIX)-uImage
- ln -sf $(IMG_PREFIX)-uImage $@.boot/uImage
-
- $(foreach dts,$(DEVICE_DTS), \
- $(CP) \
- $(DTS_DIR)/$(dts).dtb \
- $@.boot/$(IMG_PREFIX)-$(dts).dtb; \
- ln -sf \
- $(IMG_PREFIX)-$(dts).dtb \
- $@.boot/$(dts).dtb; \
- )
- mkimage -A arm -O linux -T script -C none -a 0 -e 0 \
- -n '$(DEVICE_ID) OpenWrt bootscript' \
- -d ./bootscript-$(DEVICE_NAME) \
- $@.boot/6x_bootscript-$(DEVICE_NAME)
-
- $(STAGING_DIR_HOST)/bin/mkfs.ubifs \
- --space-fixup --compr=zlib --squash-uids \
- $(MKUBIFS_OPTS) -c 16248 \
- -o $@.boot.ubifs -d $@.boot
-
- $(TAR) -C $@.boot -cf $@.boot.tar .
-endef
-
-define Build/bootfs.tar.gz
- rm -rf $@.boot
- mkdir -p $@.boot
-
- $(TAR) -C $@.boot -xf $(IMAGE_KERNEL).boot.tar
- $(TAR) -C $@.boot \
- --numeric-owner --owner=0 --group=0 --transform "s,./,./boot/," \
- -czvf $@ .
-endef
-
-define Build/recovery-scr
- mkimage -A arm -O linux -T script -C none -a 0 -e 0 \
- -n '$(DEVICE_ID) OpenWrt recovery bootscript' \
- -d ./recovery-$(DEVICE_NAME) $@
-endef
-
-define Build/imx6-combined-image-prepare
- rm -rf $@.boot
- mkdir -p $@.boot
-endef
-
-define Build/imx6-combined-image-clean
- rm -rf $@.boot $@.fs
-endef
-
-define Build/imx6-combined-image
- $(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 bootscript-$(DEVICE_NAME) \
- $@.boot/boot.scr
-
- cp $@ $@.fs
-
- $(SCRIPT_DIR)/gen_image_generic.sh $@ \
- $(CONFIG_TARGET_KERNEL_PARTSIZE) \
- $@.boot \
- $(CONFIG_TARGET_ROOTFS_PARTSIZE) \
- $@.fs \
- 1024
-endef
-
-define Build/imx6-sdcard
- $(Build/imx6-combined-image-prepare)
-
- $(CP) $(STAGING_DIR_IMAGE)/$(UBOOT)-u-boot.img $@.boot/u-boot.img
- $(Build/imx6-combined-image)
- dd if=$(STAGING_DIR_IMAGE)/$(UBOOT)-SPL of=$@ bs=1024 seek=1 conv=notrunc
-
- $(Build/imx6-combined-image-clean)
-endef
-
-define Build/apalis-emmc
- $(Build/imx6-combined-image-prepare)
- $(Build/imx6-combined-image)
- $(Build/imx6-combined-image-clean)
-endef
-
-#################################################
-# Devices
-#################################################
-
-KERNEL_LOADADDR=0x10008000
-
-define Device/Default
- PROFILES := Generic
- FILESYSTEMS := squashfs ext4
- KERNEL_INSTALL := 1
- KERNEL_SUFFIX := -uImage
- KERNEL_NAME := zImage
- KERNEL := kernel-bin | uImage none
- IMAGES :=
-endef
-
-define Device/gateworks_ventana
- DEVICE_VENDOR := Gateworks
- DEVICE_MODEL := Ventana family
- DEVICE_VARIANT := normal NAND flash
- DEVICE_NAME := ventana
- DEVICE_DTS:= \
- imx6dl-gw51xx \
- imx6dl-gw52xx \
- imx6dl-gw53xx \
- imx6dl-gw54xx \
- imx6dl-gw551x \
- imx6dl-gw552x \
- imx6dl-gw553x \
- imx6dl-gw5904 \
- imx6dl-gw5907 \
- imx6dl-gw5910 \
- imx6dl-gw5912 \
- imx6dl-gw5913 \
- imx6q-gw51xx \
- imx6q-gw52xx \
- imx6q-gw53xx \
- imx6q-gw54xx \
- imx6q-gw5400-a \
- imx6q-gw551x \
- imx6q-gw552x \
- imx6q-gw553x \
- imx6q-gw5904 \
- imx6q-gw5907 \
- imx6q-gw5910 \
- imx6q-gw5912 \
- imx6q-gw5913
- 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 kobs-ng
- KERNEL += | boot-overlay
- IMAGES := nand.ubi bootfs.tar.gz dtb
- IMAGE/nand.ubi := append-ubi
- IMAGE/bootfs.tar.gz := bootfs.tar.gz
- IMAGE/dtb := install-dtb
- UBINIZE_PARTS = boot=$$(KDIR_KERNEL_IMAGE).boot.ubifs=15
- PAGESIZE := 2048
- BLOCKSIZE := 128k
- MKUBIFS_OPTS := -m $$(PAGESIZE) -e 124KiB
-endef
-TARGET_DEVICES += gateworks_ventana
-
-define Device/gateworks_ventana-large
- $(Device/gateworks_ventana)
- DEVICE_VARIANT := large NAND flash
- IMAGES := nand.ubi
- PAGESIZE := 4096
- BLOCKSIZE := 256k
- MKUBIFS_OPTS := -m $$(PAGESIZE) -e 248KiB
-endef
-TARGET_DEVICES += gateworks_ventana-large
-
-define Device/solidrun_cubox-i
- DEVICE_VENDOR := SolidRun
- DEVICE_MODEL := CuBox-i
- DEVICE_DTS := \
- imx6q-cubox-i \
- imx6dl-cubox-i \
- imx6q-hummingboard \
- imx6dl-hummingboard
- DEVICE_PACKAGES := kmod-drm-imx kmod-drm-imx-hdmi kmod-usb-hid
- UBOOT := mx6cuboxi
- KERNEL := kernel-bin
- KERNEL_SUFFIX := -zImage
- FILESYSTEMS := squashfs
- IMAGES := combined.bin dtb
- IMAGE/combined.bin := append-rootfs | pad-extra 128k | imx6-sdcard
- IMAGE/dtb := install-dtb
-endef
-TARGET_DEVICES += solidrun_cubox-i
-
-define Device/toradex_apalis
- DEVICE_VENDOR := Toradex
- DEVICE_MODEL := Apalis family
- SUPPORTED_DEVICES := apalis,ixora apalis,eval
- DEVICE_DTS := \
- imx6q-apalis-eval \
- imx6q-apalis-ixora \
- imx6q-apalis-ixora-v1.1
- DEVICE_PACKAGES := \
- kmod-can kmod-can-flexcan kmod-can-raw \
- kmod-leds-gpio kmod-gpio-button-hotplug \
- kmod-pps-gpio kmod-rtc-ds1307
- FILESYSTEMS := squashfs
- IMAGES := combined.bin sysupgrade.bin
- DEVICE_IMG_NAME = $$(DEVICE_IMG_PREFIX)-$$(1).$$(2)
- IMAGE/combined.bin := append-rootfs | pad-extra 128k | apalis-emmc
- IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
- ARTIFACTS := recovery.scr
- ARTIFACT/recovery.scr := recovery-scr
-endef
-TARGET_DEVICES += toradex_apalis
-
-define Device/wandboard_dual
- DEVICE_VENDOR := Wandboard
- DEVICE_MODEL := Dual
- DEVICE_DTS := imx6dl-wandboard
-endef
-TARGET_DEVICES += wandboard_dual
+include $(SUBTARGET).mk
$(eval $(call BuildImage))
--- /dev/null
+DEVICE_VARS += MKUBIFS_OPTS UBOOT
+
+define Build/boot-overlay
+ rm -rf $@.boot
+ mkdir -p $@.boot
+
+ $(CP) $@ $@.boot/$(IMG_PREFIX)-uImage
+ ln -sf $(IMG_PREFIX)-uImage $@.boot/uImage
+
+ $(foreach dts,$(DEVICE_DTS), \
+ $(CP) \
+ $(DTS_DIR)/$(dts).dtb \
+ $@.boot/$(IMG_PREFIX)-$(dts).dtb; \
+ ln -sf \
+ $(IMG_PREFIX)-$(dts).dtb \
+ $@.boot/$(dts).dtb; \
+ )
+ mkimage -A arm -O linux -T script -C none -a 0 -e 0 \
+ -n '$(DEVICE_ID) OpenWrt bootscript' \
+ -d ./bootscript-$(DEVICE_NAME) \
+ $@.boot/6x_bootscript-$(DEVICE_NAME)
+
+ $(STAGING_DIR_HOST)/bin/mkfs.ubifs \
+ --space-fixup --compr=zlib --squash-uids \
+ $(MKUBIFS_OPTS) -c 16248 \
+ -o $@.boot.ubifs -d $@.boot
+
+ $(TAR) -C $@.boot -cf $@.boot.tar .
+endef
+
+define Build/bootfs.tar.gz
+ rm -rf $@.boot
+ mkdir -p $@.boot
+
+ $(TAR) -C $@.boot -xf $(IMAGE_KERNEL).boot.tar
+ $(TAR) -C $@.boot \
+ --numeric-owner --owner=0 --group=0 --transform "s,./,./boot/," \
+ -czvf $@ .
+endef
+
+define Build/recovery-scr
+ mkimage -A arm -O linux -T script -C none -a 0 -e 0 \
+ -n '$(DEVICE_ID) OpenWrt recovery bootscript' \
+ -d ./recovery-$(DEVICE_NAME) $@
+endef
+
+define Build/imx6-combined-image-prepare
+ rm -rf $@.boot
+ mkdir -p $@.boot
+endef
+
+define Build/imx6-combined-image-clean
+ rm -rf $@.boot $@.fs
+endef
+
+define Build/imx6-combined-image
+ $(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 bootscript-$(DEVICE_NAME) \
+ $@.boot/boot.scr
+
+ cp $@ $@.fs
+
+ $(SCRIPT_DIR)/gen_image_generic.sh $@ \
+ $(CONFIG_TARGET_KERNEL_PARTSIZE) \
+ $@.boot \
+ $(CONFIG_TARGET_ROOTFS_PARTSIZE) \
+ $@.fs \
+ 1024
+endef
+
+define Build/imx6-sdcard
+ $(Build/imx6-combined-image-prepare)
+
+ $(CP) $(STAGING_DIR_IMAGE)/$(UBOOT)-u-boot.img $@.boot/u-boot.img
+ $(Build/imx6-combined-image)
+ dd if=$(STAGING_DIR_IMAGE)/$(UBOOT)-SPL of=$@ bs=1024 seek=1 conv=notrunc
+
+ $(Build/imx6-combined-image-clean)
+endef
+
+define Build/apalis-emmc
+ $(Build/imx6-combined-image-prepare)
+ $(Build/imx6-combined-image)
+ $(Build/imx6-combined-image-clean)
+endef
+
+
+define Device/Default
+ PROFILES := Default
+ FILESYSTEMS := squashfs ext4
+ KERNEL_INSTALL := 1
+ KERNEL_SUFFIX := -uImage
+ KERNEL_NAME := zImage
+ KERNEL := kernel-bin | uImage none
+ KERNEL_LOADADDR := 0x10008000
+ IMAGES :=
+endef
+
+define Device/gateworks_ventana
+ DEVICE_VENDOR := Gateworks
+ DEVICE_MODEL := Ventana family
+ DEVICE_VARIANT := normal NAND flash
+ DEVICE_NAME := ventana
+ DEVICE_DTS:= \
+ imx6dl-gw51xx \
+ imx6dl-gw52xx \
+ imx6dl-gw53xx \
+ imx6dl-gw54xx \
+ imx6dl-gw551x \
+ imx6dl-gw552x \
+ imx6dl-gw553x \
+ imx6dl-gw5904 \
+ imx6dl-gw5907 \
+ imx6dl-gw5910 \
+ imx6dl-gw5912 \
+ imx6dl-gw5913 \
+ imx6q-gw51xx \
+ imx6q-gw52xx \
+ imx6q-gw53xx \
+ imx6q-gw54xx \
+ imx6q-gw5400-a \
+ imx6q-gw551x \
+ imx6q-gw552x \
+ imx6q-gw553x \
+ imx6q-gw5904 \
+ imx6q-gw5907 \
+ imx6q-gw5910 \
+ imx6q-gw5912 \
+ imx6q-gw5913
+ 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 kobs-ng
+ KERNEL += | boot-overlay
+ IMAGES := nand.ubi bootfs.tar.gz dtb
+ IMAGE/nand.ubi := append-ubi
+ IMAGE/bootfs.tar.gz := bootfs.tar.gz
+ IMAGE/dtb := install-dtb
+ UBINIZE_PARTS = boot=$$(KDIR_KERNEL_IMAGE).boot.ubifs=15
+ PAGESIZE := 2048
+ BLOCKSIZE := 128k
+ MKUBIFS_OPTS := -m $$(PAGESIZE) -e 124KiB
+endef
+TARGET_DEVICES += gateworks_ventana
+
+define Device/gateworks_ventana-large
+ $(Device/gateworks_ventana)
+ DEVICE_VARIANT := large NAND flash
+ IMAGES := nand.ubi
+ PAGESIZE := 4096
+ BLOCKSIZE := 256k
+ MKUBIFS_OPTS := -m $$(PAGESIZE) -e 248KiB
+endef
+TARGET_DEVICES += gateworks_ventana-large
+
+define Device/solidrun_cubox-i
+ DEVICE_VENDOR := SolidRun
+ DEVICE_MODEL := CuBox-i
+ DEVICE_DTS := \
+ imx6q-cubox-i \
+ imx6dl-cubox-i \
+ imx6q-hummingboard \
+ imx6dl-hummingboard
+ DEVICE_PACKAGES := kmod-drm-imx kmod-drm-imx-hdmi kmod-usb-hid
+ UBOOT := mx6cuboxi
+ KERNEL := kernel-bin
+ KERNEL_SUFFIX := -zImage
+ FILESYSTEMS := squashfs
+ IMAGES := combined.bin dtb
+ IMAGE/combined.bin := append-rootfs | pad-extra 128k | imx6-sdcard
+ IMAGE/dtb := install-dtb
+endef
+TARGET_DEVICES += solidrun_cubox-i
+
+define Device/toradex_apalis
+ DEVICE_VENDOR := Toradex
+ DEVICE_MODEL := Apalis family
+ SUPPORTED_DEVICES := apalis,ixora apalis,eval
+ DEVICE_DTS := \
+ imx6q-apalis-eval \
+ imx6q-apalis-ixora \
+ imx6q-apalis-ixora-v1.1
+ DEVICE_PACKAGES := \
+ kmod-can kmod-can-flexcan kmod-can-raw \
+ kmod-leds-gpio kmod-gpio-button-hotplug \
+ kmod-pps-gpio kmod-rtc-ds1307
+ FILESYSTEMS := squashfs
+ IMAGES := combined.bin sysupgrade.bin
+ DEVICE_IMG_NAME = $$(DEVICE_IMG_PREFIX)-$$(1).$$(2)
+ IMAGE/combined.bin := append-rootfs | pad-extra 128k | apalis-emmc
+ IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
+ ARTIFACTS := recovery.scr
+ ARTIFACT/recovery.scr := recovery-scr
+endef
+TARGET_DEVICES += toradex_apalis
+
+define Device/wandboard_dual
+ DEVICE_VENDOR := Wandboard
+ DEVICE_MODEL := Dual
+ DEVICE_DTS := imx6dl-wandboard
+endef
+TARGET_DEVICES += wandboard_dual