From patchwork Sun Apr 24 09:18:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pieter Smith X-Patchwork-Id: 614128 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 3qt3hw16mYz9t5q for ; Sun, 24 Apr 2016 19:19:44 +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=kGZADLWJ; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 5BF592F562; Sun, 24 Apr 2016 09:19:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eREU3pC6wOOQ; Sun, 24 Apr 2016 09:19:38 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 81C8931205; Sun, 24 Apr 2016 09:19:15 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id BD5511C0F9E for ; Sun, 24 Apr 2016 09:19:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B3ECC873B3 for ; Sun, 24 Apr 2016 09:19:07 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4Y7cqczFN4D7 for ; Sun, 24 Apr 2016 09:19:07 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by whitealder.osuosl.org (Postfix) with ESMTPS id B2CA286E1D for ; Sun, 24 Apr 2016 09:19:06 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id e201so14602189wme.2 for ; Sun, 24 Apr 2016 02:19:06 -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 :in-reply-to:references; bh=DqYbUbXi9CEqN9hKdj2etn8q5U6PNwzc5h0cnorp7gQ=; b=kGZADLWJnDTB5yInluioKA+MaiGnVcIyI+lYhaPAQ2Zyww94rsTWW59yId5PanNfpB +AOcNmQaHD4h8gRaNhlP14aITvbSEYkNlU60H6hTAouIQrRvYIOx9ZdHZhd+pTUU9AmZ 2uJvzRwP9M1N2gEcIk/hVoXadkoW4srHdV3Qjp7DanFjiAIQBvKDXa9GQv3cXrwuPQkE OLgFS7gJ5qGuPzi/Mkg0clznRanl9rdw4RkWheylXDCDmhUl7YBs7ywo3NMaJjj3IWKn n55ivZxUiQi66oGBTwGdtX0l0AIUYfH8GANZjfiY80UfiEhsKyHko/BF+ml+hKGXJgSD SoGg== 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:in-reply-to:references; bh=DqYbUbXi9CEqN9hKdj2etn8q5U6PNwzc5h0cnorp7gQ=; b=MwK6yTfUdjD4c8HKsjiukORwE6rZjepx4bSeC2bFPs7btjopAbKxakx1Od3kbhtaTm 6mIChXSlGi07LN7eGd2PxYxS4KRk1mar83QqRwVqqJCFiUaB5jDUq2vaCtZY4+9PWbk8 Mbj+vTxPr/tGZeto6QAHzm3SDBxIMb/mSk0qy8KpJVQ/5Ol06VJTAf+vQy0PFe+42U/v AguW3MWx6hs/QqKTHaGoK4U3myq+JIz2vUtXMrIx9Lwt/0mAuEiQ11TI9VbIS8k1H/ch 9VAg0gJFnyCusB47PuRG4vrNqjF+imiMGZSmQ36pI6SK7iElUUyZdzq2b+XL7JPRI0Za E+ng== X-Gm-Message-State: AOPr4FU+hM1j/K5RuQgsmNatXan6S/HnHz8K8Z2IMb4f8ZCOxdsNQ21VSWbShHnc8aX8ww== X-Received: by 10.28.48.203 with SMTP id w194mr1621475wmw.67.1461489545388; Sun, 24 Apr 2016 02:19:05 -0700 (PDT) Received: from localhost.localdomain ([31.161.172.8]) by smtp.gmail.com with ESMTPSA id j8sm17390809wjv.44.2016.04.24.02.19.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 24 Apr 2016 02:19:04 -0700 (PDT) From: Pieter Smith To: buildroot@buildroot.org, Yegor Yefremov , Arnout Vandecappelle , Thomas Petazzoni Date: Sun, 24 Apr 2016 11:18:47 +0200 Message-Id: X-Mailer: git-send-email 2.5.0 In-Reply-To: References: In-Reply-To: References: Cc: Pieter Smith , "Yann E. MORIN" , Peter Korsgaard Subject: [Buildroot] [PATCH v5 5/5] beaglebone: adds barebox bootloader defconfig 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" * Builds the barebox MLO and bootloader. * Generates a bootable SD card image with boot and rootfs partitions. * Barebox integrates a perfectly good device-tree for the bbb, so no dtb is being generated with the kernel. Signed-off-by: Pieter Smith --- board/beaglebone/barebox/barebox.env/boot/sd | 11 ++++++ board/beaglebone/barebox/barebox.env/config-board | 4 +++ board/beaglebone/barebox/genimage.cfg | 32 +++++++++++++++++ board/beaglebone/barebox/post-image.sh | 17 +++++++++ configs/beaglebone_barebox_defconfig | 43 +++++++++++++++++++++++ 5 files changed, 107 insertions(+) create mode 100644 board/beaglebone/barebox/barebox.env/boot/sd create mode 100644 board/beaglebone/barebox/barebox.env/config-board create mode 100644 board/beaglebone/barebox/genimage.cfg create mode 100755 board/beaglebone/barebox/post-image.sh create mode 100644 configs/beaglebone_barebox_defconfig diff --git a/board/beaglebone/barebox/barebox.env/boot/sd b/board/beaglebone/barebox/barebox.env/boot/sd new file mode 100644 index 0000000..0cd1be6 --- /dev/null +++ b/board/beaglebone/barebox/barebox.env/boot/sd @@ -0,0 +1,11 @@ +#!/bin/sh + +global.bootm.image=/boot/zImage + +# Default to using the barebox built-in dtb +# global.bootm.oftree=/boot/oftree + +# No initrd +# global.bootm.initrd= + +global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2 rootfstype=ext4 rootwait" diff --git a/board/beaglebone/barebox/barebox.env/config-board b/board/beaglebone/barebox/barebox.env/config-board new file mode 100644 index 0000000..cd7b26d --- /dev/null +++ b/board/beaglebone/barebox/barebox.env/config-board @@ -0,0 +1,4 @@ +#!/bin/sh + +global.boot.default=sd + diff --git a/board/beaglebone/barebox/genimage.cfg b/board/beaglebone/barebox/genimage.cfg new file mode 100644 index 0000000..a058ce9 --- /dev/null +++ b/board/beaglebone/barebox/genimage.cfg @@ -0,0 +1,32 @@ +image boot.vfat { + vfat { + file MLO { + image = "barebox-am33xx-beaglebone-mlo.img" + } + file barebox.bin { + image = "barebox-am33xx-beaglebone.img" + } + files = { + "barebox.env", + "zImage" + } + } + size = 32M +} + +image sdcard.img { + hdimage { + } + + partition boot { + partition-type = 0xC + in-partition-table = "yes" + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/board/beaglebone/barebox/post-image.sh b/board/beaglebone/barebox/post-image.sh new file mode 100755 index 0000000..149ffb1 --- /dev/null +++ b/board/beaglebone/barebox/post-image.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +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}" + +exit $? + diff --git a/configs/beaglebone_barebox_defconfig b/configs/beaglebone_barebox_defconfig new file mode 100644 index 0000000..ef86e89 --- /dev/null +++ b/configs/beaglebone_barebox_defconfig @@ -0,0 +1,43 @@ +# architecture +BR2_arm=y +BR2_cortex_a8=y +BR2_ARM_EABIHF=y + +# system +BR2_TARGET_GENERIC_HOSTNAME="beaglebone" +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y +BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW=y + +# filesystem +BR2_PACKAGE_AM33X_CM3=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +# BR2_TARGET_ROOTFS_TAR is not set + +# Linux headers same as kernel, a 4.5 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_5=y + +# bootloader +BR2_TARGET_BAREBOX=y +BR2_TARGET_BAREBOX_BOARD_DEFCONFIG="am335x" +BR2_TARGET_BAREBOX_IMAGE_FILE="images/barebox-am33xx-beaglebone.img" +BR2_TARGET_BAREBOX_CUSTOM_ENV=y +BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH="board/beaglebone/barebox/barebox.env" +BR2_TARGET_BAREBOX_2=y +BR2_TARGET_BAREBOX_2_BOARD_DEFCONFIG="am335x_mlo" +BR2_TARGET_BAREBOX_2_IMAGE_FILE="images/barebox-am33xx-beaglebone-mlo.img" + +# use board/beaglebone/genimage.cfg to generate boot.vfat and sdcard.img +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/beaglebone/barebox/post-image.sh" +BR2_PACKAGE_HOST_GENIMAGE=y + +# kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.5.2" +BR2_LINUX_KERNEL_USE_DEFCONFIG=y +BR2_LINUX_KERNEL_DEFCONFIG="omap2plus" +BR2_LINUX_KERNEL_ZIMAGE=y + +# use the barebox built-in dtb +# BR2_LINUX_KERNEL_DTS_SUPPORT is not set