Add support for Toradex Colibri Vybrid modules
v2 cover Add support for Toradex Colibri Vybrid modules
Hello,
This is the second iteration for adding support for Toradex Colibri Vybrid modules.
Discussions on the first version of the patch are here
http://lists.busybox.net/pipermail/buildroot/2015-October/142453.html
Thanks Arnout Vandecappelle for your feedback on v1 patches.
Changes since v1:
1. Remove use of external toolchain and package selection like GDB and iproute using only minimal configuration
2. Add support for building uboot
3. Add a readme file for users
Explanations on some of the configs used:
1. Custom git repos maintained by Toradex have been used for both uboot and Linux kernel. Also just note (not sure if required) this is my personal work and not officially supported. I will take the onus of updating the config periodically with each release we do here at Toradex.
2. The BR2_LINUX_KERNEL_INSTALL_TARGET though is not considered a good idea and it is recommended to put the kernel in a seperate MTD partition or UBI volume, however currently on the Colibri Vybrid modules we have one UBI parition on which the root filesystem resides along with the kernel and device tree blobs in /boot. From uboot we then use boot from ubifs.
I have added the above since it directly gives a rootfs ubifs image which users of the Colibri Vybrid can then directly use as per how we define our update procedures at the moment. If and when we do move to use of static UBI parition for the kernel by itself, I will update this accordingly.
3. The config file keeps use of some of the default UBI options. Even though the defaults are the same as we use, I would like it to be explicit just in case if the default by any reason change in the future and this also aligns with what we use in OpenEmbedded/our scripts during the rootfs ubifs image generation.
One question, I did like a specific name for the rootfs ubifs image generated. For this I specify -o in extra options for mkfs.ubifs however this does not seem to work. During the run, from build output I see
echo " /home/sanchayan/Toradex/buildroot/output/host/usr/sbin/mkfs.ubifs -d /home/sanchayan/Toradex/buildroot/output/target -e 0x1f000 -c 8112 -m 0x800 -x lzo --space-fixup -o ubifs.img -o /home/sanchayan/Toradex/buildroot/output/images/rootfs.ubifs" >> /home/sanchayan/Toradex/buildroot/output/build/_fakeroot.fs
Is the -o option provided to be prefixed with a ${BINARIES_DIR}/?
Thanks & Regards,
Sanchayan Maity.
Sanchayan Maity (2):
configs: Add support for Toradex Colibri Vybrid Modules
board: Add a readme file for Toradex Colibri Vybrid module
board/toradex/colibri-vf/readme.txt | 23 ++++++++++++++++++++++ configs/colibri_vf_defconfig | 38 +++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 board/toradex/colibri-vf/readme.txt create mode 100644 configs/colibri_vf_defconfig
Signature · 1 line
2.6.4
PATCH v2 1/2 configs: Add support for Toradex Colibri Vybrid Modules
Add a minimal default configuration for Colibri Vybrid modules.
Tested on Colibri VF50 and VF61 modules.
--- configs/colibri_vf_defconfig | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 configs/colibri_vf_defconfig
configs/colibri_vf_defconfig new file +38 -0
@@ -0,0 +1,38 @@ +BR2_arm=y +BR2_cortex_a5=y +BR2_ARM_EABIHF=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_FPU_NEON_VFPV4=y +BR2_TARGET_GENERIC_HOSTNAME="colibri-vf" +BR2_TARGET_GENERIC_ISSUE="Colibri VF 20151211" +BR2_TARGET_GENERIC_GETTY_PORT="ttyLP0" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://git.toradex.com/linux-toradex.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="a276a526ac8e0d255f4165221c5bece5940dbc95" +BR2_LINUX_KERNEL_DEFCONFIG="colibri_vf" +BR2_LINUX_KERNEL_ZIMAGE=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="vf610-colibri-eval-v3 vf500-colibri-eval-v3" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_TARGET_ROOTFS_UBIFS=y +BR2_TARGET_ROOTFS_UBIFS_LEBSIZE=0x1f000 +BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE=0x800 +BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT=8112 +BR2_TARGET_ROOTFS_UBIFS_RT_LZO=y +BR2_TARGET_ROOTFS_UBIFS_NONE=y +BR2_TARGET_ROOTFS_UBIFS_OPTS="--space-fixup -o ubifs.img" +BR2_TARGET_ROOTFS_UBI=y +BR2_TARGET_ROOTFS_UBI_PEBSIZE=0x20000 +BR2_TARGET_ROOTFS_UBI_SUBSIZE=2048 +BR2_TARGET_ROOTFS_UBI_OPTS="" +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://git.toradex.com/u-boot-toradex.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="1bb2de8875a385dd390678e8d46d3aab5a70445d" +BR2_TARGET_UBOOT_USE_DEFCONFIG=y +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="colibri_vf" +BR2_TARGET_UBOOT_FORMAT_IMX=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-nand.imx"
Signature · 1 line
2.6.4
PATCH v2 2/2 board: Add a readme file for Toradex Colibri Vybrid module
In reply to Sanchayan MaityAdd a readme file documenting how to use the build output images using and cross referencing the update procedure as used by Toradex.
--- board/toradex/colibri-vf/readme.txt | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 board/toradex/colibri-vf/readme.txt
board/toradex/colibri-vf/readme.txt new file +23 -0
@@ -0,0 +1,23 @@ +Build instructions +------------------ + +As a regular user configure and then build: + +$ make colibri_vf_defconfig +$ make + +This configuration will use a linux kernel and uboot from the git trees +maintained by Toradex and build a minimal root file system. + +Flashing the Vybrid module +-------------------------- + +Details can be found at: +http://developer.toradex.com/knowledge-base/flashing-linux-on-vybrid-modules + +The above build configuration would result in building of rootfs.ubifs image +and u-boot-nand.imx uboot binary. Prepare the SD card as per the instructions +on the above article. Replace the ubifs.img file in SD card with rootfs.ubifs +image file, rename it to ubifs.img and replace the u-boot-nand.imx uboot binary +on the SD card with the one generated by buildroot. Then follow the updation +procedure on the above article.
Signature · 1 line
2.6.4
PATCH v2 1/2 configs: Add support for Toradex Colibri Vybrid Modules
In reply to Sanchayan MaityHello,
Thanks for this new iteration, and sorry for the very slow response. Are you still interested in getting this defconfig merged in Buildroot upstream? If so, please see my comments below.
Quoted 3 lines · Sanchayan Maity
Add a minimal default configuration for Colibri Vybrid modules.
Tested on Colibri VF50 and VF61 modules.
We need your Signed-off-by line here.
Quoted 11 lines
--- configs/colibri_vf_defconfig | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 configs/colibri_vf_defconfigconfigs/colibri_vf_defconfig new file +0
-0
configs/colibri_vf_defconfig line 5
Quoted 5 lines
configs/colibri_vf_defconfig new file +5
-0@@ -0,0 +1,38 @@ +BR2_arm=y +BR2_cortex_a5=y +BR2_ARM_EABIHF=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_FPU_NEON_VFPV4=y
Please add here:
# Linux headers same as kernel, a 4.5 series
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_5=y
Of course 4.5 should be adjusted to match the kernel version you're using. This is needed to make sure that the toolchain is built with kernel headers that are at least as old as the kernel running on the target.
Quoted 9 lines
configs/colibri_vf_defconfig new file +9
-0+BR2_TARGET_GENERIC_HOSTNAME="colibri-vf" +BR2_TARGET_GENERIC_ISSUE="Colibri VF 20151211" +BR2_TARGET_GENERIC_GETTY_PORT="ttyLP0" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://git.toradex.com/linux-toradex.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="a276a526ac8e0d255f4165221c5bece5940dbc95" +BR2_LINUX_KERNEL_DEFCONFIG="colibri_vf" +BR2_LINUX_KERNEL_ZIMAGE=y
configs/colibri_vf_defconfig line 24
Quoted 10 lines
configs/colibri_vf_defconfig new file +10
-0+BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="vf610-colibri-eval-v3 vf500-colibri-eval-v3" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_TARGET_ROOTFS_UBIFS=y +BR2_TARGET_ROOTFS_UBIFS_LEBSIZE=0x1f000 +BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE=0x800 +BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT=8112 +BR2_TARGET_ROOTFS_UBIFS_RT_LZO=y +BR2_TARGET_ROOTFS_UBIFS_NONE=y +BR2_TARGET_ROOTFS_UBIFS_OPTS="--space-fixup -o ubifs.img"
Remove the -o ubifs.img, it is anyway overridden by the ubifs.mk build logic in Buildroot. If you really want to rename the file, do so in a post-image script.
Quoted 4 lines
configs/colibri_vf_defconfig new file +4
-0+BR2_TARGET_ROOTFS_UBI=y +BR2_TARGET_ROOTFS_UBI_PEBSIZE=0x20000 +BR2_TARGET_ROOTFS_UBI_SUBSIZE=2048 +BR2_TARGET_ROOTFS_UBI_OPTS=""
configs/colibri_vf_defconfig line 38
Quoted 10 lines
configs/colibri_vf_defconfig new file +10
-0+BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://git.toradex.com/u-boot-toradex.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="1bb2de8875a385dd390678e8d46d3aab5a70445d" +BR2_TARGET_UBOOT_USE_DEFCONFIG=y +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="colibri_vf" +BR2_TARGET_UBOOT_FORMAT_IMX=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-nand.imx"
I have some more comments on the second patch, which I'll do now.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 2/2 board: Add a readme file for Toradex Colibri Vybrid module
In reply to Sanchayan MaityHello,
Quoted 2 lines · Sanchayan Maity
Add a readme file documenting how to use the build output images using and cross referencing the update procedure as used by Toradex.
This patch should be squashed/merged into your previous patch. I.e, we want a single patch adding the defconfig/readme for the Toradex Colibri Vybrid module.
We also need your Signed-off-by here.
board/toradex/colibri-vf/readme.txt
Quoted 11 lines
--- board/toradex/colibri-vf/readme.txt | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 board/toradex/colibri-vf/readme.txtboard/toradex/colibri-vf/readme.txt new file +0
-0@@ -0,0 +1,23 @@
Please add a short introduction paragraph here that indicates which HW platforms are supported, if possible with links to the official website for the platform.
Quoted 8 lines
board/toradex/colibri-vf/readme.txt new file +8
-0+Build instructions +------------------ + +As a regular user configure and then build: + +$ make colibri_vf_defconfig +$ make +
board/toradex/colibri-vf/readme.txt line 18
Quoted 10 lines
board/toradex/colibri-vf/readme.txt new file +10
-0+This configuration will use a linux kernel and uboot from the git trees +maintained by Toradex and build a minimal root file system. + +Flashing the Vybrid module +-------------------------- + +Details can be found at: +http://developer.toradex.com/knowledge-base/flashing-linux-on-vybrid-modules + +The above build configuration would result in building of rootfs.ubifs image
would result -> will result
board/toradex/colibri-vf/readme.txt
Quoted 4 lines
board/toradex/colibri-vf/readme.txt new file +4
-0+and u-boot-nand.imx uboot binary. Prepare the SD card as per the instructions +on the above article. Replace the ubifs.img file in SD card with rootfs.ubifs +image file, rename it to ubifs.img and replace the u-boot-nand.imx uboot binary +on the SD card with the one generated by buildroot.
It is really not great that you have to prepare a complete SD card with those weird instructions, and then replace some files with what Buildroot has produced. What is so special about this SD card that Buildroot cannot produce?
Quoted 1 line
Then follow the updation
updation -> update
Quoted 1 line
+procedure on the above article.
Could you fix the above issues, and send an updated version?
Thanks a lot!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 1/2 configs: Add support for Toradex Colibri Vybrid Modules
In reply to Thomas PetazzoniHello Thomas,
Quoted 5 lines · Thomas Petazzoni
Hello,
Thanks for this new iteration, and sorry for the very slow response. Are you still interested in getting this defconfig merged in Buildroot upstream? If so, please see my comments below.
Yes, I am still interested.
Quoted 27 lines · Sanchayan Maity
Quoted 3 lines
Add a minimal default configuration for Colibri Vybrid modules.
Tested on Colibri VF50 and VF61 modules.
We need your Signed-off-by line here.
Quoted 11 lines
--- configs/colibri_vf_defconfig | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 configs/colibri_vf_defconfigconfigs/colibri_vf_defconfig new file +0
-0configs/colibri_vf_defconfig line 5
Quoted 5 lines
configs/colibri_vf_defconfig new file +5
-0@@ -0,0 +1,38 @@ +BR2_arm=y +BR2_cortex_a5=y +BR2_ARM_EABIHF=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_FPU_NEON_VFPV4=yPlease add here:
Quoted 7 lines
# Linux headers same as kernel, a 4.5 series
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_5=yOf course 4.5 should be adjusted to match the kernel version you're using. This is needed to make sure that the toolchain is built with kernel headers that are at least as old as the kernel running on the target.
Ok. I have this in a new version in my local branch.
Quoted 16 lines
Quoted 16 lines
configs/colibri_vf_defconfig new file +15
-0+BR2_TARGET_GENERIC_HOSTNAME="colibri-vf" +BR2_TARGET_GENERIC_ISSUE="Colibri VF 20151211" +BR2_TARGET_GENERIC_GETTY_PORT="ttyLP0" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://git.toradex.com/linux-toradex.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="a276a526ac8e0d255f4165221c5bece5940dbc95" +BR2_LINUX_KERNEL_DEFCONFIG="colibri_vf" +BR2_LINUX_KERNEL_ZIMAGE=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="vf610-colibri-eval-v3 vf500-colibri-eval-v3" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_TARGET_ROOTFS_UBIFS=y +BR2_TARGET_ROOTFS_UBIFS_LEBSIZE=0x1f000 +BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE=0x800
Quoted 8 lines
configs/colibri_vf_defconfig line 24
Quoted 4 lines
configs/colibri_vf_defconfig new file +4
-0+BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT=8112 +BR2_TARGET_ROOTFS_UBIFS_RT_LZO=y +BR2_TARGET_ROOTFS_UBIFS_NONE=y +BR2_TARGET_ROOTFS_UBIFS_OPTS="--space-fixup -o ubifs.img"Remove the -o ubifs.img, it is anyway overridden by the ubifs.mk build logic in Buildroot. If you really want to rename the file, do so in a post-image script.
Ah I see. I was wondering why it does not work as intended. Thanks for the tip. I will look into the post-image script part.
Regards,
Sanchayan.
Quoted 25 lines
Quoted 5 lines
configs/colibri_vf_defconfig new file +4
-0+BR2_TARGET_ROOTFS_UBI=y +BR2_TARGET_ROOTFS_UBI_PEBSIZE=0x20000 +BR2_TARGET_ROOTFS_UBI_SUBSIZE=2048 +BR2_TARGET_ROOTFS_UBI_OPTS=""configs/colibri_vf_defconfig line 38
Quoted 10 lines
configs/colibri_vf_defconfig new file +10
-0+BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://git.toradex.com/u-boot-toradex.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="1bb2de8875a385dd390678e8d46d3aab5a70445d" +BR2_TARGET_UBOOT_USE_DEFCONFIG=y +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="colibri_vf" +BR2_TARGET_UBOOT_FORMAT_IMX=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-nand.imx"I have some more comments on the second patch, which I'll do now.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 2/2 board: Add a readme file for Toradex Colibri Vybrid module
In reply to Thomas PetazzoniHello Thomas,
Quoted 11 lines · Thomas Petazzoni
Hello,
Quoted 2 lines · Sanchayan Maity
Add a readme file documenting how to use the build output images using and cross referencing the update procedure as used by Toradex.
This patch should be squashed/merged into your previous patch. I.e, we want a single patch adding the defconfig/readme for the Toradex Colibri Vybrid module.
We also need your Signed-off-by here.
Will fix it.
Quoted 6 lines
Quoted 6 lines
--- board/toradex/colibri-vf/readme.txt | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 board/toradex/colibri-vf/readme.txt
Quoted 10 lines
board/toradex/colibri-vf/readme.txt
Quoted 6 lines
board/toradex/colibri-vf/readme.txt new file +0
-0@@ -0,0 +1,23 @@Please add a short introduction paragraph here that indicates which HW platforms are supported, if possible with links to the official website for the platform.
Ok.
Quoted 22 lines
Quoted 9 lines
board/toradex/colibri-vf/readme.txt new file +8
-0+Build instructions +------------------ + +As a regular user configure and then build: + +$ make colibri_vf_defconfig +$ make +board/toradex/colibri-vf/readme.txt line 18
Quoted 10 lines
board/toradex/colibri-vf/readme.txt new file +10
-0+This configuration will use a linux kernel and uboot from the git trees +maintained by Toradex and build a minimal root file system. + +Flashing the Vybrid module +-------------------------- + +Details can be found at: +http://developer.toradex.com/knowledge-base/flashing-linux-on-vybrid-modules + +The above build configuration would result in building of rootfs.ubifs imagewould result -> will result
Quoted 9 lines
board/toradex/colibri-vf/readme.txt
Quoted 4 lines
board/toradex/colibri-vf/readme.txt new file +4
-0+and u-boot-nand.imx uboot binary. Prepare the SD card as per the instructions +on the above article. Replace the ubifs.img file in SD card with rootfs.ubifs +image file, rename it to ubifs.img and replace the u-boot-nand.imx uboot binary +on the SD card with the one generated by buildroot.It is really not great that you have to prepare a complete SD card with those weird instructions, and then replace some files with what Buildroot has produced. What is so special about this SD card that Buildroot cannot produce?
Will work on including our update process within this.
Quoted 8 lines
Quoted 2 lines
Then follow the updation
updation -> update
Quoted 1 line
+procedure on the above article.
Could you fix the above issues, and send an updated version?
Yes, will try to address all the issues and send updated version.
Thanks for your feedback.
Regards,
Sanchayan.
Quoted 8 lines
Thanks a lot!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com