From patchwork Fri Mar 22 23:04:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxime Hadjinlian X-Patchwork-Id: 230291 X-Patchwork-Delegate: yann.morin.1998@free.fr 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 EFFA22C00C2 for ; Sat, 23 Mar 2013 10:05:14 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id C71CD102B17; Fri, 22 Mar 2013 23:04:57 +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 78YE6a65CqSb; Fri, 22 Mar 2013 23:04:55 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 247FD101C9F; Fri, 22 Mar 2013 23:04:55 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id CD8068F7A7 for ; Fri, 22 Mar 2013 23:05:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 69D518B28E for ; Fri, 22 Mar 2013 23:05:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id emNLb6nu8VqG for ; Fri, 22 Mar 2013 23:05:08 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) by whitealder.osuosl.org (Postfix) with ESMTPS id E39CA8AF3C for ; Fri, 22 Mar 2013 23:05:07 +0000 (UTC) Received: by mail-wi0-f169.google.com with SMTP id c10so306845wiw.2 for ; Fri, 22 Mar 2013 16:05:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=a6ZYx8t+JfYN+G/RVSvA4XuTx7cdNo0CjBkgPw87m3U=; b=FsOXi45IpDu7aaaFNckIg7i7Bl9AqLxuHUEIzc9Z7hOh633Vjw8Vi45esXEqLbiLa+ MZbxHx5oCOoxwTd+sAFBpIif+s/vq2GKpNkTfwsRWhUSi1SCDQ85tOou6HKC6HF6FSy5 jjYxTEsWvtY16P8P4fzkihaClfBvRkHmvQA0x4po68uY7DsxWBx5a4K0dWx1hSwiZpBd u9fDB4mUFkUYrNYcQ5hPhYxE8zhVfl98QAvFtc5//05VR0GYPlJ7CkaX+OFCz/fQpzc/ URdz/HACYmuv2l6JfbN3H+GDvKlbiRwwj54sPyxtiDUQM7ytQocYHYc/+Pk7Yq6E+Fgn 9gXA== X-Received: by 10.180.11.136 with SMTP id q8mr5851265wib.18.1363993506028; Fri, 22 Mar 2013 16:05:06 -0700 (PDT) Received: from localhost.localdomain (13-105-190-109.dsl.ovh.fr. [109.190.105.13]) by mx.google.com with ESMTPS id bj9sm13768107wib.4.2013.03.22.16.05.03 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 22 Mar 2013 16:05:04 -0700 (PDT) From: Maxime Hadjinlian To: buildroot@busybox.net Date: Sat, 23 Mar 2013 00:04:49 +0100 Message-Id: <1363993489-7054-1-git-send-email-maxime.hadjinlian@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <20130322135825.1d097827@skate> References: <20130322135825.1d097827@skate> MIME-Version: 1.0 Subject: [Buildroot] =?utf-8?q?=5BPATCH=5D_configs=3A_add_RaspberryPi_defc?= =?utf-8?q?onfig?= 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 This is a default configuration for the RaspberryPi, tested and functionnal. The kernel used is the one developped by the RaspberryPi foundation as it's not fully supported currently in mainline kernel. The configuration used for the kernel is the default bcmrpi. For more info, please find board/raspberrypi/README.txt Signed-off-by: Maxime Hadjinlian --- board/raspberrypi/README.txt | 127 ++++++++++++++++++++++++++++++++++++++++++ configs/rpi_defconfig | 21 +++++++ 2 files changed, 148 insertions(+) create mode 100644 board/raspberrypi/README.txt create mode 100644 configs/rpi_defconfig diff --git a/board/raspberrypi/README.txt b/board/raspberrypi/README.txt new file mode 100644 index 0000000..9825d92 --- /dev/null +++ b/board/raspberrypi/README.txt @@ -0,0 +1,127 @@ +##RaspberryPi + +Intro +===== + +To be able to use your RaspberryPi board with the images generated by +Buildroot, you have a prior choice to make, will you use: + - Volatile rootfs in RAM (The rootfs is an initramfs) + - Persistent rootfs on the SDCard + +Also, a good source of information is http://elinux.org/R-Pi_Hub + +Volatile rootfs +=============== + +How to build it +--------------- + +You need to use the rpi_defconfig, to do so: + * make rpi_defconfig + +Then, you need to select the kind of images you want: + * make menuconfig + * Select "Filesystem images" + * Select "initial RAM filesystem linked into linux kernel" + +What is generated +----------------- + +After building, you should obtain this tree: + + output/images/ + +-- rootfs.tar + +-- rpi-firmware + |   +-- bootcode.bin + |   +-- config.txt + |   +-- fixup_cd.dat + |   +-- fixup.dat + |   +-- start_cd.elf + |   `-- start.elf + `-- zImage + +Note : rootfs.tar will only be there if you kept "tar the root filesystem" +option selected in "Filesystem images". + +Where should the binaries be copied on the SDCard +------------------------------------------------- + +Your SDCard must have its first partition using fat32 and with bootable flags. + +At the root of the partition, the RaspberryPi must find the following files: + + * bootcode.bin + * config.txt + * fixup_cd.dat + * fixup.dat + * start_cd.elf + * start.elf + * zImage + +So you should, copy the entire content of output/images/rpi-firmware along with +zImage. + +Note : You can create any number of partitions you desire, the only requirement +is that the first partition must be using fat32. + +Persistent rootfs +================== + +How to build it +--------------- + +You only need to use the rpi_defconfig, to do so: + * make rpi_defconfig + +What is generated +----------------- + +After building, you should obtain this tree: + + output/images/ + +-- rootfs.tar + +-- rpi-firmware + |   +-- bootcode.bin + |   +-- config.txt + |   +-- fixup_cd.dat + |   +-- fixup.dat + |   +-- start_cd.elf + |   `-- start.elf + `-- zImage + +Where should the binaries be copied on the SDCard +------------------------------------------------- + +Your SDCard must have its first partition using fat32 and with bootable flags. +It should also have another partition which will contain your rootfs, it should +be partitioned as ext4. + +Boot partition +~~~~~~~~~~~~ + +The first partition will contain everything used to boot the RaspberryPi. +You must copy theses files at the root of partition: + + * bootcode.bin + * config.txt + * fixup_cd.dat + * fixup.dat + * start_cd.elf + * start.elf + * zImage + +So you should, copy the entire content of output/images/rpi-firmware along with +zImage. + +Rootfs partition +~~~~~~~~~~~~~~ + +The second partition, will contain your rootfs. +Simply extract (as root!) the contents of the rootfs.tar archive +into this partition. + +For example: (Assuming mountpoint is a directory and exist) + + $ sudo mount /dev/sdXY /mnt/mountpoint + $ sudo tar xf rootfs.tar -C /mnt/mountpoint + diff --git a/configs/rpi_defconfig b/configs/rpi_defconfig new file mode 100644 index 0000000..69c7b74 --- /dev/null +++ b/configs/rpi_defconfig @@ -0,0 +1,21 @@ +BR2_arm=y +BR2_arm1176jzf_s=y + +BR2_TOOLCHAIN_BUILDROOT_LARGEFILE=y +BR2_TOOLCHAIN_BUILDROOT_CXX=y + +BR2_TARGET_GENERIC_GETTY_PORT="tty1" + +BR2_PACKAGE_RPI_FIRMWARE=y +BR2_PACKAGE_RPI_USERLAND=y +BR2_PACKAGE_LIBCOFI=y + +BR2_LINUX_KERNEL=y +# Lock to 3.8 headers to avoid breaking with newer kernels +BR2_KERNEL_HEADERS_3_8=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL="git://github.com/raspberrypi/linux.git" +BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION="31a951046155b27361127d9cf85a1f58719fe9b3" +BR2_LINUX_KERNEL_USE_DEFCONFIG=y +BR2_LINUX_KERNEL_DEFCONFIG="bcmrpi" +BR2_LINUX_KERNEL_ZIMAGE=y