Patchwork [1/2] rpi: improve documentation

login
register
mail settings
Submitter mathieu benoit
Date May 10, 2013, 2:39 p.m.
Message ID <1368196796-6491-1-git-send-email-mathieu.benoit@savoirfairelinux.com>
Download mbox | patch
Permalink /patch/242998/
State Superseded
Headers show

Comments

mathieu benoit - May 10, 2013, 2:39 p.m.
Signed-off-by: Mathieu Benoit <mathieu.benoit@savoirfairelinux.com>
---
 board/raspberrypi/readme.txt | 129 ++++++++++++++++++-------------------------
 1 file changed, 55 insertions(+), 74 deletions(-)

Patch

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