From patchwork Fri Mar 14 12:13:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marcin Jabrzyk X-Patchwork-Id: 330289 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id DD4072C0097 for ; Fri, 14 Mar 2014 23:13:41 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id EC0FD9BD84; Fri, 14 Mar 2014 12:13:40 +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 J_E9idMw8i9u; Fri, 14 Mar 2014 12:13:40 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 506859BCA3; Fri, 14 Mar 2014 12:13:40 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 49F681BFA9E for ; Fri, 14 Mar 2014 12:13:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 44D4232FA0 for ; Fri, 14 Mar 2014 12:13:39 +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 cChKprBgdn-t for ; Fri, 14 Mar 2014 12:13:38 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ee0-f45.google.com (mail-ee0-f45.google.com [74.125.83.45]) by silver.osuosl.org (Postfix) with ESMTPS id B23F832F56 for ; Fri, 14 Mar 2014 12:13:37 +0000 (UTC) Received: by mail-ee0-f45.google.com with SMTP id d17so1313820eek.4 for ; Fri, 14 Mar 2014 05:13:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=U7YsMZPmYBtbSRmAMZLwTnBLZkFx8yiHZ97XZuS4s1k=; b=zB8A8Iw/pygI+2CvEhvUJAHsA4j7ivgjplmyCWk01kMjYdv+e4kC8b/aWyn5VBfXAX m6gCEdhUMalNAAckopydjtTuZyF6SSCUY7gz9yYiDErVHtGL1vYgzsL1Efk3AE8hdEGk +2wzIhk/zTTaiegIERgB5G4FNdTa7wl6Hic3Xc3JkFwIkcbCKbWTu8apIGI52yAn82gK DzFFbUt90sqQNeXaRkbVjKbjhhxn3hQEKGadSbackrGaJJYxYDHk65xPdFDPcJfvC0zT W7VBwmyWsP3jNCCo3GQuduxO/GZvsMMqn5FokICyXrTTFcOEDNHH5WzMoe508xlCk/vE aRBQ== X-Received: by 10.14.110.68 with SMTP id t44mr8045265eeg.74.1394799216287; Fri, 14 Mar 2014 05:13:36 -0700 (PDT) Received: from localhost.localdomain ([94.232.36.211]) by mx.google.com with ESMTPSA id i47sm16758383eeg.6.2014.03.14.05.13.34 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Mar 2014 05:13:35 -0700 (PDT) From: Marcin Jabrzyk To: buildroot@buildroot.org Date: Fri, 14 Mar 2014 13:13:22 +0100 Message-Id: <1394799202-15980-1-git-send-email-marcin.jabrzyk@gmail.com> X-Mailer: git-send-email 1.8.3.2 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/1] beaglebone: better support for starting and creating images X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 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-bounces@busybox.net - Added short readme file with description of first steps how to start. - Added uEnv.txt so the board can start from SDCard - Added post-image.sh script to copy included uEnv.txt to output/images Signed-off-by: Marcin Jabrzyk Tested-by: Stephan Hoffmann Tested-by: Marcin Jabrzyk Acked-by: Arnout Vandecappelle (Essensium/Mind) --- board/beaglebone/post-image.sh | 6 ++++ board/beaglebone/readme.txt | 62 ++++++++++++++++++++++++++++++++++++++++++ board/beaglebone/uEnv.txt | 3 ++ configs/beaglebone_defconfig | 1 + 4 files changed, 72 insertions(+) create mode 100755 board/beaglebone/post-image.sh create mode 100644 board/beaglebone/readme.txt create mode 100644 board/beaglebone/uEnv.txt diff --git a/board/beaglebone/post-image.sh b/board/beaglebone/post-image.sh new file mode 100755 index 0000000..7441d07 --- /dev/null +++ b/board/beaglebone/post-image.sh @@ -0,0 +1,6 @@ +#!/bin/sh +# post-image.sh for BeagleBone +# 2014, Marcin Jabrzyk + +# copy the uEnv.txt to the output/images directory +cp board/beaglebone/uEnv.txt $BINARIES_DIR/uEnv.txt diff --git a/board/beaglebone/readme.txt b/board/beaglebone/readme.txt new file mode 100644 index 0000000..dc44751 --- /dev/null +++ b/board/beaglebone/readme.txt @@ -0,0 +1,62 @@ +BeagleBone + +Intro +===== +To be able to use BeagleBone board with the images generated by +Buildroot, you have prepare the SDCard. + +How to build it +=============== + + $ make beaglebone_defconfig + +Then you can edit the build options using + + $ make menuconfig + +Compile all and build rootfs image: + + $ make + +Result of the build +------------------- + +After building, you should get a tree like this: + + output/images/ + ├── am335x-boneblack.dtb + ├── am335x-bone.dtb + ├── MLO + ├── rootfs.ext2 + ├── u-boot.img + ├── uEnv.txt + └── zImage + + +Prepare you SDCard +================== + +You need to prepare first partition in fat32 and marked as bootable, +and second where you will write rootfs. + +Copy the files to boot partition + + $ cp MLO u-boot.img zImage uEnv.txt *.dtb /media/zzzzz + +where /media/zzzzz is the mount point +Then you need to write the rootfs image onto SDCard: + + # dd if=rootfs.ext2 of=/dev/xxxxx + +where /dev/xxxxx is the second partition. Use: + + # fdisk -l + +to check for correct one. + +Finish +====== + +Unmount all mounted SDCard partitions and insert the card to BeagleBone. +Hold the "BOOT" button and apply power. Then release the "BOOT" button. +The output is available on the serial console. \ No newline at end of file diff --git a/board/beaglebone/uEnv.txt b/board/beaglebone/uEnv.txt new file mode 100644 index 0000000..68d6e23 --- /dev/null +++ b/board/beaglebone/uEnv.txt @@ -0,0 +1,3 @@ +bootpart=0:1 +bootdir= +uenvcmd=run loaduimage;run loadramdisk;run findfdt;run loadfdt;run ramboot diff --git a/configs/beaglebone_defconfig b/configs/beaglebone_defconfig index 3181c66..b2052f4 100644 --- a/configs/beaglebone_defconfig +++ b/configs/beaglebone_defconfig @@ -8,6 +8,7 @@ BR2_TARGET_GENERIC_HOSTNAME="beaglebone" BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y BR2_TARGET_GENERIC_GETTY_PORT="ttyO0" # BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/beaglebone/post-image.sh" # filesystem BR2_PACKAGE_AM33X_CM3=y