diff options
Diffstat (limited to 'import-layers/meta-raspberrypi')
83 files changed, 1508 insertions, 1177 deletions
diff --git a/import-layers/meta-raspberrypi/.github/ISSUE_TEMPLATE.md b/import-layers/meta-raspberrypi/.github/ISSUE_TEMPLATE.md new file mode 100644 index 000000000..ea2697d05 --- /dev/null +++ b/import-layers/meta-raspberrypi/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,27 @@ +<!-- +If you are reporting a new issue, make sure that we do not have any duplicates +already open. You can ensure this by searching the issue list for this +repository. If there is a duplicate, please close your issue and add a comment +to the existing issue instead. +--> + +**Description** + +<!-- +Briefly describe the problem you are having in a few paragraphs. +--> + +**Steps to reproduce the issue:** +1. +2. +3. + +**Describe the results you received:** + + +**Describe the results you expected:** + + +**Additional information you deem important (e.g. issue happens only occasionally):** + +**Additional details (revisions used, host distro, etc.):** diff --git a/import-layers/meta-raspberrypi/.github/PULL_REQUEST_TEMPLATE.md b/import-layers/meta-raspberrypi/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..223f23a82 --- /dev/null +++ b/import-layers/meta-raspberrypi/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,16 @@ +<!-- +Please make sure you've read and understood our contributing guidelines. + +For additional information on the contribution guidelines: +https://wiki.yoctoproject.org/wiki/Contribution_Guidelines#General_Information + +If this PR fixes an issue, make sure your description includes "fixes #xxxx". + +If this PR connects to an issue, make sure your description includes "connected to #xxxx". + +Please provide the following information: +--> + +**- What I did** + +**- How I did it** diff --git a/import-layers/meta-raspberrypi/.gitignore b/import-layers/meta-raspberrypi/.gitignore index bd5616a90..706144a55 100644 --- a/import-layers/meta-raspberrypi/.gitignore +++ b/import-layers/meta-raspberrypi/.gitignore @@ -3,3 +3,5 @@ build* .*.swp *.orig *.rej +*.log +docs/_build diff --git a/import-layers/meta-raspberrypi/README b/import-layers/meta-raspberrypi/README deleted file mode 100644 index bfc3e2ed1..000000000 --- a/import-layers/meta-raspberrypi/README +++ /dev/null @@ -1,352 +0,0 @@ -Quick links -=========== -Git repository web frontend: - http://git.yoctoproject.org/cgit/cgit.cgi/meta-raspberrypi/ -Mailing list (yocto mailing list): - yocto@yoctoproject.org -Issues management (Github Issues): - https://github.com/agherzan/meta-raspberrypi/issues - - -Contents: -========= -1. Description -2. Yocto BSP Layer - Raspberry Pi - 2.A. How to use it - 2.B. Images -3. Optional build configuration - 3.A. Compressed deployed files - 3.B. GPU memory - 3.C. Add purchased license codecs - 3.D. Disable overscan - 3.E. Set overclocking options - 3.F. Video camera support with V4L2 drivers - 3.G. Enable offline compositing support - 3.H. Enable kgdb over console support - 3.I. Boot to U-Boot - 3.J. Image with Initramfs - 3.K. Device tree support - 3.L. Enable SPI bus - 3.M. Enable I2C - 3.N. Enable PiTFT support - 3.O. Enable UART support -4. Extra apps - 4.A. omxplayer -5. Board Configuration - 5.A. Audio Routing -6. Source code and mirrors -7. Contribution - 7.A. Mailing List - 7.B. Github Issues -8. Maintainers - - -1. Description -============== - -This is the general hardware specific BSP overlay for the RaspberryPi device. - -More information can be found at: - http://www.raspberrypi.org/ (Official Site) - -The core BSP part of meta-raspberrypi should work with different -OpenEmbedded/Yocto distributions and layer stacks, such as: -* Distro-less (only with OE-Core). -* Angstrom. -* Yocto/Poky (main focus of testing). - -2. Yocto BSP Layer - RaspberryPi -================================ - -This layer depends on: - -URI: git://git.yoctoproject.org/poky -branch: master -revision: HEAD - -URI: git://git.openembedded.org/meta-openembedded -layers: meta-oe, meta-multimedia, meta-networking, meta-python -branch: master -revision: HEAD - -2.A. How to use it -================== -a. source poky/oe-init-build-env rpi-build -b. Add needed layer to bblayers.conf: - - meta-raspberrypi -c. Set MACHINE in local.conf to one of the supported boards: - - raspberrypi - - raspberrypi0 - - raspberrypi0-wifi - - raspberrypi2 - - raspberrypi3 - - raspberrypi-cm (dummy alias for raspberrypi) - - raspberrypi-cm3 (dummy alias for raspberrypi2) -d. bitbake rpi-hwup-image -e. dd to a SD card the generated sdimg file (use xzcat if rpi-sdimg.xz is used) -f. Boot your RPI. - -2.B. Images --=========== -* rpi-hwup-image - Hardware up image -* rpi-basic-image - Based on rpi-hwup-image with some added features (ex: splash) -* rpi-test-image - Image based on rpi-basic-image which includes most of the packages in this - layer and some media samples. - -3. Optional build configuration -=============================== - -There 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 - -3.A. Compressed deployed files -============================== -1. Overwrite IMAGE_FSTYPES in local.conf - IMAGE_FSTYPES = "tar.bz2 ext3.xz" -2. Overwrite SDIMG_ROOTFS_TYPE in local.conf - SDIMG_ROOTFS_TYPE = "ext3.xz" -3. Overwrite SDIMG_COMPRESSION in local.conf - SDIMG_COMPRESSION = "xz" -*Accommodate the values above to your own needs (ex: ext3 / ext4). - -3.B. GPU memory -=============== -Variable : Details -GPU_MEM : GPU memory in megabyte. Sets the memory split between the ARM and - GPU. ARM gets the remaining memory. Min 16. Default 64. -GPU_MEM_256 : GPU memory in megabyte for the 256MB Raspberry Pi. Ignored by the - 512MB RP. Overrides gpu_mem. Max 192. Default not set. -GPU_MEM_512 : GPU memory in megabyte for the 512MB Raspberry Pi. Ignored by the - 256MB RP. Overrides gpu_mem. Max 448. Default not set. -GPU_MEM_1024: GPU memory in megabyte for the 1024MB Raspberry Pi. Ignored by the - 256MB/512MB RP. Overrides gpu_mem. Max 944. Default not set. - -3.C. Add purchased license codecs -================================= -To add you own licenses use variables KEY_DECODE_MPG2 and KEY_DECODE_WVC1 in -local.conf. Example: -KEY_DECODE_MPG2 = "12345678" -KEY_DECODE_WVC1 = "12345678" -You can supply more licenses separated by comma. Example: -KEY_DECODE_WVC1 = "0x12345678,0xabcdabcd,0x87654321" - -3.D. Disable overscan -===================== -By 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: -DISABLE_OVERSCAN = "1" - -3.E. Set overclocking options -============================= -The 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 -ARM_FREQ = "1000" -CORE_FREQ = "500" -SDRAM_FREQ = "500" -OVER_VOLTAGE = "6" - -3.F. Video camera support with V4L2 drivers -=========================================== -Set this variable to enable support for the video camera (Linux 3.12.4+ required) -VIDEO_CAMERA = "1" - -3.G. Enable offline compositing support -======================================= -Set this variable to enable support for dispmanx offline compositing -DISPMANX_OFFLINE = "1" - -This 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 -of elements) is high, compositing will happen off-line into the buffer. - -Heavily recommended for Wayland/Weston. - -See: http://wayland.freedesktop.org/raspberrypi.html - -3.H. Enable kgdb over console support -===================================== -To add the kdbg over console (kgdboc) parameter to the kernel command line, -set this variable in local.conf: -ENABLE_KGDB = "1" - -3.I. Boot to U-Boot -=================== -To have u-boot load kernel image, set in your local.conf -KERNEL_IMAGETYPE = "uImage" - -This will make kernel.img be u-boot image which will load uImage. -By default, kernel.img is the actual kernel image (ex. Image). - -3.J. Image with Initramfs -========================= -To build an initramfs image : - * Set this 3 kernel variables (in linux-raspberrypi.inc for example) - - kernel_configure_variable BLK_DEV_INITRD y - - kernel_configure_variable INITRAMFS_SOURCE "" - - kernel_configure_variable RD_GZIP y - * Set the yocto variables (in linux-raspberrypi.inc for example) - - INITRAMFS_IMAGE = "<a name for your initramfs image>" - - INITRAMFS_IMAGE_BUNDLE = "1" - * Set the meta-rasberrypi variable (in raspberrypi.conf for example) - - KERNEL_INITRAMFS = "-initramfs" - -3.K. Device tree support -========================= -Device tree for RPi is only supported when using linux-raspberrypi 3.18+ -kernels. - - * Set KERNEL_DEVICETREE (in conf/machine/raspberrypi.conf) - - 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). - -NOTE: KERNEL_DEVICETREE is default enabled for kernel >= 3.18 and always disabled for - older kernel versions. - -3.L. Enable SPI bus -==================== -When using device tree kernels, set this variable to enable the SPI bus -ENABLE_SPI_BUS = "1" - -3.M. Enable I2C -=============== -When using device tree kernels, set this variable to enable I2C -ENABLE_I2C = "1" - -3.N. Enable PiTFT support -========================= -Basic support for using PiTFT screens can be enabled by adding -below in local.conf: - -MACHINE_FEATURES += "pitft" - - This will enable SPI bus and i2c device-trees, it will also setup - framebuffer for console and x server on PiTFT. - -NOTE: To get this working the overlay for the PiTFT model must be build, - added and specified as well (dtoverlay=<driver> in config.txt) - -Below 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: - - MACHINE_FEATURES += "pitft <modelname>" - -List of currently supported models: - - pitft22 - - pitft28r - -3.O. Enable UART -=============== -RaspberryPi 0, 1, 2 and CM will have UART console enabled by default. - -RaspberryPi 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 -who 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". - -Ref.: https://github.com/raspberrypi/firmware/issues/553 - https://github.com/RPi-Distro/repo/issues/22 - -4. Extra apps -============= - -4.A. omxplayer -============== -omxplayer depends on libav which has a commercial license. So in order to be -able to compile omxplayer you will need to whiteflag the commercial license -adding to you local.conf: -LICENSE_FLAGS_WHITELIST = "commercial" - -5. Board Configuration -====================== - -5.A. Audio Routing -================== -To load audio driver - - modprobe snd-bcm2835 - -To test audio playback - - e.g. aplay test.wav - -Note 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. - -To force the audio routing via the 3.5in jack connector use - - amixer cset numid=3 1 - -Options to amixer cset are: - - 0=auto - 1=headphones - 2=hdmi - -6. Source code and mirrors -========================== - -Main repo: - git://git.yoctoproject.org/meta-raspberrypi - http://git.yoctoproject.org/git/meta-raspberrypi - -Github mirror: - https://github.com/agherzan/meta-raspberrypi - -Bitbucket mirror: - https://bitbucket.org/agherzan/meta-raspberrypi - - -7. Contributing -=============== - -7.A. Mailing list -================= -The main communication tool we use is a mailing list: - yocto@yoctoproject.org - https://lists.yoctoproject.org/listinfo/yocto - -Feel 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. - -7.B. Patches and pull requests -============================== - -To contribute to this project you should send pull requests to the github mirror -(<https://github.com/agherzan/meta-raspberrypi>). **Additionally** you can send -the patches for review to the above specified mailing list. - -When creating patches, please use something like: - - git format-patch -s --subject-prefix='meta-raspberrypi][PATCH' origin - -When sending patches to mailing list, please use something like: - - git send-email --to yocto@yoctoproject.org <generated patch> - -7.C. Github issues -================== -In order to manage and trace the meta-raspberrypi issues, we use github issues: - https://github.com/agherzan/meta-raspberrypi/issues - -If 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: - [Issue #13] - - -8. Maintainers -============== - - Andrei Gherzan <andrei at gherzan.ro> diff --git a/import-layers/meta-raspberrypi/README.md b/import-layers/meta-raspberrypi/README.md new file mode 100644 index 000000000..c2ea048fe --- /dev/null +++ b/import-layers/meta-raspberrypi/README.md @@ -0,0 +1,55 @@ +# meta-raspberrypi + +Yocto BSP layer for the Raspberry Pi boards - <http://www.raspberrypi.org/>. + +[](https://yocto-ci.resin.io/job/meta-raspberrypi1) +[](https://yocto-ci.resin.io/job/meta-raspberrypi2) +[](https://yocto-ci.resin.io/job/meta-raspberrypi3) +[](https://gitter.im/agherzan/meta-raspberrypi) + +## Quick links + +* Git repository web frontend: + <http://git.yoctoproject.org/cgit/cgit.cgi/meta-raspberrypi/> +* Mailing list (yocto mailing list): <yocto@yoctoproject.org> +* Issues management (Github Issues): + <https://github.com/agherzan/meta-raspberrypi/issues> + +## Description + +This is the general hardware specific BSP overlay for the RaspberryPi device. + +More information can be found at: <http://www.raspberrypi.org/> (Official Site) + +The core BSP part of meta-raspberrypi should work with different +OpenEmbedded/Yocto distributions and layer stacks, such as: + +* Distro-less (only with OE-Core). +* Angstrom. +* Yocto/Poky (main focus of testing). + +## Dependencies + +This layer depends on: + +* URI: git://git.yoctoproject.org/poky + * branch: pyro + * revision: HEAD + +* URI: git://git.openembedded.org/meta-openembedded + * layers: meta-oe, meta-multimedia, meta-networking, meta-python + * branch: pyro + * revision: HEAD + +## Quick Start + +1. source poky/oe-init-build-env rpi-build +2. Add this layer to bblayers.conf and the dependencies above +3. Set MACHINE in local.conf to one of the supported boards +4. bitbake rpi-hwup-image +5. dd to a SD card the generated sdimg file (use xzcat if rpi-sdimg.xz is used) +6. Boot your RPI. + +## Maintainers + +* Andrei Gherzan `<andrei at gherzan.ro>` diff --git a/import-layers/meta-raspberrypi/classes/linux-raspberrypi-base.bbclass b/import-layers/meta-raspberrypi/classes/linux-raspberrypi-base.bbclass index dc2330af2..e925d4e91 100644 --- a/import-layers/meta-raspberrypi/classes/linux-raspberrypi-base.bbclass +++ b/import-layers/meta-raspberrypi/classes/linux-raspberrypi-base.bbclass @@ -3,8 +3,8 @@ inherit linux-kernel-base def get_dts(d, ver=None): import re - staging_dir = d.getVar("STAGING_KERNEL_BUILDDIR", True) - dts = d.getVar("KERNEL_DEVICETREE", True) + staging_dir = d.getVar("STAGING_KERNEL_BUILDDIR") + dts = d.getVar("KERNEL_DEVICETREE") # d.getVar() might return 'None' as a normal string # leading to 'is None' check isn't enough. diff --git a/import-layers/meta-raspberrypi/classes/sdcard_image-rpi.bbclass b/import-layers/meta-raspberrypi/classes/sdcard_image-rpi.bbclass index 79ab53aa4..56a854e03 100644 --- a/import-layers/meta-raspberrypi/classes/sdcard_image-rpi.bbclass +++ b/import-layers/meta-raspberrypi/classes/sdcard_image-rpi.bbclass @@ -72,6 +72,10 @@ SDIMG = "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.rpi-sdimg" # Additional files and/or directories to be copied into the vfat partition from the IMAGE_ROOTFS. FATPAYLOAD ?= "" +# SD card vfat partition image name +SDIMG_VFAT = "${IMAGE_NAME}.vfat" +SDIMG_LINK_VFAT = "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.vfat" + IMAGE_CMD_rpi-sdimg () { # Align partitions @@ -107,7 +111,7 @@ IMAGE_CMD_rpi-sdimg () { DT_ROOT="${@split_overlays(d, 1)}" # Copy board device trees to root folder - for DTB in ${DT_ROOT}; do + for DTB in $DT_ROOT; do DTB_BASE_NAME=`basename ${DTB} .dtb` mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTB_BASE_NAME}.dtb ::${DTB_BASE_NAME}.dtb @@ -115,7 +119,7 @@ IMAGE_CMD_rpi-sdimg () { # Copy device tree overlays to dedicated folder mmd -i ${WORKDIR}/boot.img overlays - for DTB in ${DT_OVERLAYS}; do + for DTB in $DT_OVERLAYS; do DTB_EXT=${DTB##*.} DTB_BASE_NAME=`basename ${DTB} ."${DTB_EXT}"` @@ -145,6 +149,16 @@ IMAGE_CMD_rpi-sdimg () { echo "${IMAGE_NAME}" > ${WORKDIR}/image-version-info mcopy -i ${WORKDIR}/boot.img -v ${WORKDIR}/image-version-info :: + # Deploy vfat partition (for u-boot case only) + case "${KERNEL_IMAGETYPE}" in + "uImage") + cp ${WORKDIR}/boot.img ${IMGDEPLOYDIR}/${SDIMG_VFAT} + ln -sf ${SDIMG_VFAT} ${SDIMG_LINK_VFAT} + ;; + *) + ;; + esac + # Burn Partitions dd if=${WORKDIR}/boot.img of=${SDIMG} conv=notrunc seek=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync # If SDIMG_ROOTFS_TYPE is a .xz file use xzcat diff --git a/import-layers/meta-raspberrypi/conf/machine/include/rpi-base.inc b/import-layers/meta-raspberrypi/conf/machine/include/rpi-base.inc index dc98099f2..7ed108839 100644 --- a/import-layers/meta-raspberrypi/conf/machine/include/rpi-base.inc +++ b/import-layers/meta-raspberrypi/conf/machine/include/rpi-base.inc @@ -32,6 +32,7 @@ KERNEL_DEVICETREE ?= " \ overlays/lirc-rpi.dtbo \ overlays/pitft22.dtbo \ overlays/pitft28-resistive.dtbo \ + overlays/pitft35-resistive.dtbo \ overlays/pps-gpio.dtbo \ overlays/rpi-ft5406.dtbo \ overlays/w1-gpio.dtbo \ @@ -52,7 +53,44 @@ MACHINE_EXTRA_RRECOMMENDS += " kernel-modules" # Set Raspberrypi splash image SPLASH = "psplash-raspberrypi" -IMAGE_BOOT_FILES ?= "bcm2835-bootfiles/* ${KERNEL_IMAGETYPE};${SDIMG_KERNELIMAGE}" +def make_dtb_boot_files(d): + # Generate IMAGE_BOOT_FILES entries for device tree files listed in + # KERNEL_DEVICETREE. + alldtbs = d.getVar('KERNEL_DEVICETREE') + imgtyp = d.getVar('KERNEL_IMAGETYPE') + + def transform(dtb): + if dtb.endswith('dtb'): + # eg: whatever/bcm2708-rpi-b.dtb has: + # DEPLOYDIR file: ${KERNEL_IMAGETYPE}-bcm2708-rpi-b.dtb + # destination: bcm2708-rpi-b.dtb + base = os.path.basename(dtb) + src = '{}-{}'.format(imgtyp, base) + dst = base + return '{};{}'.format(src, dst) + elif dtb.endswith('dtbo'): + # overlay dtb: + # eg: overlays/hifiberry-amp.dtbo has: + # DEPLOYDIR file: ${KERNEL_IMAGETYPE}-hifiberry-amp.dtbo + # destination: overlays/hifiberry-amp.dtbo + base = os.path.basename(dtb) + src = '{}-{}'.format(imgtyp, base) + dst = dtb + return '{};{}'.format(src, dtb) + + return ' '.join([transform(dtb) for dtb in alldtbs.split(' ') if dtb]) + + +IMAGE_BOOT_FILES ?= "bcm2835-bootfiles/* \ + ${@make_dtb_boot_files(d)} \ + ${@bb.utils.contains('KERNEL_IMAGETYPE', 'uImage', \ + '${KERNEL_IMAGETYPE} u-boot.bin;${SDIMG_KERNELIMAGE} boot.scr', \ + '${KERNEL_IMAGETYPE};${SDIMG_KERNELIMAGE}', d)} \ + " +do_image_wic[depends] += " \ + bcm2835-bootfiles:do_deploy \ + ${@bb.utils.contains('RPI_USE_U_BOOT', '1', 'u-boot:do_deploy', '',d)} \ + " # The kernel image is installed into the FAT32 boot partition and does not need # to also be installed into the rootfs. diff --git a/import-layers/meta-raspberrypi/conf/machine/include/rpi-default-providers.inc b/import-layers/meta-raspberrypi/conf/machine/include/rpi-default-providers.inc index 078e9d673..5b2658ba3 100644 --- a/import-layers/meta-raspberrypi/conf/machine/include/rpi-default-providers.inc +++ b/import-layers/meta-raspberrypi/conf/machine/include/rpi-default-providers.inc @@ -6,4 +6,5 @@ PREFERRED_PROVIDER_virtual/egl ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4 PREFERRED_PROVIDER_virtual/libgles2 ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "mesa", "userland", d)}" PREFERRED_PROVIDER_virtual/libgl ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "mesa", "mesa-gl", d)}" PREFERRED_PROVIDER_virtual/mesa ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "mesa", "mesa-gl", d)}" +PREFERRED_PROVIDER_libgbm ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "mesa", "mesa-gl", d)}" PREFERRED_PROVIDER_jpeg ?= "jpeg" diff --git a/import-layers/meta-raspberrypi/conf/machine/include/rpi-default-versions.inc b/import-layers/meta-raspberrypi/conf/machine/include/rpi-default-versions.inc index e65a4ae9e..faa6b41d0 100644 --- a/import-layers/meta-raspberrypi/conf/machine/include/rpi-default-versions.inc +++ b/import-layers/meta-raspberrypi/conf/machine/include/rpi-default-versions.inc @@ -1,3 +1,3 @@ # RaspberryPi BSP default versions -PREFERRED_VERSION_linux-raspberrypi ?= "4.4.%" +PREFERRED_VERSION_linux-raspberrypi ??= "4.9.%" diff --git a/import-layers/meta-raspberrypi/conf/machine/raspberrypi0.conf b/import-layers/meta-raspberrypi/conf/machine/raspberrypi0.conf index 7c2b81193..3bd9e956e 100644 --- a/import-layers/meta-raspberrypi/conf/machine/raspberrypi0.conf +++ b/import-layers/meta-raspberrypi/conf/machine/raspberrypi0.conf @@ -5,5 +5,5 @@ MACHINEOVERRIDES = "raspberrypi:${MACHINE}" include conf/machine/raspberrypi.conf -SERIAL_CONSOLE = "115200 ttyAMA0" +SERIAL_CONSOLE ?= "115200 ttyAMA0" VC4_CMA_SIZE ?= "cma-128" diff --git a/import-layers/meta-raspberrypi/conf/machine/raspberrypi3-64.conf b/import-layers/meta-raspberrypi/conf/machine/raspberrypi3-64.conf index fc361426b..e3d11f20a 100644 --- a/import-layers/meta-raspberrypi/conf/machine/raspberrypi3-64.conf +++ b/import-layers/meta-raspberrypi/conf/machine/raspberrypi3-64.conf @@ -6,9 +6,6 @@ MACHINEOVERRIDES = "raspberrypi3:${MACHINE}" MACHINE_EXTRA_RRECOMMENDS += "linux-firmware-bcm43430" -# Set this early so it overrides rpi-default-versions.inc -PREFERRED_VERSION_linux-raspberrypi ?= "4.9.%" - require conf/machine/include/arm/arch-armv8.inc include conf/machine/include/rpi-base.inc @@ -26,6 +23,7 @@ KERNEL_DEVICETREE = " \ overlays/lirc-rpi.dtbo \ overlays/pitft22.dtbo \ overlays/pitft28-resistive.dtbo \ + overlays/pitft35-resistive.dtbo \ overlays/pps-gpio.dtbo \ overlays/rpi-ft5406.dtbo \ overlays/w1-gpio.dtbo \ @@ -39,3 +37,4 @@ SERIAL_CONSOLE ?= "115200 ttyS0" VC4_CMA_SIZE ?= "cma-256" UBOOT_MACHINE = "rpi_3_config" +MACHINE_FEATURES_append = " vc4graphics" diff --git a/import-layers/meta-raspberrypi/conf/machine/raspberrypi3.conf b/import-layers/meta-raspberrypi/conf/machine/raspberrypi3.conf index 884d875a1..b511bec0d 100644 --- a/import-layers/meta-raspberrypi/conf/machine/raspberrypi3.conf +++ b/import-layers/meta-raspberrypi/conf/machine/raspberrypi3.conf @@ -10,6 +10,6 @@ MACHINE_EXTRA_RRECOMMENDS += "linux-firmware-bcm43430" SDIMG_KERNELIMAGE ?= "kernel7.img" KERNEL_DEFCONFIG ?= "bcm2709_defconfig" -UBOOT_MACHINE ?= "rpi_2_config" +UBOOT_MACHINE = "rpi_3_32b_config" SERIAL_CONSOLE ?= "115200 ttyS0" VC4_CMA_SIZE ?= "cma-256" diff --git a/import-layers/meta-raspberrypi/docs/Makefile b/import-layers/meta-raspberrypi/docs/Makefile new file mode 100644 index 000000000..d0de87ff7 --- /dev/null +++ b/import-layers/meta-raspberrypi/docs/Makefile @@ -0,0 +1,225 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = _build + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . +# the i18n builder cannot share the environment and doctrees with the others +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +.PHONY: help +help: + @echo "Please use \`make <target>' where <target> is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " applehelp to make an Apple Help Book" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " epub3 to make an epub3" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " texinfo to make Texinfo files" + @echo " info to make Texinfo files and run them through makeinfo" + @echo " gettext to make PO message catalogs" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " xml to make Docutils-native XML files" + @echo " pseudoxml to make pseudoxml-XML files for display purposes" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + @echo " coverage to run coverage check of the documentation (if enabled)" + @echo " dummy to check syntax errors of document sources" + +.PHONY: clean +clean: + rm -rf $(BUILDDIR)/* + +.PHONY: html +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +.PHONY: dirhtml +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +.PHONY: singlehtml +singlehtml: + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +.PHONY: pickle +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +.PHONY: json +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +.PHONY: htmlhelp +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +.PHONY: qthelp +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/meta-raspberrypi.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/meta-raspberrypi.qhc" + +.PHONY: applehelp +applehelp: + $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp + @echo + @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." + @echo "N.B. You won't be able to view it unless you put it in" \ + "~/Library/Documentation/Help or install it in your application" \ + "bundle." + +.PHONY: devhelp +devhelp: + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $$HOME/.local/share/devhelp/meta-raspberrypi" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/meta-raspberrypi" + @echo "# devhelp" + +.PHONY: epub +epub: + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +.PHONY: epub3 +epub3: + $(SPHINXBUILD) -b epub3 $(ALLSPHINXOPTS) $(BUILDDIR)/epub3 + @echo + @echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3." + +.PHONY: latex +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +.PHONY: latexpdf +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +.PHONY: latexpdfja +latexpdfja: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through platex and dvipdfmx..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +.PHONY: text +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +.PHONY: man +man: + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +.PHONY: texinfo +texinfo: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo + @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." + @echo "Run \`make' in that directory to run these through makeinfo" \ + "(use \`make info' here to do that automatically)." + +.PHONY: info +info: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo "Running Texinfo files through makeinfo..." + make -C $(BUILDDIR)/texinfo info + @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." + +.PHONY: gettext +gettext: + $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale + @echo + @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." + +.PHONY: changes +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +.PHONY: linkcheck +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +.PHONY: doctest +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." + +.PHONY: coverage +coverage: + $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage + @echo "Testing of coverage in the sources finished, look at the " \ + "results in $(BUILDDIR)/coverage/python.txt." + +.PHONY: xml +xml: + $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml + @echo + @echo "Build finished. The XML files are in $(BUILDDIR)/xml." + +.PHONY: pseudoxml +pseudoxml: + $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml + @echo + @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." + +.PHONY: dummy +dummy: + $(SPHINXBUILD) -b dummy $(ALLSPHINXOPTS) $(BUILDDIR)/dummy + @echo + @echo "Build finished. Dummy builder generates no files." diff --git a/import-layers/meta-raspberrypi/docs/conf.py b/import-layers/meta-raspberrypi/docs/conf.py new file mode 100644 index 000000000..ce0bb0ad0 --- /dev/null +++ b/import-layers/meta-raspberrypi/docs/conf.py @@ -0,0 +1,343 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# meta-raspberrypi documentation build configuration file, created by +# sphinx-quickstart on Tue May 23 09:51:24 2017. +# +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +# import os +# import sys +# sys.path.insert(0, os.path.abspath('.')) + +# -- General configuration ------------------------------------------------ + +# If your documentation needs a minimal Sphinx version, state it here. +# +# needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# +# source_suffix = ['.rst', '.md'] +source_suffix = ['.rst', '.md'] + +# The encoding of source files. +# +# source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = 'meta-raspberrypi' +copyright = '2017, meta-raspberrypi contributors' +author = 'meta-raspberrypi contributors' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = 'pyro' +# The full version, including alpha/beta/rc tags. +release = 'pyro' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +# +# today = '' +# +# Else, today_fmt is used as the format for a strftime call. +# +# today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This patterns also effect to html_static_path and html_extra_path +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] + +# The reST default role (used for this markup: `text`) to use for all +# documents. +# +# default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +# +# add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +# +# add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +# +# show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +# modindex_common_prefix = [] + +# If true, keep warnings as "system message" paragraphs in the built documents. +# keep_warnings = False + +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = False + + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = 'alabaster' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +# +# html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +# html_theme_path = [] + +# The name for this set of Sphinx documents. +# "<project> v<release> documentation" by default. +# +# html_title = 'meta-raspberrypi vmaster' + +# A shorter title for the navigation bar. Default is the same as html_title. +# +# html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +# +# html_logo = None + +# The name of an image file (relative to this directory) to use as a favicon of +# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +# +# html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# Add any extra paths that contain custom files (such as robots.txt or +# .htaccess) here, relative to this directory. These files are copied +# directly to the root of the documentation. +# +# html_extra_path = [] + +# If not None, a 'Last updated on:' timestamp is inserted at every page +# bottom, using the given strftime format. +# The empty string is equivalent to '%b %d, %Y'. +# +# html_last_updated_fmt = None + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +# +# html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +# +# html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +# +# html_additional_pages = {} + +# If false, no module index is generated. +# +# html_domain_indices = True + +# If false, no index is generated. +# +# html_use_index = True + +# If true, the index is split into individual pages for each letter. +# +# html_split_index = False + +# If true, links to the reST sources are added to the pages. +# +# html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +# +# html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +# +# html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a <link> tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +# +# html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +# html_file_suffix = None + +# Language to be used for generating the HTML full-text search index. +# Sphinx supports the following languages: +# 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja' +# 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr', 'zh' +# +# html_search_language = 'en' + +# A dictionary with options for the search language support, empty by default. +# 'ja' uses this config value. +# 'zh' user can custom change `jieba` dictionary path. +# +# html_search_options = {'type': 'default'} + +# The name of a javascript file (relative to the configuration directory) that +# implements a search results scorer. If empty, the default will be used. +# +# html_search_scorer = 'scorer.js' + +# Output file base name for HTML help builder. +htmlhelp_basename = 'meta-raspberrypidoc' + +# -- Options for LaTeX output --------------------------------------------- + +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + # + # 'papersize': 'letterpaper', + + # The font size ('10pt', '11pt' or '12pt'). + # + # 'pointsize': '10pt', + + # Additional stuff for the LaTeX preamble. + # + # 'preamble': '', + + # Latex figure (float) alignment + # + # 'figure_align': 'htbp', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + (master_doc, 'meta-raspberrypi.tex', 'meta-raspberrypi Documentation', + 'meta-raspberrypi contributors', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +# +# latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +# +# latex_use_parts = False + +# If true, show page references after internal links. +# +# latex_show_pagerefs = False + +# If true, show URL addresses after external links. +# +# latex_show_urls = False + +# Documents to append as an appendix to all manuals. +# +# latex_appendices = [] + +# It false, will not define \strong, \code, itleref, \crossref ... but only +# \sphinxstrong, ..., \sphinxtitleref, ... To help avoid clash with user added +# packages. +# +# latex_keep_old_macro_names = True + +# If false, no module index is generated. +# +# latex_domain_indices = True + + +# -- Options for manual page output --------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + (master_doc, 'meta-raspberrypi', 'meta-raspberrypi Documentation', + [author], 1) +] + +# If true, show URL addresses after external links. +# +# man_show_urls = False + + +# -- Options for Texinfo output ------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + (master_doc, 'meta-raspberrypi', 'meta-raspberrypi Documentation', + author, 'meta-raspberrypi', 'One line description of project.', + 'Miscellaneous'), +] + +# Documents to append as an appendix to all manuals. +# +# texinfo_appendices = [] + +# If false, no module index is generated. +# +# texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +# +# texinfo_show_urls = 'footnote' + +# If true, do not generate a @detailmenu in the "Top" node's menu. +# +# texinfo_no_detailmenu = False + +source_parsers = { + '.md': 'recommonmark.parser.CommonMarkParser', +} diff --git a/import-layers/meta-raspberrypi/docs/contributing.md b/import-layers/meta-raspberrypi/docs/contributing.md new file mode 100644 index 000000000..94dbf49ab --- /dev/null +++ b/import-layers/meta-raspberrypi/docs/contributing.md @@ -0,0 +1,38 @@ +# Contributing + +## Mailing list + +The main communication tool we use is a mailing list: +* <yocto@yoctoproject.org> +* <https://lists.yoctoproject.org/listinfo/yocto> + +Feel 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. + +## Patches and pull requests + +All the contributions should be compliant with the openembedded patch +guidelines: <http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines> + +To contribute to this project you should send pull requests to the github mirror +(<https://github.com/agherzan/meta-raspberrypi>). **Additionally** you can send +the patches for review to the above specified mailing list. + +When creating patches for the mailing list, please use something like: + + git format-patch -s --subject-prefix='meta-raspberrypi][PATCH' origin + +When sending patches to the mailing list, please use something like: + + git send-email --to yocto@yoctoproject.org <generated patch> + +## Github issues + +In order to manage and trace the meta-raspberrypi issues, we use github issues: +<https://github.com/agherzan/meta-raspberrypi/issues> + +If 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: +`[Issue #13]` diff --git a/import-layers/meta-raspberrypi/docs/extra-apps.md b/import-layers/meta-raspberrypi/docs/extra-apps.md new file mode 100644 index 000000000..53007dc1f --- /dev/null +++ b/import-layers/meta-raspberrypi/docs/extra-apps.md @@ -0,0 +1,9 @@ +# Extra apps + +## omxplayer + +omxplayer depends on libav which has a commercial license. So in order to be +able to compile omxplayer you will need to whiteflag the commercial +license in your local.conf: + + LICENSE_FLAGS_WHITELIST = "commercial" diff --git a/import-layers/meta-raspberrypi/docs/extra-build-config.md b/import-layers/meta-raspberrypi/docs/extra-build-config.md new file mode 100644 index 000000000..365c49068 --- /dev/null +++ b/import-layers/meta-raspberrypi/docs/extra-build-config.md @@ -0,0 +1,180 @@ +# Optional build configuration + +There 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> + +## Compressed deployed files + +1. Overwrite IMAGE_FSTYPES in local.conf + * `IMAGE_FSTYPES = "tar.bz2 ext3.xz"` + +2. Overwrite SDIMG_ROOTFS_TYPE in local.conf + * `SDIMG_ROOTFS_TYPE = "ext3.xz"` + +3. Overwrite SDIMG_COMPRESSION in local.conf + * `SDIMG_COMPRESSION = "xz"` + +Accommodate the values above to your own needs (ex: ext3 / ext4). + +## GPU memory + +* `GPU_MEM`: GPU memory in megabyte. Sets the memory split between the ARM and + GPU. ARM gets the remaining memory. Min 16. Default 64. + +* `GPU_MEM_256`: GPU memory in megabyte for the 256MB Raspberry Pi. Ignored by + the 512MB RP. Overrides gpu_mem. Max 192. Default not set. + +* `GPU_MEM_512`: GPU memory in megabyte for the 512MB Raspberry Pi. Ignored by + the 256MB RP. Overrides gpu_mem. Max 448. Default not set. + +* `GPU_MEM_1024`: GPU memory in megabyte for the 1024MB Raspberry Pi. Ignored by + the 256MB/512MB RP. Overrides gpu_mem. Max 944. Default not set. + +## Add purchased license codecs + +To add you own licenses use variables `KEY_DECODE_MPG2` and `KEY_DECODE_WVC1` in +local.conf. Example: + + KEY_DECODE_MPG2 = "12345678" + KEY_DECODE_WVC1 = "12345678" + +You can supply more licenses separated by comma. Example: + + KEY_DECODE_WVC1 = "0x12345678,0xabcdabcd,0x87654321" + + +## Disable overscan + +By 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: + + DISABLE_OVERSCAN = "1" + +## Set overclocking options + +The 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: + + ARM_FREQ = "1000" + CORE_FREQ = "500" + SDRAM_FREQ = "500" + OVER_VOLTAGE = "6" + +## Video camera support with V4L2 drivers + +Set this variable to enable support for the video camera (Linux 3.12.4+ +required): + + VIDEO_CAMERA = "1" + +## Enable offline compositing support + +Set this variable to enable support for dispmanx offline compositing: + + DISPMANX_OFFLINE = "1" + +This 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 +of elements) is high, compositing will happen off-line into the buffer. + +Heavily recommended for Wayland/Weston. + +See: <http://wayland.freedesktop.org/raspberrypi.html> + +## Enable kgdb over console support + +To add the kdbg over console (kgdboc) parameter to the kernel command line, set +this variable in local.conf: + + ENABLE_KGDB = "1" + +## Boot to U-Boot + +To have u-boot load kernel image, set in your local.conf: + + KERNEL_IMAGETYPE = "uImage" + +This will make kernel.img be u-boot image which will load uImage. By default, +kernel.img is the actual kernel image (ex. Image). + +## Image with Initramfs + +To build an initramfs image: + +* Set this 3 kernel variables (in linux-raspberrypi.inc for example) + - kernel_configure_variable BLK_DEV_INITRD y + - kernel_configure_variable INITRAMFS_SOURCE "" + - kernel_configure_variable RD_GZIP y + +* Set the yocto variables (in linux-raspberrypi.inc for example) + - `INITRAMFS_IMAGE = "<a name for your initramfs image>"` + - `INITRAMFS_IMAGE_BUNDLE = "1"` + +* Set the meta-rasberrypi variable (in raspberrypi.conf for example) + - `KERNEL_INITRAMFS = "-initramfs"` + +## Enable SPI bus + +When using device tree kernels, set this variable to enable the SPI bus: + + ENABLE_SPI_BUS = "1" + +## Enable I2C + +When using device tree kernels, set this variable to enable I2C: + + ENABLE_I2C = "1" + +## Enable PiTFT support + +Basic support for using PiTFT screens can be enabled by adding below in +local.conf: + +* `MACHINE_FEATURES += "pitft"` + - This will enable SPI bus and i2c device-trees, it will also setup + framebuffer for console and x server on PiTFT. + +NOTE: To get this working the overlay for the PiTFT model must be build, added +and specified as well (dtoverlay=<driver> in config.txt). + +Below 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: + + MACHINE_FEATURES += "pitft <modelname>" + +List of currently supported models: +* pitft22 +* pitft28r +* pitft35r + +## Misc. display + +If 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: + + WAVESHARE_1024X600_C_2_1 = "1" + +## Enable UART + +RaspberryPi 0, 1, 2 and CM will have UART console enabled by default. + +RaspberryPi 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 +who 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" + +Ref.: +* <https://github.com/raspberrypi/firmware/issues/553> +* <https://github.com/RPi-Distro/repo/issues/22> diff --git a/import-layers/meta-raspberrypi/docs/index.rst b/import-layers/meta-raspberrypi/docs/index.rst new file mode 100644 index 000000000..0d7ee0755 --- /dev/null +++ b/import-layers/meta-raspberrypi/docs/index.rst @@ -0,0 +1,26 @@ +.. meta-raspberrypi documentation master file, created by + sphinx-quickstart on Tue May 23 09:51:24 2017. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to meta-raspberrypi's documentation! +============================================ + +Contents: + +.. toctree:: + :maxdepth: 2 + + readme + layer-contents + extra-build-config + extra-apps + contributing + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` + diff --git a/import-layers/meta-raspberrypi/docs/layer-contents.md b/import-layers/meta-raspberrypi/docs/layer-contents.md new file mode 100644 index 000000000..29cfa35c4 --- /dev/null +++ b/import-layers/meta-raspberrypi/docs/layer-contents.md @@ -0,0 +1,24 @@ +# Layer Contents + +## Supported Machines + +* raspberrypi +* raspberrypi0 +* raspberrypi0-wifi +* raspberrypi2 +* raspberrypi3 +* raspberrypi3-64 (64 bit kernel & userspace) +* raspberrypi-cm (dummy alias for raspberrypi) +* raspberrypi-cm3 (dummy alias for raspberrypi2) + +## Images + +* rpi-hwup-image + * Hardware up image + +* rpi-basic-image + * Based on rpi-hwup-image with some added features (ex: splash) + +* rpi-test-image + * Image based on rpi-basic-image which includes most of the packages in this + layer and some media samples. diff --git a/import-layers/meta-raspberrypi/docs/readme.md b/import-layers/meta-raspberrypi/docs/readme.md new file mode 120000 index 000000000..32d46ee88 --- /dev/null +++ b/import-layers/meta-raspberrypi/docs/readme.md @@ -0,0 +1 @@ +../README.md
\ No newline at end of file diff --git a/import-layers/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bb b/import-layers/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bb index 20ec34392..b3c50847a 100644 --- a/import-layers/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bb +++ b/import-layers/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bb @@ -18,6 +18,7 @@ PR = "r5" PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}" PITFT22="${@bb.utils.contains("MACHINE_FEATURES", "pitft22", "1", "0", d)}" PITFT28r="${@bb.utils.contains("MACHINE_FEATURES", "pitft28r", "1", "0", d)}" +PITFT35r="${@bb.utils.contains("MACHINE_FEATURES", "pitft35r", "1", "0", d)}" VC4GRAPHICS="${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "1", "0", d)}" @@ -99,6 +100,11 @@ do_deploy() { echo "dtoverlay=pitft28-resistive,rotate=90,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt fi + if [ "${PITFT35r}" = "1" ]; then + echo "# Enable PITFT35r display" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt + echo "dtoverlay=pitft35-resistive,rotate=90,speed=42000000,fps=20" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt + fi + # UART support if [ "${ENABLE_UART}" = "1" ]; then echo "# Enable UART" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt @@ -110,6 +116,16 @@ do_deploy() { echo "# Enable VC4 Graphics" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt echo "dtoverlay=vc4-kms-v3d,${VC4_CMA_SIZE}" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt fi + + # Waveshare "C" 1024x600 7" Rev2.1 IPS capacitive touch (http://www.waveshare.com/7inch-HDMI-LCD-C.htm) + if [ "${WAVESHARE_1024X600_C_2_1}" = "1" ]; then + echo "# Waveshare \"C\" 1024x600 7\" Rev2.1 IPS capacitive touch screen" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + echo "max_usb_current=1" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + echo "hdmi_group=2" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + echo "hdmi_mode=87" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + echo "hdmi_cvt 1024 600 60 6 0 0 0" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + echo "hdmi_drive=1" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + fi } do_deploy_append_raspberrypi3-64() { diff --git a/import-layers/meta-raspberrypi/recipes-bsp/common/firmware.inc b/import-layers/meta-raspberrypi/recipes-bsp/common/firmware.inc index 1c3a911dd..67078c12e 100644 --- a/import-layers/meta-raspberrypi/recipes-bsp/common/firmware.inc +++ b/import-layers/meta-raspberrypi/recipes-bsp/common/firmware.inc @@ -1,10 +1,9 @@ -RPIFW_DATE ?= "20170405" +RPIFW_DATE ?= "20171029" RPIFW_SRC_URI ?= "https://github.com/raspberrypi/firmware/archive/1.${RPIFW_DATE}.tar.gz" RPIFW_S ?= "${WORKDIR}/firmware-1.${RPIFW_DATE}" SRC_URI = "${RPIFW_SRC_URI}" -SRC_URI[md5sum] = "ea82d14a7cd8cfae9b78e00d4e56bc71" -SRC_URI[sha256sum] = "2f4e5bddbac1372590db203002c35cbba3fb9d6172a93c314ee27bf05ae13bff" - +SRC_URI[md5sum] = "4d27c1888a7bab3097471906e7b4a319" +SRC_URI[sha256sum] = "46ce28c8d87ef22bdcc57ac1836ca3f04d1ec6f46580ff5a30bf76b3c0822117" PV = "${RPIFW_DATE}" diff --git a/import-layers/meta-raspberrypi/recipes-bsp/u-boot/files/0001-arm-add-save_boot_params-for-ARM1176.patch b/import-layers/meta-raspberrypi/recipes-bsp/u-boot/files/0001-arm-add-save_boot_params-for-ARM1176.patch deleted file mode 100644 index a5ebff510..000000000 --- a/import-layers/meta-raspberrypi/recipes-bsp/u-boot/files/0001-arm-add-save_boot_params-for-ARM1176.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 3e10fcde3f3c24a488866dd33fa3f5d46ff3d7a3 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?C=C3=A9dric=20Schieli?= <cschieli@gmail.com> -Date: Fri, 11 Nov 2016 11:59:06 +0100 -Subject: [PATCH] arm: add save_boot_params for ARM1176 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Implement a hook to allow boards to save boot-time CPU state for later -use. When U-Boot is chain-loaded by another bootloader, CPU registers may -contain useful information such as system configuration information. This -feature mirrors the equivalent ARMv7 feature. - -Signed-off-by: CĂ©dric Schieli <cschieli@gmail.com> -Acked-by: Stephen Warren <swarren@nvidia.com> -Signed-off-by: Paul Barker <paul@paulbarker.me.uk> -Upstream-status: Backport ---- - arch/arm/cpu/arm1176/start.S | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/arch/arm/cpu/arm1176/start.S b/arch/arm/cpu/arm1176/start.S -index a602d4e..7c00201 100644 ---- a/arch/arm/cpu/arm1176/start.S -+++ b/arch/arm/cpu/arm1176/start.S -@@ -16,6 +16,7 @@ - - #include <asm-offsets.h> - #include <config.h> -+#include <linux/linkage.h> - - #ifndef CONFIG_SYS_PHY_UBOOT_BASE - #define CONFIG_SYS_PHY_UBOOT_BASE CONFIG_SYS_UBOOT_BASE -@@ -37,6 +38,11 @@ - .globl reset - - reset: -+ /* Allow the board to save important registers */ -+ b save_boot_params -+.globl save_boot_params_ret -+save_boot_params_ret: -+ - /* - * set the cpu to SVC32 mode - */ -@@ -110,3 +116,7 @@ mmu_disable_phys: - c_runtime_cpu_setup: - - mov pc, lr -+ -+WEAK(save_boot_params) -+ b save_boot_params_ret /* back to my caller */ -+ENDPROC(save_boot_params) --- -2.1.4 - diff --git a/import-layers/meta-raspberrypi/recipes-bsp/u-boot/files/0002-rpi-passthrough-of-the-firmware-provided-FDT-blob.patch b/import-layers/meta-raspberrypi/recipes-bsp/u-boot/files/0002-rpi-passthrough-of-the-firmware-provided-FDT-blob.patch deleted file mode 100644 index 323b7ab40..000000000 --- a/import-layers/meta-raspberrypi/recipes-bsp/u-boot/files/0002-rpi-passthrough-of-the-firmware-provided-FDT-blob.patch +++ /dev/null @@ -1,156 +0,0 @@ -From ade243a211d62327e9ebadce27bbbff7981e37f0 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?C=C3=A9dric=20Schieli?= <cschieli@gmail.com> -Date: Fri, 11 Nov 2016 11:59:07 +0100 -Subject: [PATCH] rpi: passthrough of the firmware provided FDT blob -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Raspberry firmware used to pass a FDT blob at a fixed address (0x100), -but this is not true anymore. The address now depends on both the -memory size and the blob size [1]. - -If one wants to passthrough this FDT blob to the kernel, the most -reliable way is to save its address from the r2/x0 register in the -U-Boot entry point and expose it in a environment variable for -further processing. - -This patch just does this: -- save the provided address in the global variable fw_dtb_pointer -- expose it in ${fdt_addr} if it points to a a valid FDT blob - -There are many different ways to use it. One can, for example, use -the following script which will extract from the tree the command -line built by the firmware, then hand over the blob to a previously -loaded kernel: - -fdt addr ${fdt_addr} -fdt get value bootargs /chosen bootargs -bootz ${kernel_addr_r} - ${fdt_addr} - -Alternatively, users relying on sysboot/pxe can simply omit any FDT -statement in their extlinux.conf file, U-Boot will automagically pick -${fdt_addr} and pass it to the kernel. - -[1] https://www.raspberrypi.org/forums//viewtopic.php?f=107&t=134018 - -Upstream-Status: Backport - -Signed-off-by: CĂ©dric Schieli <cschieli@gmail.com> -Acked-by: Stephen Warren <swarren@nvidia.com> -Signed-off-by: Jonathan Liu <net147@gmail.com> ---- - board/raspberrypi/rpi/Makefile | 1 + - board/raspberrypi/rpi/lowlevel_init.S | 36 +++++++++++++++++++++++++++++++++++ - board/raspberrypi/rpi/rpi.c | 29 ++++++++++++++++++++++++++++ - 3 files changed, 66 insertions(+) - create mode 100644 board/raspberrypi/rpi/lowlevel_init.S - -diff --git a/board/raspberrypi/rpi/Makefile b/board/raspberrypi/rpi/Makefile -index 4ce2c98..dcb25ac 100644 ---- a/board/raspberrypi/rpi/Makefile -+++ b/board/raspberrypi/rpi/Makefile -@@ -5,3 +5,4 @@ - # - - obj-y := rpi.o -+obj-y += lowlevel_init.o -diff --git a/board/raspberrypi/rpi/lowlevel_init.S b/board/raspberrypi/rpi/lowlevel_init.S -new file mode 100644 -index 0000000..cdbd8e1 ---- /dev/null -+++ b/board/raspberrypi/rpi/lowlevel_init.S -@@ -0,0 +1,36 @@ -+/* -+ * (C) Copyright 2016 -+ * CĂ©dric Schieli <cschieli@gmail.com> -+ * -+ * SPDX-License-Identifier: GPL-2.0+ -+ */ -+ -+#include <config.h> -+ -+.align 8 -+.global fw_dtb_pointer -+fw_dtb_pointer: -+#ifdef CONFIG_ARM64 -+ .dword 0x0 -+#else -+ .word 0x0 -+#endif -+ -+/* -+ * Routine: save_boot_params (called after reset from start.S) -+ * Description: save ATAG/FDT address provided by the firmware at boot time -+ */ -+ -+.global save_boot_params -+save_boot_params: -+ -+ /* The firmware provided ATAG/FDT address can be found in r2/x0 */ -+#ifdef CONFIG_ARM64 -+ adr x8, fw_dtb_pointer -+ str x0, [x8] -+#else -+ str r2, fw_dtb_pointer -+#endif -+ -+ /* Returns */ -+ b save_boot_params_ret -diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c -index 6245b36..ffd6d31 100644 ---- a/board/raspberrypi/rpi/rpi.c -+++ b/board/raspberrypi/rpi/rpi.c -@@ -25,6 +25,9 @@ - - DECLARE_GLOBAL_DATA_PTR; - -+/* From lowlevel_init.S */ -+extern unsigned long fw_dtb_pointer; -+ - static const struct bcm2835_gpio_platdata gpio_platdata = { - .base = BCM2835_GPIO_BASE, - }; -@@ -285,6 +288,31 @@ static void set_fdtfile(void) - setenv("fdtfile", fdtfile); - } - -+/* -+ * If the firmware provided a valid FDT at boot time, let's expose it in -+ * ${fdt_addr} so it may be passed unmodified to the kernel. -+ */ -+static void set_fdt_addr(void) -+{ -+ if (getenv("fdt_addr")) -+ return; -+ -+ if (fdt_magic(fw_dtb_pointer) != FDT_MAGIC) -+ return; -+ -+ setenv_hex("fdt_addr", fw_dtb_pointer); -+} -+ -+/* -+ * Prevent relocation from stomping on a firmware provided FDT blob. -+ */ -+unsigned long board_get_usable_ram_top(unsigned long total_size) -+{ -+ if ((gd->ram_top - fw_dtb_pointer) > SZ_64M) -+ return gd->ram_top; -+ return fw_dtb_pointer & ~0xffff; -+} -+ - static void set_usbethaddr(void) - { - ALLOC_CACHE_ALIGN_BUFFER(struct msg_get_mac_address, msg, 1); -@@ -356,6 +384,7 @@ static void set_serial_number(void) - - int misc_init_r(void) - { -+ set_fdt_addr(); - set_fdtfile(); - set_usbethaddr(); - #ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG --- -2.10.2 - diff --git a/import-layers/meta-raspberrypi/recipes-bsp/u-boot/files/0003-Include-lowlevel_init.o-for-rpi2.patch b/import-layers/meta-raspberrypi/recipes-bsp/u-boot/files/0003-Include-lowlevel_init.o-for-rpi2.patch deleted file mode 100644 index 1431a2e62..000000000 --- a/import-layers/meta-raspberrypi/recipes-bsp/u-boot/files/0003-Include-lowlevel_init.o-for-rpi2.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 1eb01436bc57ad32519a4567a1c9ec82d52d60a1 Mon Sep 17 00:00:00 2001 -From: Paul Barker <paul@paulbarker.me.uk> -Date: Tue, 29 Nov 2016 19:47:49 +0000 -Subject: [PATCH] Include lowlevel_init.o for rpi2 - -Signed-off-by: Paul Barker <paul@paulbarker.me.uk> -Upstream-status: Inappropriate - (not needed upstream as rpi_2 board directory is removed in latest - version) ---- - board/raspberrypi/rpi_2/Makefile | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/board/raspberrypi/rpi_2/Makefile b/board/raspberrypi/rpi_2/Makefile -index d82cd21..9f865c5 100644 ---- a/board/raspberrypi/rpi_2/Makefile -+++ b/board/raspberrypi/rpi_2/Makefile -@@ -5,3 +5,4 @@ - # - - obj-y := ../rpi/rpi.o -+obj-y += ../rpi/lowlevel_init.o --- -2.1.4 - diff --git a/import-layers/meta-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend b/import-layers/meta-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend index a4545f005..37816668c 100644 --- a/import-layers/meta-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend +++ b/import-layers/meta-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend @@ -1,7 +1 @@ -FILESEXTRAPATHS_prepend_rpi := "${THISDIR}/files:" RDEPENDS_${PN}_append_rpi = " rpi-u-boot-scr" -SRC_URI_append_rpi = " \ - file://0001-arm-add-save_boot_params-for-ARM1176.patch \ - file://0002-rpi-passthrough-of-the-firmware-provided-FDT-blob.patch \ - file://0003-Include-lowlevel_init.o-for-rpi2.patch \ - " diff --git a/import-layers/meta-raspberrypi/recipes-core/psplash/psplash_git.bbappend b/import-layers/meta-raspberrypi/recipes-core/psplash/psplash_git.bbappend index 65dc30fda..698564b94 100644 --- a/import-layers/meta-raspberrypi/recipes-core/psplash/psplash_git.bbappend +++ b/import-layers/meta-raspberrypi/recipes-core/psplash/psplash_git.bbappend @@ -1,2 +1,4 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:" -SPLASH_IMAGES += "file://psplash-raspberrypi-img.h;outsuffix=raspberrypi" +SPLASH_IMAGES_append_rpi = " file://psplash-raspberrypi-img.h;outsuffix=raspberrypi" +ALTERNATIVE_PRIORITY_psplash-raspberrypi[psplash] = "10" + diff --git a/import-layers/meta-raspberrypi/recipes-devtools/bcm2835/bcm2835_1.50.bb b/import-layers/meta-raspberrypi/recipes-devtools/bcm2835/bcm2835_1.52.bb index 9cf6f484f..8e41c61f1 100644 --- a/import-layers/meta-raspberrypi/recipes-devtools/bcm2835/bcm2835_1.50.bb +++ b/import-layers/meta-raspberrypi/recipes-devtools/bcm2835/bcm2835_1.52.bb @@ -12,8 +12,8 @@ COMPATIBLE_MACHINE = "raspberrypi" SRC_URI = "http://www.airspayce.com/mikem/bcm2835/bcm2835-${PV}.tar.gz" -SRC_URI[md5sum] = "258caf3437012d09a651e1852d0bd60c" -SRC_URI[sha256sum] = "52180b8a61b6546c1df4aed259d0a4d2fa56e50605e0d4d967a76bf2b23dafb8" +SRC_URI[md5sum] = "b5dc426b4ff258bb1397442f98e40236" +SRC_URI[sha256sum] = "b9fd10f7a80aadaed28a77168709b7c519568a63b6e98d0a50e9c5fe31bea6bb" inherit autotools @@ -35,6 +35,8 @@ do_install_append() { PACKAGES += "${PN}-tests" +RDEPENDS_${PN}-dev = "" + FILES_${PN} = "" FILES_${PN}-tests = "${libdir}/${BPN}" FILES_${PN}-dbg += "${libdir}/${BPN}/.debug" diff --git a/import-layers/meta-raspberrypi/recipes-devtools/pi-blaster/files/remove-initscript-lsb-dependency.patch b/import-layers/meta-raspberrypi/recipes-devtools/pi-blaster/files/remove-initscript-lsb-dependency.patch index 7ea9a3bde..c8afe60ee 100644 --- a/import-layers/meta-raspberrypi/recipes-devtools/pi-blaster/files/remove-initscript-lsb-dependency.patch +++ b/import-layers/meta-raspberrypi/recipes-devtools/pi-blaster/files/remove-initscript-lsb-dependency.patch @@ -1,13 +1,28 @@ -Remove dependencies on LSB functions +From 1338f98a279616f4e5e9ea30a25d1dfa0c7df5d6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petter=20Mab=C3=A4cker?= <petter@technux.se> +Date: Sun, 4 Jun 2017 12:22:40 +0200 +Subject: [PATCH] Remove dependencies on LSB functions +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +See this as a rebase of the previous 'Remove dependencies on LSB +functions patch' with only minor modifications from the original version, +based on the work done by Alex Lennon <ajlennon@dynamicdevices.co.uk> in +'25fd817 pi-blaster: Added recipe'. Upstream-Status: Inappropriate [configuration] -Signed-off-by: Alex Lennon <ajlennon@dynamicdevices.co.uk> +Signed-off-by: Petter Mabäcker <petter@technux.se> +--- + debian/pi-blaster.init | 38 +++++++------------------------------- + 1 file changed, 7 insertions(+), 31 deletions(-) -diff -ur git.org/pi-blaster.boot.sh git/pi-blaster.boot.sh ---- git.org/pi-blaster.boot.sh 2014-05-20 14:49:44.378582168 +0100 -+++ git/pi-blaster.boot.sh 2014-05-20 14:51:08.330582386 +0100 -@@ -28,12 +28,12 @@ +diff --git a/debian/pi-blaster.init b/debian/pi-blaster.init +index b142d70..01a686c 100644 +--- a/debian/pi-blaster.init ++++ b/debian/pi-blaster.init +@@ -28,12 +28,12 @@ SCRIPTNAME=/etc/init.d/$NAME [ -r /etc/default/$NAME ] && . /etc/default/$NAME # Load the VERBOSE setting and other rcS variables @@ -22,7 +37,7 @@ diff -ur git.org/pi-blaster.boot.sh git/pi-blaster.boot.sh # # Function that starts the daemon/service -@@ -77,48 +77,23 @@ +@@ -77,48 +77,24 @@ do_stop() case "$1" in start) @@ -52,6 +67,7 @@ diff -ur git.org/pi-blaster.boot.sh git/pi-blaster.boot.sh # 'force-reload' alias # - log_daemon_msg "Restarting $DESC" "$NAME" ++ echo "Restarting $DESC" "$NAME" do_stop - case "$?" in - 0|1) @@ -67,11 +83,14 @@ diff -ur git.org/pi-blaster.boot.sh git/pi-blaster.boot.sh - log_end_msg 1 - ;; - esac -+ do_start ++ do_start ;; *) - echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 -+ echo "Usage: $SCRIPTNAME {start|stop|restart}" >&2 ++ echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 exit 3 ;; esac +-- +1.9.1 + diff --git a/import-layers/meta-raspberrypi/recipes-devtools/pi-blaster/pi-blaster.inc b/import-layers/meta-raspberrypi/recipes-devtools/pi-blaster/pi-blaster.inc index a3beccc02..a548957dc 100644 --- a/import-layers/meta-raspberrypi/recipes-devtools/pi-blaster/pi-blaster.inc +++ b/import-layers/meta-raspberrypi/recipes-devtools/pi-blaster/pi-blaster.inc @@ -2,7 +2,7 @@ DESCRIPTION = "This project enables PWM on the GPIO pins you request of a Raspbe HOMEPAGE = "https://github.com/sarfata/pi-blaster/" SECTION = "devel/libs" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://README.md;beginline=157;endline=170;md5=f20832f31126609af5a7bf2340014540" +LIC_FILES_CHKSUM = "file://README.md;beginline=212;endline=239;md5=a012868ef5f83b9f257af253d7cb07a3" SRC_URI = "git://github.com/sarfata/pi-blaster \ file://remove-initscript-lsb-dependency.patch \ diff --git a/import-layers/meta-raspberrypi/recipes-devtools/pi-blaster/pi-blaster_git.bb b/import-layers/meta-raspberrypi/recipes-devtools/pi-blaster/pi-blaster_git.bb index 263852b4f..ac812abcd 100644 --- a/import-layers/meta-raspberrypi/recipes-devtools/pi-blaster/pi-blaster_git.bb +++ b/import-layers/meta-raspberrypi/recipes-devtools/pi-blaster/pi-blaster_git.bb @@ -1,3 +1,3 @@ require pi-blaster.inc -SRCREV = "ec5e1b4c6191d8f9a538497dbbb86f9cf0de7016" +SRCREV = "9f45eb23a8a3b2d1c08d08a6d68f206fe91ecf4c" diff --git a/import-layers/meta-raspberrypi/recipes-devtools/python/rpi-gpio_0.6.1.bb b/import-layers/meta-raspberrypi/recipes-devtools/python/rpi-gpio_0.6.2.bb index 89f601bdb..a08ea98ac 100644 --- a/import-layers/meta-raspberrypi/recipes-devtools/python/rpi-gpio_0.6.1.bb +++ b/import-layers/meta-raspberrypi/recipes-devtools/python/rpi-gpio_0.6.2.bb @@ -10,8 +10,8 @@ SRC_URI = "\ http://pypi.python.org/packages/source/R/RPi.GPIO/${SRCNAME}-${PV}.tar.gz \ file://0001-Remove-nested-functions.patch \ " -SRC_URI[md5sum] = "254d0443a436eb241367c487274e7197" -SRC_URI[sha256sum] = "54e5fb06d9ea1a1389a497fb5a06dfa950c86303b0f4ba89b68c55999d1df064" +SRC_URI[md5sum] = "9db86fd5f3bae872de9dbb068ee0b096" +SRC_URI[sha256sum] = "82acff0ef6bbe3cdf6f4dbdd73d96add5294bb94baf7f51c1d901861af3c2392" S = "${WORKDIR}/${SRCNAME}-${PV}" diff --git a/import-layers/meta-raspberrypi/recipes-devtools/python/rpio_0.10.0.bb b/import-layers/meta-raspberrypi/recipes-devtools/python/rpio_0.10.0.bb index 69ecb6f9b..1a6cee704 100644 --- a/import-layers/meta-raspberrypi/recipes-devtools/python/rpio_0.10.0.bb +++ b/import-layers/meta-raspberrypi/recipes-devtools/python/rpio_0.10.0.bb @@ -16,5 +16,10 @@ inherit setuptools COMPATIBLE_MACHINE = "raspberrypi" +RDEPENDS_${PN} = "\ + python-logging \ + python-threading \ +" + SRC_URI[md5sum] = "cefc45422833dcafcd59b78dffc540f4" SRC_URI[sha256sum] = "b89f75dec9de354681209ebfaedfe22b7c178aacd91a604a7bd6d92024e4cf7e" diff --git a/import-layers/meta-raspberrypi/recipes-devtools/wiringPi/files/0001-Add-initial-cross-compile-support.patch b/import-layers/meta-raspberrypi/recipes-devtools/wiringPi/files/0001-Add-initial-cross-compile-support.patch index 603422c6d..01e054634 100644 --- a/import-layers/meta-raspberrypi/recipes-devtools/wiringPi/files/0001-Add-initial-cross-compile-support.patch +++ b/import-layers/meta-raspberrypi/recipes-devtools/wiringPi/files/0001-Add-initial-cross-compile-support.patch @@ -1,21 +1,21 @@ -From 6d85e6cc3ab97c3f060e5e0a8e3f1945a14c86ba Mon Sep 17 00:00:00 2001 -From: Gianfranco Costamagna <gianfranco.costamagna@abinsula.com> -Date: Mon, 12 Oct 2015 12:15:51 +0200 -Subject: [PATCH] Add initial cross compile support (rebase from Petter Mabäcker <petter@technux.se> version) +From ca25788e2563bad0d554deb9f4300d1e7d062825 Mon Sep 17 00:00:00 2001 +From: Aurelian Zanoschi <aurelian17@gmail.com> +Date: Mon, 31 Jul 2017 20:25:15 +0300 +Subject: [PATCH] Add initial cross compile support --- - devLib/Makefile | 54 ++++++++++++++++++++++++------------------- - examples/Gertboard/Makefile | 22 +++++++++++------- - examples/Makefile | 22 +++++++++++------- - examples/PiFace/Makefile | 22 +++++++++++------- - examples/PiGlow/Makefile | 4 ++-- - examples/q2w/Makefile | 4 ++-- - gpio/Makefile | 29 ++++++++++++----------- - wiringPi/Makefile | 50 +++++++++++++++++++++------------------ - 8 files changed, 119 insertions(+), 88 deletions(-) + devLib/Makefile | 54 +++++++++++++++++++++++++-------------------- + examples/Gertboard/Makefile | 22 +++++++++++------- + examples/Makefile | 22 +++++++++++------- + examples/PiFace/Makefile | 22 +++++++++++------- + examples/PiGlow/Makefile | 4 ++-- + examples/q2w/Makefile | 4 ++-- + gpio/Makefile | 29 ++++++++++++------------ + wiringPi/Makefile | 52 ++++++++++++++++++++++++------------------- + 8 files changed, 120 insertions(+), 89 deletions(-) diff --git a/devLib/Makefile b/devLib/Makefile -index 0fb0033..cbea759 100644 +index cf665d6..040c03a 100644 --- a/devLib/Makefile +++ b/devLib/Makefile @@ -31,15 +31,19 @@ ifneq ($V,1) @@ -46,7 +46,7 @@ index 0fb0033..cbea759 100644 LIBS = -@@ -66,16 +70,16 @@ $(STATIC): $(OBJ) +@@ -68,16 +72,16 @@ $(STATIC): $(OBJ) $(DYNAMIC): $(OBJ) $Q echo "[Link (Dynamic)]" @@ -66,7 +66,7 @@ index 0fb0033..cbea759 100644 .PHONY: tags tags: $(SRC) -@@ -86,22 +90,22 @@ tags: $(SRC) +@@ -88,22 +92,22 @@ tags: $(SRC) .PHONY: install install: $(DYNAMIC) $Q echo "[Install Headers]" @@ -99,7 +99,7 @@ index 0fb0033..cbea759 100644 .PHONY: install-deb install-deb: $(DYNAMIC) -@@ -116,9 +120,11 @@ install-deb: $(DYNAMIC) +@@ -118,9 +122,11 @@ install-deb: $(DYNAMIC) .PHONY: uninstall uninstall: $Q echo "[UnInstall]" @@ -148,7 +148,7 @@ index 1939ad6..98d1415 100644 # Should not alter anything below this line ############################################################################### diff --git a/examples/Makefile b/examples/Makefile -index e6b9b71..931b167 100644 +index 6d87885..8623816 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -26,14 +26,20 @@ ifneq ($V,1) @@ -162,7 +162,7 @@ index e6b9b71..931b167 100644 -CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe - -LDFLAGS = -L/usr/local/lib --LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm +-LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm -lcrypt -lrt +DESTDIR?=/usr +PREFIX?=/local + @@ -176,12 +176,12 @@ index e6b9b71..931b167 100644 +CFLAGS ?= $(DEBUG) -Wall $(INCLUDE) -Winline -pipe + +LDFLAGS ?= -L$(LIB_DIR) -+LDLIBS ?= -lwiringPi -lwiringPiDev -lpthread -lm ++LDLIBS ?= -lwiringPi -lwiringPiDev -lpthread -lm -lcrypt -lrt # Should not alter anything below this line ############################################################################### diff --git a/examples/PiFace/Makefile b/examples/PiFace/Makefile -index 4685adc..cfaf902 100644 +index f937c14..ad030b3 100644 --- a/examples/PiFace/Makefile +++ b/examples/PiFace/Makefile @@ -26,14 +26,20 @@ ifneq ($V,1) @@ -214,7 +214,7 @@ index 4685adc..cfaf902 100644 # Should not alter anything below this line ############################################################################### diff --git a/examples/PiGlow/Makefile b/examples/PiGlow/Makefile -index acd4818..dabd64e 100644 +index f182db7..d1ea74f 100644 --- a/examples/PiGlow/Makefile +++ b/examples/PiGlow/Makefile @@ -29,10 +29,10 @@ endif @@ -231,7 +231,7 @@ index acd4818..dabd64e 100644 # Should not alter anything below this line diff --git a/examples/q2w/Makefile b/examples/q2w/Makefile -index 6f50fa0..c5e9f6e 100644 +index 8f773bf..14aa6e4 100644 --- a/examples/q2w/Makefile +++ b/examples/q2w/Makefile @@ -29,10 +29,10 @@ endif @@ -248,7 +248,7 @@ index 6f50fa0..c5e9f6e 100644 ############################################################################### diff --git a/gpio/Makefile b/gpio/Makefile -index 7dcd090..83ec454 100644 +index f41a005..22753ee 100644 --- a/gpio/Makefile +++ b/gpio/Makefile @@ -30,13 +30,17 @@ ifneq ($V,1) @@ -259,7 +259,7 @@ index 7dcd090..83ec454 100644 -DEBUG = -O2 -CC = gcc -INCLUDE = -I$(DESTDIR)$(PREFIX)/include --CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe +-CFLAGS = $(DEBUG) -Wall -Wextra $(INCLUDE) -Winline -pipe +INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include +LIB_DIR?=$(DESTDIR)$(PREFIX)/lib +BIN_DIR?=$(DESTDIR)$(PREFIX)/bin @@ -269,10 +269,10 @@ index 7dcd090..83ec454 100644 +DEBUG ?= -O2 +CC ?= gcc +INCLUDE ?= -I$(INCLUDE_DIR) -+CFLAGS ?= $(DEBUG) -Wall $(INCLUDE) -Winline -pipe ++CFLAGS ?= $(DEBUG) -Wall -Wextra $(INCLUDE) -Winline -pipe + +LDFLAGS ?= -L$(LIB_DIR) - LIBS = -lwiringPi -lwiringPiDev -lpthread + LIBS = -lwiringPi -lwiringPiDev -lpthread -lrt -lm -lcrypt # May not need to alter anything below this line @@ -72,13 +76,10 @@ tags: $(SRC) @@ -293,7 +293,7 @@ index 7dcd090..83ec454 100644 .PHONY: install-deb install-deb: gpio -@@ -89,7 +90,7 @@ install-deb: gpio +@@ -91,7 +92,7 @@ install-deb: gpio .PHONY: uninstall uninstall: $Q echo "[UnInstall]" @@ -303,10 +303,10 @@ index 7dcd090..83ec454 100644 .PHONY: depend diff --git a/wiringPi/Makefile b/wiringPi/Makefile -index 6bbcc5d..5355b74 100644 +index e1868b9..750d290 100644 --- a/wiringPi/Makefile +++ b/wiringPi/Makefile -@@ -25,19 +25,23 @@ VERSION=$(shell cat ../VERSION) +@@ -25,21 +25,25 @@ VERSION=$(shell cat ../VERSION) DESTDIR?=/usr PREFIX?=/local @@ -334,19 +334,22 @@ index 6bbcc5d..5355b74 100644 +CC ?= gcc +INCLUDE ?= -I. DEFS = -D_GNU_SOURCE - CFLAGS = $(DEBUG) $(DEFS) -Wformat=2 -Wall -Winline $(INCLUDE) -pipe -fPIC +-CFLAGS = $(DEBUG) $(DEFS) -Wformat=2 -Wall -Wextra -Winline $(INCLUDE) -pipe -fPIC ++CFLAGS = $(DEBUG) $(DEFS) $(INCLUDE) -Wformat=2 -Wall -Wextra -Winline -pipe -fPIC + + LIBS = -lm -lpthread -lrt -lcrypt -@@ -89,17 +93,17 @@ $(STATIC): $(OBJ) +@@ -78,17 +82,17 @@ $(STATIC): $(OBJ) $(DYNAMIC): $(OBJ) $Q echo "[Link (Dynamic)]" -- $Q $(CC) -shared -Wl,-soname,libwiringPi.so$(WIRINGPI_SONAME_SUFFIX) -o libwiringPi.so.$(VERSION) -lpthread $(OBJ) -+ $Q $(CC) $(LDFLAGS) -shared -Wl,-soname,$(BASE_NAME).so.$(DYN_VERS_MAJ) -o $(BASE_NAME).so -lpthread $(OBJ) +- $Q $(CC) -shared -Wl,-soname,libwiringPi.so$(WIRINGPI_SONAME_SUFFIX) -o libwiringPi.so.$(VERSION) $(LIBS) $(OBJ) ++ $Q $(CC) $(LDFLAGS) -shared -Wl,-soname,$(BASE_NAME).so.$(DYN_VERS_MAJ) -o $(BASE_NAME).so $(OBJ) $(LIBS) .c.o: $Q echo [Compile] $< - $Q $(CC) -c $(CFLAGS) $< -o $@ -+ $Q $(CC) -c $(CFLAGS) -fPIC $< -o $@ ++ $Q $(CC) $(CFLAGS) $(LIBS) -c $< -o $@ .PHONY: clean @@ -357,7 +360,7 @@ index 6bbcc5d..5355b74 100644 .PHONY: tags tags: $(SRC) -@@ -110,22 +114,22 @@ tags: $(SRC) +@@ -99,22 +103,22 @@ tags: $(SRC) .PHONY: install install: $(DYNAMIC) $Q echo "[Install Headers]" @@ -390,7 +393,7 @@ index 6bbcc5d..5355b74 100644 .PHONY: install-deb install-deb: $(DYNAMIC) -@@ -140,9 +144,11 @@ install-deb: $(DYNAMIC) +@@ -129,9 +133,11 @@ install-deb: $(DYNAMIC) .PHONY: uninstall uninstall: $Q echo "[UnInstall]" @@ -406,5 +409,5 @@ index 6bbcc5d..5355b74 100644 .PHONY: depend -- -2.1.4 +2.7.4 diff --git a/import-layers/meta-raspberrypi/recipes-devtools/wiringPi/wiringpi/0001-include-asm-ioctl.h-directly-for-_IOC_SIZEBITS.patch b/import-layers/meta-raspberrypi/recipes-devtools/wiringPi/wiringpi/0001-include-asm-ioctl.h-directly-for-_IOC_SIZEBITS.patch deleted file mode 100644 index 5de5853b1..000000000 --- a/import-layers/meta-raspberrypi/recipes-devtools/wiringPi/wiringpi/0001-include-asm-ioctl.h-directly-for-_IOC_SIZEBITS.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 7f65eb37a82a6d9b095d9c8f262ad9dd205acd03 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sat, 30 Jan 2016 16:57:38 -0800 -Subject: [PATCH] include <asm/ioctl.h> directly for _IOC_SIZEBITS - -Fixes errors like -| wiringPiSPI.c: In function 'wiringPiSPIDataRW': -| wiringPiSPI.c:89:35: error: '_IOC_SIZEBITS' undeclared (first use in -this function) - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Submitted - - wiringPi/wiringPi.c | 1 + - wiringPi/wiringPiI2C.c | 1 + - wiringPi/wiringPiSPI.c | 1 + - 3 files changed, 3 insertions(+) - -diff --git a/wiringPi/wiringPi.c b/wiringPi/wiringPi.c -index 32e5100..cb5db9d 100644 ---- a/wiringPi/wiringPi.c -+++ b/wiringPi/wiringPi.c -@@ -64,6 +64,7 @@ - #include <time.h> - #include <fcntl.h> - #include <pthread.h> -+#include <asm/ioctl.h> - #include <sys/time.h> - #include <sys/mman.h> - #include <sys/stat.h> -diff --git a/wiringPi/wiringPiI2C.c b/wiringPi/wiringPiI2C.c -index c787bce..efdf53c 100644 ---- a/wiringPi/wiringPiI2C.c -+++ b/wiringPi/wiringPiI2C.c -@@ -52,6 +52,7 @@ - #include <string.h> - #include <fcntl.h> - #include <sys/ioctl.h> -+#include <asm/ioctl.h> - - #include "wiringPi.h" - #include "wiringPiI2C.h" -diff --git a/wiringPi/wiringPiSPI.c b/wiringPi/wiringPiSPI.c -index 453df31..ae3c7d9 100644 ---- a/wiringPi/wiringPiSPI.c -+++ b/wiringPi/wiringPiSPI.c -@@ -27,6 +27,7 @@ - #include <fcntl.h> - #include <errno.h> - #include <string.h> -+#include <asm/ioctl.h> - #include <sys/ioctl.h> - #include <linux/spi/spidev.h> - --- -2.7.0 - diff --git a/import-layers/meta-raspberrypi/recipes-devtools/wiringPi/wiringpi_git.bb b/import-layers/meta-raspberrypi/recipes-devtools/wiringPi/wiringpi_git.bb index c337b19f4..7953a55b2 100644 --- a/import-layers/meta-raspberrypi/recipes-devtools/wiringPi/wiringpi_git.bb +++ b/import-layers/meta-raspberrypi/recipes-devtools/wiringPi/wiringpi_git.bb @@ -4,14 +4,13 @@ SECTION = "devel/libs" LICENSE = "LGPLv3+" LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=e6a600fd5e1d9cbde2d983680233ad02" -# tag 2.32 -SRCREV = "b0a60c3302973ca1878d149d61f2f612c8f27fac" +# tag 2.44 +SRCREV = "96344ff7125182989f98d3be8d111952a8f74e15" S = "${WORKDIR}/git" SRC_URI = "git://git.drogon.net/wiringPi \ file://0001-Add-initial-cross-compile-support.patch \ - file://0001-include-asm-ioctl.h-directly-for-_IOC_SIZEBITS.patch \ " COMPATIBLE_MACHINE = "raspberrypi" diff --git a/import-layers/meta-raspberrypi/recipes-graphics/eglinfo/eglinfo-fb_%.bbappend b/import-layers/meta-raspberrypi/recipes-graphics/eglinfo/eglinfo-fb_%.bbappend index 7f8b6009d..7692133b8 100644 --- a/import-layers/meta-raspberrypi/recipes-graphics/eglinfo/eglinfo-fb_%.bbappend +++ b/import-layers/meta-raspberrypi/recipes-graphics/eglinfo/eglinfo-fb_%.bbappend @@ -1 +1,2 @@ EGLINFO_DEVICE_rpi = "raspberrypi" +COMPATIBLE_HOST_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', 'null', '"(.*)"', d)}" diff --git a/import-layers/meta-raspberrypi/recipes-graphics/mesa/mesa-gl_%.bbappend b/import-layers/meta-raspberrypi/recipes-graphics/mesa/mesa-gl_%.bbappend new file mode 100644 index 000000000..7897125b4 --- /dev/null +++ b/import-layers/meta-raspberrypi/recipes-graphics/mesa/mesa-gl_%.bbappend @@ -0,0 +1 @@ +PACKAGECONFIG_append_rpi = " gbm" diff --git a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0001-Allow-applications-to-set-next-resource-handle.patch b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0001-Allow-applications-to-set-next-resource-handle.patch index 4f72845dc..5861c4ea1 100644 --- a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0001-Allow-applications-to-set-next-resource-handle.patch +++ b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0001-Allow-applications-to-set-next-resource-handle.patch @@ -1,7 +1,7 @@ -From 4b68419e58ef31e72abab688d0c7cc5db80efc13 Mon Sep 17 00:00:00 2001 +From e45bc677368d0f8d42720aad242f33f6e2687fb1 Mon Sep 17 00:00:00 2001 From: Dom Cobley <dc4@broadcom.com> Date: Tue, 9 Jul 2013 09:26:26 -0400 -Subject: [PATCH 01/12] Allow applications to set next resource handle +Subject: [PATCH 01/15] Allow applications to set next resource handle This patch adds provisions in userland to let apps callers set the next rendereing dispmanx resource. @@ -204,5 +204,5 @@ index 8a5734c..51b3580 100644 FN(void, eglIntGetColorData_impl, (EGL_SURFACE_ID_T s, KHRN_IMAGE_FORMAT_T format, uint32_t width, uint32_t height, int32_t stride, uint32_t y_offset, void *data)) -- -2.10.2 +2.15.0 diff --git a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0002-wayland-Add-support-for-the-Wayland-winsys.patch b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0002-wayland-Add-support-for-the-Wayland-winsys.patch index 6cc8ea84c..d6e6476b0 100644 --- a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0002-wayland-Add-support-for-the-Wayland-winsys.patch +++ b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0002-wayland-Add-support-for-the-Wayland-winsys.patch @@ -1,7 +1,7 @@ -From e3d2d0007e1c6c32ab7d9a28f1e399d42b511333 Mon Sep 17 00:00:00 2001 +From 15fb270f438f4ef1413192b5ce1e0dc784b45d9e Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso <tomeu.vizoso@collabora.com> Date: Tue, 1 Oct 2013 13:19:20 +0200 -Subject: [PATCH 02/12] wayland: Add support for the Wayland winsys +Subject: [PATCH 02/15] wayland: Add support for the Wayland winsys * Adds EGL_WL_bind_wayland_display extension * Adds wayland-egl library @@ -17,7 +17,7 @@ TODO: wl_dispmanx_server_buffer should probably be defined in a private header that can be included from EGL and vc_* instead of in vc_vchi_dispmanx.h --- - .gitignore | 2 + + .gitignore | 1 + CMakeLists.txt | 11 + README.md | 4 + buildme | 10 +- @@ -47,7 +47,7 @@ vc_vchi_dispmanx.h interface/vmcs_host/vc_vchi_dispmanx.h | 15 ++ interface/wayland/dispmanx.xml | 123 +++++++++++ makefiles/cmake/Wayland.cmake | 72 ++++++ - 30 files changed, 1258 insertions(+), 98 deletions(-) + 30 files changed, 1257 insertions(+), 98 deletions(-) create mode 100644 interface/khronos/common/linux/khrn_wayland.c copy interface/{vmcs_host/vc_vchi_dispmanx.h => khronos/common/linux/khrn_wayland.h} (56%) create mode 100644 interface/khronos/ext/egl_wayland.c @@ -58,17 +58,16 @@ vc_vchi_dispmanx.h create mode 100644 makefiles/cmake/Wayland.cmake diff --git a/.gitignore b/.gitignore -index 4a88665..5da71a9 100644 +index 63570f1..1459436 100644 --- a/.gitignore +++ b/.gitignore -@@ -13,3 +13,5 @@ build/ - *.lai - *.la - *.a -+ +@@ -30,3 +30,4 @@ build/ + *.pts + *.ppm + *.mkv +*~ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 98252c3..d6ae907 100644 +index cfc8ae5..673a5ad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,6 +24,17 @@ include(makefiles/cmake/global_settings.cmake) @@ -102,7 +101,7 @@ index 358d2b4..4da4448 100644 + +$ BUILD_WAYLAND=1 ./buildme. diff --git a/buildme b/buildme -index 1061745..d0e6e54 100755 +index b8fd440..a780bb6 100755 --- a/buildme +++ b/buildme @@ -8,6 +8,10 @@ fi @@ -117,7 +116,7 @@ index 1061745..d0e6e54 100755 # Native compile on the Raspberry Pi mkdir -p build/raspberry/$BUILDSUBDIR @@ -32,9 +36,13 @@ elif [ "$1" = "--native" ]; then - make -j 6 $* + make -j `nproc` $* else # Cross compile on a more capable machine + if [ -n "$BUILD_WAYLAND" ]; then @@ -128,7 +127,7 @@ index 1061745..d0e6e54 100755 pushd build/arm-linux/$BUILDSUBDIR - cmake -DCMAKE_TOOLCHAIN_FILE=../../../makefiles/cmake/toolchains/arm-linux-gnueabihf.cmake -DCMAKE_BUILD_TYPE=$BUILDTYPE ../../.. + cmake -DCMAKE_TOOLCHAIN_FILE=../../../makefiles/cmake/toolchains/arm-linux-gnueabihf.cmake -DCMAKE_BUILD_TYPE=$BUILDTYPE $WAYLAND_VARS ../../.. - make -j 6 + make -j `nproc` if [ "$1" != "" ]; then diff --git a/host_applications/linux/apps/raspicam/CMakeLists.txt b/host_applications/linux/apps/raspicam/CMakeLists.txt @@ -808,16 +807,16 @@ index b8bb374..03fe67b 100644 /* TODO: do an RPC call to make sure the Khronos vll is loaded (and that it stays loaded until eglTerminate) Also affects global image (and possibly others?) -@@ -451,6 +444,9 @@ EGLAPI const char EGLAPIENTRY * eglQueryString(EGLDisplay dpy, EGLint name) +@@ -450,6 +443,9 @@ EGLAPI const char EGLAPIENTRY * eglQueryString(EGLDisplay dpy, EGLint name) + #ifdef EGL_KHR_fence_sync "EGL_KHR_fence_sync " #endif - #endif ++#endif +#if EGL_WL_bind_wayland_display + "EGL_WL_bind_wayland_display " -+#endif + #endif ; break; - case EGL_VENDOR: @@ -655,8 +651,7 @@ EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy, EGLConfig c false, EGL_NO_TEXTURE, @@ -1542,7 +1541,7 @@ index 0000000..8bafc15 +Libs: -L${libdir} -lwayland-egl +Cflags: -I${includedir} diff --git a/interface/vmcs_host/CMakeLists.txt b/interface/vmcs_host/CMakeLists.txt -index 0b3adc9..f44d01f 100755 +index fde18da..6718215 100755 --- a/interface/vmcs_host/CMakeLists.txt +++ b/interface/vmcs_host/CMakeLists.txt @@ -9,13 +9,24 @@ add_definitions(-fno-strict-aliasing) @@ -1551,12 +1550,12 @@ index 0b3adc9..f44d01f 100755 -add_library(vchostif - ${VMCS_TARGET}/vcfilesys.c ${VMCS_TARGET}/vcmisc.c -- vc_vchi_gencmd.c vc_vchi_filesys.c +- vc_vchi_gencmd.c vc_vchi_filesys.c vc_vchi_gpuserv.c - vc_vchi_tvservice.c vc_vchi_cecservice.c - vc_vchi_dispmanx.c vc_service_common.c) +set(VCHOSTIF_SOURCE + ${VMCS_TARGET}/vcfilesys.c ${VMCS_TARGET}/vcmisc.c -+ vc_vchi_gencmd.c vc_vchi_filesys.c ++ vc_vchi_gencmd.c vc_vchi_filesys.c vc_vchi_gpuserv.c + vc_vchi_tvservice.c vc_vchi_cecservice.c + vc_vchi_dispmanx.c vc_service_common.c) # ${VMCS_TARGET}/vmcs_main.c @@ -1604,7 +1603,7 @@ index 37fdae1..fe3619a 100755 } #endif diff --git a/interface/vmcs_host/vc_vchi_dispmanx.c b/interface/vmcs_host/vc_vchi_dispmanx.c -index 133e86d..45f4cff 100755 +index 7a6cdcd..eab146e 100755 --- a/interface/vmcs_host/vc_vchi_dispmanx.c +++ b/interface/vmcs_host/vc_vchi_dispmanx.c @@ -1319,3 +1319,45 @@ static void *dispmanx_notify_func( void *arg ) { @@ -1885,5 +1884,5 @@ index 0000000..ad90d30 + set(${_sources} ${${_sources}} PARENT_SCOPE) +endfunction() -- -2.10.2 +2.15.0 diff --git a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0003-wayland-Add-Wayland-example.patch b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0003-wayland-Add-Wayland-example.patch index bbd972761..1d78755c2 100644 --- a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0003-wayland-Add-Wayland-example.patch +++ b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0003-wayland-Add-Wayland-example.patch @@ -1,7 +1,7 @@ -From 8a4b3ea902bbcc08452e13a61ffbdc834bc13ea3 Mon Sep 17 00:00:00 2001 +From b0437cf318a26c62119ad60649430903f58bbab4 Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso <tomeu.vizoso@collabora.com> Date: Tue, 1 Oct 2013 13:19:20 +0200 -Subject: [PATCH 03/12] wayland: Add Wayland example +Subject: [PATCH 03/15] wayland: Add Wayland example --- .../linux/apps/hello_pi/CMakeLists.txt | 1 + @@ -862,5 +862,5 @@ index 8225dd5..0be6ce7 100755 - +make -C hello_wayland -- -2.10.2 +2.15.0 diff --git a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0004-wayland-egl-Add-bcm_host-to-dependencies.patch b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0004-wayland-egl-Add-bcm_host-to-dependencies.patch index 752b61a0c..d60c43276 100644 --- a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0004-wayland-egl-Add-bcm_host-to-dependencies.patch +++ b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0004-wayland-egl-Add-bcm_host-to-dependencies.patch @@ -1,7 +1,7 @@ -From 718402e1be80ff9fb9863e847e31072ec735a5eb Mon Sep 17 00:00:00 2001 +From cae4ff834eef23c8f23126ba4d630db395f13aee Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Mon, 10 Aug 2015 02:38:27 -0700 -Subject: [PATCH 04/12] wayland-egl: Add bcm_host to dependencies +Subject: [PATCH 04/15] wayland-egl: Add bcm_host to dependencies It uses headers like vcos_platform_types.h but does not depend on module which should add the required include paths @@ -24,5 +24,5 @@ index 8bafc15..fd259c9 100644 Libs: -L${libdir} -lwayland-egl Cflags: -I${includedir} -- -2.10.2 +2.15.0 diff --git a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0005-interface-remove-faulty-assert-to-make-weston-happy-.patch b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0005-interface-remove-faulty-assert-to-make-weston-happy-.patch index 05b0dfa7b..676f34ca4 100644 --- a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0005-interface-remove-faulty-assert-to-make-weston-happy-.patch +++ b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0005-interface-remove-faulty-assert-to-make-weston-happy-.patch @@ -1,7 +1,7 @@ -From 2a6e3d53a75fe44ec6fa3ae64c8ca5664b614979 Mon Sep 17 00:00:00 2001 +From 8ee4f6eedb81e9bfe0e603a21606c52f9501e609 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" <yann.morin.1998@free.fr> Date: Sat, 24 Jan 2015 22:07:19 +0100 -Subject: [PATCH 05/12] interface: remove faulty assert() to make weston happy +Subject: [PATCH 05/15] interface: remove faulty assert() to make weston happy at runtime This was removed after a discussion on IRC with the weston guys @@ -13,7 +13,7 @@ Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> 1 file changed, 1 deletion(-) diff --git a/interface/vmcs_host/vc_vchi_dispmanx.c b/interface/vmcs_host/vc_vchi_dispmanx.c -index 45f4cff..5d0368c 100755 +index eab146e..29e0dee 100755 --- a/interface/vmcs_host/vc_vchi_dispmanx.c +++ b/interface/vmcs_host/vc_vchi_dispmanx.c @@ -1306,7 +1306,6 @@ static void *dispmanx_notify_func( void *arg ) { @@ -25,5 +25,5 @@ index 45f4cff..5d0368c 100755 } } else { -- -2.10.2 +2.15.0 diff --git a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0006-zero-out-wl-buffers-in-egl_surface_free.patch b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0006-zero-out-wl-buffers-in-egl_surface_free.patch index f4da1c13e..a8f1f2435 100644 --- a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0006-zero-out-wl-buffers-in-egl_surface_free.patch +++ b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0006-zero-out-wl-buffers-in-egl_surface_free.patch @@ -1,7 +1,7 @@ -From a3d43c1b754fc0576b428d36a877b9b50dd5d1ce Mon Sep 17 00:00:00 2001 +From 789b0b0c04b741c21dd573b78eded970721d14c2 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Sat, 6 Feb 2016 11:10:47 -0800 -Subject: [PATCH 06/12] zero-out wl buffers in egl_surface_free +Subject: [PATCH 06/15] zero-out wl buffers in egl_surface_free origins from buildroot @@ -29,5 +29,5 @@ index 42350bf..1f923d9 100644 #endif } -- -2.10.2 +2.15.0 diff --git a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0007-initialize-front-back-wayland-buffers.patch b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0007-initialize-front-back-wayland-buffers.patch index 47f633a6d..ad2636a2c 100644 --- a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0007-initialize-front-back-wayland-buffers.patch +++ b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0007-initialize-front-back-wayland-buffers.patch @@ -1,7 +1,7 @@ -From 5b37f53cff07f37b281c25f987b9dbdacc264bf6 Mon Sep 17 00:00:00 2001 +From 762dd3156775f167ff0dfd44322dbb19a85822a7 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Sat, 6 Feb 2016 11:11:41 -0800 -Subject: [PATCH 07/12] initialize front back wayland buffers +Subject: [PATCH 07/15] initialize front back wayland buffers origins from metrological wayland support @@ -30,5 +30,5 @@ index 1f923d9..9a9582c 100644 } #endif -- -2.10.2 +2.15.0 diff --git a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0008-Remove-RPC_FLUSH.patch b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0008-Remove-RPC_FLUSH.patch index 74918425e..1e668138c 100644 --- a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0008-Remove-RPC_FLUSH.patch +++ b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0008-Remove-RPC_FLUSH.patch @@ -1,7 +1,7 @@ -From 14a749a3f840e93db548373b907a7a0e664dcfdb Mon Sep 17 00:00:00 2001 +From f8929adbf95ad3d44491cf6fc8a84a686b71193e Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Sat, 6 Feb 2016 11:09:18 -0800 -Subject: [PATCH 08/12] Remove RPC_FLUSH +Subject: [PATCH 08/15] Remove RPC_FLUSH Origins from buildroot @@ -23,5 +23,5 @@ index f9b7287..b04ffef 100644 } #endif -- -2.10.2 +2.15.0 diff --git a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0009-fix-cmake-dependency-race.patch b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0009-fix-cmake-dependency-race.patch index 3f57d1eb7..214d5e25d 100644 --- a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0009-fix-cmake-dependency-race.patch +++ b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0009-fix-cmake-dependency-race.patch @@ -1,7 +1,7 @@ -From b5392c39d7407a5226c9314bc01ed82877ff0539 Mon Sep 17 00:00:00 2001 +From f53e028f33f261f85883c9168977dd5486e9b47c Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Sat, 6 Feb 2016 13:12:47 -0800 -Subject: [PATCH 09/12] fix cmake dependency race +Subject: [PATCH 09/15] fix cmake dependency race Fixes errors like @@ -42,7 +42,7 @@ index 1d81ca3..d6cd415 100644 add_library (vcos SHARED ${SOURCES}) target_link_libraries (vcos pthread dl rt) diff --git a/interface/vmcs_host/CMakeLists.txt b/interface/vmcs_host/CMakeLists.txt -index f44d01f..9bcc2c3 100755 +index 6718215..c415176 100755 --- a/interface/vmcs_host/CMakeLists.txt +++ b/interface/vmcs_host/CMakeLists.txt @@ -17,14 +17,6 @@ set(VCHOSTIF_SOURCE @@ -74,5 +74,5 @@ index f0bae30..8c44c58 100644 struct wl_resource *resource; struct wl_dispmanx *dispmanx; -- -2.10.2 +2.15.0 diff --git a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0010-Fix-for-framerate-with-nested-composition.patch b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0010-Fix-for-framerate-with-nested-composition.patch index 8a34f3f1a..9f779203c 100644 --- a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0010-Fix-for-framerate-with-nested-composition.patch +++ b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0010-Fix-for-framerate-with-nested-composition.patch @@ -1,7 +1,7 @@ -From 098faed5e7035b51f14700fdf4cf5875aa7af97e Mon Sep 17 00:00:00 2001 +From 6559a57c66c5f55571a1aa29cf14d9130a9ef2c9 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Tue, 29 Mar 2016 20:38:30 -0700 -Subject: [PATCH 10/12] Fix for framerate with nested composition +Subject: [PATCH 10/15] Fix for framerate with nested composition frame rate appears irregular and lower than expected when using nested composition. @@ -56,5 +56,5 @@ index 03fe67b..13a110c 100644 #ifdef ANDROID CLIENT_UNLOCK(); -- -2.10.2 +2.15.0 diff --git a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0011-build-shared-library-for-vchostif.patch b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0011-build-shared-library-for-vchostif.patch index f2455e52c..5ee5cbd9f 100644 --- a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0011-build-shared-library-for-vchostif.patch +++ b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0011-build-shared-library-for-vchostif.patch @@ -1,7 +1,7 @@ -From b533d784484caead1dc84c766127e1d3854d2aad Mon Sep 17 00:00:00 2001 +From 3e396f0b514f3acf90c02f5d55b3816028367a55 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Sat, 2 Apr 2016 10:37:24 -0700 -Subject: [PATCH 11/12] build shared library for vchostif +Subject: [PATCH 11/15] build shared library for vchostif Fixes #149 @@ -11,7 +11,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/vmcs_host/CMakeLists.txt b/interface/vmcs_host/CMakeLists.txt -index 9bcc2c3..0ef753f 100755 +index c415176..d0cca1a 100755 --- a/interface/vmcs_host/CMakeLists.txt +++ b/interface/vmcs_host/CMakeLists.txt @@ -17,7 +17,7 @@ set(VCHOSTIF_SOURCE @@ -24,5 +24,5 @@ index 9bcc2c3..0ef753f 100755 #add_library(bufman vc_vchi_bufman.c ) -- -2.10.2 +2.15.0 diff --git a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0012-implement-buffer-wrapping-interface-for-dispmanx.patch b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0012-implement-buffer-wrapping-interface-for-dispmanx.patch index aa3e0ef35..48af58832 100644 --- a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0012-implement-buffer-wrapping-interface-for-dispmanx.patch +++ b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0012-implement-buffer-wrapping-interface-for-dispmanx.patch @@ -1,7 +1,7 @@ -From ee5ebfcf0e030efed17f2a45fbb018a02dd421b3 Mon Sep 17 00:00:00 2001 +From f5b2263c8d65e307cb085414e08118cbbe00a94c Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Sat, 2 Apr 2016 10:54:59 -0700 -Subject: [PATCH 12/12] implement buffer wrapping interface for dispmanx +Subject: [PATCH 12/15] implement buffer wrapping interface for dispmanx Courtesy: Zan Dobersek @@ -88,5 +88,5 @@ index c18626d..11ed1ef 100644 </protocol> -- -2.10.2 +2.15.0 diff --git a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0013-Implement-triple-buffering-for-wayland.patch b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0013-Implement-triple-buffering-for-wayland.patch new file mode 100644 index 000000000..d3a984045 --- /dev/null +++ b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0013-Implement-triple-buffering-for-wayland.patch @@ -0,0 +1,90 @@ +From 10ba55489002c2ccdf96d221301ec059c4574811 Mon Sep 17 00:00:00 2001 +From: Jeff Wannamaker <jeff_wannamaker@cable.comcast.com> +Date: Thu, 19 Jan 2017 18:56:07 +0000 +Subject: [PATCH 13/15] Implement triple buffering for wayland + +Change from double to triple buffering for wayland. +This enables higher frame rates without tearing artifacts +by allowing both the glFinish and the buffer release +interlock to operate without pushing the frame period +to two vertical intervals + +Signed-off-by: Jeff Wannamaker <jeff_wannamaker@cable.comcast.com> +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + interface/khronos/egl/egl_client.c | 3 ++- + interface/khronos/egl/egl_client_surface.c | 8 ++++++++ + interface/khronos/egl/egl_client_surface.h | 11 +++++++++++ + 3 files changed, 21 insertions(+), 1 deletion(-) + +diff --git a/interface/khronos/egl/egl_client.c b/interface/khronos/egl/egl_client.c +index 13a110c..0380274 100644 +--- a/interface/khronos/egl/egl_client.c ++++ b/interface/khronos/egl/egl_client.c +@@ -2323,7 +2323,8 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surf) + + buffer_temp = surface->front_wl_buffer; + surface->front_wl_buffer = surface->back_wl_buffer; +- surface->back_wl_buffer = buffer_temp; ++ surface->back_wl_buffer = surface->middle_wl_buffer; ++ surface->middle_wl_buffer = buffer_temp; + + configid = egl_config_to_id(surface->config); + color = egl_config_get_color_format(configid); +diff --git a/interface/khronos/egl/egl_client_surface.c b/interface/khronos/egl/egl_client_surface.c +index 9a9582c..10b3b04 100644 +--- a/interface/khronos/egl/egl_client_surface.c ++++ b/interface/khronos/egl/egl_client_surface.c +@@ -402,12 +402,14 @@ EGL_SURFACE_T *egl_surface_create( + if (type == WINDOW && wl_display) { + surface->wl_egl_window = (struct wl_egl_window*)win; + surface->front_wl_buffer = NULL; ++ surface->middle_wl_buffer = NULL; + surface->back_wl_buffer = allocate_wl_buffer( + surface->wl_egl_window, color); + resource = surface->back_wl_buffer->resource; + } else { + surface->wl_egl_window = NULL; + surface->front_wl_buffer = NULL; ++ surface->middle_wl_buffer = NULL; + surface->back_wl_buffer = NULL; + resource = DISPMANX_NO_HANDLE; + } +@@ -696,6 +698,12 @@ void egl_surface_free(EGL_SURFACE_T *surface) + surface->back_wl_buffer = 0; + } + ++ if (surface->middle_wl_buffer) { ++ wl_buffer_destroy(surface->middle_wl_buffer->wl_buffer); ++ free(surface->middle_wl_buffer); ++ surface->middle_wl_buffer = 0; ++ } ++ + if (surface->front_wl_buffer) { + wl_buffer_destroy(surface->front_wl_buffer->wl_buffer); + free(surface->front_wl_buffer); +diff --git a/interface/khronos/egl/egl_client_surface.h b/interface/khronos/egl/egl_client_surface.h +index e328b77..58a3184 100644 +--- a/interface/khronos/egl/egl_client_surface.h ++++ b/interface/khronos/egl/egl_client_surface.h +@@ -312,6 +312,17 @@ typedef struct { + */ + struct wl_dispmanx_client_buffer *front_wl_buffer; + ++ /* ++ middle_wl_buffer ++ ++ Validity: ++ type == WINDOW ++ ++ Invariant: ++ client-side information about the wl_buffer in the middle ++ */ ++ struct wl_dispmanx_client_buffer *middle_wl_buffer; ++ + /* + back_wl_buffer + +-- +2.15.0 + diff --git a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0014-GLES2-gl2ext.h-Define-GL_R8_EXT-and-GL_RG8_EXT.patch b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0014-GLES2-gl2ext.h-Define-GL_R8_EXT-and-GL_RG8_EXT.patch new file mode 100644 index 000000000..b59605659 --- /dev/null +++ b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0014-GLES2-gl2ext.h-Define-GL_R8_EXT-and-GL_RG8_EXT.patch @@ -0,0 +1,30 @@ +From d750c738b5c23bba24531cb713292e4ab3f2ec56 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 10 May 2017 06:39:34 +0000 +Subject: [PATCH 14/15] GLES2/gl2ext.h: Define GL_R8_EXT and GL_RG8_EXT + +weston code uses these defines +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + interface/khronos/include/GLES2/gl2ext.h | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/interface/khronos/include/GLES2/gl2ext.h b/interface/khronos/include/GLES2/gl2ext.h +index 4eacf7f..283e3e1 100644 +--- a/interface/khronos/include/GLES2/gl2ext.h ++++ b/interface/khronos/include/GLES2/gl2ext.h +@@ -327,6 +327,9 @@ typedef void* GLeglImageOES; + #define GL_RGBX_BRCM 0x80EE + #endif + ++#define GL_R8_EXT 0x8229 ++#define GL_RG8_EXT 0x822B ++ + /* GL_EXT_texture_type_2_10_10_10_REV */ + #ifndef GL_EXT_texture_type_2_10_10_10_REV + #define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368 +-- +2.15.0 + diff --git a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0015-EGL-glplatform.h-define-EGL_CAST.patch b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0015-EGL-glplatform.h-define-EGL_CAST.patch new file mode 100644 index 000000000..f10740b65 --- /dev/null +++ b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0015-EGL-glplatform.h-define-EGL_CAST.patch @@ -0,0 +1,32 @@ +From 827907f2223df93918e680101a1ac6228ba0f07e Mon Sep 17 00:00:00 2001 +From: Andrea Galbusera <gizero@gmail.com> +Date: Fri, 14 Jul 2017 09:52:54 +0200 +Subject: [PATCH 15/15] EGL/glplatform.h: define EGL_CAST + +C++ / C typecast macros for special EGL handle values: used by libepoxy code +The definition comes from the updated version of this header in mesa. + +Upstream-Status: Pending +--- + interface/khronos/include/EGL/eglplatform.h | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/interface/khronos/include/EGL/eglplatform.h b/interface/khronos/include/EGL/eglplatform.h +index 1f7c930..c39d425 100644 +--- a/interface/khronos/include/EGL/eglplatform.h ++++ b/interface/khronos/include/EGL/eglplatform.h +@@ -202,4 +202,11 @@ EGLAPI void EGLAPIENTRY BEGL_GetDefaultDriverInterfaces(BEGL_DriverInterfaces *i + #include "interface/khronos/common/khrn_client_mangle.h" + #endif + ++/* C++ / C typecast macros for special EGL handle values */ ++#if defined(__cplusplus) ++#define EGL_CAST(type, value) (static_cast<type>(value)) ++#else ++#define EGL_CAST(type, value) ((type) (value)) ++#endif ++ + #endif /* __eglplatform_h */ +-- +2.15.0 + diff --git a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland_git.bb b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland_git.bb index a37249c82..579aace13 100644 --- a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland_git.bb +++ b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland_git.bb @@ -10,13 +10,13 @@ PR = "r5" PROVIDES = "virtual/libgles2 \ virtual/egl" -RPROVIDES_${PN} += "libgles2 libgl" +RPROVIDES_${PN} += "libgles2 egl libegl" COMPATIBLE_MACHINE = "raspberrypi" SRCBRANCH = "master" SRCFORK = "raspberrypi" -SRCREV = "bb15afe33b313fe045d52277a78653d288e04f67" +SRCREV = "bc3c52a51315399a9f31ed24049eb4bc81fd1c60" SRC_URI = "\ git://github.com/${SRCFORK}/userland.git;protocol=git;branch=${SRCBRANCH} \ @@ -32,6 +32,9 @@ SRC_URI = "\ file://0010-Fix-for-framerate-with-nested-composition.patch \ file://0011-build-shared-library-for-vchostif.patch \ file://0012-implement-buffer-wrapping-interface-for-dispmanx.patch \ + file://0013-Implement-triple-buffering-for-wayland.patch \ + file://0014-GLES2-gl2ext.h-Define-GL_R8_EXT-and-GL_RG8_EXT.patch \ + file://0015-EGL-glplatform.h-define-EGL_CAST.patch \ " S = "${WORKDIR}/git" diff --git a/import-layers/meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend b/import-layers/meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend index 6fd17da11..a5a6af3f3 100644 --- a/import-layers/meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend +++ b/import-layers/meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend @@ -7,5 +7,3 @@ PACKAGECONFIG_rpi ?= " \ ${@bb.utils.contains("DISTRO_FEATURES", "wayland", "xwayland", "", d)} \ ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "systemd", "", d)} \ " - -XSERVER_RRECOMMENDS_append = " xf86-input-libinput" diff --git a/import-layers/meta-raspberrypi/recipes-kernel/linux-firmware/files/brcmfmac43430-sdio.bin b/import-layers/meta-raspberrypi/recipes-kernel/linux-firmware/files/brcmfmac43430-sdio.bin Binary files differnew file mode 100644 index 000000000..6b955da80 --- /dev/null +++ b/import-layers/meta-raspberrypi/recipes-kernel/linux-firmware/files/brcmfmac43430-sdio.bin diff --git a/import-layers/meta-raspberrypi/recipes-kernel/linux-firmware/files/brcmfmac43430-sdio.txt b/import-layers/meta-raspberrypi/recipes-kernel/linux-firmware/files/brcmfmac43430-sdio.txt index ea4f648a1..3d917a7fd 100644 --- a/import-layers/meta-raspberrypi/recipes-kernel/linux-firmware/files/brcmfmac43430-sdio.txt +++ b/import-layers/meta-raspberrypi/recipes-kernel/linux-firmware/files/brcmfmac43430-sdio.txt @@ -1,19 +1,20 @@ -# NVRAM file for BCM943430WLPTH +# NVRAM file for BCM943430WLSELG # 2.4 GHz, 20 MHz BW mode # The following parameter values are just placeholders, need to be updated. manfid=0x2d0 -prodid=0x0727 +prodid=0x0726 vendid=0x14e4 devid=0x43e2 -boardtype=0x0727 -boardrev=0x1101 +boardtype=0x0726 +boardrev=0x1202 boardnum=22 macaddr=00:90:4c:c5:12:38 sromrev=11 boardflags=0x00404201 boardflags3=0x08000000 xtalfreq=37400 +#xtalfreq=19200 nocrc=1 ag0=255 aa2g=1 @@ -21,6 +22,7 @@ ccode=ALL pa0itssit=0x20 extpagain2g=0 + #PA parameters for 2.4GHz, measured at CHIP OUTPUT pa2ga0=-168,7161,-820 AvVmid_c0=0x0,0xc8 @@ -40,15 +42,9 @@ ofdmdigfilttypebe=18 # PAPD mode: papdmode=1 papdvalidtest=1 -pacalidx2g=42 -papdepsoffset=-22 -papdendidx=58 - -# LTECX flags -ltecxmux=0 -ltecxpadnum=0x0102 -ltecxfnsel=0x44 -ltecxgcigpio=0x01 +pacalidx2g=32 +papdepsoffset=-36 +papdendidx=61 il0macaddr=00:90:4c:c5:12:38 wl0id=0x431b @@ -61,6 +57,3 @@ muxenab=0x1 #VCO freq 326.4MHz spurconfig=0x3 - -edonthd20l=-75 -edoffthd20ul=-80 diff --git a/import-layers/meta-raspberrypi/recipes-kernel/linux-firmware/linux-firmware_%.bbappend b/import-layers/meta-raspberrypi/recipes-kernel/linux-firmware/linux-firmware_%.bbappend index 252da22a4..565b73526 100644 --- a/import-layers/meta-raspberrypi/recipes-kernel/linux-firmware/linux-firmware_%.bbappend +++ b/import-layers/meta-raspberrypi/recipes-kernel/linux-firmware/linux-firmware_%.bbappend @@ -1,12 +1,26 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:" -SRC_URI += "file://brcmfmac43430-sdio.txt" +SRC_URI += " \ + file://brcmfmac43430-sdio.bin \ + file://brcmfmac43430-sdio.txt \ + " do_install_append() { - install -D -m 0644 ${WORKDIR}/brcmfmac43430-sdio.txt ${D}/lib/firmware/brcm/brcmfmac43430-sdio.txt + # Overwrite v7.45.41.26 by the one we currently provide in this layer + # (v7.45.41.46) + local _firmware="brcmfmac43430-sdio.bin" + local _oldmd5=9258986488eca9fe5343b0d6fe040f8e + if [ "$(md5sum ${D}/lib/firmware/brcm/$_firmware | awk '{print $1}')" != "$_oldmd5" ]; then + _firmware="" + bbwarn "linux-firmware stopped providing brcmfmac43430 v7.45.41.26." + else + _firmware="${WORKDIR}/$_firmware" + fi + + mkdir -p ${D}/lib/firmware/brcm + install -m 0644 $_firmware ${WORKDIR}/brcmfmac43430-sdio.txt ${D}/lib/firmware/brcm } FILES_${PN}-bcm43430 += " \ - /lib/firmware/brcm/brcmfmac43430-sdio.txt \ + /lib/firmware/brcm/brcmfmac43430-sdio.txt \ " - diff --git a/import-layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-4.4/0001-fix-dtbo-rules.patch b/import-layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-4.4/0001-fix-dtbo-rules.patch deleted file mode 100644 index 5113e23fb..000000000 --- a/import-layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-4.4/0001-fix-dtbo-rules.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 13c8784da3dbd977f64cec740eba775b6fab11c2 Mon Sep 17 00:00:00 2001 -From: Herve Jourdain <herve.jourdain@neuf.fr> -Date: Fri, 20 May 2016 16:02:23 +0800 -Subject: [yocto][meta-raspberrypi][PATCH v4 4/5] linux-raspberrypi_4.4.inc: - support for .dtbo files for dtb overlays - -Upstream-Status: Pending - -Kernel 4.4.6+ on RaspberryPi support .dtbo files for overlays, instead of .dtb. -Patch the kernel, which has faulty rules to generate .dtbo the way yocto does - -Signed-off-by: Herve Jourdain <herve.jourdain@neuf.fr> ---- - .../0001-fix-dtbo-rules.patch | 27 ++++++++++++++++++++++ - 1 file changed, 27 insertions(+) - create mode 100644 recipes-kernel/linux/linux-raspberrypi-4.4/0001-fix-dtbo-rules.patch - -diff --git a/arch/arm/Makefile b/arch/arm/Makefile -index a2e7cf7..673c1cb 100644 ---- a/arch/arm/Makefile -+++ b/arch/arm/Makefile -@@ -333,6 +333,8 @@ $(INSTALL_TARGETS): - - %.dtb: | scripts - $(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@ -+%.dtbo: | scripts -+ $(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@ - - PHONY += dtbs dtbs_install - -diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib -index 3079c4f..6cc3766 100644 ---- a/scripts/Makefile.lib -+++ b/scripts/Makefile.lib -@@ -293,7 +293,8 @@ $(obj)/%.dtb: $(src)/%.dts FORCE - $(call if_changed_dep,dtc) - - quiet_cmd_dtco = DTCO $@ --cmd_dtco = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ -+cmd_dtco = mkdir -p $(dir ${dtc-tmp}) ; \ -+ $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ - $(objtree)/scripts/dtc/dtc -@ -H epapr -O dtb -o $@ -b 0 \ - -i $(dir $<) $(DTC_FLAGS) \ - -d $(depfile).dtc.tmp $(dtc-tmp) ; \ diff --git a/import-layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-dev.bb b/import-layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-dev.bb new file mode 100644 index 000000000..0879bcb30 --- /dev/null +++ b/import-layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-dev.bb @@ -0,0 +1,26 @@ +python __anonymous() { + if "linux-raspberrypi-dev" not in d.getVar("PREFERRED_PROVIDER_virtual/kernel"): + msg = "Skipping linux-raspberrypi-dev as it is not the preferred " + \ + "provider of virtual/kernel." + raise bb.parse.SkipRecipe(msg) +} + +FILESEXTRAPATHS_prepend := "${THISDIR}/linux-raspberrypi:" + +LINUX_VERSION ?= "4.11" +LINUX_RPI_DEV_BRANCH ?= "rpi-4.11.y" + +SRCREV = "${AUTOREV}" +SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=${LINUX_RPI_DEV_BRANCH} \ + file://0001-build-arm64-Add-rules-for-.dtbo-files-for-dts-overla.patch \ +" +require linux-raspberrypi.inc + +# A LOADADDR is needed when building a uImage format kernel. This value is not +# set by default in rpi-4.8.y and later branches so we need to provide it +# manually. This value unused if KERNEL_IMAGETYPE is not uImage. +KERNEL_EXTRA_ARGS += "LOADADDR=0x00008000" + +# Disable version check so that we don't have to edit this recipe every time +# upstream bumps the version +KERNEL_VERSION_SANITY_SKIP = "1" diff --git a/import-layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-dev/0001-build-arm64-Add-rules-for-.dtbo-files-for-dts-overla.patch b/import-layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-dev/0001-build-arm64-Add-rules-for-.dtbo-files-for-dts-overla.patch new file mode 100644 index 000000000..e8bc52ee8 --- /dev/null +++ b/import-layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-dev/0001-build-arm64-Add-rules-for-.dtbo-files-for-dts-overla.patch @@ -0,0 +1,29 @@ +From 922ce1fd0eb810b713f6ffa9a7ab97c11b6e38cf Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 10 Feb 2017 17:57:08 -0800 +Subject: [PATCH] build/arm64: Add rules for .dtbo files for dts overlays + +We now create overlays as .dtbo files. + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + arch/arm64/Makefile | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile +index 3635b8662724..822fefeb1cd0 100644 +--- a/arch/arm64/Makefile ++++ b/arch/arm64/Makefile +@@ -113,6 +113,9 @@ zinstall install: + %.dtb: scripts + $(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@ + ++%.dtbo: | scripts ++ $(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@ ++ + PHONY += dtbs dtbs_install + + dtbs: prepare scripts +-- +2.11.1 + diff --git a/import-layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi.inc b/import-layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi.inc index d196d8e00..9265d557a 100644 --- a/import-layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi.inc +++ b/import-layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi.inc @@ -21,7 +21,7 @@ KERNEL_DEFCONFIG_raspberrypi2 ?= "bcm2709_defconfig" KERNEL_DEFCONFIG_raspberrypi3-64 ?= "bcmrpi3_defconfig" # CMDLINE for raspberrypi -CMDLINE = "dwc_otg.lpm_enable=0 console=serial0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait" +CMDLINE ?= "dwc_otg.lpm_enable=0 console=serial0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait" # Add the kernel debugger over console kernel command line option if enabled CMDLINE_append = ' ${@base_conditional("ENABLE_KGDB", "1", "kgdboc=serial0,115200", "", d)}' @@ -33,8 +33,8 @@ KERNEL_MODULE_AUTOLOAD += "${@bb.utils.contains("MACHINE_FEATURES", "pitft28r", # Set programmatically some variables during recipe parsing # See http://www.yoctoproject.org/docs/current/bitbake-user-manual/bitbake-user-manual.html#anonymous-python-functions python __anonymous () { - kerneltype = d.getVar('KERNEL_IMAGETYPE', True) - kerneldt = get_dts(d, d.getVar('LINUX_VERSION', True)) + kerneltype = d.getVar('KERNEL_IMAGETYPE') + kerneldt = get_dts(d, d.getVar('LINUX_VERSION')) d.setVar("KERNEL_DEVICETREE", kerneldt) } diff --git a/import-layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.4.bb b/import-layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.4.bb deleted file mode 100644 index b6be0ecac..000000000 --- a/import-layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.4.bb +++ /dev/null @@ -1,10 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:" - -LINUX_VERSION ?= "4.4.50" - -SRCREV = "04c8e47067d4873c584395e5cb260b4f170a99ea" -SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-4.4.y \ - file://0001-fix-dtbo-rules.patch \ -" - -require linux-raspberrypi.inc diff --git a/import-layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.9.bb b/import-layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.9.bb index 074f448e7..df28fda77 100644 --- a/import-layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.9.bb +++ b/import-layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.9.bb @@ -1,10 +1,10 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:" -LINUX_VERSION ?= "4.9.27" +LINUX_VERSION ?= "4.9.59" + +SRCREV = "e7976b2affa8c05bd299ead0ad9c36ddaf135b9d" +SRC_URI = "git://github.com/raspberrypi/linux.git;branch=rpi-4.9.y" -SRCREV = "9a5f215eda12bad29b35040dff00d0346fe517e2" -SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-4.9.y \ -" require linux-raspberrypi.inc # A LOADADDR is needed when building a uImage format kernel. This value is not diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx%.bbappend b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx%.bbappend new file mode 100644 index 000000000..67e46de95 --- /dev/null +++ b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx%.bbappend @@ -0,0 +1,9 @@ +GSTREAMER_1_0_OMX_TARGET_rpi = "rpi" +GSTREAMER_1_0_OMX_CORE_NAME_rpi = "${libdir}/libopenmaxil.so" + + +# How to make this RPI specific? +EXTRA_OECONF_append_rpi = " CFLAGS="$CFLAGS -I${STAGING_DIR_TARGET}/usr/include/IL -I${STAGING_DIR_TARGET}/usr/include/interface/vcos/pthreads -I${STAGING_DIR_TARGET}/usr/include/interface/vmcs_host/linux"" +#examples only build with GL but not GLES, so disable it for RPI +EXTRA_OECONF_append_rpi = " --disable-examples" + diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.2.0/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.10/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch index 815a7c2b6..815a7c2b6 100644 --- a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.2.0/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch +++ b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.10/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.2.0/0001-config-files-path.patch b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.10/0001-config-files-path.patch index a7da9221c..a7da9221c 100644 --- a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.2.0/0001-config-files-path.patch +++ b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.10/0001-config-files-path.patch diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.2.0/0002-fix-decoder-flushing.patch b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.10/0002-fix-decoder-flushing.patch index d4c7c81d2..d4c7c81d2 100644 --- a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.2.0/0002-fix-decoder-flushing.patch +++ b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.10/0002-fix-decoder-flushing.patch diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.2.0/0003-no-timeout-on-get-state.patch b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.10/0003-no-timeout-on-get-state.patch index 0a0050de7..0a0050de7 100644 --- a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.2.0/0003-no-timeout-on-get-state.patch +++ b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.10/0003-no-timeout-on-get-state.patch diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.10/0004-Properly-handle-drain-requests-while-flushing.patch b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.10/0004-Properly-handle-drain-requests-while-flushing.patch new file mode 100644 index 000000000..4d10f24de --- /dev/null +++ b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.10/0004-Properly-handle-drain-requests-while-flushing.patch @@ -0,0 +1,30 @@ +From 80dddfd13aaf2fe7272765f8cf291215fe375e28 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= <eocanha@igalia.com> +Date: Tue, 17 Nov 2015 16:51:27 +0000 +Subject: [PATCH] Properly handle drain requests while flushing + +Without this commit the decoder streaming thread stops without ever attending +the drain request, leaving the decoder input thread waiting forever. +--- + omx/gstomx.c | 7 +++++++ + omx/gstomxvideodec.c | 13 +++++++++++++ + 2 files changed, 20 insertions(+) + +Index: gst-omx-1.10.2/omx/gstomx.c +=================================================================== +--- gst-omx-1.10.2.orig/omx/gstomx.c ++++ gst-omx-1.10.2/omx/gstomx.c +@@ -737,6 +737,13 @@ gst_omx_component_new (GstObject * paren + + g_mutex_lock (&comp->lock); + gst_omx_component_handle_messages (comp); ++ ++ if (err != OMX_ErrorNone && comp->last_error == OMX_ErrorNone) { ++ GST_ERROR_OBJECT (comp->parent, ++ "Last operation returned an error. Setting last_error manually."); ++ comp->last_error = err; ++ } ++ + g_mutex_unlock (&comp->lock); + + return comp; diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.2.0/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.10/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch index b7a875375..b7a875375 100644 --- a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.2.0/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch +++ b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.10/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.2.0/0004-Properly-handle-drain-requests-while-flushing.patch b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.2.0/0004-Properly-handle-drain-requests-while-flushing.patch deleted file mode 100644 index 98689f3fb..000000000 --- a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.2.0/0004-Properly-handle-drain-requests-while-flushing.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 80dddfd13aaf2fe7272765f8cf291215fe375e28 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= <eocanha@igalia.com> -Date: Tue, 17 Nov 2015 16:51:27 +0000 -Subject: [PATCH] Properly handle drain requests while flushing - -Without this commit the decoder streaming thread stops without ever attending -the drain request, leaving the decoder input thread waiting forever. ---- - omx/gstomx.c | 7 +++++++ - omx/gstomxvideodec.c | 13 +++++++++++++ - 2 files changed, 20 insertions(+) - -diff --git a/omx/gstomx.c b/omx/gstomx.c -index 69696c4..f0cd890 100644 ---- a/omx/gstomx.c -+++ b/omx/gstomx.c -@@ -830,6 +830,13 @@ gst_omx_component_set_state (GstOMXComponent * comp, OMX_STATETYPE state) - done: - - gst_omx_component_handle_messages (comp); -+ -+ if (err != OMX_ErrorNone && comp->last_error == OMX_ErrorNone) { -+ GST_ERROR_OBJECT (comp->parent, -+ "Last operation returned an error. Setting last_error manually."); -+ comp->last_error = err; -+ } -+ - g_mutex_unlock (&comp->lock); - - if (err != OMX_ErrorNone) { -diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c -index d531f75..a26c4a6 100644 ---- a/omx/gstomxvideodec.c -+++ b/omx/gstomxvideodec.c -@@ -1539,9 +1539,16 @@ component_error: - flushing: - { - GST_DEBUG_OBJECT (self, "Flushing -- stopping task"); -+ -+ g_mutex_lock (&self->drain_lock); -+ if (self->draining) { -+ self->draining = FALSE; -+ g_cond_broadcast (&self->drain_cond); -+ } - gst_pad_pause_task (GST_VIDEO_DECODER_SRC_PAD (self)); - self->downstream_flow_ret = GST_FLOW_FLUSHING; - self->started = FALSE; -+ g_mutex_unlock (&self->drain_lock); - return; - } - -@@ -1599,8 +1606,14 @@ flow_error: - self->started = FALSE; - } else if (flow_ret == GST_FLOW_FLUSHING) { - GST_DEBUG_OBJECT (self, "Flushing -- stopping task"); -+ g_mutex_lock (&self->drain_lock); -+ if (self->draining) { -+ self->draining = FALSE; -+ g_cond_broadcast (&self->drain_cond); -+ } - gst_pad_pause_task (GST_VIDEO_DECODER_SRC_PAD (self)); - self->started = FALSE; -+ g_mutex_unlock (&self->drain_lock); - } - GST_VIDEO_DECODER_STREAM_UNLOCK (self); - return; --- -1.8.3.2 - diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.2.0/0006-omxvideodec-unref-allocator-after-getting-it-from-al.patch b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.2.0/0006-omxvideodec-unref-allocator-after-getting-it-from-al.patch deleted file mode 100644 index ace60a617..000000000 --- a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.2.0/0006-omxvideodec-unref-allocator-after-getting-it-from-al.patch +++ /dev/null @@ -1,48 +0,0 @@ -From d2df0fb032c36b366a08a1355c4f4c816eb53447 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Aur=C3=A9lien=20Zanelli?= <aurelien.zanelli@darkosphere.fr> -Date: Fri, 3 Jul 2015 00:26:48 +0200 -Subject: [PATCH] omxvideodec: unref allocator after getting it from allocation - query - -Otherwise a reference will be leaked for each allocator. It only happens -when target platform is Raspberry Pi and when we have GL support. - -https://bugzilla.gnome.org/show_bug.cgi?id=751867 ---- - omx/gstomxvideodec.c | 20 ++++++++++++-------- - 1 file changed, 12 insertions(+), 8 deletions(-) - -diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c -index cd24944..b8c3756 100644 ---- a/omx/gstomxvideodec.c -+++ b/omx/gstomxvideodec.c -@@ -2530,14 +2530,18 @@ gst_omx_video_dec_decide_allocation (GstVideoDecoder * bdec, GstQuery * query) - GstAllocationParams params; - - gst_query_parse_nth_allocation_param (query, i, &allocator, ¶ms); -- if (allocator -- && g_strcmp0 (allocator->mem_type, -- GST_EGL_IMAGE_MEMORY_TYPE) == 0) { -- found = TRUE; -- gst_query_set_nth_allocation_param (query, 0, allocator, ¶ms); -- while (gst_query_get_n_allocation_params (query) > 1) -- gst_query_remove_nth_allocation_param (query, 1); -- break; -+ if (allocator) { -+ if (g_strcmp0 (allocator->mem_type, GST_EGL_IMAGE_MEMORY_TYPE) == 0) { -+ found = TRUE; -+ gst_query_set_nth_allocation_param (query, 0, allocator, ¶ms); -+ while (gst_query_get_n_allocation_params (query) > 1) -+ gst_query_remove_nth_allocation_param (query, 1); -+ } -+ -+ gst_object_unref (allocator); -+ -+ if (found) -+ break; - } - } - --- -2.5.5 - diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.2.0/0007-omxvideodec-Use-gstglmemoryegl-for-the-RPi.patch b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.2.0/0007-omxvideodec-Use-gstglmemoryegl-for-the-RPi.patch deleted file mode 100644 index ed828c361..000000000 --- a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.2.0/0007-omxvideodec-Use-gstglmemoryegl-for-the-RPi.patch +++ /dev/null @@ -1,115 +0,0 @@ -From 1cb902edb51d8f5d95f910b79b9b4c208550a7b6 Mon Sep 17 00:00:00 2001 -From: Gwang Yoon Hwang <yoon@igalia.com> -Date: Wed, 20 Jan 2016 03:10:38 +0900 -Subject: [PATCH] omxvideodec : Use gstglmemoryegl for the RPi - -Modified to use gstglmemoryegl to avoid texture creation/copy operations -at the glupload. ---- - omx/gstomxvideodec.c | 28 ++++++++++++++-------------- - 1 file changed, 14 insertions(+), 14 deletions(-) - -diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c -index ec97731..c9d60ff 100644 ---- a/omx/gstomxvideodec.c -+++ b/omx/gstomxvideodec.c -@@ -38,7 +38,7 @@ - - #if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL) - #include <gst/gl/gl.h> --#include <gst/gl/egl/gsteglimagememory.h> -+#include <gst/gl/egl/gstglmemoryegl.h> - #endif - - #if defined (USE_OMX_TARGET_RPI) && defined(__GNUC__) -@@ -125,7 +125,7 @@ gst_omx_video_dec_class_init (GstOMXVideoDecClass * klass) - klass->cdata.type = GST_OMX_COMPONENT_TYPE_FILTER; - klass->cdata.default_src_template_caps = - #if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL) -- GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_MEMORY_EGL_IMAGE, -+ GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, - "RGBA") "; " - #endif - "video/x-raw, " -@@ -596,8 +596,8 @@ gst_omx_video_dec_allocate_output_buffers (GstOMXVideoDec * self) - gst_structure_free (config); - - #if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL) -- eglimage = self->eglimage && (allocator -- && g_strcmp0 (allocator->mem_type, GST_EGL_IMAGE_MEMORY_TYPE) == 0); -+ eglimage = self->eglimage -+ && (allocator && GST_IS_GL_MEMORY_EGL_ALLOCATOR (allocator)); - #else - /* TODO: Implement something that works for other targets too */ - eglimage = FALSE; -@@ -640,12 +640,12 @@ gst_omx_video_dec_allocate_output_buffers (GstOMXVideoDec * self) - for (i = 0; i < min; i++) { - GstBuffer *buffer; - GstMemory *mem; -+ GstGLMemoryEGL *gl_mem; - - if (gst_buffer_pool_acquire_buffer (pool, &buffer, ¶ms) != GST_FLOW_OK - || gst_buffer_n_memory (buffer) != 1 - || !(mem = gst_buffer_peek_memory (buffer, 0)) -- || g_strcmp0 (mem->allocator->mem_type, -- GST_EGL_IMAGE_MEMORY_TYPE) != 0) { -+ || !GST_IS_GL_MEMORY_EGL_ALLOCATOR (mem->allocator)) { - GST_INFO_OBJECT (self, "Failed to allocated %d-th EGLImage", i); - g_list_free_full (buffers, (GDestroyNotify) gst_buffer_unref); - g_list_free (images); -@@ -656,13 +656,13 @@ gst_omx_video_dec_allocate_output_buffers (GstOMXVideoDec * self) - err = OMX_ErrorUndefined; - goto done; - } -- -+ gl_mem = (GstGLMemoryEGL *)mem; - buffers = g_list_append (buffers, buffer); -- gst_egl_image_memory_set_orientation (mem, -+ gst_gl_memory_egl_set_orientation (gl_mem, - GST_VIDEO_GL_TEXTURE_ORIENTATION_X_NORMAL_Y_FLIP); -- images = g_list_append (images, gst_egl_image_memory_get_image (mem)); -+ images = g_list_append (images, gst_gl_memory_egl_get_image (gl_mem)); - if (egl_display == EGL_NO_DISPLAY) -- egl_display = gst_egl_image_memory_get_display (mem); -+ egl_display = gst_gl_memory_egl_get_display (gl_mem); - } - - GST_DEBUG_OBJECT (self, "Allocated %d EGLImages successfully", min); -@@ -954,14 +954,14 @@ gst_omx_video_dec_reconfigure_output_port (GstOMXVideoDec * self) - gst_caps_unref (state->caps); - state->caps = gst_video_info_to_caps (&state->info); - gst_caps_set_features (state->caps, 0, -- gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_EGL_IMAGE, NULL)); -+ gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, NULL)); - - /* try to negotiate with caps feature */ - if (!gst_video_decoder_negotiate (GST_VIDEO_DECODER (self))) { - - GST_DEBUG_OBJECT (self, - "Failed to negotiate with feature %s", -- GST_CAPS_FEATURE_MEMORY_EGL_IMAGE); -+ GST_CAPS_FEATURE_MEMORY_GL_MEMORY); - - if (state->caps) - gst_caps_replace (&state->caps, NULL); -@@ -2554,7 +2554,7 @@ gst_omx_video_dec_decide_allocation (GstVideoDecoder * bdec, GstQuery * query) - - gst_query_parse_nth_allocation_param (query, i, &allocator, ¶ms); - if (allocator) { -- if (g_strcmp0 (allocator->mem_type, GST_EGL_IMAGE_MEMORY_TYPE) == 0) { -+ if (GST_IS_GL_MEMORY_EGL_ALLOCATOR (allocator)) { - found = TRUE; - gst_query_set_nth_allocation_param (query, 0, allocator, ¶ms); - while (gst_query_get_n_allocation_params (query) > 1) -@@ -2572,7 +2572,7 @@ gst_omx_video_dec_decide_allocation (GstVideoDecoder * bdec, GstQuery * query) - * and if allocator is not of type memory EGLImage then fails */ - if (feature - && gst_caps_features_contains (feature, -- GST_CAPS_FEATURE_MEMORY_EGL_IMAGE) && !found) { -+ GST_CAPS_FEATURE_MEMORY_GL_MEMORY) && !found) { - return FALSE; - } - } --- -2.5.0 - diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.10%.bbappend b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.10%.bbappend new file mode 100644 index 000000000..d4198677a --- /dev/null +++ b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.10%.bbappend @@ -0,0 +1,13 @@ +# +# Need to make this conditional to gstreamer1 +# +SRC_URI_append_rpi = " \ + file://0001-config-files-path.patch \ + file://0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch \ + file://0002-fix-decoder-flushing.patch \ + file://0003-no-timeout-on-get-state.patch \ + file://0004-Properly-handle-drain-requests-while-flushing.patch \ + file://0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch \ +" + +FILESEXTRAPATHS_prepend := "${THISDIR}/gstreamer1.0-omx-1.10:" diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.2.0.bbappend b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.2.0.bbappend deleted file mode 100644 index 1e84abe6b..000000000 --- a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.2.0.bbappend +++ /dev/null @@ -1,24 +0,0 @@ -# -# Need to make this conditional to gstreamer1 -# -SRC_URI_append_rpi = " \ - file://0001-config-files-path.patch \ - file://0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch \ - file://0002-fix-decoder-flushing.patch \ - file://0003-no-timeout-on-get-state.patch \ - file://0004-Properly-handle-drain-requests-while-flushing.patch \ - file://0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch \ - file://0006-omxvideodec-unref-allocator-after-getting-it-from-al.patch \ - file://0007-omxvideodec-Use-gstglmemoryegl-for-the-RPi.patch \ -" - -FILESEXTRAPATHS_prepend := "${THISDIR}/gstreamer1.0-omx-1.2.0:" - -GSTREAMER_1_0_OMX_TARGET_rpi = "rpi" -GSTREAMER_1_0_OMX_CORE_NAME_rpi = "${libdir}/libopenmaxil.so" - - -# How to make this RPI specific? -EXTRA_OECONF_append_rpi = " CFLAGS="$CFLAGS -I${STAGING_DIR_TARGET}/usr/include/IL -I${STAGING_DIR_TARGET}/usr/include/interface/vcos/pthreads -I${STAGING_DIR_TARGET}/usr/include/interface/vmcs_host/linux"" -#examples only build with GL but not GLES, so disable it for RPI -EXTRA_OECONF_append_rpi = " --disable-examples" diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bbappend b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bbappend deleted file mode 100644 index a13aad778..000000000 --- a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bbappend +++ /dev/null @@ -1,22 +0,0 @@ -# -# Need to make this conditional to gstreamer1 -# -SRC_URI_append_rpi = " \ - file://0001-config-files-path.patch \ - file://0002-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch \ - file://0003-fix-decoder-flushing.patch \ - file://0003-no-timeout-on-get-state.patch \ - file://0004-Properly-handle-drain-requests-while-flushing.patch \ - file://0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch \ -" - -FILESEXTRAPATHS_prepend := "${THISDIR}/gstreamer1.0-omx:" - -GSTREAMER_1_0_OMX_TARGET_rpi = "rpi" -GSTREAMER_1_0_OMX_CORE_NAME_rpi = "${libdir}/libopenmaxil.so" - - -# How to make this RPI specific? -EXTRA_OECONF_append_rpi = " CFLAGS="$CFLAGS -I${STAGING_DIR_TARGET}/usr/include/IL -I${STAGING_DIR_TARGET}/usr/include/interface/vcos/pthreads -I${STAGING_DIR_TARGET}/usr/include/interface/vmcs_host/linux"" -#examples only build with GL but not GLES, so disable it for RPI -EXTRA_OECONF_append_rpi = " --disable-examples" diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0002-Libraries-and-headers-from-ffmpeg-are-installed-in-u.patch b/import-layers/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0002-Libraries-and-headers-from-ffmpeg-are-installed-in-u.patch index 75f72548a..203f34b2d 100644 --- a/import-layers/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0002-Libraries-and-headers-from-ffmpeg-are-installed-in-u.patch +++ b/import-layers/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0002-Libraries-and-headers-from-ffmpeg-are-installed-in-u.patch @@ -14,33 +14,33 @@ Signed-off-by: Jonathan Liu <net147@gmail.com> Makefile.ffmpeg | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) -diff --git a/Makefile b/Makefile -index be97c2b..2c120fc 100644 ---- a/Makefile -+++ b/Makefile +Index: git/Makefile +=================================================================== +--- git.orig/Makefile ++++ git/Makefile @@ -1,9 +1,9 @@ CFLAGS+=-std=c++0x -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -DTARGET_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CMAKE_CONFIG -D__VIDEOCORE4__ -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_OPT_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DHAVE_LIBSWRESAMPLE_SWRESAMPLE_H -DOMX -DOMX_SKIP64BIT -ftree-vectorize -DUSE_EXTERNAL_OMX -DTARGET_RASPBERRY_PI -DUSE_EXTERNAL_LIBBCM_HOST --LDFLAGS+=-L./ -Lffmpeg_compiled/usr/local/lib/ -lc -lWFC -lGLESv2 -lEGL -lbcm_host -lopenmaxil -lfreetype -lz -+LDFLAGS+=-L./ -Lffmpeg_compiled/usr/lib/ -lc -lWFC -lGLESv2 -lEGL -lbcm_host -lopenmaxil -lfreetype -lz +-LDFLAGS+=-L./ -Lffmpeg_compiled/usr/local/lib/ -lc -lWFC -lGLESv2 -lEGL -lbcm_host -lopenmaxil -lfreetype -lz -lasound ++LDFLAGS+=-L./ -Lffmpeg_compiled/usr/lib/ -lc -lWFC -lGLESv2 -lEGL -lbcm_host -lopenmaxil -lfreetype -lz -lasound -INCLUDES+=-I./ -Ilinux -Iffmpeg_compiled/usr/local/include/ -I /usr/include/dbus-1.0 -I /usr/lib/arm-linux-gnueabihf/dbus-1.0/include -+INCLUDES+=-I./ -Ilinux -Iffmpeg_compiled/usr/include/ -I=/usr/include/dbus-1.0 -I /usr/lib/arm-linux-gnueabihf/dbus-1.0/include ++INCLUDES+=-I./ -Ilinux -Iffmpeg_compiled/usr/include/ -I=/usr/include/dbus-1.0 DIST ?= omxplayer-dist -@@ -87,5 +87,5 @@ dist: omxplayer.bin omxplayer.1 +@@ -88,5 +88,5 @@ dist: omxplayer.bin omxplayer.1 cp COPYING $(DIST)/usr/share/doc/omxplayer cp README.md $(DIST)/usr/share/doc/omxplayer/README cp omxplayer.1 $(DIST)/usr/share/man/man1 - cp -P ffmpeg_compiled/usr/local/lib/*.so* $(DIST)/usr/lib/omxplayer/ + cp -P ffmpeg_compiled/usr/lib/*.so* $(DIST)/usr/lib/omxplayer/ cd $(DIST); tar -czf ../$(DIST).tgz * -diff --git a/Makefile.ffmpeg b/Makefile.ffmpeg -index 5ccf96f..a7ddd5f 100644 ---- a/Makefile.ffmpeg -+++ b/Makefile.ffmpeg +Index: git/Makefile.ffmpeg +=================================================================== +--- git.orig/Makefile.ffmpeg ++++ git/Makefile.ffmpeg @@ -254,5 +254,5 @@ checkout: .PHONY : install install: @@ -48,6 +48,3 @@ index 5ccf96f..a7ddd5f 100644 - $(HOST)-strip ffmpeg_compiled/usr/local/lib/*.so + $(HOST)-strip ffmpeg_compiled/usr/lib/*.so --- -1.9.3 - diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0004-Add-FFMPEG_EXTRA_CFLAGS-and-FFMPEG_EXTRA_LDFLAGS.patch b/import-layers/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0004-Add-FFMPEG_EXTRA_CFLAGS-and-FFMPEG_EXTRA_LDFLAGS.patch index edb388e4f..ea8530def 100644 --- a/import-layers/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0004-Add-FFMPEG_EXTRA_CFLAGS-and-FFMPEG_EXTRA_LDFLAGS.patch +++ b/import-layers/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0004-Add-FFMPEG_EXTRA_CFLAGS-and-FFMPEG_EXTRA_LDFLAGS.patch @@ -12,20 +12,26 @@ Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> Makefile.ffmpeg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -diff --git a/Makefile.ffmpeg b/Makefile.ffmpeg -index abe4b26..c9d42d7 100644 ---- a/Makefile.ffmpeg -+++ b/Makefile.ffmpeg -@@ -22,7 +22,8 @@ configure: +Index: git/Makefile.ffmpeg +=================================================================== +--- git.orig/Makefile.ffmpeg ++++ git/Makefile.ffmpeg +@@ -1,6 +1,8 @@ + + CFLAGS=-D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -DTARGET_LINUX -fPIC -DPIC -D_REENTRANT -D_HAVE_SBRK -D_LARGEFILE64_SOURCE -DHAVE_CMAKE_CONFIG -DHAVE_VMCS_CONFIG -D_REENTRANT -DUSE_VCHIQ_ARM -DVCHI_BULK_ALIGN=1 -DVCHI_BULK_GRANULARITY=1 -DEGL_SERVER_DISPMANX -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__VIDEOCORE4__ -DGRAPHICS_X_VG=1 -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DOMX -DOMX_SKIP64BIT + ++FFMPEG_EXTRA_CFLAGS?=-mfpu=vfp -mfloat-abi=$(FLOAT) -mno-apcs-stack-check -mstructure-size-boundary=32 -mno-sched-prolog ++ + WORK=$(PWD) + + .PHONY : all +@@ -21,7 +23,8 @@ configure: CFLAGS="$(CFLAGS) ${INCLUDES}" \ LDFLAGS="" \ ./configure \ - --extra-cflags="-mfpu=vfp -mfloat-abi=$(FLOAT) -mno-apcs-stack-check -mstructure-size-boundary=32 -mno-sched-prolog" \ -+ --extra-cflags="-mfpu=vfp -mfloat-abi=$(FLOAT) -mno-apcs-stack-check -mstructure-size-boundary=32 -mno-sched-prolog $(FFMPEG_EXTRA_CFLAGS)" \ ++ --extra-cflags="$(FFMPEG_EXTRA_CFLAGS)" \ + --extra-ldflags="$(FFMPEG_EXTRA_LDFLAGS)" \ --enable-cross-compile \ --enable-shared \ --disable-static \ --- -2.1.0 - diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer_git.bb b/import-layers/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer_git.bb index d9460de22..0e0f9ba40 100644 --- a/import-layers/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer_git.bb +++ b/import-layers/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer_git.bb @@ -7,10 +7,10 @@ SECTION = "console/utils" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" -DEPENDS = "libpcre libav virtual/egl boost freetype dbus openssl samba libssh" +DEPENDS = "libpcre libav virtual/egl boost freetype dbus openssl samba libssh libomxil coreutils-native curl-native" PR = "r4" -SRCREV = "8466acf65f5f444dfa22631fb83c07ac759c02a5" +SRCREV = "061425a5eabf6e9ee43229911c073a863d144038" SRC_URI = "git://github.com/popcornmix/omxplayer.git;protocol=git;branch=master \ file://0001-Remove-Makefile.include-which-includes-hardcoded.patch \ file://0002-Libraries-and-headers-from-ffmpeg-are-installed-in-u.patch \ @@ -21,7 +21,9 @@ SRC_URI = "git://github.com/popcornmix/omxplayer.git;protocol=git;branch=master " S = "${WORKDIR}/git" -COMPATIBLE_MACHINE = "raspberrypi" +COMPATIBLE_MACHINE ?= "null" +COMPATIBLE_MACHINE_rpi_aarch64 = "null" +COMPATIBLE_MACHINE_rpi = "(.*)" inherit autotools-brokensep pkgconfig @@ -31,9 +33,8 @@ export TEMPDIR = "${S}/tmp" # Needed in Makefile.ffmpeg export HOST = "${HOST_SYS}" export WORK = "${S}" -export FLOAT = "${@bb.utils.contains("TUNE_FEATURES", "callconvention-hard", "hard", "softfp", d)}" -export FFMPEG_EXTRA_CFLAGS = "--sysroot=${STAGING_DIR_TARGET}" -export FFMPEG_EXTRA_LDFLAGS = "--sysroot=${STAGING_DIR_TARGET}" +export FFMPEG_EXTRA_CFLAGS = "${TUNE_CCARGS} ${TOOLCHAIN_OPTIONS}" +export FFMPEG_EXTRA_LDFLAGS = "${TUNE_CCARGS} ${TOOLCHAIN_OPTIONS}" # Needed in top Makefile export LDFLAGS = "-L${S}/ffmpeg_compiled/usr/lib \ diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/x264/x264_git.bbappend b/import-layers/meta-raspberrypi/recipes-multimedia/x264/x264_git.bbappend new file mode 100644 index 000000000..c1cb3bc5e --- /dev/null +++ b/import-layers/meta-raspberrypi/recipes-multimedia/x264/x264_git.bbappend @@ -0,0 +1 @@ +EXTRA_OECONF_append_raspberrypi = " --disable-asm" diff --git a/import-layers/meta-raspberrypi/scripts/lib/image/canned-wks/sdimage-raspberrypi.wks b/import-layers/meta-raspberrypi/wic/sdimage-raspberrypi.wks index 353daac9a..353daac9a 100644 --- a/import-layers/meta-raspberrypi/scripts/lib/image/canned-wks/sdimage-raspberrypi.wks +++ b/import-layers/meta-raspberrypi/wic/sdimage-raspberrypi.wks |