The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / board / raspberrypi / readme.txt
1 Raspberry Pi
2
3 Intro
4 =====
5
6 These instructions apply to all models of the Raspberry Pi:
7   - the original models A and B,
8   - the "enhanced" models A+ and B+,
9   - the model B2 (aka Raspberry Pi 2).
10
11 To be able to use your Raspberry Pi board with the images generated by
12 Buildroot, you have to choose whether you will use:
13
14     * Volatile rootfs in RAM (the rootfs is an initramfs) or
15     * Persistent rootfs on the SDCard
16
17 Also, a good source of information is http://elinux.org/R-Pi_Hub
18
19 How to build it
20 ===============
21
22 Configure Buildroot
23 -------------------
24
25 The raspberrypi_defconfig configuration is a minimal configuration with
26 all that is required to bring the Raspberry Pi up. You should base your
27 work on this defconfig:
28
29   $ make raspberrypi_defconfig
30
31 Alternatively, if you want to test support for the Device Tree:
32
33   $ make raspberrypi_dt_defconfig
34
35 For Raspberry Pi 2 use a different defconfig:
36
37   $ make raspberrypi2_defconfig
38
39 If you want to use a persistent rootfs, skip to "Build the rootfs", below.
40
41 For a volatile rootfs, you have to slightly adjust the configuration:
42
43   $ make menuconfig
44     * Select "Filesystem images"
45     * Select "initial RAM filesystem linked into linux kernel"
46
47 You may also deselect "tar the root filesystem".
48
49 Build the rootfs
50 ----------------
51
52 Note: you will need to have access to the network, since Buildroot will
53 download the packages' sources.
54
55 You may now build your rootfs with:
56
57   $ make
58
59 (This may take a while; consider getting yourself a coffee ;-) )
60
61 Result of the build
62 -------------------
63
64 After building, you should obtain this tree:
65
66     output/images/
67     +-- rootfs.tar                              [0]
68     +-- rpi-firmware/
69     |   +-- bcm2708-rpi-b.dtb
70     |   +-- bcm2708-rpi-b-plus.dtb
71     |   +-- bcm2709-rpi-2-b.dtb
72     |   +-- bootcode.bin
73     |   +-- config.txt
74     |   +-- fixup.dat
75     |   `-- start.elf
76     `-- zImage
77
78 [0] Note for Volatile: rootfs.tar will only be there if you kept
79     "tar the root filesystem" option selected in "Filesystem images".
80
81 Prepare you SDCard
82 ==================
83
84 For more information, visit
85 http://elinux.org/RPi_Advanced_Setup#Advanced_SD_card_setup
86
87 In summary, your SDCard must have first partition in fat32 and marked bootable.
88
89 Create the required partitions:
90   - for a persistent rootfs, 10MiB is enough memory for the boot fat32
91     partition, and a second partition is required for the root filesystem
92   - for a volatile rootfs, 50MiB is required for the boot fat32 partition
93
94 Note: You can create any number of partitions you desire, the only requirement
95 is that the first partition must be using fat32 and be bootable.
96
97 Mount the partitions (adjust 'sdX' to match your SDcard device):
98
99   $ sudo mount /dev/sdX1 /mnt/mountpointboot
100   $ sudo mount /dev/sdX2 /mnt/mountpointroot    (only for persistent rootfs)
101
102 Install the binaries to the SDCard
103 ----------------------------------
104
105 At the root of the boot partition, the Raspberry Pi must find the following
106 files:
107
108     * bcm2708-rpi-b.dtb         [1]
109     * bcm2708-rpi-b-plus.dtb    [2]
110     * bcm2709-rpi-2-b.dtb       [3]
111     * bootcode.bin
112     * config.txt
113     * fixup.dat
114     * start.elf
115     * zImage
116
117 [1] For models A and B
118 [2] For models A+ and B+
119 [3] For model 2
120
121 For example:
122
123  $ cp output/images/rpi-firmware/* /mnt/mountpointboot
124
125 If your kernel does *not* have support for the Device Tree, then install
126 it with:
127
128  $ cp output/images/zImage /mnt/mountpointboot
129
130 If your kernel *does* have support for the Device Tree, then install it
131 with:
132
133   $ ./output/host/usr/bin/mkknlimg output/images/zImage /mnt/mountpointboot/zImage
134
135 Note: The kernel image file name is defined in config.txt like this:
136 kernel=zImage
137
138 If you use a volatile rootfs, Skip to "Finish", below. For a persistent
139 rootfs, there are further steps to do.
140
141 Extract (as root!) the contents of the rootfs.tar archive into the second
142 partition you created above:
143
144   $ sudo tar xf ./output/images/rootfs.tar -C /mnt/mountpointroot
145
146 Finish
147 ======
148
149 Unmount all the partitions:
150
151   $ sudo umount /mnt/mountpointboot
152   $ sudo umount /mnt/mountpointroot     (only for persistent rootfs)
153
154 And eject your SDcard from your computer SDcard reader.
155
156 Insert the SDcard into your Raspberry Pi, and power it up. Your new system
157 should come up, now.