From patchwork Mon May 23 13:33:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Korsgaard X-Patchwork-Id: 626416 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 3rFL2d0yY9z9sD3 for ; Thu, 26 May 2016 04:11:53 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=mqLTfS6N; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id A3218C0CCA; Wed, 25 May 2016 18:11:51 +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 NIUCYfAYj7a0; Wed, 25 May 2016 18:11:47 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 7D366C0D0F; Wed, 25 May 2016 18:11:45 +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 93FCD1C0B8F for ; Wed, 25 May 2016 18:11:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 7F7029829C for ; Wed, 25 May 2016 18:11:44 +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 PJxBrh6W0d5T for ; Wed, 25 May 2016 18:11:38 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by hemlock.osuosl.org (Postfix) with ESMTPS id 5563799834 for ; Mon, 23 May 2016 13:34:01 +0000 (UTC) Received: by mail-wm0-f67.google.com with SMTP id q62so15130862wmg.3 for ; Mon, 23 May 2016 06:34:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=vErkHhG2BJHdmBE11EAjYoLt86wDXJKe9v+3pbyD4eQ=; b=mqLTfS6NJyeICnZ0itpvDsevC3RCW8pYpLILXiQy20LBvYj4eOSMGgcZVKcCpTWFpw eKbU3coqHT/KwtrM8vBzNOuec+Y2xicN1Zpyh4uyAE0MAzcU4Z22sg1mk0WiI9N7cdAA I/dHFPwB601ZNrgeB1ejS5xZesFfK0qhFMNu/MjBC2kkZboXNhFvB2ocicZp62mdO0aV cVyUigvAsGCeM7zIAUxUYV5i9oMeFD7+ZuzPRt6xjDBEmrpHo9HCPJz0LXy/NukxXfHe /uqPMYO2tAePFKXne1O5/EyDnvl6crMXrnbbvWCOmYNHFmnO9i4fA/T1hNOmlaWCx70D PqZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=vErkHhG2BJHdmBE11EAjYoLt86wDXJKe9v+3pbyD4eQ=; b=U+jRsLdRFmUS23zeLHHlOdihx9mcNhyUzYCy8oFQFmOc2hpONvE7ADl0rDOIm9QdiJ QCGSrS0JUbgl4ZmM62ve3Ck4TGh+aE7i00h5UQeVAV0KUKC8sAVar2S2gysaAe/2iM6U YMu9wiSf6iCc3/JTZuhRpT188qGEloIFMGkTqiBB1Ji3AMsjGM5qFHEMfbOYesjZqbtg SOm2fiLyTjfuFoHcxvxTGtiKwIV5nze+upyU6xoyTtHrtCWCWrdBAjhXSL5y7qsL7kLV 5uIL2/cbQubGzToJKb2msvTPfc94mUWaoUNzrBXi7Iqmb5i6UWadawMIOl6jJ4UXcj0f RToA== X-Gm-Message-State: AOPr4FVe2OsyfoGI+LHBbZyskwJ2YKSdFc4KSRRzsDeS97fzr7iPhuDIRqDIAKBFBLN43g== X-Received: by 10.28.167.206 with SMTP id q197mr16572445wme.85.1464010439846; Mon, 23 May 2016 06:33:59 -0700 (PDT) Received: from dell.be.48ers.dk ([91.183.172.93]) by smtp.gmail.com with ESMTPSA id i3sm35323652wjx.30.2016.05.23.06.33.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 May 2016 06:33:58 -0700 (PDT) Received: from peko by dell.be.48ers.dk with local (Exim 4.84) (envelope-from ) id 1b4pzZ-0000xS-My; Mon, 23 May 2016 15:33:57 +0200 From: Peter Korsgaard To: buildroot@buildroot.org Date: Mon, 23 May 2016 15:33:49 +0200 Message-Id: <1464010429-3604-2-git-send-email-peter@korsgaard.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1464010429-3604-1-git-send-email-peter@korsgaard.com> References: <1464010429-3604-1-git-send-email-peter@korsgaard.com> Subject: [Buildroot] [PATCH 2/2] boards: add roseapple pi board support 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 basic support for the roseapple pi board, a SBC in a RPI form factor with an Actions Semiconductor S500 SoC. For details, see: http://roseapplepi.org/ The vendor kernel unfortunately needs a minor patch to build the XHCI driver, so include it here. Signed-off-by: Peter Korsgaard --- board/roseapplepi/genimage.cfg | 43 ++++++++++++++++++++++ .../patches/linux/0001-unbreak-xhci-trace.patch | 31 ++++++++++++++++ board/roseapplepi/post-image.sh | 18 +++++++++ board/roseapplepi/uEnv.txt | 3 ++ configs/roseapplepi_defconfig | 40 ++++++++++++++++++++ 5 files changed, 135 insertions(+) create mode 100644 board/roseapplepi/genimage.cfg create mode 100644 board/roseapplepi/patches/linux/0001-unbreak-xhci-trace.patch create mode 100755 board/roseapplepi/post-image.sh create mode 100755 board/roseapplepi/uEnv.txt create mode 100644 configs/roseapplepi_defconfig diff --git a/board/roseapplepi/genimage.cfg b/board/roseapplepi/genimage.cfg new file mode 100644 index 0000000..4d40e65 --- /dev/null +++ b/board/roseapplepi/genimage.cfg @@ -0,0 +1,43 @@ +# Minimal SD card image for the Roseapple Pi +# +image boot.vfat { + vfat { + files = { + "uEnv.txt", + "uImage" + } + file kernel.dtb { + image = "actduino_bubble_gum_sdboot_linux.dtb" + } + } + size = 10M +} + +image sdcard.img { + hdimage { + } + + partition s500-bootloader { + in-partition-table = "no" + image = "s500-bootloader.bin" + offset = 0x200200 + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot-dtb.img" + offset = 0x300000 + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + size = 512M + } +} diff --git a/board/roseapplepi/patches/linux/0001-unbreak-xhci-trace.patch b/board/roseapplepi/patches/linux/0001-unbreak-xhci-trace.patch new file mode 100644 index 0000000..79e8c80 --- /dev/null +++ b/board/roseapplepi/patches/linux/0001-unbreak-xhci-trace.patch @@ -0,0 +1,31 @@ +[PATCH] unbreak xhci-trace compilation + +When commit 84a99f6fc5d4 (xhci: add traces for debug messages in +xhci_address_device) was backported to the owl tree as part of commit +5b2ea66f15396 (usb: add owl usb driver), the specific CFLAGS needed for +xhci-trace.c were missed, causing build breakage: + + CC drivers/usb/host/xhci-trace.o +In file included from drivers/usb/host/xhci-trace.h:151:0, + from drivers/usb/host/xhci-trace.c:15: +include/trace/define_trace.h:79:43: fatal error: ./xhci-trace.h: No such file or directory + +Signed-off-by: Peter Korsgaard +--- + drivers/usb/host/Makefile | 3 +++ + 1 file changed, 3 insertions(+) + +Index: linux-59dbf6a4998e967eb9c6bdcc9b506c0d96acb26b/drivers/usb/host/Makefile +=================================================================== +--- linux-59dbf6a4998e967eb9c6bdcc9b506c0d96acb26b.orig/drivers/usb/host/Makefile ++++ linux-59dbf6a4998e967eb9c6bdcc9b506c0d96acb26b/drivers/usb/host/Makefile +@@ -4,6 +4,9 @@ + + ccflags-$(CONFIG_USB_DEBUG) := -DDEBUG + ++# tell define_trace.h where to find the xhci trace header ++CFLAGS_xhci-trace.o := -I$(src) ++ + isp1760-y := isp1760-hcd.o isp1760-if.o + + fhci-y := fhci-hcd.o fhci-hub.o fhci-q.o diff --git a/board/roseapplepi/post-image.sh b/board/roseapplepi/post-image.sh new file mode 100755 index 0000000..e8f2df2 --- /dev/null +++ b/board/roseapplepi/post-image.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +BOARD_DIR="$(dirname $0)" +GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg" +GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" + +rm -rf "${GENIMAGE_TMP}" + +cp "${BOARD_DIR}/uEnv.txt" "${BINARIES_DIR}" + +genimage \ + --rootpath "${TARGET_DIR}" \ + --tmppath "${GENIMAGE_TMP}" \ + --inputpath "${BINARIES_DIR}" \ + --outputpath "${BINARIES_DIR}" \ + --config "${GENIMAGE_CFG}" + +exit $? diff --git a/board/roseapplepi/uEnv.txt b/board/roseapplepi/uEnv.txt new file mode 100755 index 0000000..f9646e4 --- /dev/null +++ b/board/roseapplepi/uEnv.txt @@ -0,0 +1,3 @@ +# no ramdisk +ramdisk_addr_r=- +bootargs=clk_ignore_unused root=/dev/mmcblk0p2 diff --git a/configs/roseapplepi_defconfig b/configs/roseapplepi_defconfig new file mode 100644 index 0000000..6627ff4 --- /dev/null +++ b/configs/roseapplepi_defconfig @@ -0,0 +1,40 @@ +BR2_arm=y +BR2_cortex_a9=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y + +BR2_GLOBAL_PATCH_DIR="board/roseapplepi/patches" +# Linux headers same as kernel, a 3.10 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_10=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/roseapplepi/post-image.sh" + +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/xapp-le/kernel.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="59dbf6a4998e967eb9c6bdcc9b506c0d96acb26b" +BR2_LINUX_KERNEL_DEFCONFIG="actduino_bubble_gum_linux" +BR2_LINUX_KERNEL_UIMAGE=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="actduino_bubble_gum_sdboot_linux" + +# Filesystem / image +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +# BR2_TARGET_ROOTFS_TAR is not set + +# Bootloaders +BR2_TARGET_S500_BOOTLOADER=y +BR2_TARGET_S500_BOOTLOADER_BOARD="linux/bubble_gum_sd" +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/xapp-le/u-boot.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="a035d2673a90143a1a74557503b2e137b1447ae6" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="actduino_bubble_gum_v10" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_FORMAT_DTB_IMG=y + +# Required tools to create the SD image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y