blob: 65a1e5f9ab4659eeb08d9e0367b858e483cf9578 [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
Patrick Williamsb2e6a9b2017-02-23 20:31:26 -06007Issues management (Github Issues):
8 https://github.com/agherzan/meta-raspberrypi/issues
Patrick Williams8b8bc412016-08-17 15:02:23 -05009
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
Patrick Williamsb2e6a9b2017-02-23 20:31:26 -060040 7.B. Github Issues
Patrick Williams8b8bc412016-08-17 15:02:23 -0500418. 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
Patrick Williamsb2e6a9b2017-02-23 20:31:26 -060082 - raspberrypi-cm (dummy alias for raspberrypi)
83 - raspberrypi-cm3 (dummy alias for raspberrypi2)
Patrick Williams8b8bc412016-08-17 15:02:23 -050084d. bitbake rpi-hwup-image
85e. dd to a SD card the generated sdimg file (use xzcat if rpi-sdimg.xz is used)
86f. Boot your RPI.
87
882.B. Images
89-===========
90* rpi-hwup-image
91 Hardware up image
92* rpi-basic-image
93 Based on rpi-hwup-image with some added features (ex: splash)
94* rpi-test-image
95 Image based on rpi-basic-image which includes most of the packages in this
96 layer and some media samples.
97
983. Optional build configuration
99===============================
100
101There are a set of ways in which a user can influence different paramenters of the build.
102We list here the ones that are closely related to this BSP or specific to it. For the rest
103please check: http://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html
104
1053.A. Compressed deployed files
106==============================
1071. Overwrite IMAGE_FSTYPES in local.conf
108 IMAGE_FSTYPES = "tar.bz2 ext3.xz"
1092. Overwrite SDIMG_ROOTFS_TYPE in local.conf
110 SDIMG_ROOTFS_TYPE = "ext3.xz"
1113. Overwrite SDIMG_COMPRESSION in local.conf
112 SDIMG_COMPRESSION = "xz"
113*Accommodate the values above to your own needs (ex: ext3 / ext4).
114
1153.B. GPU memory
116===============
117Variable : Details
118GPU_MEM : GPU memory in megabyte. Sets the memory split between the ARM and
119 GPU. ARM gets the remaining memory. Min 16. Default 64.
120GPU_MEM_256 : GPU memory in megabyte for the 256MB Raspberry Pi. Ignored by the
121 512MB RP. Overrides gpu_mem. Max 192. Default not set.
122GPU_MEM_512 : GPU memory in megabyte for the 512MB Raspberry Pi. Ignored by the
123 256MB RP. Overrides gpu_mem. Max 448. Default not set.
124GPU_MEM_1024: GPU memory in megabyte for the 1024MB Raspberry Pi. Ignored by the
125 256MB/512MB RP. Overrides gpu_mem. Max 944. Default not set.
126
1273.C. Add purchased license codecs
128=================================
129To add you own licenses use variables KEY_DECODE_MPG2 and KEY_DECODE_WVC1 in
130local.conf. Example:
131KEY_DECODE_MPG2 = "12345678"
132KEY_DECODE_WVC1 = "12345678"
133You can supply more licenses separated by comma. Example:
134KEY_DECODE_WVC1 = "0x12345678,0xabcdabcd,0x87654321"
135
1363.D. Disable overscan
137=====================
138By default the GPU adds a black border around the video output to compensate for
139TVs which cut off part of the image. To disable this set this variable in
140local.conf:
141DISABLE_OVERSCAN = "1"
142
1433.E. Set overclocking options
144=============================
145The Raspberry PI can be overclocked. As of now overclocking up to the "Turbo
146Mode" is officially supported by the raspbery and does not void warranty.
147Check the config.txt for a detailed description of options and modes. Example:
148# Turbo mode
149ARM_FREQ = "1000"
150CORE_FREQ = "500"
151SDRAM_FREQ = "500"
152OVER_VOLTAGE = "6"
153
1543.F. Video camera support with V4L2 drivers
155===========================================
156Set this variable to enable support for the video camera (Linux 3.12.4+ required)
157VIDEO_CAMERA = "1"
158
1593.G. Enable offline compositing support
160=======================================
161Set this variable to enable support for dispmanx offline compositing
Patrick Williamsb2e6a9b2017-02-23 20:31:26 -0600162DISPMANX_OFFLINE = "1"
Patrick Williams8b8bc412016-08-17 15:02:23 -0500163
164This will enable the firmware to fall back to off-line compositing of
165Dispmanx elements. Normally the compositing is done on-line, during scanout,
166but cannot handle too many elements. With off-line enabled, an off-screen
167buffer is allocated for compositing. When scene complexity (number and sizes
168of elements) is high, compositing will happen off-line into the buffer.
169
170Heavily recommended for Wayland/Weston.
171
172See: http://wayland.freedesktop.org/raspberrypi.html
173
1743.H. Enable kgdb over console support
175=====================================
176To add the kdbg over console (kgdboc) parameter to the kernel command line,
177set this variable in local.conf:
178ENABLE_KGDB = "1"
179
1803.I. Boot to U-Boot
181===================
182To have u-boot load kernel image, set in your local.conf
183KERNEL_IMAGETYPE = "uImage"
184
185This will make kernel.img be u-boot image which will load uImage.
186By default, kernel.img is the actual kernel image (ex. Image).
187
1883.J. Image with Initramfs
189=========================
190To build an initramfs image :
191 * Set this 3 kernel variables (in linux-raspberrypi.inc for example)
192 - kernel_configure_variable BLK_DEV_INITRD y
193 - kernel_configure_variable INITRAMFS_SOURCE ""
194 - kernel_configure_variable RD_GZIP y
195 * Set the yocto variables (in linux-raspberrypi.inc for example)
196 - INITRAMFS_IMAGE = "<a name for your initramfs image>"
197 - INITRAMFS_IMAGE_BUNDLE = "1"
198 * Set the meta-rasberrypi variable (in raspberrypi.conf for example)
199 - KERNEL_INITRAMFS = "-initramfs"
200
2013.K. Device tree support
202=========================
203Device tree for RPi is only supported when using linux-raspberrypi 3.18+
204kernels.
205
206 * Set KERNEL_DEVICETREE (in conf/machine/raspberrypi.conf)
207 - the trailer is added to the kernel image before kernel install task.
208 While creating the SDCard image, this modified kernel is put on
209 boot partition (as kernel.img) as well as DeviceTree blobs (.dtb files).
210
211NOTE: KERNEL_DEVICETREE is default enabled for kernel >= 3.18 and always disabled for
212 older kernel versions.
213
2143.L. Enable SPI bus
215====================
216When using device tree kernels, set this variable to enable the SPI bus
217ENABLE_SPI_BUS = "1"
218
2193.M. Enable I2C
220===============
221When using device tree kernels, set this variable to enable I2C
222ENABLE_I2C = "1"
223
2243.N. Enable PiTFT support
225=========================
226Basic support for using PiTFT screens can be enabled by adding
227below in local.conf:
228
229MACHINE_FEATURES += "pitft"
230 - This will enable SPI bus and i2c device-trees, it will also setup
231 framebuffer for console and x server on PiTFT.
232
233NOTE: To get this working the overlay for the PiTFT model must be build,
234 added and specified as well (dtoverlay=<driver> in config.txt)
235
236Below is a list of currently supported PiTFT models in meta-raspberrypi,
237the modelname should be added as a MACHINE_FEATURES in local.conf like below:
238 - MACHINE_FEATURES += "pitft <modelname>"
239
240List of currently supported models:
241 - pitft22
242 - pitft28r
243
2443.O. Enable UART
245===============
246
247RaspberryPi 1, 2 and CM will have UART console enabled by default.
248
249RaspberryPi 3 does not have the UART enabled by default because this needs a
250fixed core frequency and enable_uart wil set it to the minimum. Certain
251operations - 60fps h264 decode, high quality deinterlace - which aren't
252performed on the ARM may be affected, and we wouldn't want to do that to users
253who don't want to use the serial port. Users who want serial console support on
254RaspberryPi3 will have to explicitely set in local.conf: ENABLE_UART = "1".
255
256Ref.: https://github.com/raspberrypi/firmware/issues/553
257 https://github.com/RPi-Distro/repo/issues/22
258
2594. Extra apps
260=============
261
2624.A. omxplayer
263==============
264omxplayer depends on libav which has a commercial license. So in order to be
265able to compile omxplayer you will need to whiteflag the commercial license
266adding to you local.conf:
267LICENSE_FLAGS_WHITELIST = "commercial"
268
2695. Board Configuration
270======================
271
2725.A. Audio Routing
273==================
274To load audio driver
275
276 modprobe snd-bcm2835
277
278To test audio playback
279
280 e.g. aplay test.wav
281
282Note that without HDMI connected this emits audio from the 3.5in jack connector
283as expected. However With an HDMI display connected there is no audio output from
284the jack connector.
285
286To force the audio routing via the 3.5in jack connector use
287
288 amixer cset numid=3 1
289
290Options to amixer cset are:
291
292 0=auto
293 1=headphones
294 2=hdmi
295
2966. Source code and mirrors
297==========================
298
299Main repo:
300 git://git.yoctoproject.org/meta-raspberrypi
301 http://git.yoctoproject.org/git/meta-raspberrypi
302
303Github mirror:
304 https://github.com/agherzan/meta-raspberrypi
305
306Bitbucket mirror:
307 https://bitbucket.org/agherzan/meta-raspberrypi
308
309
3107. Contributing
311===============
312
3137.A. Mailing list
314=================
315The main communication tool we use is a mailing list:
316 yocto@yoctoproject.org
317 https://lists.yoctoproject.org/listinfo/yocto
318
319Feel free to ask any kind of questions but always prepend your email subject
320with "[meta-raspberrypi]". This is because we use the 'yocto' mailing list and
321not a perticular 'meta-raspberrypi' mailing list.
322
323To contribute to this layer you should send the patches for review to the
324above specified mailing list.
325The patches should be compliant with the openembedded patch guidelines:
326http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
327
328
329When creating patches, please use something like:
330
331 git format-patch -s --subject-prefix='meta-raspberrypi][PATCH' origin
332
333When sending patches to mailing list, please use something like:
334
335 git send-email --to yocto@yoctoproject.org <generated patch>
336
3377.B. Github issues
338==================
339In order to manage and trace the meta-raspberrypi issues, we use github issues:
340 https://github.com/agherzan/meta-raspberrypi/issues
341
342If you push patches which have a github issue associated, please provide the
343issue number in the commit log just before "Signed-off-by" line(s). Example line
344for a bug:
345 [Issue #13]
346
347
3488. Maintainers
349==============
350
351 Andrei Gherzan <andrei at gherzan.ro>