diff options
authorGravatar Sergio Prado <sergio.prado@e-labworks.com>2016-06-15 09:40:59 -0300
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-06-15 23:23:41 +0200
commite7127d25c56b9af237366dac79e3b4a67b306fa4 (patch)
parent42f9d9e37b8e9195e29754e383960886a9460f58 (diff)
configs/toradex_apalis_imx6_defconfig: new board
Signed-off-by: Sergio Prado <sergio.prado@e-labworks.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
5 files changed, 118 insertions, 0 deletions
diff --git a/board/toradex/apalis-imx6/genimage.cfg b/board/toradex/apalis-imx6/genimage.cfg
new file mode 100644
index 0000000000..fe359bd93e
--- /dev/null
+++ b/board/toradex/apalis-imx6/genimage.cfg
@@ -0,0 +1,15 @@
+# Minimal SD card image for the Toradex Apalis i.MX6 COM
+# It does not need a boot section for a bootloader since it is booted
+# from its internal flash memory (eMMC).
+image sdcard.img {
+ hdimage {
+ }
+ partition rootfs {
+ partition-type = 0x83
+ image = "rootfs.ext2"
+ size = 512M
+ }
diff --git a/board/toradex/apalis-imx6/post-image.sh b/board/toradex/apalis-imx6/post-image.sh
new file mode 100755
index 0000000000..2b49f9d3d0
--- /dev/null
+++ b/board/toradex/apalis-imx6/post-image.sh
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+GENIMAGE_CFG="$(dirname $0)/genimage.cfg"
+# copy the uEnv.txt to the output/images directory
+cp board/toradex/apalis-imx6/uEnv.txt $BINARIES_DIR/uEnv.txt
+rm -rf "${GENIMAGE_TMP}"
+# generate rootfs.img
+genimage \
+ --rootpath "${TARGET_DIR}" \
+ --tmppath "${GENIMAGE_TMP}" \
+ --inputpath "${BINARIES_DIR}" \
+ --outputpath "${BINARIES_DIR}" \
+ --config "${GENIMAGE_CFG}"
+exit ${RET}
diff --git a/board/toradex/apalis-imx6/readme.txt b/board/toradex/apalis-imx6/readme.txt
new file mode 100644
index 0000000000..feddad641c
--- /dev/null
+++ b/board/toradex/apalis-imx6/readme.txt
@@ -0,0 +1,53 @@
+Toradex Apalis i.MX6 Computer on Module
+The Apalis iMX6 is a small form-factor Computer on Module that comes
+in both quad core and dual core versions based on Freescale i.MX6Q and
+Freescale i.MX6D SoCs respectively. The Cortex A9 quad core and dual
+core CPU peaks at 1 GHz for commercial temperature variant, while the
+industrial temperature variant has a peak frequency of 800 MHz.
+It supports two carrier boards:
+Apalis Evaluation Board
+Ixora Carrier Board
+How to build it
+Configure Buildroot:
+ $ make toradex_apalis_imx6_defconfig
+Compile everything and build the rootfs image:
+ $ make
+How to boot the image
+The board only boots from its internal flash memory eMMC, so the
+bootloader image should be copied to it, following the procedures
+described in Toradex website.
+Buildroot prepares a "sdcard.img" in output/images/ with the kernel
+image, device tree and a root filesystem, ready to be dumped on an SD
+ $ dd if=output/images/sdcard.img of=/dev/sdX bs=1M
+To boot from the SD card, you should change the U-Boot
+environment. Since U-Boot is running from internal eMMC, you will need
+to access its command line prompt and manually set the necessary
+variables to boot from the external SD card. For convenience, you can
+use uEnv.txt provided in output/images/ as a reference to create the
+necessary U-Boot variables to boot from the SD card.
diff --git a/board/toradex/apalis-imx6/uEnv.txt b/board/toradex/apalis-imx6/uEnv.txt
new file mode 100644
index 0000000000..96ab80cfb6
--- /dev/null
+++ b/board/toradex/apalis-imx6/uEnv.txt
@@ -0,0 +1,6 @@
+sdargs=ip=off root=/dev/mmcblk1p1 rw,noatime rootfstype=ext4 rootwait
+sddtbload=ext2load mmc 2:1 ${fdt_addr_r} boot/${fdt_file}
+sdkernelload=ext2load mmc 2:1 ${kernel_addr_r} boot/${boot_file}
+bootcmd=run setup; setenv bootargs ${defargs} ${sdargs} ${setupargs} ${vidargs}; echo Booting from SD card...; run sddtbload; run sdkernelload; bootz ${kernel_addr_r} - ${fdt_addr_r}
diff --git a/configs/toradex_apalis_imx6_defconfig b/configs/toradex_apalis_imx6_defconfig
new file mode 100644
index 0000000000..74d1fb3b9c
--- /dev/null
+++ b/configs/toradex_apalis_imx6_defconfig
@@ -0,0 +1,24 @@
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6q-apalis-eval imx6q-apalis-ixora imx6q-apalis_v1_0-eval imx6q-apalis_v1_0-ixora"