From patchwork Tue Sep 26 17:15:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Chevallier X-Patchwork-Id: 818745 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="gRbsZj6H"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3y1nfw4PmPz9s7G for ; Wed, 27 Sep 2017 03:16:23 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 45028884B4; Tue, 26 Sep 2017 17:16:20 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KXflfAtcFyQG; Tue, 26 Sep 2017 17:16:17 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id ED4C287417; Tue, 26 Sep 2017 17:16:16 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 5ED471C26F3 for ; Tue, 26 Sep 2017 17:16:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 5309289184 for ; Tue, 26 Sep 2017 17:16:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AC0mBhmO9gjd for ; Tue, 26 Sep 2017 17:16:14 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr0-f196.google.com (mail-wr0-f196.google.com [209.85.128.196]) by hemlock.osuosl.org (Postfix) with ESMTPS id 5ADC989146 for ; Tue, 26 Sep 2017 17:16:14 +0000 (UTC) Received: by mail-wr0-f196.google.com with SMTP id n64so2873701wrb.2 for ; Tue, 26 Sep 2017 10:16:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=71+fEUVNQ6hCQX0BLRZhyX0CGWzIIMZZ5SItzubZin0=; b=gRbsZj6H1Z+9qNIj62jJe/Bn21H2HWwd0GVZb11h80oniMbh7DyhEPc30ye+80FJHG 6ztTT0UMW5OcUpkOBbMir80vYXq/Q24lJjETs3+LoJ4GslDOZhoSUEE7/LRD69GLFDJN JFzXSB6BfWdm54EsGODzZcayTH6o91TDmbWeI7NxeA3AziFqes320VgJP3YIFkqGWEUk bpfpPdBIxXZcBHcGo9H5NVTXfxccA+PMDTI+Lv3Na8KkftyycR639VPpSEJ/8gOHeua2 sx0ATYG9YBn14598BuciRPF+hRFjSjvhpDBc5H+RjwU4+4FIBKIcEhguaJV2NAqomRhU QPzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=71+fEUVNQ6hCQX0BLRZhyX0CGWzIIMZZ5SItzubZin0=; b=Bqsri+dd3CBIGQ4Uze9Ohq9WiVcC8xDINVvYNN1Xy5MouVYpHEC4bhxP9EMYC0Sk/W 4hP1qYj/J+nwyMjM8zSYAuRUjBbKS3ZHpNETd9ZINCs2O7kKzNG571ewG03dvfhY0ThP o4/pG3n5nT8MEpFzJaKSNwlbaBmr/gWktcw2uU9ggVoZqa9jC8Uo++jPXb0DG0yN2WaU W3zV9GSDb5D0gSVoycw0Y149ywOVd0L7nSdsWkOq3VzUhmGzE0xI9C18cyBZHeU6FyZj xKNbuGOkAVsyhwKM+lyX61dSW7jsWQI3ucN/Nx31KdBux5B4EDwxqPEC3DucORZKXjkt K/vg== X-Gm-Message-State: AHPjjUjpjOo7DD0xCwTDPLml5kHhFsNWXSQ6KVUEfWmuA58RAakqPHMM wA5Z/HMwHQToOil9mBbN/fwBiJLr4Dk= X-Google-Smtp-Source: AOwi7QDufbTdWh0kuhVYRfG6KCGkHzdoaHLLBNOzGsJdCQSlpyGMcDZcSwL/agZ7M30XEXshhnJIdA== X-Received: by 10.223.171.206 with SMTP id s72mr9523408wrc.27.1506446172217; Tue, 26 Sep 2017 10:16:12 -0700 (PDT) Received: from localhost.localdomain (laf31-6-82-241-3-198.fbx.proxad.net. [82.241.3.198]) by smtp.gmail.com with ESMTPSA id 55sm17291378wrw.60.2017.09.26.10.16.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 26 Sep 2017 10:16:11 -0700 (PDT) From: Maxime Chevallier To: buildroot@buildroot.org Date: Tue, 26 Sep 2017 19:15:50 +0200 Message-Id: <1506446150-4177-1-git-send-email-chevalliersebmax@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506290733-6042-1-git-send-email-chevalliersebmax@gmail.com> References: <1506290733-6042-1-git-send-email-chevalliersebmax@gmail.com> Cc: romain.naour@gmail.com, Maxime Chevallier Subject: [Buildroot] [PATCH v2 1/1] board: Add support for espressobin 88f3720 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "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 --- 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 F: arch/Config.in.xtensa +N: Maxime Chevallier +F: configs/globalscale_espressobin_defconfig +F: board/globalscale/espressobin/ + N: Maxime Hadjinlian 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"