All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] board: resurrect support for RIoTboard
@ 2018-09-03  2:03 Nikolay Dimitrov
  2018-09-06 19:25 ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Nikolay Dimitrov @ 2018-09-03  2:03 UTC (permalink / raw)
  To: buildroot

Resurrect support for RIoTboard after 2018.02.x deprecation.

Signed-off-by: Nikolay Dimitrov <nikolay.dimitrov@retrohub.org>
---
 board/embest/riotboard/readme.txt                  | 46 ++++++++++++++++++++++
 .../rootfs_overlay/boot/extlinux/extlinux.conf     |  6 +++
 configs/riotboard_defconfig                        | 36 +++++++++++++++++
 3 files changed, 88 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

diff --git a/board/embest/riotboard/readme.txt b/board/embest/riotboard/readme.txt
new file mode 100644
index 0000000000..b7390d0d57
--- /dev/null
+++ b/board/embest/riotboard/readme.txt
@@ -0,0 +1,46 @@
+Buildroot for Embest RIoTboard
+==============================
+
+1. Compiling buildroot
+----------------------
+
+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 an example 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 output/images/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.
diff --git a/board/embest/riotboard/rootfs_overlay/boot/extlinux/extlinux.conf b/board/embest/riotboard/rootfs_overlay/boot/extlinux/extlinux.conf
new file mode 100644
index 0000000000..eee6ea4a95
--- /dev/null
+++ b/board/embest/riotboard/rootfs_overlay/boot/extlinux/extlinux.conf
@@ -0,0 +1,6 @@
+default buildroot
+
+label buildroot
+kernel /boot/uImage
+devicetree /boot/imx6dl-riotboard.dtb
+append console=ttymxc1,115200 root=/dev/mmcblk1p1 rw
diff --git a/configs/riotboard_defconfig b/configs/riotboard_defconfig
new file mode 100644
index 0000000000..45bbd2cbad
--- /dev/null
+++ b/configs/riotboard_defconfig
@@ -0,0 +1,36 @@
+# architecture
+BR2_arm=y
+BR2_cortex_a9=y
+BR2_ARM_ENABLE_NEON=y
+BR2_ARM_ENABLE_VFP=y
+BR2_ARM_FPU_VFPV3=y
+
+# system
+BR2_TARGET_GENERIC_GETTY=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttymxc1"
+
+# 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_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2018.05"
+BR2_TARGET_UBOOT_BOARDNAME="riotboard"
+BR2_TARGET_UBOOT_FORMAT_IMX=y
+
+# Linux headers same as kernel, a 4.15 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_15=y
+
+# kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.15"
+BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7"
+BR2_LINUX_KERNEL_UIMAGE=y
+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
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 1/1] board: resurrect support for RIoTboard
  2018-09-03  2:03 [Buildroot] [PATCH 1/1] board: resurrect support for RIoTboard Nikolay Dimitrov
@ 2018-09-06 19:25 ` Thomas Petazzoni
  2018-09-07  0:16   ` Nikolay Dimitrov
  2018-09-07  6:25   ` Alexander Dahl
  0 siblings, 2 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2018-09-06 19:25 UTC (permalink / raw)
  To: buildroot

Hello Nikolay,

On Mon,  3 Sep 2018 05:03:33 +0300, Nikolay Dimitrov wrote:
> Resurrect support for RIoTboard after 2018.02.x deprecation.
> 
> Signed-off-by: Nikolay Dimitrov <nikolay.dimitrov@retrohub.org>

Thanks a lot for this contribution. It looks mostly good, I just have a
few comments below.

> diff --git a/board/embest/riotboard/readme.txt b/board/embest/riotboard/readme.txt
> new file mode 100644
> index 0000000000..b7390d0d57
> --- /dev/null
> +++ b/board/embest/riotboard/readme.txt
> @@ -0,0 +1,46 @@
> +Buildroot for Embest RIoTboard
> +==============================
> +

Perhaps add a link to a web page that gives more details about this
board.

> +1. Compiling buildroot
> +----------------------
> +
> +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 an example 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 output/images/rootfs.tar -C /mnt/sdcard/
> +sudo umount /dev/sdX1

Please replace this by using genimage. For Freescale/NXP platforms,
there is even a common genimage.cfg file. See how
configs/freescale_imx6dlsabreauto_defconfig does it.

Thanks to genimage, it will directly produce a SD card image that has
the bootloader, a partition table, etc.

> diff --git a/board/embest/riotboard/rootfs_overlay/boot/extlinux/extlinux.conf b/board/embest/riotboard/rootfs_overlay/boot/extlinux/extlinux.conf
> new file mode 100644
> index 0000000000..eee6ea4a95
> --- /dev/null
> +++ b/board/embest/riotboard/rootfs_overlay/boot/extlinux/extlinux.conf
> @@ -0,0 +1,6 @@
> +default buildroot
> +
> +label buildroot
> +kernel /boot/uImage

Is there a reason to still use a uImage ?

> +devicetree /boot/imx6dl-riotboard.dtb
> +append console=ttymxc1,115200 root=/dev/mmcblk1p1 rw
> diff --git a/configs/riotboard_defconfig b/configs/riotboard_defconfig
> new file mode 100644
> index 0000000000..45bbd2cbad
> --- /dev/null
> +++ b/configs/riotboard_defconfig
> @@ -0,0 +1,36 @@
> +# architecture
> +BR2_arm=y
> +BR2_cortex_a9=y
> +BR2_ARM_ENABLE_NEON=y
> +BR2_ARM_ENABLE_VFP=y
> +BR2_ARM_FPU_VFPV3=y
> +# system
> +BR2_TARGET_GENERIC_GETTY=y
> +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc1"
> +
> +# rootfs
> +BR2_TARGET_ROOTFS_EXT2=y
> +BR2_TARGET_ROOTFS_EXT2_2r1=y

Use:

BR2_TARGET_ROOTFS_EXT2_4=y

instead

> +BR2_ROOTFS_OVERLAY="board/embest/riotboard/rootfs_overlay"
> +
> +# bootloader
> +BR2_TARGET_UBOOT=y
> +BR2_TARGET_UBOOT_CUSTOM_VERSION=y
> +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2018.05"
> +BR2_TARGET_UBOOT_BOARDNAME="riotboard"
> +BR2_TARGET_UBOOT_FORMAT_IMX=y
> +
> +# Linux headers same as kernel, a 4.15 series
> +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_15=y
> +
> +# kernel
> +BR2_LINUX_KERNEL=y
> +BR2_LINUX_KERNEL_CUSTOM_VERSION=y
> +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.15"

Why 4.15 specifically ?

> +BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7"
> +BR2_LINUX_KERNEL_UIMAGE=y
> +BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x10008000"

Same question as above, why uImage instead of zImage ?

> +BR2_LINUX_KERNEL_DTS_SUPPORT=y
> +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6dl-riotboard"
> +BR2_LINUX_KERNEL_INSTALL_TARGET=y

Could you fix those details and send an updated version ?

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 1/1] board: resurrect support for RIoTboard
  2018-09-06 19:25 ` Thomas Petazzoni
@ 2018-09-07  0:16   ` Nikolay Dimitrov
  2018-09-07  6:25   ` Alexander Dahl
  1 sibling, 0 replies; 4+ messages in thread
From: Nikolay Dimitrov @ 2018-09-07  0:16 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On 09/06/2018 10:25 PM, Thomas Petazzoni wrote:
> Hello Nikolay,
> 
> On Mon,  3 Sep 2018 05:03:33 +0300, Nikolay Dimitrov wrote:
>> Resurrect support for RIoTboard after 2018.02.x deprecation.
>>
>> Signed-off-by: Nikolay Dimitrov <nikolay.dimitrov@retrohub.org>
> 
> Thanks a lot for this contribution. It looks mostly good, I just have a
> few comments below.
> 
>> diff --git a/board/embest/riotboard/readme.txt b/board/embest/riotboard/readme.txt
>> new file mode 100644
>> index 0000000000..b7390d0d57
>> --- /dev/null
>> +++ b/board/embest/riotboard/readme.txt
>> @@ -0,0 +1,46 @@
>> +Buildroot for Embest RIoTboard
>> +==============================
>> +
> 
> Perhaps add a link to a web page that gives more details about this
> board.

OK.

>> +1. Compiling buildroot
>> +----------------------
>> +
>> +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 an example 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 output/images/rootfs.tar -C /mnt/sdcard/
>> +sudo umount /dev/sdX1
> 
> Please replace this by using genimage. For Freescale/NXP platforms,
> there is even a common genimage.cfg file. See how
> configs/freescale_imx6dlsabreauto_defconfig does it.
> 
> Thanks to genimage, it will directly produce a SD card image that has
> the bootloader, a partition table, etc.

OK, will check it out.

>> diff --git a/board/embest/riotboard/rootfs_overlay/boot/extlinux/extlinux.conf b/board/embest/riotboard/rootfs_overlay/boot/extlinux/extlinux.conf
>> new file mode 100644
>> index 0000000000..eee6ea4a95
>> --- /dev/null
>> +++ b/board/embest/riotboard/rootfs_overlay/boot/extlinux/extlinux.conf
>> @@ -0,0 +1,6 @@
>> +default buildroot
>> +
>> +label buildroot
>> +kernel /boot/uImage
> 
> Is there a reason to still use a uImage ?

Well, no specific reason, it just worked before and I don't know what
imx6 guys are using around now. If there's a better solution I can use
it.

>> +devicetree /boot/imx6dl-riotboard.dtb
>> +append console=ttymxc1,115200 root=/dev/mmcblk1p1 rw
>> diff --git a/configs/riotboard_defconfig b/configs/riotboard_defconfig
>> new file mode 100644
>> index 0000000000..45bbd2cbad
>> --- /dev/null
>> +++ b/configs/riotboard_defconfig
>> @@ -0,0 +1,36 @@
>> +# architecture
>> +BR2_arm=y
>> +BR2_cortex_a9=y
>> +BR2_ARM_ENABLE_NEON=y
>> +BR2_ARM_ENABLE_VFP=y
>> +BR2_ARM_FPU_VFPV3=y
>> +# system
>> +BR2_TARGET_GENERIC_GETTY=y
>> +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc1"
>> +
>> +# rootfs
>> +BR2_TARGET_ROOTFS_EXT2=y
>> +BR2_TARGET_ROOTFS_EXT2_2r1=y
> 
> Use:
> 
> BR2_TARGET_ROOTFS_EXT2_4=y
> 
> instead

OK.

>> +BR2_ROOTFS_OVERLAY="board/embest/riotboard/rootfs_overlay"
>> +
>> +# bootloader
>> +BR2_TARGET_UBOOT=y
>> +BR2_TARGET_UBOOT_CUSTOM_VERSION=y
>> +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2018.05"
>> +BR2_TARGET_UBOOT_BOARDNAME="riotboard"
>> +BR2_TARGET_UBOOT_FORMAT_IMX=y
>> +
>> +# Linux headers same as kernel, a 4.15 series
>> +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_15=y
>> +
>> +# kernel
>> +BR2_LINUX_KERNEL=y
>> +BR2_LINUX_KERNEL_CUSTOM_VERSION=y
>> +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.15"
> 
> Why 4.15 specifically ?

Other arm boards used it, no special reason here.

>> +BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7"
>> +BR2_LINUX_KERNEL_UIMAGE=y
>> +BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x10008000"
> 
> Same question as above, why uImage instead of zImage ?

I can switch to zImage.

>> +BR2_LINUX_KERNEL_DTS_SUPPORT=y
>> +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6dl-riotboard"
>> +BR2_LINUX_KERNEL_INSTALL_TARGET=y
> 
> Could you fix those details and send an updated version ?

Sure, will do it.

> Thanks a lot!
> 
> Thomas

Regards,
Nikolay

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 1/1] board: resurrect support for RIoTboard
  2018-09-06 19:25 ` Thomas Petazzoni
  2018-09-07  0:16   ` Nikolay Dimitrov
@ 2018-09-07  6:25   ` Alexander Dahl
  1 sibling, 0 replies; 4+ messages in thread
From: Alexander Dahl @ 2018-09-07  6:25 UTC (permalink / raw)
  To: buildroot

Hei hei,

FWIW, yesterday I used DistroKit [1] master to build a SD card image
for RIoTboard and it just worked. You might have a look at that?

On Thu, Sep 06, 2018 at 09:25:11PM +0200, Thomas Petazzoni wrote:
> Please replace this by using genimage. For Freescale/NXP platforms,
> there is even a common genimage.cfg file. See how
> configs/freescale_imx6dlsabreauto_defconfig does it.
> 
> Thanks to genimage, it will directly produce a SD card image that has
> the bootloader, a partition table, etc.

+1, ptxdist/DistroKit also uses genimage for that:

https://git.pengutronix.de/cgit/DistroKit/tree/configs/platform-v7a/config/images/riotboard.config

> Is there a reason to still use a uImage ?

I don't think so, a generic arm zImage does well.

> > +BR2_LINUX_KERNEL=y
> > +BR2_LINUX_KERNEL_CUSTOM_VERSION=y
> > +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.15"
> 
> Why 4.15 specifically ?

No need for that. The board runs a recent vanilla kernel v4.18.x.

HTH & Greets
Alex

-- 
/"\ ASCII RIBBON | ?With the first link, the chain is forged. The first
\ / CAMPAIGN     | speech censured, the first thought forbidden, the
 X  AGAINST      | first freedom denied, chains us all irrevocably.?
/ \ HTML MAIL    | (Jean-Luc Picard, quoting Judge Aaron Satie)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180907/26605cc3/attachment.asc>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-09-07  6:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-03  2:03 [Buildroot] [PATCH 1/1] board: resurrect support for RIoTboard Nikolay Dimitrov
2018-09-06 19:25 ` Thomas Petazzoni
2018-09-07  0:16   ` Nikolay Dimitrov
2018-09-07  6:25   ` Alexander Dahl

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.