Skip to contentSkip to conversation

mx6sx: Add support for mx6sx udoo neo boards

PATCH New Fabio Estevam 3 participants 5 messages Dec 13, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mx6sx: Add support for mx6sx udoo neo boards

Add support for mx6sx udoo neo boards. For more information about these boards, please check:
http://www.udoo.org/udoo-neo

The U-Boot and kernel dts patches will be removed when we bump U-Boot to 2017.01 and kernel to 4.10 version as they have already been sent upstream.

---
 board/udoo/neo/boot.scr.txt                        |   7 +
 board/udoo/neo/genimage.cfg                        |  31 +
 .../neo/patches/linux/0001-udoo_neo_support.patch  | 560 +++++++++++++++++
 board/udoo/neo/patches/uboot/0001-udoo.patch       | 691 +++++++++++++++++++++
 board/udoo/neo/post-build.sh                       |   8 +
 board/udoo/neo/post-image.sh                       |  15 +
 board/udoo/neo/readme.txt                          |  16 +
 configs/mx6sx_udoo_neo_defconfig                   |  29 +
 8 files changed, 1357 insertions(+)
 create mode 100644 board/udoo/neo/boot.scr.txt
 create mode 100644 board/udoo/neo/genimage.cfg
 create mode 100644 board/udoo/neo/patches/linux/0001-udoo_neo_support.patch
 create mode 100644 board/udoo/neo/patches/uboot/0001-udoo.patch
 create mode 100755 board/udoo/neo/post-build.sh
 create mode 100755 board/udoo/neo/post-image.sh
 create mode 100644 board/udoo/neo/readme.txt
 create mode 100644 configs/mx6sx_udoo_neo_defconfig
board/udoo/neo/boot.scr.txt new file +7 -0
new file mode 100644
index 0000000..f647db3
@@ -0,0 +1,7 @@
+setenv finduuid "part uuid mmc 0:1 uuid"
+run finduuid
+run findfdt
+setenv bootargs "console=ttymxc0,115200 root=PARTUUID=${uuid} rootwait rootfstype=ext4"
+load mmc 0:1 ${fdt_addr} boot/${fdt_file}
+load mmc 0:1 ${loadaddr} boot/zImage
+bootz ${loadaddr} - ${fdt_addr}
board/udoo/neo/genimage.cfg new file +31 -0
new file mode 100644
index 0000000..1f7edf4
@@ -0,0 +1,31 @@
+# Minimal SD card image for the MX6SX Udoo Neo board
+#
+# The SD card must have at least 1 MB free at the beginning.
+# U-Boot and its environment are dumped as is.
+# A single root filesystem partition is required (Ext4 in this case).
+#
+# For details about the layout, see:
+# http://wiki.wandboard.org/index.php/Boot-process
+
+image sdcard.img {
+  hdimage {
+  }
+
+  partition spl {
+    in-partition-table = "no"
+    image = "SPL"
+    offset = 1K
+  }
+
+  partition u-boot {
+    in-partition-table = "no"
+    image = "u-boot.img"
+    offset = 69K
+  }
+
+  partition rootfs {
+    partition-type = 0x83
+    image = "rootfs.ext4"
+    size = 512M
+  }
+}
board/udoo/neo/patches/linux/0001-udoo_neo_support.patch new file +560 -0

560 lines not on this page · raw message

board/udoo/neo/patches/uboot/0001-udoo.patch new file +691 -0

691 lines not on this page · raw message

board/udoo/neo/post-build.sh new file +8 -0
new file mode 100755
index 0000000..07c480e
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+BOARD_DIR="$(dirname $0)"
+
+$HOST_DIR/usr/bin/mkimage -A arm -O linux -T script -C none  \
+-n "boot script" -d $BOARD_DIR/boot.scr.txt $BOARD_DIR/boot.scr
+
+install -m 0644 -D $BOARD_DIR/boot.scr $TARGET_DIR/boot/boot.scr
board/udoo/neo/post-image.sh new file +15 -0
new file mode 100755
index 0000000..18e76aa
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+
+BOARD_DIR="$(dirname $0)"
+GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg"
+GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
+
+rm -rf "${GENIMAGE_TMP}"
+
+genimage \
+  --rootpath "${TARGET_DIR}" \
+  --tmppath "${GENIMAGE_TMP}" \
+  --inputpath "${BINARIES_DIR}" \
+  --outputpath "${BINARIES_DIR}" \
+  --config "${GENIMAGE_CFG}"
+
board/udoo/neo/readme.txt new file +16 -0
new file mode 100644
index 0000000..f037ad4
@@ -0,0 +1,16 @@
+MX6X Udoo Neo board
+
+http://www.udoo.org/udoo-neo/
+
+To build a minimal support for these boards:
+
+    $ make mx6sx_udoo_neo_defconfig
+    $ make
+
+Buildroot prepares a bootable "sdcard.img" image in the output/images/
+directory, ready to be dumped on an SD card:
+
+dd if=output/images/sdcard.img of=/dev/<your-microsd-device>
+
+For details about the medium image layout, see the definition in
+board/udoo/neo/genimage.cfg.
configs/mx6sx_udoo_neo_defconfig new file +29 -0
new file mode 100644
index 0000000..cbea577
@@ -0,0 +1,29 @@
+BR2_arm=y
+BR2_cortex_a9=y
+# Linux headers same as kernel, a 4.9 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_9=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/udoo/neo/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/udoo/neo/post-image.sh"
+BR2_GLOBAL_PATCH_DIR="board/udoo/neo/patches"
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BOARDNAME="udoo_neo"
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2016.11"
+BR2_TARGET_UBOOT_FORMAT_IMG=y
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_SPL_NAME="SPL"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.9"
+BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6sx-udoo-neo-basic imx6sx-udoo-neo-full imx6sx-udoo-neo-extended"
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
+# required tools to create the SD card image
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
+BR2_PACKAGE_HOST_UBOOT_TOOLS=y
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 mx6sx: Add support for mx6sx udoo neo boards

Quoted 50 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Fabio" == Fabio Estevam <[email protected]> writes:

Add support for mx6sx udoo neo boards. For more information about these boards, please check:
http://www.udoo.org/udoo-neo

The U-Boot and kernel dts patches will be removed when we bump U-Boot to 2017.01 and kernel to 4.10 version as they have already been sent upstream.

---
 board/udoo/neo/boot.scr.txt                        |   7 +
 board/udoo/neo/genimage.cfg                        |  31 +
 .../neo/patches/linux/0001-udoo_neo_support.patch  | 560 +++++++++++++++++
 board/udoo/neo/patches/uboot/0001-udoo.patch       | 691 +++++++++++++++++++++
 board/udoo/neo/post-build.sh                       |   8 +
 board/udoo/neo/post-image.sh                       |  15 +
 board/udoo/neo/readme.txt                          |  16 +
 configs/mx6sx_udoo_neo_defconfig                   |  29 +
 8 files changed, 1357 insertions(+)
 create mode 100644 board/udoo/neo/boot.scr.txt
 create mode 100644 board/udoo/neo/genimage.cfg
 create mode 100644 board/udoo/neo/patches/linux/0001-udoo_neo_support.patch
 create mode 100644 board/udoo/neo/patches/uboot/0001-udoo.patch
 create mode 100755 board/udoo/neo/post-build.sh
 create mode 100755 board/udoo/neo/post-image.sh
 create mode 100644 board/udoo/neo/readme.txt
 create mode 100644 configs/mx6sx_udoo_neo_defconfig
board/udoo/neo/boot.scr.txt new file +7 -0
new file mode 100644
index 0000000..f647db3
@@ -0,0 +1,7 @@
+setenv finduuid "part uuid mmc 0:1 uuid"
+run finduuid
+run findfdt
+setenv bootargs "console=ttymxc0,115200 root=PARTUUID=${uuid} rootwait rootfstype=ext4"
+load mmc 0:1 ${fdt_addr} boot/${fdt_file}
+load mmc 0:1 ${loadaddr} boot/zImage
+bootz ${loadaddr} - ${fdt_addr}
configs/mx6sx_udoo_neo_defconfig new file +0 -0
new file mode 100644
index 0000000..cbea577

configs/mx6sx_udoo_neo_defconfig line 5

Quoted 5 lines
configs/mx6sx_udoo_neo_defconfig new file +5 -0
@@ -0,0 +1,29 @@
+BR2_arm=y
+BR2_cortex_a9=y
+# Linux headers same as kernel, a 4.9 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_9=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0"

As you already pass console=ttymxc0 then I believe the default (/dev/console) should work as well.

Committed, thanks. Will you send a patch to move the existing board/udoo/* files to E.G. board/udoo/mx6 for consistency?

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

PATCH 1/1 mx6sx: Add support for mx6sx udoo neo boards

Quoted 2 lines · Peter Korsgaard

As you already pass console=ttymxc0 then I believe the default (/dev/console) should work as well.

I will give it a try tomorrow, thanks for the hint.

Quoted 2 lines

Committed, thanks. Will you send a patch to move the existing board/udoo/* files to E.G. board/udoo/mx6 for consistency?

Good point. Will do as suggested, thanks.

#3 lore raw

PATCH 1/1 mx6sx: Add support for mx6sx udoo neo boards

In reply to Fabio Estevam
Quoted 12 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Fabio" == Fabio Estevam <[email protected]> writes:

Add support for mx6sx udoo neo boards. For more information about these boards, please check:
http://www.udoo.org/udoo-neo

The U-Boot and kernel dts patches will be removed when we bump U-Boot to 2017.01 and kernel to 4.10 version as they have already been sent upstream.

+++ b/configs/mx6sx_udoo_neo_defconfig

configs/mx6sx_udoo_neo_defconfig line 2

Quoted 2 lines
configs/mx6sx_udoo_neo_defconfig new file +2 -0
@@ -0,0 +1,29 @@
+BR2_arm=y
+BR2_cortex_a9=y

One more comment, doesn't the A9 in the mx6sx have a VFP and NEON support? If so, please enable them like we do for
E.G. nitrogen6x_defconfig.

Signature · 1 line
Bye, Peter Korsgaard
#4 lore raw

PATCH 1/1 mx6sx: Add support for mx6sx udoo neo boards

Quoted 3 lines · Peter Korsgaard

One more comment, doesn't the A9 in the mx6sx have a VFP and NEON support? If so, please enable them like we do for
E.G. nitrogen6x_defconfig.

Yes, let me do this for all the imx6 boards, thanks.