README 11 KB

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