imx6: Add support for Toradex Apalis family of CoMs
This patch adds support for the following computer on modules (CoM) from
Toradex[A]:
Apalis iMX6 Quad 2GB IT - i.MX 6Quad 800MHz, 2GB DDR3, 4GB eMMC
-40° to +85° C Temp
Apalis iMX6 Quad 1GB - i.MX 6Quad 1GHz, 1GB DDR3, 4GB eMMC
0° to +70° C Temp
Apalis iMX6 Dual 1GB IT - i.MX 6Dual 800MHz, 1GB DDR3, 4GB eMMC
-40° to +85° C Temp
Apalis iMX6 Dual 512MB - i.MX 6Dual 1GHz, 512MB DDR3, 4GB eMMC
0° to +70° C Temp
I've developed and tested it on Quad 2GB IT v1.1A and Dual 512MB v1.1A
CoMs, using Ixora[B] carrier board v1.0A, but it should hopefuly work on
Eval[C] board as well.
A. https://www.toradex.com/computer-on-modules/apalis-arm-family/nxp-freescale-imx-6
B. https://www.toradex.com/products/carrier-board/ixora-carrier-board
C. https://www.toradex.com/products/carrier-board/apalis-evaluation-board
Flashing/recovery instructions:
1. Download and compile imx_loader for OpenWrt from
https://github.com/ynezz/imx_loader
2. Enter recovery mode as desribed in
https://developer.toradex.com/knowledge-base/imx-recovery-mode
3. Connect board via USB to the host computer, check that it's connected
by lsusb:
15a2:0054 Freescale Semiconductor, Inc. i.MX 6Dual/6Quad SystemOnChip
in RecoveryMode
4. Copy following OpenWrt images to imx_loader directory:
SPL
u-boot.img
u-boot-with-spl.imx
openwrt-imx6-apalis-recovery.scr
openwrt-imx6-apalis-squashfs.combined.bin
5. Run imx_usb in imx_loader directory
Signed-off-by: Petr Štetiar <ynezz@true.cz>
This commit is contained in:
@@ -58,6 +58,12 @@ define Build/boot-scr
|
||||
$(BIN_DIR)/boot.scr
|
||||
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
|
||||
@@ -101,6 +107,10 @@ define Build/imx6-sdcard
|
||||
$(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
|
||||
|
||||
#################################################
|
||||
@@ -190,4 +200,27 @@ define Device/cubox-i
|
||||
endef
|
||||
TARGET_DEVICES += cubox-i
|
||||
|
||||
define Device/apalis
|
||||
DEVICE_TITLE := Toradex 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
|
||||
BOOT_SCRIPT := bootscript-apalis
|
||||
UBOOT := apalis_imx6
|
||||
FILESYSTEMS := squashfs
|
||||
IMAGES := combined.bin sysupgrade.bin
|
||||
IMAGE_NAME = $$(IMAGE_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 += apalis
|
||||
|
||||
$(eval $(call BuildImage))
|
||||
|
||||
20
target/linux/imx6/image/bootscript-apalis
Normal file
20
target/linux/imx6/image/bootscript-apalis
Normal file
@@ -0,0 +1,20 @@
|
||||
echo "Toradex Apalis OpenWrt Boot script v1.0"
|
||||
|
||||
run finduuid
|
||||
|
||||
setenv nextcon 0
|
||||
setenv fdt_file imx6q-apalis-ixora.dtb
|
||||
setenv root root=PARTUUID=${uuid} rootfstype=squashfs rootwait
|
||||
setenv bootargs earlyprintk console=${console},${baudrate}n8 ${root}
|
||||
setenv fsload ext4load mmc ${mmcbootdev}:${bootpart}
|
||||
|
||||
if ${fsload} ${kernel_addr_r} ${boot_file}; then
|
||||
if ${fsload} ${fdt_addr_r} ${fdt_file}; then
|
||||
test -n "$fdt_fixup" && run fdt_fixup
|
||||
bootm ${kernel_addr_r} - ${fdt_addr_r}
|
||||
else
|
||||
echo "Error loading device-tree"
|
||||
fi
|
||||
else
|
||||
echo "Error loading kernel image"
|
||||
fi
|
||||
14
target/linux/imx6/image/recovery-apalis
Normal file
14
target/linux/imx6/image/recovery-apalis
Normal file
@@ -0,0 +1,14 @@
|
||||
# flash u-boot-with-spl.imx
|
||||
# using fixed size of 1M for U-Boot + SPL
|
||||
mmc dev 0 1
|
||||
mmc write 0x12100000 0x2 0x800
|
||||
|
||||
# flash openwrt-imx6-apalis-squashfs.combined.bin
|
||||
run set_blkcnt
|
||||
mmc dev 0 0
|
||||
mmc write 0x12500000 0 ${blkcnt}
|
||||
|
||||
env default -f -a
|
||||
saveenv
|
||||
|
||||
reset
|
||||
Reference in New Issue
Block a user