VIA VAB-820 board
cover VIA VAB-820 board
From: Gergely Imreh <[email protected]>
Hi,
I'd like to submit a patch to add support for an ARM dev board.
I'm technical marketing at VIA Embedded, a Taiwan based board maker, that makes a couple of ARM boards. One of them is a Freescale i.MX6Q based board VAB-820 (and its system equivalent, called AMOS-820), inspired by the SABRE Lite design.
These boards unfortunately don't come with a bootable OS image in the BSP, but with a manual explaining how to get an OS image up based on the relevant Freescale BSP. I did some development to remedy this and make it easier for the board's users to get started[0]. I was using Buildroot to make the toolchain setup easier for the kernel compilation part. Now I managed to add all the parts and sources that are needed to be able to build the whole image within Buildroot. I'm submitting this patch to release the development to the wider community.
Since this is our first contribution, would love to have any kind of feedback. Most of the changes I've based on other code that is already part of Buildroot, and kept changes to the absolute minimum.
Comments on the patch:
* the included u-boot patch is needed to have working system without any manual u-boot variable setting in the debug console (thus making the compiled image usable right out of factory)
* the gcc version in the defconfig is set to a value that is known to work (4.7), as newer versions seem to result in an uImage that kernel panics during boot
Cheers,
Greg
[0]: http://www.viaspringboard.com/blog/2014/12/31/ready-go-file-system-vab-820/
Gergely Imreh (1):
board: add support for the VIA VAB-820 board
board/via/imx6_vab820/6x_bootscript.txt | 5 ++ board/via/imx6_vab820/post-build.sh | 7 ++ board/via/imx6_vab820/readme.txt | 95 ++++++++++++++++++++++ .../imx6_vab820/uboot-0001-add-bootscript.patch | 44 ++++++++++ configs/via_imx6_vab820_defconfig | 38 +++++++++ 5 files changed, 189 insertions(+) create mode 100644 board/via/imx6_vab820/6x_bootscript.txt create mode 100755 board/via/imx6_vab820/post-build.sh create mode 100644 board/via/imx6_vab820/readme.txt create mode 100644 board/via/imx6_vab820/uboot-0001-add-bootscript.patch create mode 100644 configs/via_imx6_vab820_defconfig
Signature · 1 line
2.2.2
PATCH 1/1 board: add support for the VIA VAB-820 board
From: Gergely Imreh <[email protected]>
The VIA VAB-820 board (and the AMOS-820 system built around it) is based on Freescale i.MX6Q for embedded and industrial computing
http://www.viaembedded.com/en/products/boards/2150/1/VAB-820_(Pico-ITX).html
--- board/via/imx6_vab820/6x_bootscript.txt | 5 ++ board/via/imx6_vab820/post-build.sh | 7 ++ board/via/imx6_vab820/readme.txt | 95 ++++++++++++++++++++++ .../imx6_vab820/uboot-0001-add-bootscript.patch | 44 ++++++++++ configs/via_imx6_vab820_defconfig | 38 +++++++++ 5 files changed, 189 insertions(+) create mode 100644 board/via/imx6_vab820/6x_bootscript.txt create mode 100755 board/via/imx6_vab820/post-build.sh create mode 100644 board/via/imx6_vab820/readme.txt create mode 100644 board/via/imx6_vab820/uboot-0001-add-bootscript.patch create mode 100644 configs/via_imx6_vab820_defconfig
board/via/imx6_vab820/6x_bootscript.txt new file +5 -0
@@ -0,0 +1,5 @@ +set loadaddr 0x10800000 +set kernel uImage +set hdmi video=mxcfb0:dev=hdmi,1920x1080M at 60,bpp=32 +set bootargs console=ttymxc1,115200 console=tty1,115200 ${hdmi} root=/dev/mmcblk1p2 rootwait rw +mmc dev 0; ext2load mmc 0:1 ${loadaddr} ${kernel} && bootm ; echo "Error loading kernel image"
board/via/imx6_vab820/post-build.sh new file +7 -0
@@ -0,0 +1,7 @@ +#!/bin/sh + +TARGET_DIR=$1 +BOARD_DIR="$(dirname $0)" + +mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "boot script" \ + -d $BOARD_DIR/6x_bootscript.txt $TARGET_DIR/6x_bootscript
board/via/imx6_vab820/readme.txt new file +95 -0
95 lines not on this page · raw message
board/via/imx6_vab820/uboot-0001-add-bootscript.patch new file +44 -0
44 lines not on this page · raw message
configs/via_imx6_vab820_defconfig new file +38 -0
@@ -0,0 +1,38 @@ +# architecture +BR2_arm=y +BR2_cortex_a9=y + +# toolchain +BR2_DEPRECATED=y +BR2_KERNEL_HEADERS_3_0=y +BR2_DEFAULT_KERNEL_HEADERS="3.0.101" +BR2_GCC_VERSION_4_7_X=y + +# system +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc1" + +# kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://github.com/viaembedded/vab820-kernel-bsp.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="via_3.0.35" +BR2_LINUX_KERNEL_DEFCONFIG="imx6" +BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x10008000" +BR2_LINUX_KERNEL_UBOOT_IMAGE=y +BR2_LINUX_KERNEL_UIMAGE=y + +# bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="mx6q_sabrelite" +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://github.com/viaembedded/vab820-uboot-bsp.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="via_3.0.35" +BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR="board/via/imx6_vab820" +BR2_TARGET_UBOOT_FORMAT_BIN=y + +# rootfs +BR2_TARGET_ROOTFS_TAR=y +BR2_TARGET_ROOTFS_TAR_GZIP=y + +# post-build +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/via/imx6_vab820/post-build.sh"
Signature · 1 line
2.2.2
PATCH 1/1 board: add support for the VIA VAB-820 board
Hello,
This generally looks very good, I only have a few minor comments.
Quoted 1 line · imrehg at gmail.com
+The results of the build should be these files in the default setting:
results -> result.
Quoted 1 line
+Important: pay attention which partition you ar modifying so you don't
ar -> are.
board/via/imx6_vab820/readme.txt line 74
Quoted 2 lines
board/via/imx6_vab820/readme.txt new file +2
-0+Finally copy the root file system as well onto the mounted /dev/sdX1 +rootfs partition:
I guess you meant "mounted /dev/sdX2" here, no?
board/via/imx6_vab820/readme.txt line 82
Quoted 2 lines
board/via/imx6_vab820/readme.txt new file +2
-0+On the VAB-820 board make sure the jumper J11 (just next to the SD card +slot) is sorted betweek the two pins towards the center of the board.
"sorted betweek" ? I guess you meant "between", but even with this, I don't understand what it means.
configs/via_imx6_vab820_defconfig line 6
Quoted 12 lines
configs/via_imx6_vab820_defconfig new file +6
-0@@ -0,0 +1,38 @@ +# architecture +BR2_arm=y +BR2_cortex_a9=y + +# toolchain +BR2_DEPRECATED=y
This is not needed.
configs/via_imx6_vab820_defconfig line 8
Quoted 2 lines
configs/via_imx6_vab820_defconfig new file +2
-0+BR2_KERNEL_HEADERS_3_0=y +BR2_DEFAULT_KERNEL_HEADERS="3.0.101"
Use instead:
BR2_KERNEL_HEADERS_VERSION=y
BR2_DEFAULT_KERNEL_VERSION="3.0.101"
Quoted 17 lines
configs/via_imx6_vab820_defconfig new file +17
-0+BR2_GCC_VERSION_4_7_X=y + +# system +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc1" + +# kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://github.com/viaembedded/vab820-kernel-bsp.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="via_3.0.35" +BR2_LINUX_KERNEL_DEFCONFIG="imx6" +BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x10008000" +BR2_LINUX_KERNEL_UBOOT_IMAGE=y +BR2_LINUX_KERNEL_UIMAGE=y + +# bootloader +BR2_TARGET_UBOOT=y
configs/via_imx6_vab820_defconfig line 35
Quoted 10 lines
configs/via_imx6_vab820_defconfig new file +10
-0+BR2_TARGET_UBOOT_BOARDNAME="mx6q_sabrelite" +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://github.com/viaembedded/vab820-uboot-bsp.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="via_3.0.35" +BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR="board/via/imx6_vab820" +BR2_TARGET_UBOOT_FORMAT_BIN=y + +# rootfs +BR2_TARGET_ROOTFS_TAR=y +BR2_TARGET_ROOTFS_TAR_GZIP=y
Compressing the rootfs tarball is not necessary.
Other than that, looks good to me! Can you fix those minor issues and resend an updated patch?
Thanks a lot!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 board: add support for the VIA VAB-820 board
Hi,
Thanks a lot for the overview, really sorry about the embarrassing number of typos, I'll fix them for v2!
Quoted 15 lines · Thomas Petazzoni
configs/via_imx6_vab820_defconfig line 6
Quoted 12 lines
configs/via_imx6_vab820_defconfig new file +6
-0@@ -0,0 +1,38 @@ +# architecture +BR2_arm=y +BR2_cortex_a9=y + +# toolchain +BR2_DEPRECATED=yThis is not needed.
Quoted 7 lines
configs/via_imx6_vab820_defconfig line 8
Quoted 2 lines
configs/via_imx6_vab820_defconfig new file +2
-0+BR2_KERNEL_HEADERS_3_0=y +BR2_DEFAULT_KERNEL_HEADERS="3.0.101"Use instead:
BR2_KERNEL_HEADERS_VERSION=y
BR2_DEFAULT_KERNEL_VERSION="3.0.101"
I was trying this setting, and run into the problem that make defconfig defaults to 2.6.x headers with BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_REALLY_OLD=y and then I run into a compile time error:
if ! support/scripts/check-kernel-headers.sh/home/greg/Software/vab820-buildroot/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot
2.6; then exit 1; fi
Incorrect selection of kernel headers: expected 2.6.x, got 3.0.x
It is fixed with BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_0=y in the defconfig, but I'm not sure if that is the correct way.
Also, could I set BR2_DEFAULT_KERNEL_VERSION="3.0.35" for clarity, as that is the exact version?
So after these two issues above, now I just tested a working version with:
BR2_KERNEL_HEADERS_VERSION=y BR2_DEFAULT_KERNEL_VERSION="3.0.35" BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_0=y
What do you think?
Cheers,
Greg
cover VIA VAB-820 board
In reply to imrehg at gmail.comHello Gergely,
Quoted 4 lines · imrehg at gmail.com
I'm technical marketing at VIA Embedded, a Taiwan based board maker, that makes a couple of ARM boards. One of them is a Freescale i.MX6Q based board VAB-820 (and its system equivalent, called AMOS-820), inspired by the SABRE Lite design.
Thanks for this contribution! Nice to see the HW vendor being directly involved in contributing a defconfig for Buildroot!
I'll reply with some specific comments on the patch itself.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
cover VIA VAB-820 board
Hi Thomas,
Quoted 9 lines · Thomas Petazzoni
Hello Gergely,
Quoted 4 lines · imrehg at gmail.com
I'm technical marketing at VIA Embedded, a Taiwan based board maker, that makes a couple of ARM boards. One of them is a Freescale i.MX6Q based board VAB-820 (and its system equivalent, called AMOS-820), inspired by the SABRE Lite design.
Quoted 8 lines
Thanks for this contribution! Nice to see the HW vendor being directly involved in contributing a defconfig for Buildroot!
I'll reply with some specific comments on the patch itself.
Thanks!
Thomas
I've submitted the updated patch: https://patchwork.ozlabs.org/patch/435715/
Let me know if it needs any further tuning! :)
Cheers, (and happy new year of the Goat from here in Taiwan!)
Gergely
cover VIA VAB-820 board
Dear Gergely Imreh,
Quoted 2 lines · Gergely Imreh
I've submitted the updated patch: https://patchwork.ozlabs.org/patch/435715/
Let me know if it needs any further tuning! :)
Thanks, we'll have a look at your patch as time permits, and we'll let you know if there are some more comments.
Thanks a lot for following-up on this!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com