configs: add RaspberryPi defconfig
authorMaxime Hadjinlian <maxime.hadjinlian@gmail.com>
Mon, 25 Mar 2013 13:27:56 +0000 (13:27 +0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Tue, 26 Mar 2013 13:00:29 +0000 (14:00 +0100)
This is a default configuration for the RaspberryPi, tested and functional.

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

[Peter: minor README tweaks, rename to readme.txt]
Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
[yann.morin.1998@free.fr: use correct kernel headers, update kernel cset]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
board/raspberrypi/readme.txt [new file with mode: 0644]
configs/rpi_defconfig [new file with mode: 0644]

diff --git a/board/raspberrypi/readme.txt b/board/raspberrypi/readme.txt
new file mode 100644 (file)
index 0000000..3287795
--- /dev/null
@@ -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) or
+    - 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 marked bootable.
+
+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 and bootable.
+
+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 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:
+
+ * 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 (file)
index 0000000..96f63ba
--- /dev/null
@@ -0,0 +1,23 @@
+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
+
+# Lock to 3.6 headers as the RPi kernel is based off the 3.6 branch
+BR2_KERNEL_HEADERS_VERSION=y
+BR2_DEFAULT_KERNEL_VERSION="3.6.11"
+
+BR2_LINUX_KERNEL=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="e959a8e"
+BR2_LINUX_KERNEL_USE_DEFCONFIG=y
+BR2_LINUX_KERNEL_DEFCONFIG="bcmrpi"
+BR2_LINUX_KERNEL_ZIMAGE=y