From patchwork Fri May 10 14:39:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: mathieu benoit X-Patchwork-Id: 242998 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 C62732C00A3 for ; Sat, 11 May 2013 00:39:48 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 62F98101F97; Fri, 10 May 2013 14:39:28 +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 7PcNIe03JPMV; Fri, 10 May 2013 14:39:25 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 08583100DC7; Fri, 10 May 2013 14:39:25 +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 3AC3B8F79A for ; Fri, 10 May 2013 14:39:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 3F69E8CE96 for ; Fri, 10 May 2013 14:39:42 +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 mP+GxoSq-7WS for ; Fri, 10 May 2013 14:39:42 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [209.172.62.77]) by whitealder.osuosl.org (Postfix) with ESMTP id D78A28CDFA for ; Fri, 10 May 2013 14:39:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 0C2D610D6455 for ; Fri, 10 May 2013 10:39:42 -0400 (EDT) X-Virus-Scanned: amavisd-new at mail.savoirfairelinux.com Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UzgIIPPDIN5Z; Fri, 10 May 2013 10:39:41 -0400 (EDT) Received: from localhost (mtl.savoirfairelinux.net [208.88.110.46]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id 95DB410D6454; Fri, 10 May 2013 10:39:41 -0400 (EDT) From: Mathieu Benoit To: buildroot@busybox.net Date: Fri, 10 May 2013 10:39:56 -0400 Message-Id: <1368196796-6491-1-git-send-email-mathieu.benoit@savoirfairelinux.com> X-Mailer: git-send-email 1.8.1.4 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/2] rpi: improve documentation 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 Signed-off-by: Mathieu Benoit --- board/raspberrypi/readme.txt | 129 ++++++++++++++++++------------------------- 1 file changed, 55 insertions(+), 74 deletions(-) diff --git a/board/raspberrypi/readme.txt b/board/raspberrypi/readme.txt index 3287795..3f2ee37 100644 --- a/board/raspberrypi/readme.txt +++ b/board/raspberrypi/readme.txt @@ -5,123 +5,104 @@ 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) or - - Persistent rootfs on the SDCard -Also, a good source of information is http://elinux.org/R-Pi_Hub + * Volatile rootfs in RAM (the rootfs is an initramfs) or + * Persistent rootfs on the SDCard -Volatile rootfs -=============== +Also, a good source of information is http://elinux.org/R-Pi_Hub How to build it ---------------- +=============== You need to use the rpi_defconfig, to do so: - * make rpi_defconfig + + $ make rpi_defconfig + +If Volatile rootfs +------------------ Then, you need to select the kind of images you want: - * make menuconfig + + $ make menuconfig + * Select "Filesystem images" * Select "initial RAM filesystem linked into linux kernel" -What is generated ------------------ +Build +----- + + $ make + +And take a coffee + +### 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 + | +-- 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". +Note for Volatile: 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 -------------------------------------------------- +Prepare you SDCard +================== -Your SDCard must have its first partition using fat32 and marked bootable. +For more information, visit +http://elinux.org/RPi_Advanced_Setup#Advanced_SD_card_setup -At the root of the partition, the RaspberryPi must find the following files: +In summary, your SDCard must have first partition in fat32 and marked bootable. - * bootcode.bin - * config.txt - * fixup_cd.dat - * fixup.dat - * start_cd.elf - * start.elf - * zImage +If Persistent rootfs, 50Mo is enough memory for the boot fat32 partition. +Create another partition, like ext4, for the root. -So you should copy the entire content of output/images/rpi-firmware along with -zImage. +Mount partition: -Note: You can create any number of partitions you desire, the only requirement -is that the first partition must be using fat32 and bootable. - -Persistent rootfs -================= - -How to build it ---------------- - -You only need to use the rpi_defconfig, to do so: - * make rpi_defconfig + $ sudo mount /dev/sdX1 /mnt/mountpointboot -What is generated ------------------ + $ sudo mount /dev/sdX2 /mnt/mountpointroot -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: You can create any number of partitions you desire, the only requirement +is that the first partition must be using fat32 and be bootable. Where should the binaries be copied on the SDCard ------------------------------------------------- -Your SDCard must have its first partition using fat32 and marked bootable. -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: +At the root of the boot partition, +the RaspberryPi must find the following files: * bootcode.bin - * config.txt + * config.txt (optional) * 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. +For example: (Assuming mountpointboot is a directory and exists) -Rootfs partition -~~~~~~~~~~~~~~~~ + $ cp ./rpi-firmware/* /mnt/mountpointboot/ + + $ cp ./zImage /mnt/mountpointboot/zImage.img + +Note: The default name is kernel.img. +Actually, the name is zImage and it's define in the file config.txt like: +kernel=zImage + +### If Persistent 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 +For example: (Assuming mountpointroot is a directory and exists) + $ sudo tar xf rootfs.tar -C /mnt/mountpointroot