2015-02-24 23:42:22 +01:00
|
|
|
Raspberry Pi
|
2013-03-25 14:27:56 +01:00
|
|
|
|
|
|
|
Intro
|
|
|
|
=====
|
|
|
|
|
2015-02-24 23:42:22 +01:00
|
|
|
These instructions apply to all models of the Raspberry Pi:
|
|
|
|
- the original models A and B,
|
|
|
|
- the "enhanced" models A+ and B+,
|
|
|
|
- the model B2 (aka Raspberry Pi 2).
|
|
|
|
|
2013-11-06 00:28:18 +01:00
|
|
|
How to build it
|
2013-03-25 14:27:56 +01:00
|
|
|
===============
|
|
|
|
|
2013-11-06 00:28:18 +01:00
|
|
|
Configure Buildroot
|
|
|
|
-------------------
|
|
|
|
|
2015-06-30 00:07:46 +02:00
|
|
|
There are two RaspberryPi defconfig files in Buildroot, one for each
|
|
|
|
major variant, which you should base your work on:
|
2013-11-06 00:28:18 +01:00
|
|
|
|
2015-06-30 00:07:46 +02:00
|
|
|
For models A, B, A+ or B+:
|
2015-01-10 14:14:58 +01:00
|
|
|
|
2015-06-30 00:07:46 +02:00
|
|
|
$ make raspberrypi_defconfig
|
2015-01-10 14:14:58 +01:00
|
|
|
|
2015-06-30 00:07:46 +02:00
|
|
|
And for model 2 B:
|
2015-04-07 13:44:20 +02:00
|
|
|
|
|
|
|
$ make raspberrypi2_defconfig
|
|
|
|
|
2013-11-06 00:28:18 +01:00
|
|
|
Build the rootfs
|
|
|
|
----------------
|
2013-03-25 14:27:56 +01:00
|
|
|
|
2013-11-06 00:28:18 +01:00
|
|
|
Note: you will need to have access to the network, since Buildroot will
|
|
|
|
download the packages' sources.
|
2013-03-25 14:27:56 +01:00
|
|
|
|
2013-11-06 00:28:18 +01:00
|
|
|
You may now build your rootfs with:
|
2013-03-25 14:27:56 +01:00
|
|
|
|
2013-11-06 00:28:18 +01:00
|
|
|
$ make
|
|
|
|
|
2015-12-31 14:28:08 +01:00
|
|
|
(This may take a while, consider getting yourself a coffee ;-) )
|
2013-11-06 00:28:18 +01:00
|
|
|
|
|
|
|
Result of the build
|
|
|
|
-------------------
|
2013-03-25 14:27:56 +01:00
|
|
|
|
|
|
|
After building, you should obtain this tree:
|
|
|
|
|
|
|
|
output/images/
|
2015-12-31 14:28:08 +01:00
|
|
|
+-- bcm2708-rpi-b.dtb [1]
|
|
|
|
+-- bcm2708-rpi-b-plus.dtb [1]
|
|
|
|
+-- bcm2709-rpi-2-b.dtb [1]
|
|
|
|
+-- boot.vfat
|
|
|
|
+-- kernel-marked/zImage [2]
|
|
|
|
+-- rootfs.ext4
|
2015-01-10 14:14:58 +01:00
|
|
|
+-- rpi-firmware/
|
2013-11-06 00:28:18 +01:00
|
|
|
| +-- bootcode.bin
|
2015-12-31 14:28:08 +01:00
|
|
|
| +-- cmdline.txt
|
2013-11-06 00:28:18 +01:00
|
|
|
| +-- config.txt
|
|
|
|
| +-- fixup.dat
|
|
|
|
| `-- start.elf
|
2015-12-31 14:28:08 +01:00
|
|
|
+-- sdcard.img
|
2013-03-25 14:27:56 +01:00
|
|
|
`-- zImage
|
|
|
|
|
2015-06-30 00:07:46 +02:00
|
|
|
[1] Not all of them will be present, depending on the RaspberryPi
|
|
|
|
model you are using.
|
|
|
|
|
2015-12-31 14:28:08 +01:00
|
|
|
[2] This is the mkknlimg DT-marked kernel.
|
2013-03-25 14:27:56 +01:00
|
|
|
|
2015-12-31 14:28:08 +01:00
|
|
|
How to write the SD card
|
|
|
|
========================
|
2013-03-25 14:27:56 +01:00
|
|
|
|
2015-12-31 14:28:08 +01:00
|
|
|
Once the build process is finished you will have an image called "sdcard.img"
|
|
|
|
in the output/images/ directory.
|
2013-03-25 14:27:56 +01:00
|
|
|
|
2015-12-31 14:28:08 +01:00
|
|
|
Copy the bootable "sdcard.img" onto an SD card with "dd":
|
2013-03-25 14:27:56 +01:00
|
|
|
|
2015-12-31 14:28:08 +01:00
|
|
|
$ sudo dd if=output/images/sdcard.img of=/dev/sdX
|
2013-03-25 14:27:56 +01:00
|
|
|
|
2013-11-06 00:28:18 +01:00
|
|
|
Insert the SDcard into your Raspberry Pi, and power it up. Your new system
|
2015-12-31 14:28:08 +01:00
|
|
|
should come up now.
|