blob: c39f9edeb8090eb2aed043caacb79a49e4060fd2 [file] [log] [blame]
Patrick Williams8b8bc412016-08-17 15:02:23 -05001Quick links
2===========
3Git repository web frontend:
4 http://git.yoctoproject.org/cgit/cgit.cgi/meta-raspberrypi/
5Mailing list (yocto mailing list):
6 yocto@yoctoproject.org
7Issues management (redmine):
8 http://redmine.gherzan.ro/projects/meta-raspberrypi
9
10
11Contents:
12=========
131. Description
142. Yocto BSP Layer - Raspberry Pi
15 2.A. How to use it
16 2.B. Images
173. Optional build configuration
18 3.A. Compressed deployed files
19 3.B. GPU memory
20 3.C. Add purchased license codecs
21 3.D. Disable overscan
22 3.E. Set overclocking options
23 3.F. Video camera support with V4L2 drivers
24 3.G. Enable offline compositing support
25 3.H. Enable kgdb over console support
26 3.I. Boot to U-Boot
27 3.J. Image with Initramfs
28 3.K. Device tree support
29 3.L. Enable SPI bus
30 3.M. Enable I2C
31 3.N. Enable PiTFT support
32 3.O. Enable UART support
334. Extra apps
34 4.A. omxplayer
355. Board Configuration
36 5.A. Audio Routing
376. Source code and mirrors
387. Contribution
39 7.A. Mailing List
40 7.B. Redmine
418. Maintainers
42
43
441. Description
45==============
46
47This is the general hardware specific BSP overlay for the RaspberryPi device.
48
49More information can be found at:
50 http://www.raspberrypi.org/ (Official Site)
51
52The core BSP part of meta-raspberrypi should work with different
53OpenEmbedded/Yocto distributions and layer stacks, such as:
54* Distro-less (only with OE-Core).
55* Angstrom.
56* Yocto/Poky (main focus of testing).
57
582. Yocto BSP Layer - RaspberryPi
59================================
60
61This layer depends on:
62
63URI: git://git.yoctoproject.org/poky
64branch: master
65revision: HEAD
66
67URI: git://git.openembedded.org/meta-openembedded
68layers: meta-oe, meta-multimedia
69branch: master
70revision: HEAD
71
722.A. How to use it
73==================
74a. source poky/oe-init-build-env rpi-build
75b. Add needed layer to bblayers.conf:
76 - meta-raspberrypi
77c. Set MACHINE in local.conf to one of the supported boards:
78 - raspberrypi
79 - raspberrypi0
80 - raspberrypi2
81 - raspberrypi3
82d. bitbake rpi-hwup-image
83e. dd to a SD card the generated sdimg file (use xzcat if rpi-sdimg.xz is used)
84f. Boot your RPI.
85
862.B. Images
87-===========
88* rpi-hwup-image
89 Hardware up image
90* rpi-basic-image
91 Based on rpi-hwup-image with some added features (ex: splash)
92* rpi-test-image
93 Image based on rpi-basic-image which includes most of the packages in this
94 layer and some media samples.
95
963. Optional build configuration
97===============================
98
99There are a set of ways in which a user can influence different paramenters of the build.
100We list here the ones that are closely related to this BSP or specific to it. For the rest
101please check: http://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html
102
1033.A. Compressed deployed files
104==============================
1051. Overwrite IMAGE_FSTYPES in local.conf
106 IMAGE_FSTYPES = "tar.bz2 ext3.xz"
1072. Overwrite SDIMG_ROOTFS_TYPE in local.conf
108 SDIMG_ROOTFS_TYPE = "ext3.xz"
1093. Overwrite SDIMG_COMPRESSION in local.conf
110 SDIMG_COMPRESSION = "xz"
111*Accommodate the values above to your own needs (ex: ext3 / ext4).
112
1133.B. GPU memory
114===============
115Variable : Details
116GPU_MEM : GPU memory in megabyte. Sets the memory split between the ARM and
117 GPU. ARM gets the remaining memory. Min 16. Default 64.
118GPU_MEM_256 : GPU memory in megabyte for the 256MB Raspberry Pi. Ignored by the
119 512MB RP. Overrides gpu_mem. Max 192. Default not set.
120GPU_MEM_512 : GPU memory in megabyte for the 512MB Raspberry Pi. Ignored by the
121 256MB RP. Overrides gpu_mem. Max 448. Default not set.
122GPU_MEM_1024: GPU memory in megabyte for the 1024MB Raspberry Pi. Ignored by the
123 256MB/512MB RP. Overrides gpu_mem. Max 944. Default not set.
124
1253.C. Add purchased license codecs
126=================================
127To add you own licenses use variables KEY_DECODE_MPG2 and KEY_DECODE_WVC1 in
128local.conf. Example:
129KEY_DECODE_MPG2 = "12345678"
130KEY_DECODE_WVC1 = "12345678"
131You can supply more licenses separated by comma. Example:
132KEY_DECODE_WVC1 = "0x12345678,0xabcdabcd,0x87654321"
133
1343.D. Disable overscan
135=====================
136By default the GPU adds a black border around the video output to compensate for
137TVs which cut off part of the image. To disable this set this variable in
138local.conf:
139DISABLE_OVERSCAN = "1"
140
1413.E. Set overclocking options
142=============================
143The Raspberry PI can be overclocked. As of now overclocking up to the "Turbo
144Mode" is officially supported by the raspbery and does not void warranty.
145Check the config.txt for a detailed description of options and modes. Example:
146# Turbo mode
147ARM_FREQ = "1000"
148CORE_FREQ = "500"
149SDRAM_FREQ = "500"
150OVER_VOLTAGE = "6"
151
1523.F. Video camera support with V4L2 drivers
153===========================================
154Set this variable to enable support for the video camera (Linux 3.12.4+ required)
155VIDEO_CAMERA = "1"
156
1573.G. Enable offline compositing support
158=======================================
159Set this variable to enable support for dispmanx offline compositing
160DISMANX_OFFLINE = "1"
161
162This will enable the firmware to fall back to off-line compositing of
163Dispmanx elements. Normally the compositing is done on-line, during scanout,
164but cannot handle too many elements. With off-line enabled, an off-screen
165buffer is allocated for compositing. When scene complexity (number and sizes
166of elements) is high, compositing will happen off-line into the buffer.
167
168Heavily recommended for Wayland/Weston.
169
170See: http://wayland.freedesktop.org/raspberrypi.html
171
1723.H. Enable kgdb over console support
173=====================================
174To add the kdbg over console (kgdboc) parameter to the kernel command line,
175set this variable in local.conf:
176ENABLE_KGDB = "1"
177
1783.I. Boot to U-Boot
179===================
180To have u-boot load kernel image, set in your local.conf
181KERNEL_IMAGETYPE = "uImage"
182
183This will make kernel.img be u-boot image which will load uImage.
184By default, kernel.img is the actual kernel image (ex. Image).
185
1863.J. Image with Initramfs
187=========================
188To build an initramfs image :
189 * Set this 3 kernel variables (in linux-raspberrypi.inc for example)
190 - kernel_configure_variable BLK_DEV_INITRD y
191 - kernel_configure_variable INITRAMFS_SOURCE ""
192 - kernel_configure_variable RD_GZIP y
193 * Set the yocto variables (in linux-raspberrypi.inc for example)
194 - INITRAMFS_IMAGE = "<a name for your initramfs image>"
195 - INITRAMFS_IMAGE_BUNDLE = "1"
196 * Set the meta-rasberrypi variable (in raspberrypi.conf for example)
197 - KERNEL_INITRAMFS = "-initramfs"
198
1993.K. Device tree support
200=========================
201Device tree for RPi is only supported when using linux-raspberrypi 3.18+
202kernels.
203
204 * Set KERNEL_DEVICETREE (in conf/machine/raspberrypi.conf)
205 - the trailer is added to the kernel image before kernel install task.
206 While creating the SDCard image, this modified kernel is put on
207 boot partition (as kernel.img) as well as DeviceTree blobs (.dtb files).
208
209NOTE: KERNEL_DEVICETREE is default enabled for kernel >= 3.18 and always disabled for
210 older kernel versions.
211
2123.L. Enable SPI bus
213====================
214When using device tree kernels, set this variable to enable the SPI bus
215ENABLE_SPI_BUS = "1"
216
2173.M. Enable I2C
218===============
219When using device tree kernels, set this variable to enable I2C
220ENABLE_I2C = "1"
221
2223.N. Enable PiTFT support
223=========================
224Basic support for using PiTFT screens can be enabled by adding
225below in local.conf:
226
227MACHINE_FEATURES += "pitft"
228 - This will enable SPI bus and i2c device-trees, it will also setup
229 framebuffer for console and x server on PiTFT.
230
231NOTE: To get this working the overlay for the PiTFT model must be build,
232 added and specified as well (dtoverlay=<driver> in config.txt)
233
234Below is a list of currently supported PiTFT models in meta-raspberrypi,
235the modelname should be added as a MACHINE_FEATURES in local.conf like below:
236 - MACHINE_FEATURES += "pitft <modelname>"
237
238List of currently supported models:
239 - pitft22
240 - pitft28r
241
2423.O. Enable UART
243===============
244
245RaspberryPi 1, 2 and CM will have UART console enabled by default.
246
247RaspberryPi 3 does not have the UART enabled by default because this needs a
248fixed core frequency and enable_uart wil set it to the minimum. Certain
249operations - 60fps h264 decode, high quality deinterlace - which aren't
250performed on the ARM may be affected, and we wouldn't want to do that to users
251who don't want to use the serial port. Users who want serial console support on
252RaspberryPi3 will have to explicitely set in local.conf: ENABLE_UART = "1".
253
254Ref.: https://github.com/raspberrypi/firmware/issues/553
255 https://github.com/RPi-Distro/repo/issues/22
256
2574. Extra apps
258=============
259
2604.A. omxplayer
261==============
262omxplayer depends on libav which has a commercial license. So in order to be
263able to compile omxplayer you will need to whiteflag the commercial license
264adding to you local.conf:
265LICENSE_FLAGS_WHITELIST = "commercial"
266
2675. Board Configuration
268======================
269
2705.A. Audio Routing
271==================
272To load audio driver
273
274 modprobe snd-bcm2835
275
276To test audio playback
277
278 e.g. aplay test.wav
279
280Note that without HDMI connected this emits audio from the 3.5in jack connector
281as expected. However With an HDMI display connected there is no audio output from
282the jack connector.
283
284To force the audio routing via the 3.5in jack connector use
285
286 amixer cset numid=3 1
287
288Options to amixer cset are:
289
290 0=auto
291 1=headphones
292 2=hdmi
293
2946. Source code and mirrors
295==========================
296
297Main repo:
298 git://git.yoctoproject.org/meta-raspberrypi
299 http://git.yoctoproject.org/git/meta-raspberrypi
300
301Github mirror:
302 https://github.com/agherzan/meta-raspberrypi
303
304Bitbucket mirror:
305 https://bitbucket.org/agherzan/meta-raspberrypi
306
307
3087. Contributing
309===============
310
3117.A. Mailing list
312=================
313The main communication tool we use is a mailing list:
314 yocto@yoctoproject.org
315 https://lists.yoctoproject.org/listinfo/yocto
316
317Feel free to ask any kind of questions but always prepend your email subject
318with "[meta-raspberrypi]". This is because we use the 'yocto' mailing list and
319not a perticular 'meta-raspberrypi' mailing list.
320
321To contribute to this layer you should send the patches for review to the
322above specified mailing list.
323The patches should be compliant with the openembedded patch guidelines:
324http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
325
326
327When creating patches, please use something like:
328
329 git format-patch -s --subject-prefix='meta-raspberrypi][PATCH' origin
330
331When sending patches to mailing list, please use something like:
332
333 git send-email --to yocto@yoctoproject.org <generated patch>
334
3357.B. Github issues
336==================
337In order to manage and trace the meta-raspberrypi issues, we use github issues:
338 https://github.com/agherzan/meta-raspberrypi/issues
339
340If you push patches which have a github issue associated, please provide the
341issue number in the commit log just before "Signed-off-by" line(s). Example line
342for a bug:
343 [Issue #13]
344
345
3468. Maintainers
347==============
348
349 Andrei Gherzan <andrei at gherzan.ro>