Skip to contentSkip to conversation

board: add support for RIoTboard

PATCH Superseded Nikolay Dimitrov 2 participants 3 messages Mar 5, 2015 – Mar 6, 2015

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 board: add support for RIoTboard

This is a small development board, based on Freescale IMX6 Solo SoC (single core ARM Cortex-A9). The board has excellent support in mainline U-Boot and Linux.

---
Changed v2 -> v3:
- uImage, dtb and extlinux.conf are now automatically copied to /boot during build
- updated instructions in readme.txt

Changes v1 -> v2:
- added support for extlinux, as required by U-Boot 2015.01
- fixed some typos

 board/embest/riotboard/readme.txt                  |   44 ++++++++++++++++++++
 .../rootfs_overlay/boot/extlinux/extlinux.conf     |    6 +++
 configs/riotboard_defconfig                        |   32 ++++++++++++++
 3 files changed, 82 insertions(+)
 create mode 100644 board/embest/riotboard/readme.txt
 create mode 100644 board/embest/riotboard/rootfs_overlay/boot/extlinux/extlinux.conf
 create mode 100644 configs/riotboard_defconfig
board/embest/riotboard/readme.txt new file +44 -0
new file mode 100644
index 0000000..8ba328e
@@ -0,0 +1,44 @@
+Buildroot for Embest RIoTboard
+==============================
+
+1. Compiling buildroot
+----------------------
+make distclean
+make riotboard_defconfig
+make
+
+2. Installing buildroot
+-----------------------
+Prepare an SD-card and plug it into your card reader. Write the bootloader to
+your SD-card:
+
+sudo dd if=output/images/u-boot.imx of=/dev/sdX bs=1k seek=1
+
+Create 1 partition on the SD-card using your favourite tool. The partition
+should be big enough to hold your rootfs, for example 128MiB. Here's how an
+example of such partition layout:
+
+   Device Boot      Start         End      Blocks   Id  System
+/dev/sdX1            2048      264191      131072   83  Linux
+
+Format the SD-card partition with your favourite filesystem:
+
+sudo mkfs.ext2 /dev/sdX1
+
+Deploy your rootfs to the SD-card:
+
+sudo mkdir /mnt/sdcard/
+sudo mount /dev/sdX1 /mnt/sdcard/
+sudo tar xf rootfs.tar -C /mnt/sdcard/
+sudo umount /dev/sdX1
+
+3. Running buildroot
+--------------------
+Position the board so you can read the label "RIoTboard" on the right side of
+SW1 DIP switches. Configure the SW1 swiches like this:
+
+10100101 (1 means ON position, 0 means OFF position)
+
+Now plug your prepared SD-card in slot J6. Connect a serial console (115200, 8,
+N, 1) to header J18. Connect a 5V/1A power supply to the board and enjoy your
+new toy.
board/embest/riotboard/rootfs_overlay/boot/extlinux/extlinux.conf new file +6 -0
new file mode 100644
index 0000000..c7d32e0
@@ -0,0 +1,6 @@
+default buildroot
+
+label buildroot
+kernel /boot/uImage
+devicetree /boot/imx6dl-riotboard.dtb
+append console=ttymxc1,115200 root=/dev/mmcblk0p1 rw
configs/riotboard_defconfig new file +32 -0
new file mode 100644
index 0000000..d5b50e9
@@ -0,0 +1,32 @@
+# architecture
+BR2_arm=y
+BR2_cortex_a9=y
+
+# system
+BR2_TARGET_GENERIC_GETTY=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttymxc1"
+
+# toolchain
+BR2_TOOLCHAIN_BUILDROOT_LARGEFILE=y
+
+# rootfs
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_2r1=y
+BR2_ROOTFS_OVERLAY="board/embest/riotboard/rootfs_overlay"
+
+# bootloader
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_VERSION="2015.01"
+BR2_TARGET_UBOOT_BOARDNAME="riotboard"
+BR2_TARGET_UBOOT_FORMAT_IMX=y
+
+# kernel headers
+BR2_KERNEL_HEADERS_3_18=y
+
+# kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7"
+BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x10008000"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6dl-riotboard"
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH v3 1/1 board: add support for RIoTboard

Dear Nikolay Dimitrov,

Quoted 5 lines · Nikolay Dimitrov

This is a small development board, based on Freescale IMX6 Solo SoC (single core ARM Cortex-A9). The board has excellent support in mainline U-Boot and Linux.

This looks much simpler and nicer! Some remaining comments I forgot to make on earlier versions.

Quoted 2 lines

+1. Compiling buildroot
+----------------------

An empty line between the title and the contents of the section would be nice.

Quoted 1 line

+make distclean

We generally don't indicate to use 'make distclean' in the other instructions related to board specific details.

board/embest/riotboard/readme.txt line 11

Quoted 5 lines
board/embest/riotboard/readme.txt new file +5 -0
+make riotboard_defconfig
+make
+
+2. Installing buildroot
+-----------------------

Same: an empty new line here.

Quoted 15 lines
board/embest/riotboard/readme.txt new file +15 -0
+Prepare an SD-card and plug it into your card reader. Write the bootloader to
+your SD-card:
+
+sudo dd if=output/images/u-boot.imx of=/dev/sdX bs=1k seek=1
+
+Create 1 partition on the SD-card using your favourite tool. The partition
+should be big enough to hold your rootfs, for example 128MiB. Here's how an
+example of such partition layout:
+
+   Device Boot      Start         End      Blocks   Id  System
+/dev/sdX1            2048      264191      131072   83  Linux
+
+Format the SD-card partition with your favourite filesystem:
+
+sudo mkfs.ext2 /dev/sdX1

board/embest/riotboard/readme.txt line 36

Quoted 10 lines
board/embest/riotboard/readme.txt new file +10 -0
+
+Deploy your rootfs to the SD-card:
+
+sudo mkdir /mnt/sdcard/
+sudo mount /dev/sdX1 /mnt/sdcard/
+sudo tar xf rootfs.tar -C /mnt/sdcard/
+sudo umount /dev/sdX1
+
+3. Running buildroot
+--------------------

Same.

configs/riotboard_defconfig line 3

Quoted 9 lines
configs/riotboard_defconfig new file +3 -0
new file mode 100644
index 0000000..d5b50e9
@@ -0,0 +1,32 @@
+# architecture
+BR2_arm=y
+BR2_cortex_a9=y

I believe you should try to enable BR2_ARM_EABIHF=y. It should really be the default for ARMv7 platforms nowadays, unless you have old non-EABIhf pre-built binaries.

configs/riotboard_defconfig line 10

Quoted 6 lines
configs/riotboard_defconfig new file +6 -0
+# system
+BR2_TARGET_GENERIC_GETTY=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttymxc1"
+
+# toolchain
+BR2_TOOLCHAIN_BUILDROOT_LARGEFILE=y

No, please don't include largefile support by default. We try to keep the defconfigs minimal.

configs/riotboard_defconfig line 24

Quoted 13 lines
configs/riotboard_defconfig new file +13 -0
+# rootfs
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_2r1=y
+BR2_ROOTFS_OVERLAY="board/embest/riotboard/rootfs_overlay"
+
+# bootloader
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_VERSION="2015.01"
+BR2_TARGET_UBOOT_BOARDNAME="riotboard"
+BR2_TARGET_UBOOT_FORMAT_IMX=y
+
+# kernel headers
+BR2_KERNEL_HEADERS_3_18=y

For the kernel headers, please use:

BR2_KERNEL_HEADERS_VERSION=y
BR2_DEFAULT_KERNEL_VERSION="3.18"
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y

That's because the BR2_KERNEL_HEADERS_3_18 option may become deprecated/removed in the future.

configs/riotboard_defconfig line 27

Quoted 2 lines
configs/riotboard_defconfig new file +2 -0
+# kernel
+BR2_LINUX_KERNEL=y

Please specify:

BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18"

Even if the current default version is fine for you, this default version will change over time, and we want to be sure to rebuild the same kernel version.

configs/riotboard_defconfig line 32

Quoted 5 lines
configs/riotboard_defconfig new file +5 -0
+BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7"
+BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x10008000"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6dl-riotboard"
+BR2_LINUX_KERNEL_INSTALL_TARGET=y

Thanks a lot!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH v3 1/1 board: add support for RIoTboard

Hi Thomas,

Quoted 9 lines · Thomas Petazzoni

Dear Nikolay Dimitrov,

Quoted 5 lines · Nikolay Dimitrov

This is a small development board, based on Freescale IMX6 Solo SoC (single core ARM Cortex-A9). The board has excellent support in mainline U-Boot and Linux.

Quoted 8 lines

This looks much simpler and nicer! Some remaining comments I forgot to make on earlier versions.

Quoted 2 lines

+1. Compiling buildroot
+----------------------

An empty line between the title and the contents of the section would be nice.

Fixed.

Quoted 4 lines
Quoted 1 line

+make distclean

We generally don't indicate to use 'make distclean' in the other instructions related to board specific details.

Fixed.

Quoted 7 lines

board/embest/riotboard/readme.txt line 11

Quoted 5 lines
board/embest/riotboard/readme.txt new file +5 -0
+make riotboard_defconfig
+make
+
+2. Installing buildroot
+-----------------------

Same: an empty new line here.

Fixed.

Quoted 19 lines
Quoted 19 lines
board/embest/riotboard/readme.txt new file +19 -0
+Prepare an SD-card and plug it into your card reader. Write the bootloader to
+your SD-card:
+
+sudo dd if=output/images/u-boot.imx of=/dev/sdX bs=1k seek=1
+
+Create 1 partition on the SD-card using your favourite tool. The partition
+should be big enough to hold your rootfs, for example 128MiB. Here's how an
+example of such partition layout:
+
+   Device Boot      Start         End      Blocks   Id  System
+/dev/sdX1            2048      264191      131072   83  Linux
+
+Format the SD-card partition with your favourite filesystem:
+
+sudo mkfs.ext2 /dev/sdX1
+
+Deploy your rootfs to the SD-card:
+
+sudo mkdir /mnt/sdcard/
Quoted 8 lines

board/embest/riotboard/readme.txt line 36

Quoted 6 lines
board/embest/riotboard/readme.txt new file +6 -0
+sudo mount /dev/sdX1 /mnt/sdcard/
+sudo tar xf rootfs.tar -C /mnt/sdcard/
+sudo umount /dev/sdX1
+
+3. Running buildroot
+--------------------

Same.

Fixed.

Quoted 5 lines
Quoted 5 lines
configs/riotboard_defconfig new file +0 -0
new file mode 100644
index 0000000..d5b50e9
Quoted 8 lines

configs/riotboard_defconfig line 3

Quoted 4 lines
configs/riotboard_defconfig new file +3 -0
@@ -0,0 +1,32 @@
+# architecture
+BR2_arm=y
+BR2_cortex_a9=y

I believe you should try to enable BR2_ARM_EABIHF=y. It should really be the default for ARMv7 platforms nowadays, unless you have old non-EABIhf pre-built binaries.

Fixed.

Quoted 9 lines

configs/riotboard_defconfig line 10

Quoted 6 lines
configs/riotboard_defconfig new file +6 -0
+# system
+BR2_TARGET_GENERIC_GETTY=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttymxc1"
+
+# toolchain
+BR2_TOOLCHAIN_BUILDROOT_LARGEFILE=y

No, please don't include largefile support by default. We try to keep the defconfigs minimal.

Fixed.

Quoted 16 lines

configs/riotboard_defconfig line 24

Quoted 13 lines
configs/riotboard_defconfig new file +13 -0
+# rootfs
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_2r1=y
+BR2_ROOTFS_OVERLAY="board/embest/riotboard/rootfs_overlay"
+
+# bootloader
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_VERSION="2015.01"
+BR2_TARGET_UBOOT_BOARDNAME="riotboard"
+BR2_TARGET_UBOOT_FORMAT_IMX=y
+
+# kernel headers
+BR2_KERNEL_HEADERS_3_18=y

For the kernel headers, please use:

Quoted 6 lines

BR2_KERNEL_HEADERS_VERSION=y
BR2_DEFAULT_KERNEL_VERSION="3.18"
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y

That's because the BR2_KERNEL_HEADERS_3_18 option may become deprecated/removed in the future.

Fixed.

Quoted 11 lines

configs/riotboard_defconfig line 27

Quoted 2 lines
configs/riotboard_defconfig new file +2 -0
+# kernel
+BR2_LINUX_KERNEL=y

Please specify:

BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18"

Even if the current default version is fine for you, this default version will change over time, and we want to be sure to rebuild the same kernel version.

Fixed.

v4 is on the way.

Regards.
Nikolay