[v2,1/1] board: Add support for espressobin 88f3720

Message ID 1506446150-4177-1-git-send-email-chevalliersebmax@gmail.com
State New
Headers show
  • [v2,1/1] board: Add support for espressobin 88f3720
Related show

Commit Message

Maxime Chevallier Sept. 26, 2017, 5:15 p.m.
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 :

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


index e34802f..be1c3fb 100644
@@ -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 @@ 
+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
+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
+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
+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.
+- 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
+# Linux headers same as kernel, a 4.13 series
+# Filesystem
+# Kernel
+# uClibc does not support aarch64 yet.
+# Image generation
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/globalscale/espressobin/genimage.cfg"