All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot]  [PATCH 0/1] [RFC] Add support for espressobin
@ 2017-09-24 22:05 Maxime Chevallier
  2017-09-24 22:05 ` [Buildroot] [PATCH 1/1] [RFC] mvebu_espressobin-88f3720 : " Maxime Chevallier
  2017-09-26 17:15 ` [Buildroot] [PATCH v2 1/1] board: Add support for espressobin 88f3720 Maxime Chevallier
  0 siblings, 2 replies; 7+ messages in thread
From: Maxime Chevallier @ 2017-09-24 22:05 UTC (permalink / raw)
  To: buildroot

Hi everyone,

The following patch adds basic support for the Globalscale
Espressobin board, based on Marvell Armada 3720.

This is all based on mainline linux and toolchains, and does
not includes bootloader generation for the moment.

Lots of things can be added to generate more complete images,
with full hardware support. That would require either using a
custom device-tree, or a more featured in-tree one when it is
available on linux mainline.

Please do not hesitate to comment on this patch, especially on
the naming of the different files.

I added myself in the DEVELOPERS file, I'm not quite sure this
if this is a correct thing to do.

Maxime

Maxime Chevallier (1):
  mvebu_espressobin-88f3720 : Add support for espressobin

 DEVELOPERS                                  |  4 ++
 board/globalscale/espressobin/genimage.cfg  | 11 +++++
 board/globalscale/espressobin/readme.txt    | 76 +++++++++++++++++++++++++++++
 configs/mvebu_espressobin-88f3720_defconfig | 29 +++++++++++
 4 files changed, 120 insertions(+)
 create mode 100644 board/globalscale/espressobin/genimage.cfg
 create mode 100644 board/globalscale/espressobin/readme.txt
 create mode 100644 configs/mvebu_espressobin-88f3720_defconfig

-- 
2.7.4

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

* [Buildroot] [PATCH 1/1] [RFC] mvebu_espressobin-88f3720 : Add support for espressobin
  2017-09-24 22:05 [Buildroot] [PATCH 0/1] [RFC] Add support for espressobin Maxime Chevallier
@ 2017-09-24 22:05 ` Maxime Chevallier
  2017-09-25 21:02   ` Romain Naour
  2017-09-26 17:15 ` [Buildroot] [PATCH v2 1/1] board: Add support for espressobin 88f3720 Maxime Chevallier
  1 sibling, 1 reply; 7+ messages in thread
From: Maxime Chevallier @ 2017-09-24 22:05 UTC (permalink / raw)
  To: buildroot

Add support for the Globalscale 'Espressobin' board based
on Marvell Armada 3720.

This board has a dual Cortex-A53, 1GB DDR3, USBs, ethernets,
and some GPIO ports. More informations on the vendor site :
http://espressobin.net/tech-spec/

This config uses the mainline linux support for the board and
the buildroot toolchain using glibc, since uclibc does not
support aarch64.

Mainline device-tree does not include SDCard support yet, so USB
is the preferred way to boot the image, using the default pre-flashed
u-boot on SPI NOR.

Signed-off-by: Maxime Chevallier <chevalliersebmax@gmail.com>
---
 DEVELOPERS                                  |  4 ++
 board/globalscale/espressobin/genimage.cfg  | 11 +++++
 board/globalscale/espressobin/readme.txt    | 76 +++++++++++++++++++++++++++++
 configs/mvebu_espressobin-88f3720_defconfig | 29 +++++++++++
 4 files changed, 120 insertions(+)
 create mode 100644 board/globalscale/espressobin/genimage.cfg
 create mode 100644 board/globalscale/espressobin/readme.txt
 create mode 100644 configs/mvebu_espressobin-88f3720_defconfig

diff --git a/DEVELOPERS b/DEVELOPERS
index e34802f..5036ac2 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1208,6 +1208,10 @@ F:	package/python-wsaccel/
 N:	Max Filippov <jcmvbkbc@gmail.com>
 F:	arch/Config.in.xtensa
 
+N:	Maxime Chevallier <chevalliersebmax@gmail.com>
+F:	configs/mvebu_espressobin-88f3720_defconfig
+F:	board/globalscale/espressobin/
+
 N:	Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
 F:	package/babeld/
 F:	package/dante/
diff --git a/board/globalscale/espressobin/genimage.cfg b/board/globalscale/espressobin/genimage.cfg
new file mode 100644
index 0000000..664f81b
--- /dev/null
+++ b/board/globalscale/espressobin/genimage.cfg
@@ -0,0 +1,11 @@
+# Minimal image
+
+image sdcard.img {
+  hdimage {
+  }
+
+  partition rootfs {
+    partition-type = 0x83
+    image = "rootfs.ext4"
+  }
+}
diff --git a/board/globalscale/espressobin/readme.txt b/board/globalscale/espressobin/readme.txt
new file mode 100644
index 0000000..fc9140e
--- /dev/null
+++ b/board/globalscale/espressobin/readme.txt
@@ -0,0 +1,76 @@
+Espressobin
+===========
+
+This is the basic support for the Espressobin by globalscale technologies,
+based on the Marvell Armada 3720.
+
+This support is based on the mainline linux kernel.
+
+
+How to build
+============
+
+1 - Use default configuration for espressobin :
+
+make mvebu_espressobin-88f3720_defconfig
+
+2 - Build the system
+
+make
+
+This generates the kernel image, the devicetree binary, the rootfs as a
+tar.gz, and a filesystem image containing everything : sdcard.img (this name
+is misleading though, see Limitations).
+
+Build artifacts are located in output/images.
+
+How to boot
+===========
+
+To boot, you need an UART connection, using the on-board micro-usb port
+at 115200 bauds.
+
+NOTE : As of today, booting from SDCard is not fully supported (rootfs cannot
+be located on SCard).
+
+## From USB Stick ############################################################
+
+As of right now, this is the easiest way to boot the system, since the SDCard
+support is not fully mainlined. It uses the pre-flashed u-boot on the SPI NOR
+to load the kernel, device-tree and rootfs from a USB stick.
+
+The on-board jumpers must be configured to select the SPI NOR as a boot source.
+
+1 - Flash rootfs image on usb drive (Be careful to select the correct drive)
+
+sudo dd if=sdcard.img of=/dev/sdX bs=1M
+sync
+
+2 - Boot from SPI NOR, interrupt boot by pressing Enter
+
+3 - Setup the bootusb u-boot script :
+
+setenv fdt_addr 0x1800000
+setenv fdt_name boot/armada-3720-espressobin.dtb
+setenv bootusb 'usb start; ext4load usb 0:1 $kernel_addr $image_name; ext4load usb 0:1 $fdt_addr $fdt_name; setenv bootargs $console root=/dev/sda1 rw rootwait; booti $kernel_addr - $fdt_addr'
+run bootusb
+
+Limitations
+===========
+
+Since the buildroot support for the espressobin is based on mainline
+linux, especially regarding device-tree, the current functionnalities
+for espressobin are limited.
+
+Namely, the mainline device-tree does not include support for sdcards yet, which
+means the kernel is not able to load a rootfs located on a SDCard.
+
+Todo
+====
+
+- Add bootloader generation
+
+- Use a custom devicetree to have SDcard support (or wait for support in mainline linux tree)
+
+- When SDcard support is working, add generation of sdcard image including bootloader, and
+  document the on-board jumper configuration needed for sdcard boot.
diff --git a/configs/mvebu_espressobin-88f3720_defconfig b/configs/mvebu_espressobin-88f3720_defconfig
new file mode 100644
index 0000000..394c881
--- /dev/null
+++ b/configs/mvebu_espressobin-88f3720_defconfig
@@ -0,0 +1,29 @@
+# Architecture
+BR2_aarch64=y
+BR2_cortex_a53=y
+
+# Linux headers same as kernel, a 4.13 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_13=y
+
+# Filesystem
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_GEN=4
+BR2_TARGET_ROOTFS_TAR_GZIP=y
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.13"
+BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="marvell/armada-3720-espressobin"
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
+
+# uClibc does not support aarch64 yet.
+BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
+
+# Image generation
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/globalscale/espressobin/genimage.cfg"
-- 
2.7.4

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

* [Buildroot] [PATCH 1/1] [RFC] mvebu_espressobin-88f3720 : Add support for espressobin
  2017-09-24 22:05 ` [Buildroot] [PATCH 1/1] [RFC] mvebu_espressobin-88f3720 : " Maxime Chevallier
@ 2017-09-25 21:02   ` Romain Naour
  2017-09-25 21:41     ` Arnout Vandecappelle
  0 siblings, 1 reply; 7+ messages in thread
From: Romain Naour @ 2017-09-25 21:02 UTC (permalink / raw)
  To: buildroot

Hi Maxime,

Le 25/09/2017 ? 00:05, Maxime Chevallier a ?crit?:
> Add support for the Globalscale 'Espressobin' board based
> on Marvell Armada 3720.
> 
> This board has a dual Cortex-A53, 1GB DDR3, USBs, ethernets,
> and some GPIO ports. More informations on the vendor site :
> http://espressobin.net/tech-spec/
> 
> This config uses the mainline linux support for the board and
> the buildroot toolchain using glibc, since uclibc does not
> support aarch64.
> 
> Mainline device-tree does not include SDCard support yet, so USB
> is the preferred way to boot the image, using the default pre-flashed
> u-boot on SPI NOR.

Usually we use configs or board in the commit title.

"board: Add support for espressobin 88f3720" should be enough.

Otherwise, looks good for me as is.

Linux 4.14-rc2 is out, do you know if the SDCard support has been added in this
release?

Maybe you can also add a new entry in .gitlab-ci.yml file for CI testing in gitlab.
(see .gitlab-ci.yml.in to regenerate this file). But this can be done in a
follow up patch.

Best regards,
Romain

> 
> Signed-off-by: Maxime Chevallier <chevalliersebmax@gmail.com>
> ---
>  DEVELOPERS                                  |  4 ++
>  board/globalscale/espressobin/genimage.cfg  | 11 +++++
>  board/globalscale/espressobin/readme.txt    | 76 +++++++++++++++++++++++++++++
>  configs/mvebu_espressobin-88f3720_defconfig | 29 +++++++++++
>  4 files changed, 120 insertions(+)
>  create mode 100644 board/globalscale/espressobin/genimage.cfg
>  create mode 100644 board/globalscale/espressobin/readme.txt
>  create mode 100644 configs/mvebu_espressobin-88f3720_defconfig
> 
> diff --git a/DEVELOPERS b/DEVELOPERS
> index e34802f..5036ac2 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -1208,6 +1208,10 @@ F:	package/python-wsaccel/
>  N:	Max Filippov <jcmvbkbc@gmail.com>
>  F:	arch/Config.in.xtensa
>  
> +N:	Maxime Chevallier <chevalliersebmax@gmail.com>
> +F:	configs/mvebu_espressobin-88f3720_defconfig
> +F:	board/globalscale/espressobin/
> +
>  N:	Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
>  F:	package/babeld/
>  F:	package/dante/
> diff --git a/board/globalscale/espressobin/genimage.cfg b/board/globalscale/espressobin/genimage.cfg
> new file mode 100644
> index 0000000..664f81b
> --- /dev/null
> +++ b/board/globalscale/espressobin/genimage.cfg
> @@ -0,0 +1,11 @@
> +# Minimal image
> +
> +image sdcard.img {
> +  hdimage {
> +  }
> +
> +  partition rootfs {
> +    partition-type = 0x83
> +    image = "rootfs.ext4"
> +  }
> +}
> diff --git a/board/globalscale/espressobin/readme.txt b/board/globalscale/espressobin/readme.txt
> new file mode 100644
> index 0000000..fc9140e
> --- /dev/null
> +++ b/board/globalscale/espressobin/readme.txt
> @@ -0,0 +1,76 @@
> +Espressobin
> +===========
> +
> +This is the basic support for the Espressobin by globalscale technologies,
> +based on the Marvell Armada 3720.
> +
> +This support is based on the mainline linux kernel.
> +
> +
> +How to build
> +============
> +
> +1 - Use default configuration for espressobin :
> +
> +make mvebu_espressobin-88f3720_defconfig
> +
> +2 - Build the system
> +
> +make
> +
> +This generates the kernel image, the devicetree binary, the rootfs as a
> +tar.gz, and a filesystem image containing everything : sdcard.img (this name
> +is misleading though, see Limitations).
> +
> +Build artifacts are located in output/images.
> +
> +How to boot
> +===========
> +
> +To boot, you need an UART connection, using the on-board micro-usb port
> +at 115200 bauds.
> +
> +NOTE : As of today, booting from SDCard is not fully supported (rootfs cannot
> +be located on SCard).
> +
> +## From USB Stick ############################################################
> +
> +As of right now, this is the easiest way to boot the system, since the SDCard
> +support is not fully mainlined. It uses the pre-flashed u-boot on the SPI NOR
> +to load the kernel, device-tree and rootfs from a USB stick.
> +
> +The on-board jumpers must be configured to select the SPI NOR as a boot source.
> +
> +1 - Flash rootfs image on usb drive (Be careful to select the correct drive)
> +
> +sudo dd if=sdcard.img of=/dev/sdX bs=1M
> +sync
> +
> +2 - Boot from SPI NOR, interrupt boot by pressing Enter
> +
> +3 - Setup the bootusb u-boot script :
> +
> +setenv fdt_addr 0x1800000
> +setenv fdt_name boot/armada-3720-espressobin.dtb
> +setenv bootusb 'usb start; ext4load usb 0:1 $kernel_addr $image_name; ext4load usb 0:1 $fdt_addr $fdt_name; setenv bootargs $console root=/dev/sda1 rw rootwait; booti $kernel_addr - $fdt_addr'
> +run bootusb
> +
> +Limitations
> +===========
> +
> +Since the buildroot support for the espressobin is based on mainline
> +linux, especially regarding device-tree, the current functionnalities
> +for espressobin are limited.
> +
> +Namely, the mainline device-tree does not include support for sdcards yet, which
> +means the kernel is not able to load a rootfs located on a SDCard.
> +
> +Todo
> +====
> +
> +- Add bootloader generation
> +
> +- Use a custom devicetree to have SDcard support (or wait for support in mainline linux tree)
> +
> +- When SDcard support is working, add generation of sdcard image including bootloader, and
> +  document the on-board jumper configuration needed for sdcard boot.
> diff --git a/configs/mvebu_espressobin-88f3720_defconfig b/configs/mvebu_espressobin-88f3720_defconfig
> new file mode 100644
> index 0000000..394c881
> --- /dev/null
> +++ b/configs/mvebu_espressobin-88f3720_defconfig
> @@ -0,0 +1,29 @@
> +# Architecture
> +BR2_aarch64=y
> +BR2_cortex_a53=y
> +
> +# Linux headers same as kernel, a 4.13 series
> +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_13=y
> +
> +# Filesystem
> +BR2_TARGET_ROOTFS_EXT2=y
> +BR2_TARGET_ROOTFS_EXT2_4=y
> +BR2_TARGET_ROOTFS_EXT2_GEN=4
> +BR2_TARGET_ROOTFS_TAR_GZIP=y
> +
> +# Kernel
> +BR2_LINUX_KERNEL=y
> +BR2_LINUX_KERNEL_CUSTOM_VERSION=y
> +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.13"
> +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
> +BR2_LINUX_KERNEL_DTS_SUPPORT=y
> +BR2_LINUX_KERNEL_INTREE_DTS_NAME="marvell/armada-3720-espressobin"
> +BR2_LINUX_KERNEL_INSTALL_TARGET=y
> +
> +# uClibc does not support aarch64 yet.
> +BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
> +
> +# Image generation
> +BR2_PACKAGE_HOST_GENIMAGE=y
> +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
> +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/globalscale/espressobin/genimage.cfg"
> 

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

* [Buildroot] [PATCH 1/1] [RFC] mvebu_espressobin-88f3720 : Add support for espressobin
  2017-09-25 21:02   ` Romain Naour
@ 2017-09-25 21:41     ` Arnout Vandecappelle
  2017-09-26 10:05       ` Maxime Chevallier
  0 siblings, 1 reply; 7+ messages in thread
From: Arnout Vandecappelle @ 2017-09-25 21:41 UTC (permalink / raw)
  To: buildroot



On 25-09-17 23:02, Romain Naour wrote:
> Hi Maxime,
> 
> Le 25/09/2017 ? 00:05, Maxime Chevallier a ?crit?:
>> Add support for the Globalscale 'Espressobin' board based
>> on Marvell Armada 3720.
>>
>> This board has a dual Cortex-A53, 1GB DDR3, USBs, ethernets,
>> and some GPIO ports. More informations on the vendor site :
>> http://espressobin.net/tech-spec/
>>
>> This config uses the mainline linux support for the board and
>> the buildroot toolchain using glibc, since uclibc does not
>> support aarch64.
>>
>> Mainline device-tree does not include SDCard support yet, so USB
>> is the preferred way to boot the image, using the default pre-flashed
>> u-boot on SPI NOR.
> Usually we use configs or board in the commit title.
> 
> "board: Add support for espressobin 88f3720" should be enough.
> 
> Otherwise, looks good for me as is.

 Indeed, looks good to me as well.

 I don't like the name much, though. Isn't globalscale_espressobin_defconfig
more appropriate?

> 
> Linux 4.14-rc2 is out, do you know if the SDCard support has been added in this
> release?
> 
> Maybe you can also add a new entry in .gitlab-ci.yml file for CI testing in gitlab.
> (see .gitlab-ci.yml.in to regenerate this file). But this can be done in a
> follow up patch.

 No, this is not optional, it *must* be added otherwise we get errors from CI
(well, except that the gitlab sync is currently broken). Just run
'make .gitlab-ci.yml'.


 Regards,
 Arnout

[snip]
-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

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

* [Buildroot] [PATCH 1/1] [RFC] mvebu_espressobin-88f3720 : Add support for espressobin
  2017-09-25 21:41     ` Arnout Vandecappelle
@ 2017-09-26 10:05       ` Maxime Chevallier
  0 siblings, 0 replies; 7+ messages in thread
From: Maxime Chevallier @ 2017-09-26 10:05 UTC (permalink / raw)
  To: buildroot

Hi,

2017-09-25 23:41 GMT+02:00 Arnout Vandecappelle <arnout@mind.be>:
>
>
> On 25-09-17 23:02, Romain Naour wrote:
>> Hi Maxime,
>>
>> Le 25/09/2017 ? 00:05, Maxime Chevallier a ?crit :
>>> Add support for the Globalscale 'Espressobin' board based
>>> on Marvell Armada 3720.
>>>
>>> This board has a dual Cortex-A53, 1GB DDR3, USBs, ethernets,
>>> and some GPIO ports. More informations on the vendor site :
>>> http://espressobin.net/tech-spec/
>>>
>>> This config uses the mainline linux support for the board and
>>> the buildroot toolchain using glibc, since uclibc does not
>>> support aarch64.
>>>
>>> Mainline device-tree does not include SDCard support yet, so USB
>>> is the preferred way to boot the image, using the default pre-flashed
>>> u-boot on SPI NOR.
>> Usually we use configs or board in the commit title.
>>
>> "board: Add support for espressobin 88f3720" should be enough.

Ok

>>
>> Otherwise, looks good for me as is.
>
>  Indeed, looks good to me as well.
>
>  I don't like the name much, though. Isn't globalscale_espressobin_defconfig
> more appropriate?

Yes it makes more sense to me, but all support for this board in
u-boot and linux
include 'mvebu' somewhere in the name, so I thought I would do that to.

globalscale_espressobin_defconfig seems less confusing, I will update it in V2.

>>
>> Linux 4.14-rc2 is out, do you know if the SDCard support has been added in this
>> release?

Yes SDCard support has been added in linux 4.14-rc1. When 4.14 comes
out, we will be
able to generate bootable sdcards including the bootloader using
in-tree device-tree.

>> Maybe you can also add a new entry in .gitlab-ci.yml file for CI testing in gitlab.
>> (see .gitlab-ci.yml.in to regenerate this file). But this can be done in a
>> follow up patch.
>
>  No, this is not optional, it *must* be added otherwise we get errors from CI
> (well, except that the gitlab sync is currently broken). Just run
> 'make .gitlab-ci.yml'.

Ok I'll add that in V2.

Thanks for the feedback,

Regards,

Maxime

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

* [Buildroot] [PATCH v2 1/1] board: Add support for espressobin 88f3720
  2017-09-24 22:05 [Buildroot] [PATCH 0/1] [RFC] Add support for espressobin Maxime Chevallier
  2017-09-24 22:05 ` [Buildroot] [PATCH 1/1] [RFC] mvebu_espressobin-88f3720 : " Maxime Chevallier
@ 2017-09-26 17:15 ` Maxime Chevallier
  2017-10-21 14:50   ` Arnout Vandecappelle
  1 sibling, 1 reply; 7+ messages in thread
From: Maxime Chevallier @ 2017-09-26 17:15 UTC (permalink / raw)
  To: buildroot

Add support for the Globalscale 'Espressobin' board based
on Marvell Armada 3720.

This board has a dual Cortex-A53, 1GB DDR3, USBs, ethernets,
and some GPIO ports. More informations on the vendor site :
http://espressobin.net/tech-spec/

This config uses the mainline linux support for the board and
the buildroot toolchain using glibc, since uclibc does not
support aarch64.

Mainline device-tree does not include SDCard support yet, so USB
is the preferred way to boot the image, using the default pre-flashed
u-boot on SPI NOR.

Signed-off-by: Maxime Chevallier <chevalliersebmax@gmail.com>

---
Changes v1 -> v2:
	- Renamed defconfig (Suggested by Arnout)

 DEVELOPERS                                 |  4 ++
 board/globalscale/espressobin/genimage.cfg | 11 +++++
 board/globalscale/espressobin/readme.txt   | 76 ++++++++++++++++++++++++++++++
 configs/globalscale_espressobin_defconfig  | 29 ++++++++++++
 4 files changed, 120 insertions(+)
 create mode 100644 board/globalscale/espressobin/genimage.cfg
 create mode 100644 board/globalscale/espressobin/readme.txt
 create mode 100644 configs/globalscale_espressobin_defconfig

diff --git a/DEVELOPERS b/DEVELOPERS
index e34802f..be1c3fb 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1208,6 +1208,10 @@ F:	package/python-wsaccel/
 N:	Max Filippov <jcmvbkbc@gmail.com>
 F:	arch/Config.in.xtensa
 
+N:	Maxime Chevallier <chevalliersebmax@gmail.com>
+F:	configs/globalscale_espressobin_defconfig
+F:	board/globalscale/espressobin/
+
 N:	Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
 F:	package/babeld/
 F:	package/dante/
diff --git a/board/globalscale/espressobin/genimage.cfg b/board/globalscale/espressobin/genimage.cfg
new file mode 100644
index 0000000..664f81b
--- /dev/null
+++ b/board/globalscale/espressobin/genimage.cfg
@@ -0,0 +1,11 @@
+# Minimal image
+
+image sdcard.img {
+  hdimage {
+  }
+
+  partition rootfs {
+    partition-type = 0x83
+    image = "rootfs.ext4"
+  }
+}
diff --git a/board/globalscale/espressobin/readme.txt b/board/globalscale/espressobin/readme.txt
new file mode 100644
index 0000000..f2af4ea
--- /dev/null
+++ b/board/globalscale/espressobin/readme.txt
@@ -0,0 +1,76 @@
+Espressobin
+===========
+
+This is the basic support for the Espressobin by globalscale technologies,
+based on the Marvell Armada 3720.
+
+This support is based on the mainline linux kernel.
+
+
+How to build
+============
+
+1 - Use default configuration for espressobin :
+
+make globalscale_espressobin_defconfig
+
+2 - Build the system
+
+make
+
+This generates the kernel image, the devicetree binary, the rootfs as a
+tar.gz, and a filesystem image containing everything : sdcard.img (this name
+is misleading though, see Limitations).
+
+Build artifacts are located in output/images.
+
+How to boot
+===========
+
+To boot, you need an UART connection, using the on-board micro-usb port
+at 115200 bauds.
+
+NOTE : As of today, booting from SDCard is not fully supported (rootfs cannot
+be located on SCard).
+
+## From USB Stick ############################################################
+
+As of right now, this is the easiest way to boot the system, since the SDCard
+support is not fully mainlined. It uses the pre-flashed u-boot on the SPI NOR
+to load the kernel, device-tree and rootfs from a USB stick.
+
+The on-board jumpers must be configured to select the SPI NOR as a boot source.
+
+1 - Flash rootfs image on usb drive (Be careful to select the correct drive)
+
+sudo dd if=sdcard.img of=/dev/sdX bs=1M
+sync
+
+2 - Boot from SPI NOR, interrupt boot by pressing Enter
+
+3 - Setup the bootusb u-boot script :
+
+setenv fdt_addr 0x1800000
+setenv fdt_name boot/armada-3720-espressobin.dtb
+setenv bootusb 'usb start; ext4load usb 0:1 $kernel_addr $image_name; ext4load usb 0:1 $fdt_addr $fdt_name; setenv bootargs $console root=/dev/sda1 rw rootwait; booti $kernel_addr - $fdt_addr'
+run bootusb
+
+Limitations
+===========
+
+Since the buildroot support for the espressobin is based on mainline
+linux, especially regarding device-tree, the current functionnalities
+for espressobin are limited.
+
+Namely, the mainline device-tree does not include support for sdcards yet, which
+means the kernel is not able to load a rootfs located on a SDCard.
+
+Todo
+====
+
+- Add bootloader generation
+
+- Use a custom devicetree to have SDcard support (or wait for support in mainline linux tree)
+
+- When SDcard support is working, add generation of sdcard image including bootloader, and
+  document the on-board jumper configuration needed for sdcard boot.
diff --git a/configs/globalscale_espressobin_defconfig b/configs/globalscale_espressobin_defconfig
new file mode 100644
index 0000000..394c881
--- /dev/null
+++ b/configs/globalscale_espressobin_defconfig
@@ -0,0 +1,29 @@
+# Architecture
+BR2_aarch64=y
+BR2_cortex_a53=y
+
+# Linux headers same as kernel, a 4.13 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_13=y
+
+# Filesystem
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_GEN=4
+BR2_TARGET_ROOTFS_TAR_GZIP=y
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.13"
+BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="marvell/armada-3720-espressobin"
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
+
+# uClibc does not support aarch64 yet.
+BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
+
+# Image generation
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/globalscale/espressobin/genimage.cfg"
-- 
2.7.4

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

* [Buildroot] [PATCH v2 1/1] board: Add support for espressobin 88f3720
  2017-09-26 17:15 ` [Buildroot] [PATCH v2 1/1] board: Add support for espressobin 88f3720 Maxime Chevallier
@ 2017-10-21 14:50   ` Arnout Vandecappelle
  0 siblings, 0 replies; 7+ messages in thread
From: Arnout Vandecappelle @ 2017-10-21 14:50 UTC (permalink / raw)
  To: buildroot

 Hi Maxime,

On 26-09-17 19:15, Maxime Chevallier wrote:
> Add support for the Globalscale 'Espressobin' board based
> on Marvell Armada 3720.
> 
> This board has a dual Cortex-A53, 1GB DDR3, USBs, ethernets,
> and some GPIO ports. More informations on the vendor site :
> http://espressobin.net/tech-spec/
> 
> This config uses the mainline linux support for the board and
> the buildroot toolchain using glibc, since uclibc does not
> support aarch64.
> 
> Mainline device-tree does not include SDCard support yet, so USB
> is the preferred way to boot the image, using the default pre-flashed
> u-boot on SPI NOR.

 We discussed this a bit at the BR developer meeting, and came to the conclusion
that the current situation is not very useful. It is just a basic aarch64
defconfig with the appropriate dts. Unless there is bootloader support, there is
not a lot of use of making a defconfig.

 So, let's wait until 4.14 is out and we can have a real, full defconfig, OK?

> Signed-off-by: Maxime Chevallier <chevalliersebmax@gmail.com>
[snip]
> +Limitations
> +===========
> +
> +Since the buildroot support for the espressobin is based on mainline
> +linux, especially regarding device-tree, the current functionnalities
> +for espressobin are limited.
> +
> +Namely, the mainline device-tree does not include support for sdcards yet, which
> +means the kernel is not able to load a rootfs located on a SDCard.

 If it is *only* a matter of the dts, you can just supply the needed dts file in
board/globalscale/espressobin and use it with BR2_LINUX_KERNEL_CUSTOM_DTS_PATH.


> +# uClibc does not support aarch64 yet.
> +BR2_TOOLCHAIN_BUILDROOT_GLIBC=y

 Really?

commit 00995e0e49fafc355fbf56d9b7810c1696a41b2f
Author: Waldemar Brodkorb <wbx@openadk.org>
Date:   Fri Feb 3 15:28:14 2017

    uclibc: allow to build aarch64 internal toolchain

    uClibc-ng from 1.0.22 and up supports aarch64 architecture.



 Regards,
 Arnout

> +
> +# Image generation
> +BR2_PACKAGE_HOST_GENIMAGE=y
> +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
> +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/globalscale/espressobin/genimage.cfg"
> 

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

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

end of thread, other threads:[~2017-10-21 14:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-24 22:05 [Buildroot] [PATCH 0/1] [RFC] Add support for espressobin Maxime Chevallier
2017-09-24 22:05 ` [Buildroot] [PATCH 1/1] [RFC] mvebu_espressobin-88f3720 : " Maxime Chevallier
2017-09-25 21:02   ` Romain Naour
2017-09-25 21:41     ` Arnout Vandecappelle
2017-09-26 10:05       ` Maxime Chevallier
2017-09-26 17:15 ` [Buildroot] [PATCH v2 1/1] board: Add support for espressobin 88f3720 Maxime Chevallier
2017-10-21 14:50   ` Arnout Vandecappelle

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.