summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorAndrei Gherzan <andrei@gherzan.ro>2017-05-12 15:37:48 +0100
committerAndrei Gherzan <andrei@gherzan.ro>2017-05-12 18:16:57 +0100
commitd8da77b57e88a64e2cc2ff494b1e33a5eb1b1686 (patch)
tree24e027304ff92b366848b75a63b8f68595c2f15b /README.md
parent3cf2582cc95eb4381f7f0a39be68f1fdcfb71e0a (diff)
downloadmeta-raspberrypi-d8da77b57e88a64e2cc2ff494b1e33a5eb1b1686.tar.gz
README: Migrate to markdown version
Add badges too. Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Diffstat (limited to 'README.md')
-rw-r--r--README.md288
1 files changed, 288 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..001c44c
--- /dev/null
+++ b/README.md
@@ -0,0 +1,288 @@
1# meta-raspberrypi
2
3Yocto BSP layer for the Raspberry Pi boards - http://www.raspberrypi.org/ .
4
5[![Build Status](https://yocto-ci.resin.io/job/meta-raspberrypi1/badge/icon)](https://yocto-ci.resin.io/job/meta-raspberrypi1)
6[![Build Status](https://yocto-ci.resin.io/job/meta-raspberrypi2/badge/icon)](https://yocto-ci.resin.io/job/meta-raspberrypi2)
7[![Build Status](https://yocto-ci.resin.io/job/meta-raspberrypi3/badge/icon)](https://yocto-ci.resin.io/job/meta-raspberrypi3)
8[![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/agherzan/meta-raspberrypi)
9
10## Quick links
11* Git repository web frontend: http://git.yoctoproject.org/cgit/cgit.cgi/meta-raspberrypi/
12* Mailing list (yocto mailing list): yocto@yoctoproject.org
13* Issues management (Github Issues): https://github.com/agherzan/meta-raspberrypi/issues
14
15## Contents
16```
171. Description
182. Yocto BSP Layer - Raspberry Pi
19 2.A. How to use it
20 2.B. Images
213. Optional build configuration
22 3.A. Compressed deployed files
23 3.B. GPU memory
24 3.C. Add purchased license codecs
25 3.D. Disable overscan
26 3.E. Set overclocking options
27 3.F. Video camera support with V4L2 drivers
28 3.G. Enable offline compositing support
29 3.H. Enable kgdb over console support
30 3.I. Boot to U-Boot
31 3.J. Image with Initramfs
32 3.K. Device tree support
33 3.L. Enable SPI bus
34 3.M. Enable I2C
35 3.N. Enable PiTFT support
36 3.O. Misc. display
37 3.P. Enable UART support
384. Extra apps
39 4.A. omxplayer
405. Board Configuration
41 5.A. Audio Routing
426. Source code and mirrors
437. Contribution
44 7.A. Mailing List
45 7.B. Github Issues
468. Maintainers
47```
48
49### 1. Description
50This is the general hardware specific BSP overlay for the RaspberryPi device.
51More information can be found at: http://www.raspberrypi.org/ (Official Site)
52The core BSP part of meta-raspberrypi should work with different OpenEmbedded/Yocto distributions and layer stacks, such as:
53* Distro-less (only with OE-Core).
54* Angstrom.
55* Yocto/Poky (main focus of testing).
56
57### 2. Yocto BSP Layer - RaspberryPi
58This layer depends on:
59* URI: git://git.yoctoproject.org/poky
60 * branch: master
61 * revision: HEAD
62* URI: git://git.openembedded.org/meta-openembedded
63 * layers: meta-oe, meta-multimedia, meta-networking, meta-python
64 * branch: master
65 * revision: HEAD
66
67#### 2.A. How to use it
681. source poky/oe-init-build-env rpi-build
692. Add this layer to bblayers.conf and dthe dependencies above
703. Set MACHINE in local.conf to one of the supported boards:
71 * raspberrypi
72 * raspberrypi0
73 * raspberrypi0-wifi
74 * raspberrypi2
75 * raspberrypi3
76 * raspberrypi3-64 (64 bit kernel & userspace)
77 * raspberrypi-cm (dummy alias for raspberrypi)
78 * raspberrypi-cm3 (dummy alias for raspberrypi2)
794. bitbake rpi-hwup-image
805. dd to a SD card the generated sdimg file (use xzcat if rpi-sdimg.xz is used)
816. Boot your RPI.
82
83#### 2.B. Images
84* rpi-hwup-image
85 * Hardware up image
86* rpi-basic-image
87 * Based on rpi-hwup-image with some added features (ex: splash)
88* rpi-test-image
89 * Image based on rpi-basic-image which includes most of the packages in this layer and some media samples.
90
91### 3. Optional build configuration
92There are a set of ways in which a user can influence different paramenters of the build. We list here the ones that are closely related to this BSP or specific to it. For the rest please check: http://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html
93
94#### 3.A. Compressed deployed files
951. Overwrite IMAGE_FSTYPES in local.conf
96 * `IMAGE_FSTYPES = "tar.bz2 ext3.xz"`
972. Overwrite SDIMG_ROOTFS_TYPE in local.conf
98 * `SDIMG_ROOTFS_TYPE = "ext3.xz"`
993. Overwrite SDIMG_COMPRESSION in local.conf
100 * `SDIMG_COMPRESSION = "xz"`
101
102Accommodate the values above to your own needs (ex: ext3 / ext4).
103
104#### 3.B. GPU memory
105| Variable | Details |
106|----------------|---------------------------------------------------------------------|
107| `GPU_MEM` | GPU memory in megabyte. Sets the memory split between the ARM and |
108| | GPU. ARM gets the remaining memory. Min 16. Default 64. |
109| `GPU_MEM_256` | GPU memory in megabyte for the 256MB Raspberry Pi. Ignored by the |
110| | 512MB RP. Overrides gpu_mem. Max 192. Default not set. |
111| `GPU_MEM_512` | GPU memory in megabyte for the 512MB Raspberry Pi. Ignored by the |
112| | 256MB RP. Overrides gpu_mem. Max 448. Default not set. |
113| `GPU_MEM_1024` | GPU memory in megabyte for the 1024MB Raspberry Pi. Ignored by the |
114| | 256MB/512MB RP. Overrides gpu_mem. Max 944. Default not set. |
115
116#### 3.C. Add purchased license codecs
117To add you own licenses use variables `KEY_DECODE_MPG2` and `KEY_DECODE_WVC1` in local.conf. Example:
118```
119KEY_DECODE_MPG2 = "12345678"
120KEY_DECODE_WVC1 = "12345678"
121```
122You can supply more licenses separated by comma. Example:
123```
124KEY_DECODE_WVC1 = "0x12345678,0xabcdabcd,0x87654321"
125```
126
127#### 3.D. Disable overscan
128By default the GPU adds a black border around the video output to compensate for TVs which cut off part of the image. To disable this set this variable in local.conf:
129`DISABLE_OVERSCAN = "1"`
130
131#### 3.E. Set overclocking options
132The Raspberry PI can be overclocked. As of now overclocking up to the "Turbo Mode" is officially supported by the raspbery and does not void warranty. Check the config.txt for a detailed description of options and modes. Example turbo mode:
133```
134ARM_FREQ = "1000"
135CORE_FREQ = "500"
136SDRAM_FREQ = "500"
137OVER_VOLTAGE = "6"
138```
139
140#### 3.F. Video camera support with V4L2 drivers
141Set this variable to enable support for the video camera (Linux 3.12.4+ required)
142`VIDEO_CAMERA = "1"`
143
144#### 3.G. Enable offline compositing support
145Set this variable to enable support for dispmanx offline compositing:
146`DISPMANX_OFFLINE = "1"`
147
148This will enable the firmware to fall back to off-line compositing of Dispmanx elements. Normally the compositing is done on-line, during scanout, but cannot handle too many elements. With off-line enabled, an off-screen buffer is allocated for compositing. When scene complexity (number and sizes
149of elements) is high, compositing will happen off-line into the buffer.
150
151Heavily recommended for Wayland/Weston.
152
153See: http://wayland.freedesktop.org/raspberrypi.html
154
155#### 3.H. Enable kgdb over console support
156To add the kdbg over console (kgdboc) parameter to the kernel command line, set this variable in local.conf:
157`ENABLE_KGDB = "1"`
158
159#### 3.I. Boot to U-Boot
160To have u-boot load kernel image, set in your local.conf:
161`KERNEL_IMAGETYPE = "uImage"`
162
163This will make kernel.img be u-boot image which will load uImage. By default, kernel.img is the actual kernel image (ex. Image).
164
165#### 3.J. Image with Initramfs
166To build an initramfs image :
167* Set this 3 kernel variables (in linux-raspberrypi.inc for example)
168 - kernel_configure_variable BLK_DEV_INITRD y
169 - kernel_configure_variable INITRAMFS_SOURCE ""
170 - kernel_configure_variable RD_GZIP y
171* Set the yocto variables (in linux-raspberrypi.inc for example)
172 - `INITRAMFS_IMAGE = "<a name for your initramfs image>"`
173 - `INITRAMFS_IMAGE_BUNDLE = "1"`
174* Set the meta-rasberrypi variable (in raspberrypi.conf for example)
175 - `KERNEL_INITRAMFS = "-initramfs"`
176
177#### 3.K. Device tree support
178Device tree for RPi is only supported when using linux-raspberrypi 3.18+ kernels.
179* Set `KERNEL_DEVICETREE` (in conf/machine/raspberrypi.conf)
180 - the trailer is added to the kernel image before kernel install task. While creating the SDCard image, this modified kernel is put on boot partition (as kernel.img) as well as DeviceTree blobs (.dtb files).
181
182NOTE: `KERNEL_DEVICETREE` is default enabled for kernel >= 3.18 and always disabled for
183 older kernel versions.
184
185#### 3.L. Enable SPI bus
186When using device tree kernels, set this variable to enable the SPI bus:
187`ENABLE_SPI_BUS = "1"`
188
189#### 3.M. Enable I2C
190When using device tree kernels, set this variable to enable I2C:
191`ENABLE_I2C = "1"`
192
193#### 3.N. Enable PiTFT support
194Basic support for using PiTFT screens can be enabled by adding below in local.conf:
195
196* `MACHINE_FEATURES += "pitft"`
197 - This will enable SPI bus and i2c device-trees, it will also setup framebuffer for console and x server on PiTFT.
198
199NOTE: To get this working the overlay for the PiTFT model must be build, added and specified as well (dtoverlay=<driver> in config.txt).
200
201Below is a list of currently supported PiTFT models in meta-raspberrypi, the modelname should be added as a MACHINE_FEATURES in local.conf like below:
202`MACHINE_FEATURES += "pitft <modelname>"`
203
204List of currently supported models:
205* pitft22
206* pitft28r
207* pitft35r
208
209#### 3.O. Misc. display
210If you would like to use the Waveshare "C" 1024×600, 7 inch Capacitive Touch Screen LCD, HDMI interface (http://www.waveshare.com/7inch-HDMI-LCD-C.htm) Rev 2.1, please set the following in your local.conf:
211`WAVESHARE_1024X600_C_2_1 = "1"`
212
213#### 3.P. Enable UART
214RaspberryPi 0, 1, 2 and CM will have UART console enabled by default.
215
216RaspberryPi 0 WiFi and 3 does not have the UART enabled by default because this needs a fixed core frequency and enable_uart wil set it to the minimum. Certain operations - 60fps h264 decode, high quality deinterlace - which aren't performed on the ARM may be affected, and we wouldn't want to do that to users
217who don't want to use the serial port. Users who want serial console support on RaspberryPi3 will have to explicitely set in local.conf: `ENABLE_UART = "1"`.
218
219Ref.:
220* https://github.com/raspberrypi/firmware/issues/553
221* https://github.com/RPi-Distro/repo/issues/22
222
223### 4. Extra apps
224
225#### 4.A. omxplayer
226omxplayer depends on libav which has a commercial license. So in order to be able to compile omxplayer you will need to whiteflag the commercial licenseadding to you local.conf:
227`LICENSE_FLAGS_WHITELIST = "commercial"`
228
229### 5. Board Configuration
230
231#### 5.A. Audio Routing
232To load audio driver
233`modprobe snd-bcm2835`
234To test audio playback
235`aplay test.wav`
236
237Note that without HDMI connected this emits audio from the 3.5in jack connector as expected. However With an HDMI display connected there is no audio output from the jack connector.
238
239To force the audio routing via the 3.5in jack connector use
240`amixer cset numid=3 1`
241
242Options to amixer cset are:
243```
2440=auto
2451=headphones
2462=hdmi
247```
248
249### 6. Source code and mirrors
250
251Main repo:
252* git://git.yoctoproject.org/meta-raspberrypi
253* http://git.yoctoproject.org/git/meta-raspberrypi
254
255Github mirror:
256* https://github.com/agherzan/meta-raspberrypi
257
258Bitbucket mirror:
259* https://bitbucket.org/agherzan/meta-raspberrypi
260
261
262### 7. Contributing
263
264#### 7.A. Mailing list
265The main communication tool we use is a mailing list:
266* yocto@yoctoproject.org
267* https://lists.yoctoproject.org/listinfo/yocto
268
269Feel free to ask any kind of questions but always prepend your email subject with "[meta-raspberrypi]". This is because we use the 'yocto' mailing list and not a perticular 'meta-raspberrypi' mailing list.
270
271To contribute to this layer you should send the patches for review to the above specified mailing list.
272The patches should be compliant with the openembedded patch guidelines: http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
273
274
275When creating patches, please use something like:
276`git format-patch -s --subject-prefix='meta-raspberrypi][PATCH' origin`
277
278When sending patches to mailing list, please use something like:
279`git send-email --to yocto@yoctoproject.org <generated patch>`
280
281#### 7.B. Github issues
282In order to manage and trace the meta-raspberrypi issues, we use github issues: https://github.com/agherzan/meta-raspberrypi/issues
283
284If you push patches which have a github issue associated, please provide the issue number in the commit log just before "Signed-off-by" line(s). Example line for a bug:
285`[Issue #13]`
286
287### 8. Maintainers
288* Andrei Gherzan `<andrei at gherzan.ro>`