From patchwork Mon Jan 30 18:36:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marcin Niestroj X-Patchwork-Id: 721678 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vBylm1RCpz9t1d for ; Tue, 31 Jan 2017 05:36:36 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 3DBE28A4E9; Mon, 30 Jan 2017 18:36:32 +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 RZUNInUcitAp; Mon, 30 Jan 2017 18:36:30 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 3755B8A57A; Mon, 30 Jan 2017 18:36:30 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id DE4C11C0485 for ; Mon, 30 Jan 2017 18:36:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id D99AC30AA4 for ; Mon, 30 Jan 2017 18:36:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id P0yLcQMLzG2f for ; Mon, 30 Jan 2017 18:36:26 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp.megiteam.pl (smtp.megiteam.pl [31.186.83.105]) by silver.osuosl.org (Postfix) with ESMTPS id C39C72EE19 for ; Mon, 30 Jan 2017 18:36:25 +0000 (UTC) Received: from [95.143.241.142] (helo=localhost.localdomain) by smtp.megiteam.pl with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cYGoP-0005f2-Jr; Mon, 30 Jan 2017 19:36:22 +0100 From: Marcin Niestroj To: buildroot@buildroot.org Date: Mon, 30 Jan 2017 19:36:16 +0100 Message-Id: <20170130183617.9388-1-m.niestroj@grinn-global.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Cc: Marcin Niestroj Subject: [Buildroot] [PATCH v2 1/2] board: add support for chiliBoard 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: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Board support package includes: * Buildroot defconfig * Mainline Linux kernel v4.9.5 * Mainline U-Boot (current HEAD revision is used, as board support patches are not in stable release yet) * genimage config to create sdcard image * Board readme.txt Signed-off-by: Marcin Niestroj --- Changes v1 -> v2: * U-Boot is fetched from mainline with specific git revision, as board support patches were just applied. This means that all U-Boot patches in Buildroot were dropped. * s/liteBoard/chiliBoard/ in readme.txt (suggested by Baruch) board/grinn/chiliboard/genimage.cfg | 31 ++++++++++++++++++++++++ board/grinn/chiliboard/post-image.sh | 14 +++++++++++ board/grinn/chiliboard/readme.txt | 46 ++++++++++++++++++++++++++++++++++++ configs/grinn_chiliboard_defconfig | 28 ++++++++++++++++++++++ 4 files changed, 119 insertions(+) create mode 100644 board/grinn/chiliboard/genimage.cfg create mode 100755 board/grinn/chiliboard/post-image.sh create mode 100644 board/grinn/chiliboard/readme.txt create mode 100644 configs/grinn_chiliboard_defconfig diff --git a/board/grinn/chiliboard/genimage.cfg b/board/grinn/chiliboard/genimage.cfg new file mode 100644 index 000000000..ffe027e7a --- /dev/null +++ b/board/grinn/chiliboard/genimage.cfg @@ -0,0 +1,31 @@ +# Minimal microSD card image for Grinn's chiliBoard +# + +image boot.vfat { + vfat { + files = { + "MLO", + "u-boot.img", + "am335x-chiliboard.dtb", + "zImage" + } + } + size = 16M +} + +image sdcard.img { + hdimage { + } + + partition u-boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + offset = 1M + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/board/grinn/chiliboard/post-image.sh b/board/grinn/chiliboard/post-image.sh new file mode 100755 index 000000000..1a076eecb --- /dev/null +++ b/board/grinn/chiliboard/post-image.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +BOARD_DIR="$(dirname $0)" +GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg" +GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" + +rm -rf "${GENIMAGE_TMP}" + +genimage \ + --rootpath "${TARGET_DIR}" \ + --tmppath "${GENIMAGE_TMP}" \ + --inputpath "${BINARIES_DIR}" \ + --outputpath "${BINARIES_DIR}" \ + --config "${GENIMAGE_CFG}" diff --git a/board/grinn/chiliboard/readme.txt b/board/grinn/chiliboard/readme.txt new file mode 100644 index 000000000..676aa7040 --- /dev/null +++ b/board/grinn/chiliboard/readme.txt @@ -0,0 +1,46 @@ +********** +chiliBoard +********** + +Build +===== + +First, configure Buildroot for your chiliBoard: + + make grinn_chiliboard_defconfig + +Build image: + + make + +After building you should get a tree like this: + + output/images/ + ├── am335x-chiliboard.dtb + ├── boot.vfat + ├── MLO + ├── rootfs.ext2 + ├── rootfs.ext4 + ├── rootfs.tar + ├── sdcard.img + ├── u-boot.img + └── zImage + +Create a bootable microSD card +============================== + +Buildroot prepares a bootable microSD card image "sdcard.img" in output/images/ +directory, To flash SD card just run the following command: + + sudo dd if=output/images/sdcard.img of=/dev/ bs=1M + +where can be sdX or mmcblkX + +*** WARNING! This will destroy all contents of device you specify! *** + +Boot chiliBoard +=============== + +- insert the microSD card in the microSD slot of the board; +- plug micro USB cable to provide power and console interface +- use terminal emulator with 115200 bps, 8n1 diff --git a/configs/grinn_chiliboard_defconfig b/configs/grinn_chiliboard_defconfig new file mode 100644 index 000000000..f4fedfc97 --- /dev/null +++ b/configs/grinn_chiliboard_defconfig @@ -0,0 +1,28 @@ +BR2_arm=y +BR2_cortex_a8=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_9=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyO0" +BR2_SYSTEM_DHCP="eth0" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/grinn/chiliboard/post-image.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.9.6" +BR2_LINUX_KERNEL_DEFCONFIG="omap2plus" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="am335x-chiliboard" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://git.denx.de/u-boot.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="aac477eca88dd81b18b48573ababee5112d571f3" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="chiliboard" +BR2_TARGET_UBOOT_FORMAT_IMG=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="spl/u-boot-spl.bin" +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="MLO" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y