206 Commits

Author SHA1 Message Date
Andrei Gherzan
a5f9b07a82 bcm2835: Compile examples correct LDFLAGS to avoid HASH errors
ERROR: bcm2835-1.50-r0 do_package_qa: QA Issue: No GNU_HASH in the elf binary:
'build-rpi-master/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/bcm2835/1.50-r0/packages-split/bcm2835-tests/usr/lib/bcm2835/spi'
No GNU_HASH in the elf binary:
'build-rpi-master/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/bcm2835/1.50-r0/packages-split/bcm2835-tests/usr/lib/bcm2835/event'
No GNU_HASH in the elf binary:
'build-rpi-master/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/bcm2835/1.50-r0/packages-split/bcm2835-tests/usr/lib/bcm2835/gpio'
No GNU_HASH in the elf binary:
'build-rpi-master/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/bcm2835/1.50-r0/packages-split/bcm2835-tests/usr/lib/bcm2835/i2c'
No GNU_HASH in the elf binary:
'build-rpi-master/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/bcm2835/1.50-r0/packages-split/bcm2835-tests/usr/lib/bcm2835/blink'
No GNU_HASH in the elf binary:
'build-rpi-master/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/bcm2835/1.50-r0/packages-split/bcm2835-tests/usr/lib/bcm2835/spin'
No GNU_HASH in the elf binary:
'build-rpi-master/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/bcm2835/1.50-r0/packages-split/bcm2835-tests/usr/lib/bcm2835/input'
No GNU_HASH in the elf binary:
'build-rpi-master/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/bcm2835/1.50-r0/packages-split/bcm2835-tests/usr/lib/bcm2835/pwm'
[ldflags]

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2016-09-21 11:38:22 +01:00
Andrei Gherzan
8c5eba1d94 bcm2835: Update to 1.50
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2016-09-21 11:38:22 +01:00
Andrei Gherzan
5229f75604 wiringPi: Fix compilation of libraries
Not using the yocto LDFLAGS will make some qa tests fail:

ERROR: wiringpi-git-r0 do_package_qa: QA Issue: No GNU_HASH in the elf binary:
'build-rpi-master/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/wiringpi/git-r0/packages-split/wiringpi/usr/lib/libwiringPi.so.2.32'
No GNU_HASH in the elf binary:
'build-rpi-master/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/wiringpi/git-r0/packages-split/wiringpi/usr/lib/libwiringPiDev.so.2.32'
[ldflags]

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2016-09-21 11:38:22 +01:00
Andrei Gherzan
5771c7f7d4 wiringpi: Fix prepend space
Not having this correctly will get you into troubles like:

| gpio.c:40:23: fatal error: gertboard.h: No such file or directory
|  #include <gertboard.h>

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2016-09-21 11:38:22 +01:00
Andrei Gherzan
1b2c25ee88 wiringpi: Update to 2.32
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2016-09-21 11:38:22 +01:00
Jonathan Liu
4c02c7ce07 sdcard_image-rpi.bbclass: remove redundant IMAGEDATESTAMP
The IMAGE_NAME variable already contains the date and time so it is
redundant to also include the date again with IMAGEDATESTAMP
when writing to image-version-info in the boot partition.

Signed-off-by: Jonathan Liu <net147@gmail.com>
2016-09-16 18:30:08 +01:00
Scott Ellis
cc64d6324d userland: Add bash to RDEPENDS
WARNING: userland-git-r5 do_package_qa: QA Issue: /usr/bin/dtoverlay-post
contained in package userland requires /bin/bash, but no providers found
in RDEPENDS_userland? [file-rdeps]

Signed-off-by: Scott Ellis <scott@jumpnowtek.com>
2016-08-29 20:59:42 +01:00
Khem Raj
2745399f75 gstreamer1.0-omx-1.2.0: Add patches and bbappend for 1.2.0 separately
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-07-13 12:40:41 +01:00
Khem Raj
3fb0a1914a sdcard_image-rpi.bbclass: Add the vardepexcludes
The problem reappears because we need to add to the variable
and not assign

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-07-13 12:40:40 +01:00
Khem Raj
6564e126ae sdcard_image-rpi.bbclass: Exclude DATETIME from task stamp
This helps in fixing occasional error seen quite often

ERROR: wpe-image-1.0-r0 do_image_rpi_sdimg: Taskhash mismatch 7ea6b505bb7a2cc5ca03552bcf3333fa verses 3be7cdad8c4532430d96368c5ca523d4 for /a/builder/home/kraj/work/oe/meta-metrological/recipes-core/images/wp
e-image.bb.do_image_rpi_sdimg
ERROR: Taskhash mismatch 7ea6b505bb7a2cc5ca03552bcf3333fa verses 3be7cdad8c4532430d96368c5ca523d4 for /a/builder/home/kraj/work/oe/meta-metrological/recipes-core/images/wpe-image.bb.do_image_rpi_sdimg

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-07-08 14:25:56 +01:00
Khem Raj
101e8aba77 linux-raspberrypi_4.4: Upgrade to 4.4.13
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-07-08 14:25:55 +01:00
Khem Raj
10691ae680 firmware: Upgrade to 20160622
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-07-08 14:25:54 +01:00
Khem Raj
5cac5e67f8 userland: Upgrade to latest tip
Drop upstream applied patches

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-07-08 14:25:53 +01:00
Paul Barker
43ecd9ac99 sdcard_image-rpi: Always install dtb files
We now need dtb files when booting via u-boot.

Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2016-07-08 12:17:47 +01:00
Paul Barker
fe92cc7e14 rpi-mkimage: Remove unused recipe
The rpi-mkimage tools are no longer used. Recent Raspberry Pi firmware can
directly boot a Linux kernel image using device tree and mainline u-boot
supports Raspberry Pi without the use of these tools.

Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2016-07-08 12:17:46 +01:00
Paul Barker
d49bd07c5b u-boot: Use mainline u-boot recipe from oe-core
The repository used by u-boot-rpi has not been updated since 2012. In the
meantime, mailine u-boot has gained Raspberry Pi support. All we need to do is
set UBOOT_MACHINE to an appropriate value in the machine config files.

Currently configs are only provided for raspberrypi and raspberrypi2. The master
branch of u-boot now also appears to have a config file for raspberrypi3 so
support for this can be added in the future when u-boot is upgraded in oe-core.

The mainline u-boot recipe creates the file "u-boot.bin" instead of
"u-boot.img".

Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2016-07-08 12:17:41 +01:00
Paul Barker
b34b4fe8fc linux-raspberrypi: rpi-mkimage is no longer needed
Recent versions of the Raspberry Pi firmware can directly handle kernel images
which use device tree. The modifications made by rpi-mkimage are no longer
needed.

Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2016-07-08 12:17:39 +01:00
Andrei Gherzan
5f12d846f7 packagegroup-rpi-test: Fix COPYING md5sum
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2016-07-08 11:36:20 +01:00
Andrei Gherzan
f38938f6ca linux-raspberrypi: Fix v4.1 with GCC6
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2016-07-08 11:33:44 +01:00
Andrei Gherzan
4fb1a155dc packagegroup-rpi-test: Poky moved the license so fix LIC_FILES_CHKSUM
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2016-07-08 11:33:42 +01:00
Herve Jourdain
8a21c1dda6 linux-raspberrypi.inc: KERNEL_OUTPUT has been removed in kernel.bbclass
Signed-off-by: Herve Jourdain <herve.jourdain@neuf.fr>
2016-06-15 00:50:57 +01:00
Jonathan Liu
0dbf569173 omxplayer: fix compilation with GCC 6
Specifying -isystem${STAGING_DIR_HOST}/usr/include in INCLUDES gives:

    In file included from utils/PCMRemap.cpp:26:0:
    .../build/tmp/sysroots/raspberrypi2/usr/include/c++/6.1.1/cstdlib:75:25: fatal error: stdlib.h: No such file or directory
     #include_next <stdlib.h>
                             ^
    compilation terminated.
    Makefile:44: recipe for target 'utils/PCMRemap.o' failed

To resolve this, /usr/include shouldn't be specified as it is already a
default include path relative to the sysroot.

See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129.

Signed-off-by: Jonathan Liu <net147@gmail.com>
2016-06-14 16:27:18 +01:00
Jonathan Liu
ffddbad97c linux-rpi: ensure config file is closed
Avoids warnings like this with python3:

    WARNING: .../meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_3.18.bb:
    <string>:16: ResourceWarning: unclosed file <_io.TextIOWrapper
    name='.../meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/defconfig'
    mode='r' encoding='UTF-8'>

Signed-off-by: Jonathan Liu <net147@gmail.com>
2016-06-13 12:27:38 +01:00
Khem Raj
69840c0bbe linux-raspberrypi_4.4.bb: Upgrade to 4.4.9
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-05-19 17:25:39 +02:00
Khem Raj
b1940869a5 linux-rpi: Enable kconf options to enable initramfs support
Additionally add few few file systems e.g. squashfs, overlayfs
to support booting with initramfs

Drop checking for target triplet to set EABI, rpi probaly should
not have any legacy into OABI world.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-05-19 17:25:38 +02:00
Khem Raj
5d79d24d36 firmware: Update to "20160512" snapshot
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-05-19 17:14:06 +02:00
Khem Raj
f7af12910f userland: Update to tip of tree
Drop the patch which is upstreamed slightly differently
use VMCS_INSTALL_PREFIX to /usr via EXTRA_OECMAKE

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-05-19 17:14:04 +02:00
Khem Raj
9912d38e97 linux-raspberrypi_4.4.bb: Upgrade to 4.4.8
Fixes for gcc6
Drop upstreamed patch

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-05-05 13:20:26 +02:00
Andreas Müller
060927314d replace base_contains by bb.utils.contains
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
2016-05-05 12:51:29 +02:00
Jonathan Liu
cd338c26e2 sdcard_image-rpi.bbclass: Fix do_image_rpi_sdimg tashhash mismatch
IMAGE_CMD_rpi-sdimg() uses the IMAGEDATESTAMP variable, so the taskhash
of the function keeps changing. This results in a taskhash mismatch
error.

Fix this by excluding the IMAGEDATESTAMP variable from the checksum.

Change-Id: Ie6f30ad29e279d5312ec655ac4a3bf246c8a04de
Signed-off-by: Jonathan Liu <net147@gmail.com>
2016-05-04 15:52:15 +02:00
Andrei Gherzan
dedd75f08f README: Switch from redmine to github issues
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2016-04-25 10:10:05 +02:00
Andrei Gherzan
c4ddf87db2 rpi-base.inc: Include pi3-miniuart-bt-overlay.dtb
This is used to switch BT from ttyUSB0 to ttyS0 (miniUART).

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2016-04-25 09:05:09 +02:00
Andrei Gherzan
953dc5a406 linux-raspberrypi_4.1: Update to v4.1.21
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2016-04-22 16:41:33 +02:00
toolmmy
1317a894fa bluez5: Add bluez5 support for brcm43438 on raspberrypi3.
This patch adds the bluetooth support for the brcm43438 module on the raspberrypi3 by
deploying the modules firmware and changing the targeting firmware path. In addition
the brcm43438.service adds the automatically attaching (hciattach) for systemd environments.
The following steps can be used to manually configure the brcm43438:

root@raspberrypi3:~# hciattach /dev/ttyAMA0 bcm43xx-3wire
bcm43xx_init
Flash firmware /lib/firmware/brcm/BCM43430A1.hcd
Set Controller UART speed to 3000000 bit/s
Device setup complete
root@raspberrypi3:~# hciconfig
hci0:   Type: BR/EDR  Bus: UART
        BD Address: B8:27:EB:6C:85:BE  ACL MTU: 1021:8  SCO MTU: 64:1
        DOWN
        RX bytes:983 acl:0 sco:0 events:33 errors:0
        TX bytes:887 acl:0 sco:0 commands:33 errors:0

root@raspberrypi3:~# /usr/lib/bluez5/bluetooth/bluetoothd -e -n -E
root@raspberrypi3:~# bluetoothctl
[NEW] Controller B8:27:EB:6C:85:BE raspberrypi3 [default]
[bluetooth]# power on
[CHG] Controller B8:27:EB:6C:85:BE Class: 0x400000
Changing power on succeeded
[CHG] Controller B8:27:EB:6C:85:BE Powered: yes
[bluetooth]# scan on
Discovery started
[CHG] Controller B8:27:EB:6C:85:BE Discovering: yes
[NEW] Device 00:1C:05:FF:F9:F8 Nonin3230_501585326

NOTE: SERIAL_CONSOLE must configured to ttyS0 instead of ttyAMA0 (used by the brcm43438). See pending patch from Martin Bergek

Signed-off-by: Tom Doehring <toolmmy@gmail.com>
2016-04-22 16:41:33 +02:00
Andrei Gherzan
6cdb2becac packagegroup-rpi-test: Add packages to be able to test WiFi/Bluetooth
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2016-04-22 16:41:33 +02:00
Andrei Gherzan
37c2366724 linux-raspberrypi: Set baudrate and use serial0 for kgdboc
The driver for 8250 defaults to 9600. We setup it on 115200 to be consistent
with getty configuration.

The firmware can do its magic with kgdboc too as it searches and replaces
=serial0 and =serial1. So, use serial0 for kgdboc too.

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2016-04-22 16:39:52 +02:00
Andrei Gherzan
4a2cefab66 linux-raspberrypi: Bump to v4.4.7
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2016-04-22 11:00:41 +02:00
Theodor Gherzan
47440c32a4 README: Document new variable configuration
Signed-off-by: Theodor Gherzan <theodor@resin.io>
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2016-04-22 10:59:44 +02:00
Theodor Gherzan
3fe96d9212 linux-raspberrypi: Make use of serial aliases
The firmware will parse cmdline and replace serial aliases with the
actual serial console port.

Signed-off-by: Theodor Gherzan <theodor@resin.io>
2016-04-21 22:25:53 +02:00
Theodor Gherzan
c57a7295d7 rpi-config: Add UART enabler
Signed-off-by: Theodor Gherzan <theodor@resin.io>
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2016-04-21 22:25:41 +02:00
Theodor Gherzan
d997e2da17 firmware.inc: Update firmware to include various serial fixes
Signed-off-by: Theodor Gherzan <theodor@resin.io>
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2016-04-21 22:11:26 +02:00
Trevor Woerner
e2603e56d6 raspberrypi*.conf: Serial console definition split
The latest raspberrypi3 puts its console on ttyS0 instead of ttyAMA0 (like all
the preceding boards). Therefore pull this definition out of the common
include file and add it separately for each MACHINE.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2016-04-21 21:16:56 +02:00
Jonathan Liu
3696c0ef66 omxplayer: Bump revision
Fixes linking error due to missing vchostif library dependency.
Rebased patches and removed patches already merged upstream.

Signed-off-by: Jonathan Liu <net147@gmail.com>
2016-04-21 19:12:38 +02:00
Tom Doehring
bfc46bdd55 userland: Fix passing of wayland-native to cmake while configuring
While having 'wayland' set DISTRO_FEATURES 'wayland-native' is handled as a cmake parameter which breaks the do_configure:

$ cat /data/builds/rpi3-sandbox/tmp/work/raspberrypi2-poky-linux-gnueab i/userland/git-r5/temp/run.do_configure
 cmake \
          ${OECMAKE_SITEFILE} \
          [...]
          -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXE_LINKER_FLAGS='-Wl,--no-as-needed'                  wayland-native \
          -Wno-dev

$ CMake Error: The source directory "/data/builds/rpi3-sandbox/tmp/work/raspberrypi2-poky-linux-gnueabi/userland/git-r5/build/wayland-native" does not exist.
| Specify --help for usage, or press the help button on the CMake GUI.

Assuming that wayland-native should only be defined as a DEPENDS package this patch moves it to the correct PACKAGECONFIG position.

Signed-off-by: Tom Doehring <toolmmy@gmail.com>
Signed-off-by: toolmmy <toolmmy@gmail.com>
2016-04-20 22:57:56 +02:00
Khem Raj
3645b27848 userland: Make vchostif as shared library
This helps in using this library when building
with PIE binaries

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-04-13 05:16:57 +02:00
Khem Raj
f1b7034077 userland: Fix a build regression in builds not using wayland
Update userland to latest

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-04-13 05:16:26 +02:00
Andrei Gherzan
4f8930b9d0 userland: In case of wayland configuration build needs wayland-native
Building wayland support requires availability of wayland-scanner to avoid
build errors like:

| /bin/sh:
| /home/andrei/work/yocto/build-rpi-master/tmp/sysroots/x86_64-linux/usr/bin/wayland-scanner:
| No such file or directory

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2016-04-13 05:12:13 +02:00
Andrei Gherzan
d493717509 README: Mention all the supported machines
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2016-04-13 05:08:23 +02:00
toolmmy
9b6cdaf826 linux-firmware: Rework of brcmfmac43430 firmware handling
The current version of the recipe produces the following warnings while createing an image:

WARNING: The license listed Firmware-broadcom_brcm80211 was not in the licenses collected for recipe linux-firmwa
re
WARNING: [log_check] td-core-image: found a warning message in the logfile (keyword 'WARNING:'):
[log_check] WARNING: The license listed Firmware-broadcom_brcm80211 was not in the licenses collected for recipe
linux-firmware

This commit contains a rework of the brcm80211 firmware handling and deploys the firmware and the LICENSE files that fixes the warning messages.

Signed-off-by: Tom Doehring <toolmmy@gmail.com>
2016-04-13 04:32:03 +02:00
Alan Stice
54ecd3402d linux-raspberrypi: Rename linux.inc to linux-rpi.inc Rename linux.inc to prevent it from impacting other machines
Signed-off-by: Alan Stice <alan@alanstice.com>
2016-04-13 04:17:22 +02:00
Petter Mabäcker
e9e4b1bbd2 linux-raspberrypi: Drop support for 3.14
General policy is to support three kernel versions; latest stable + two
longterm versions. These are currently 4.4, 4.1, and 3.18.

Signed-off-by: Petter Mabäcker <petter@technux.se>
2016-04-13 03:18:41 +02:00
Petter Mabäcker
e447357ec4 .gitignore: Ignore some additional files
Signed-off-by: Petter Mabäcker <petter@technux.se>
2016-04-13 03:18:38 +02:00
Petter Mabäcker
3bd9b1bce4 rpi-base.inc: Add overlay for rpi-ft5406
rpi-ft5406 is an enabler for Official Raspberry Pi 7 inch
touchscreen support.

Signed-off-by: Petter Mabäcker <petter@technux.se>
2016-04-13 03:18:21 +02:00
Petter Mabäcker
197266a2aa rpi-base.inc: Remove deprecated MACHINE_FEATURES
Signed-off-by: Petter Mabäcker <petter@technux.se>
2016-04-13 03:17:56 +02:00
Petter Mabäcker
9797874a23 pitft: Add support for pitft28r
The support for PiTFT 28 inch resistive touchscreen is optional
and can be enabled by adding below in local.conf:

MACHINE_FEATURES += "pitft pitft28r"

While at it also fix a minor typo in README.

Signed-off-by: Petter Mabäcker <petter@technux.se>
2016-04-13 03:16:02 +02:00
Khem Raj
84af6e7de3 userland: Fix tearing effect seen with wayland compositors
Introduce EGL flush in few more places

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-04-01 13:27:59 +02:00
Khem Raj
8f425f1b9e firmware: Update to 20160326
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-04-01 13:22:37 +02:00
Khem Raj
e82417d33b userland: Implement dispmanx_wrap_buffer
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-03-28 16:37:43 +02:00
Khem Raj
d28692dc9e userland: Upgrade to latest
Regenerate patches on top of given SRCREV Add return code errors fix to get it
working with clang.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-03-28 16:37:29 +02:00
Khem Raj
f6473c36a5 eglinfo-x11: Disable --as-needed
--as-needed exposes a dependency problem where libegl needs some symbols
from libgles2 but the order that waf uses on linker cmdline for these
libs is reversed so we end up with link time failures e.g.

libEGL.so: undefined reference to `glxx_client_GetRenderbufferParameteriv'

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-03-28 16:36:06 +02:00
Khem Raj
8f285bb8f3 sdcard_image: Depend on do_deploy for kernel
SD image is expecting dtb files to be deployed in deploy area, this step
however is done when do_deploy of kernel is finished and we need to pin that in
dependency list, otherwise there are build race conditions during builds
especially visible when building with initramfs enabled.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-03-28 16:35:50 +02:00
Khem Raj
75efa69e75 linux-raspberrypi-4.4: Add the pitft22 overlay from adafruit
Upgrade to 4.4.6

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-03-28 16:35:04 +02:00
Khem Raj
38ab74bd3e linux-raspberrypi_4.4.bb: Update to 4.4.3
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-03-10 15:16:14 +01:00
Khem Raj
e9c8b2aa4d linux-raspberrypi: Upgrade 4.4.1 -> 4.4.2
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-03-10 15:16:03 +01:00
Khem Raj
2c19e8882f linux-raspberrypi: Add recipe for 4.4 release
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2016-03-10 15:15:44 +01:00
Khem Raj
00962adc49 userland: Drop extern inline patches
Not needed since the issues have been fixed differently upstream

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-03-10 14:58:26 +01:00
Khem Raj
370e0f68e6 userland: Upgrade to latest
Drop upstreamed patches

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-03-10 14:57:48 +01:00
Khem Raj
f248d7cf8c gstreamer1.0-omx: Backports and fixes for smooth video playback
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-03-10 14:56:07 +01:00
Khem Raj
53e17683c5 weston: Specify egl and compositor options for rpi
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-03-10 14:55:47 +01:00
Khem Raj
27445a1e4c gstreamer1.0-omx: Add raspberry pi optimization patches and config options
Patches from Hong Li <honglh@gmail.com>

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-03-10 14:54:43 +01:00
Khem Raj
06709d784d userland: Fix build race with wayland support
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-03-10 14:54:02 +01:00
Khem Raj
da73efffe1 userland: Add wayland to deps if in DISTRO_FEATURES
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-03-10 14:53:49 +01:00
Khem Raj
34cb837929 userland: Define PROJECT_APIVER and rprovide libgles2 libgl
These are needed for pkgconfig to have correct version number which is
checked by many configure systems e.g. cogl to decide on support for
wayland-egl

rprovides are expected by cogl as well to define runtime deps on
libgles2 and libgl

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-03-10 14:53:28 +01:00
Khem Raj
507ab2682b userland: Delete rpc flushing of thread in glEGLImageTargetTexture2DOES
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2016-03-10 14:53:03 +01:00
Khem Raj
4ed070fc0c eglinfo-x11,eglinfo-fb: Add EGLINFO_DEVICE via bbappends
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-03-10 14:51:44 +01:00
Khem Raj
b47e8f5599 rpi-gpio: Upgrade to 0.6.1 and fix build with clang
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-03-10 14:51:01 +01:00
Khem Raj
6fa040c769 weston: Enable rpi compositor backend
oe-core default configure options disables it

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-03-10 14:50:49 +01:00
Khem Raj
bfbe0ce3b4 userland: Add wayland support
backport and fix needed patches for supporting wayland-egl
use PACKAGECONFIG for wayland so we can add proper DEPENDS on wayland
Fix QA warnings about dev-so

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-03-10 14:49:21 +01:00
Khem Raj
4db634bcda userland: Fix build with clang compiler
ends up with some warning cleanups and extern inline semantics changes

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-03-10 14:49:10 +01:00
Khem Raj
32d0936570 userland: Upgrade to latest git master
Drop upstreamed patches
0002-fix-musl-build.patch was partially upstreamed
git'ify the remaining patches

Change license field to BSD 3 clause, since thats what
the licence it with BCM and RPI Copyrights

Licence changed from Broadcom to Raspberry Pi Ltd

see commit 0863709b9fb90ee1204b7fe52f69535830d3c111
Author: popcornmix <popcornmix@gmail.com>
Date:   Mon Feb 1 21:07:02 2016 +0000

    Update copyright

diff --git a/LICENCE b/LICENCE
index 2582681..dea4c26 100644
--- a/LICENCE
+++ b/LICENCE
@@ -1,4 +1,5 @@
 Copyright (c) 2012, Broadcom Europe Ltd
+Copyright (c) 2015, Raspberry Pi (Trading) Ltd
 All rights reserved.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-03-10 14:48:53 +01:00
Theodor Gherzan
519c387e3b rpi-base.inc: Add rpi3 device tree blob
Signed-off-by: Theodor Gherzan <theodor@resin.io>
2016-03-10 14:45:42 +01:00
Theodor Gherzan
12a8848127 raspberrypi3.conf: Create machine configuration for Raspberrypi 3
Signed-off-by: Theodor Gherzan <theodor@resin.io>
2016-03-10 14:45:12 +01:00
Theodor Gherzan
1601a3571c linux-firmware: Add brcmfmac43430 firmware
Signed-off-by: Theodor Gherzan <theodor@resin.io>
2016-03-10 14:44:44 +01:00
Theodor Gherzan
752a9a89e5 bcm2835-bootfiles: Update LICENCE md5 due to firmware revision update
Signed-off-by: Theodor Gherzan <theodor@resin.io>
2016-03-10 14:44:24 +01:00
Theodor Gherzan
5eaeb55161 firmware.inc: Update revision to include rpi3 support
Signed-off-by: Theodor Gherzan <theodor@resin.io>
2016-03-10 14:44:10 +01:00
Theodor Gherzan
15a23443c8 linux-raspberrypi: Update revision to include rpi3 support
Signed-off-by: Theodor Gherzan <theodor@resin.io>
2016-03-10 14:44:03 +01:00
Petter Mabäcker
a42a1706de pitft: Add PiTFT22 support
- Add support to build overlays for PiTFT22 in the kernel.
- Setup a basic configuration for the driver

The PiTFT22 support is optional and can be enabled by adding below in
local.conf:

MACHINE_FEATURES += "pitft pitft22"

This patch also includes restructuring of kernel patches per kernel version
specific directories.

[Support #70]

Signed-off-by: Petter Mabäcker <petter@technux.se>
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2016-03-01 21:56:56 +01:00
Jonathan Liu
249cb544e0 u-boot-rpi: update path to imagetool-uncompressed.py
Signed-off-by: Jonathan Liu <net147@gmail.com>
2016-03-01 15:04:04 +01:00
Jonathan Liu
807cff5e5b linux-raspberrypi: update path to mkknlimg
Signed-off-by: Jonathan Liu <net147@gmail.com>
2016-03-01 15:04:03 +01:00
Jonathan Liu
224d1c9925 rpi-mkimage: install to bindir instead of libexecdir
On fido and earlier branches, ${libexecdir} depends on ${BPN} so it
is not a good choice as ${libexecdir} is different depending on the
recipe name.

For example, rpi-mkimage would install mkknlimg to:
  [...]/sysroots/x86_64-linux/usr/lib/rpi-mkimage
but linux-raspberrypi would look for mkknlimg in the path:
  [...]/sysroots/x86_64-linux/usr/lib/linux-raspberrypi

To resolve this, we use ${bindir} instead as it doesn't depend on
${BPN} in fido and earlier branches as well as in the master branch.

Signed-off-by: Jonathan Liu <net147@gmail.com>
2016-03-01 15:04:02 +01:00
Petter Mabäcker
0d5aff5161 pitft: Add basic support for PiTFT
Add basic support for PiTFT display by using device-trees.

In order get it working below configurations must be active 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.

[Support #70]

Signed-off-by: Petter Mabäcker <petter@technux.se>
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2016-03-01 14:38:03 +01:00
Petter Mabäcker
52671faf4f rpi-base.inc: Allow MACHINE_FEATURES appends
Ensure that it's possible to add MACHINE_FEATURES from places that will
be executed before rpi-base.inc (like e.g. local.conf), without having
them overrided.

Signed-off-by: Petter Mabäcker <petter@technux.se>
2016-03-01 14:25:54 +01:00
Petter Mabäcker
b331933938 rpi-config: I2C support
With newer kernels (>=3.18) that supports device-trees I2C
should be enabled with device-trees.

This is now support by adding:
ENABLE_I2C = "1"
in local.conf

This will enable the dtparams:
i2c1
i2c_arm

Signed-off-by: Petter Mabäcker <petter@technux.se>
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2016-03-01 14:10:21 +01:00
Andrei Gherzan
6c6f6cf7b3 Add optional build configuration section
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2016-03-01 14:06:42 +01:00
Andrei Gherzan
8948772554 README: Add missing contents
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2016-03-01 13:24:39 +01:00
Petter Mabäcker
451a8de37c .gitignore: Ignore .swp files
Signed-off-by: Petter Mabäcker <petter@technux.se>
2016-02-29 22:25:35 +01:00
Andrei Gherzan
e9de6d816d linux-raspberrypi: Make sure we have initramfs image before running mkknlimg
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2016-02-28 12:48:20 +01:00
Stéphane Cerveau
9675f8f09a linux-raspberry.inc: add initramfs support
append initramfs creation to install RPi bootloader trailer

Signed-off-by: Stéphane Cerveau <voxtok@voxtok.com>
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2016-02-28 12:48:20 +01:00
Khem Raj
4d42a6efec linux-raspberrypi: Upgrade 4.1 kernel to 4.1.17
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-02-28 12:48:20 +01:00
Khem Raj
68b18fa80e rpi-config: Upgrade to tip of tree to get GPU_MEM_1024
Document it in README

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-02-28 12:48:20 +01:00
Khem Raj
37e4913438 wiringPi: Fix build with musl
Include asm/ioctl.h for _IOC_SIZEBITS

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-02-28 12:48:20 +01:00
Khem Raj
c65b0b8c3f python-rtimu: Fix build with musl
ioctl(3) needs to include asm/ioctl.h for its signature

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-02-28 12:48:20 +01:00
Khem Raj
bcb26ed634 rpio: Include sys/types.h for caddr_t
Fixes build with musl

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-02-28 12:48:20 +01:00
Andrei Gherzan
9295c7fd71 omxplayer: Add patch to fix host-user-contaminated QA
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Jonathan Liu <net147@gmail.com>
2016-02-28 11:31:49 +01:00
Jonathan Liu
048008a935 u-boot-rpi: update path to imagetool-uncompressed.py
Signed-off-by: Jonathan Liu <net147@gmail.com>
2016-02-28 10:48:56 +01:00
Jonathan Liu
c25a43a3b4 linux-raspberrypi: update path to mkknlimg
Signed-off-by: Jonathan Liu <net147@gmail.com>
2016-02-28 10:48:55 +01:00
Jonathan Liu
736e1ba035 rpi-mkimage: install to ${libexecdir}
It doesn't make sense to install to ${libexecdir}/rpi-mkimage as it
changes the path on fido and earlier branches from:
  [...]/sysroots/x86_64-linux/usr/lib/rpi-mkimage
to:
  [...]/sysroots/x86_64-linux/usr/lib/rpi-mkimage/rpi-mkimage

Using ${libexecdir} instead of ${libexecdir}/rpi-mkimage preserves
the path for fido and earlier.

Signed-off-by: Jonathan Liu <net147@gmail.com>
2016-02-28 10:48:54 +01:00
Jonathan Liu
6726ffb4fe omxplayer: bump revision
Fixes compile errors with ffmpeg 3.0.

Signed-off-by: Jonathan Liu <net147@gmail.com>
2016-02-27 13:56:47 +01:00
Maciej Borzecki
053cb6ea0d linux-raspberrypi: use STAGING_LIBEXECDIR_NATIVE for rpi-mkimage tools
The rpi-mkimage tools are installed ${libexecdir}/rpi-mkimage within
native sysroot, where ${libexecdir} resolves to /usr/libexec. This caused
the build to fail due to recipe trying to access ${libdir}/mkimage. Fix
the paths to use an unambiguous STAGING_LIBEXECDIR_NATIVE so that a
proper location is used.

Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
2016-02-26 20:42:19 +01:00
Maciej Borzecki
1465bc8787 u-boot-rpi: use STAGING_LIBEXECDIR_NATIVE for rpi-mkimage tools
The rpi-mkimage tools are installed ${libexecdir}/rpi-mkimage within
native sysroot, where ${libexecdir} resolves to /usr/libexec. This caused
the build to fail due to recipe trying to access ${libdir}/mkimage. Fix
the paths to use an unambiguous STAGING_LIBEXECDIR_NATIVE so that a
proper location is used.

Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
2016-02-26 20:42:18 +01:00
Maciej Borzecki
6bd39a61b7 rpi-mkimage: install tools under {libexecdir}/rpi-mkimage
For consistency with other recipes that look for mkimage
tools (u-boot-rpi, linux-raspberrypi) under ${libexecdir}/rpi-mkimage,
make sure that the tools are installed at the proper location.

Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
2016-02-26 20:42:11 +01:00
Andrei Gherzan
6314f668fa raspberrypi0.conf: Add machine configuration for Raspberry Pi Zero
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2016-01-11 11:09:35 +01:00
Andrei Gherzan
fe25a1163a packagegroup-rpi-test: Include newly added packages
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2016-01-11 11:00:12 +01:00
Leon Anavi
70e7860820 python-rtimu: Add recipe to support RTIMULib
RTIMULib is a C++ and Python library that makes it easy to use
9-dof and 10-dof IMUs with embedded Linux systems. Python
module for Raspberry Pi Sense HAT depends on it.

Python module python-rtimu uses the source code from the
GitHub repository of RPi-Distro.

Signed-off-by: Leon Anavi <leon@anavi.org>
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2016-01-10 19:55:25 +01:00
Leon Anavi
509f042280 python-sense-hat: Add recipe to support Raspberry Pi Sense HAT
Python module to control the Raspberry Pi Sense HAT used in
the Astro Pi mission. This recipe provides the officially
supported library for the Sense HAT with access to all of the
on-board sensors and the LED matrix.

Signed-off-by: Leon Anavi <leon@anavi.org>
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2016-01-10 19:53:25 +01:00
Jonathan Liu
f2cff839f5 README: Fix documentation to disable overscan
To disable overscan, DISABLE_OVERSCAN should be set to 1 rather than 0.

Signed-off-by: Jonathan Liu <net147@gmail.com>
2015-12-02 23:05:16 +01:00
Andrei Gherzan
a967c15d75 patch: Delete useless file
This file has been wrongly introduced in commit 72ea51f.

Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-12-02 23:00:23 +01:00
Gary Thomas
bc0d788b47 rpi-config: SPI bus support
With the newer kernels that use device tree, the SPI bus is only
enabled by a device tree setting.  This is now supported by adding
  ENABLE_SPI_BUS = "1"
in local.conf

Signed-off-by: Gary Thomas <gary@mlbassoc.com>
2015-12-02 15:33:43 +01:00
Jonathan Liu
0776b86c66 rpi-base.inc: add i2c-rtc overlay
The update of the kernel in 10a5bace87 to
3.18.16 missed the separate rtc overlays being replaced by the i2c-rtc
overlay.

Signed-off-by: Jonathan Liu <net147@gmail.com>
2015-10-25 19:50:19 +01:00
Khem Raj
58806f6552 userland: Adjust include location for pthreads-headers
vcos headers include headers like "vcos_platform.h" "vcos_futex_mutex.h"
"vcos_platform_types.h" and these headers are different based on
platform/OSes. e.g. OS targets that support pthreads these headers
should come from pthreads/ folder but not for others. So one would add
right -I option for every package that accesses them directly or
indirectly. so if a software does #include <EGL/egl.h> then it will
break

| In file included from
/mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/sysroots/raspberrypi2/usr/include/interface/vcos/vcos_assert.h:149:0,
|                  from
/mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/sysroots/raspberrypi2/usr/include/interface/vcos/vcos.h:114,
|                  from
/mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/sysroots/raspberrypi2/usr/include/interface/vmcs_host/vc_dispmanx.h:33,
|                  from
/mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/sysroots/raspberrypi2/usr/include/EGL/eglplatform.h:110,
|                  from
/mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/sysroots/raspberrypi2/usr/include/EGL/egl.h:36,
|                  from
/mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/work/armv7at2hf-vfp-neon-angstrom-linux-gnueabi/weston/1.8.0-r0/weston-1.8.0/clients/../shared/platform.h:29,
|                  from
/mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/work/armv7at2hf-vfp-neon-angstrom-linux-gnueabi/weston/1.8.0-r0/weston-1.8.0/clients/window.h:33,
|                  from
/mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/work/armv7at2hf-vfp-neon-angstrom-linux-gnueabi/weston/1.8.0-r0/weston-1.8.0/clients/eventdemo.c:40:
|
/mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/sysroots/raspberrypi2/usr/include/interface/vcos/vcos_types.h:38:33:
fatal error: vcos_platform_types.h: No such file or directory
|  #include "vcos_platform_types.h"
|                                  ^
| compilation terminated.

This is wrong, it should not happen since doing simple #include
<EGL/egl.h> should not demand manual addition of some internal paths
tobe added to -I flags.

This patch fixes the headers which refer to headers inside pthreads/
folder to prefix them with pthreads/ so we dont have to specify
additional paths

This fixes weston on rpi and I believe there are more patches now to

recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend
recipes-multimedia/omxplayer/omxplayer_git.bb

which can be removed as well

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2015-10-24 22:00:48 +02:00
Khem Raj
dba20cbb0a userland: Fix install prefix and generate pkgconfigs
several userspace libraries like libepoxy poke for pkgconfigs ( .pc )
files to detect egl support, and comes out to fail in configure stage,
one of the patches now adds support to generate .pc files for some known
cases. it could be further extended if needed for other libraries too

Secondly, the default CMAKE_INSTALL_PREFIX is /opt/vc but in OE we use
proper /usr so lets make this change as well, it simplifies do_install()

.so are not versioned so we need to grapple with OE's defaults of
expecting versioned .so files.

Adjust packages for -dev package such that it can automatically package
pkgconfig files and inherit pkgconfig because in cmake code we are not
looking for pkgconfig so we need the dependency also put in place for
consistent builds

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2015-10-24 21:51:51 +02:00
Alex J Lennon
7cff0a0a9e README: Add section on audio routing
See http://redmine.gherzan.com/issues/55

Signed-off-by: Alex J Lennon <ajlennon@dynamicdevices.co.uk>
2015-10-24 21:45:56 +02:00
Andrei Gherzan
50a7710718 pi-blaster: Bump revision
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-10-21 22:58:54 +02:00
Andrei Gherzan
fcbb1e6e91 userland: Bump revision
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-10-21 22:58:40 +02:00
Andrei Gherzan
7d2249a2e2 rpi-mkimage: Bump revision
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-10-21 22:58:19 +02:00
Andrei Gherzan
7f043ab724 omxplayer: Bump revision
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-10-21 22:56:44 +02:00
Andrei Gherzan
aaf8e2e738 firmware: Bump revision
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-10-21 22:55:43 +02:00
Andrei Gherzan
a7d629e569 bcm2835: Update to v1.46
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-10-21 22:55:18 +02:00
Andrei Gherzan
c0563670d3 rpi-default-versions: Default kernel on 4.1.%
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-10-21 20:49:04 +02:00
Andrei Gherzan
5546748231 linux-raspberrypi: Remove old 3.12 version
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-10-21 20:48:45 +02:00
Andrei Gherzan
0d7f01df10 linux-raspberrypi: Update 4.1 recipe to 4.1.10
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-10-21 20:48:11 +02:00
Alex J Lennon
36c2501130 linux-raspberrypi: support kernel 4.1.3
Signed-off-by: Alex J Lennon <ajlennon@dynamicdevices.co.uk>
2015-10-21 14:44:27 +02:00
Alex J Lennon
10a5bace87 linux-raspberrypi: Update kernel to 3.18.16
This requires some changes to KERNEL_DEVICETREE as the dtb
layout has changed to support overlays. This change also
makes us ready to support kernel 4.x series

Signed-off-by: Alex J Lennon <ajlennon@dynamicdevices.co.uk>
2015-10-21 14:44:26 +02:00
Jonathan Liu
20c8e6a5bc gstreamer1.0-plugins-bad: remove unrecognized configure option
The --with-egl-window-system=rpi configure option is not recognized
in the current version.

Signed-off-by: Jonathan Liu <net147@gmail.com>
2015-10-13 21:02:57 +02:00
Jonathan Liu
f22ecc425c linux-raspberrypi.inc: use SRCPV instead of SRCREV for PV
SRCPV is intended to be used by PV. Using SRCREV for PV is incorrect.

Signed-off-by: Jonathan Liu <net147@gmail.com>
2015-10-13 19:33:03 +02:00
Andrei Gherzan
72ea51f87b wiringPi: Bump to 2.29
The patch was rebased to apply on the updated version.

Signed-off-by: Gianfranco Costamagna <gianfranco.costamagna@abinsula.com>
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-10-13 19:20:00 +02:00
Tom Doehring
4dfa633d23 userland: Fix multiple inline issues while building with gcc 5.x
Building userland source with gcc 5.x causes multiple issues such as:

vcos_thread.h:186:15: warning: inline function 'vcos_thread_get_affinity' declared but never defined
|  VCOS_UNSIGNED vcos_thread_get_affinity(VCOS_THREAD_T *thread);

The following patches fixes these issues and allows building userland on the current
poky master branch.

Signed-off-by: Tom Doehring <toolmmy@googlemail.com>
2015-10-02 23:26:14 +02:00
Jonathan Liu
c6f7ec52cf rpi-config: fix setting decode_WVC1 in config.txt
Signed-off-by: Jonathan Liu <net147@gmail.com>
2015-09-24 01:40:38 +03:00
Petter Mabäcker
bdbe28d7f3 pi-blaster: Bump SRCREV
Update to latest revision in order to get rid of the integration patch
'0001-handle-install-data-hook-when-cross-compile.patch' that has been
submitted upstream.

Changes since cd318cd63031a30249a4c08435b97263fa76d7b7:
  bce7c1b Merge pull request #45 from Technux/dev/technux
  74510ff Display an error message if unable to open mbox
  53197ca handle install-data-hook when cross compile

Signed-off-by: Petter Mabäcker <petter@technux.se>
2015-09-24 01:28:59 +03:00
Jonathan Liu
16718000cf sdcard_image-rpi.bbclass: use existing ROOTFS_SIZE variable
The ROOTFS_SIZE variable is already set to the aligned root filesystem size.

Signed-off-by: Jonathan Liu <net147@gmail.com>
2015-09-23 23:02:58 +03:00
Khem Raj
17dad9328b README: Add extra iformation on creating/sending patches using git
Current instructions could be improvised to help user in creating
properly formatted patches with some command help on git format-patch
and git send-email

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2015-08-10 23:37:14 +02:00
Andrei Gherzan
ade923f17d rpi-default-providers: Let users overwrite the default providers
[Feature #65]

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Pierre FICHEUX <pierre.ficheux@gmail.com>
2015-08-10 23:16:08 +02:00
Petter Mabäcker
4c06098563 packagegroup-rpi-test: Add pi-blaster
Ensure that pi-blaster is built and included by default when building
'rpi-test-image'.

Signed-off-by: Petter Mabäcker <petter@technux.se>
2015-08-10 01:50:08 +02:00
Mauro Carvalho Chehab
b47cbb6996 linux-raspberrypi.inc: Make kgdboc kernel param optional
The kernel debugger over console (kgdboc) parameter is being added
unconditionally to the kernel command line but this means that the
kernel will stop and wait for gdb to attach in case of a exception
or when sending a sysrq-g key. This behaviour may not be what most
users wants that are not remotely debugging the kernel over serial
console so make it optional by adding a ENABLE_KGDB config option.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
[javier: Extended commit message and made it conditional]
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
2015-08-10 00:36:20 +02:00
Derek Foreman
bfe2307cc4 sdcard_image-rpi.bbclass: Allocate more space for boot partition
The boot partition currently has a size of 20 MiB but just the start elf
binaries account almost 12 MiB, which means that only 8 MiB is left for
the kernel image. A recent kernel with many of its options built-in can
easily be more than 4 MiB so let's double the boot partition size to 40
MiB to make sure that it has enough room for the kernel image, the DTBs
and possible even a backup kernel.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
[javier: Extended the commit message]
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
2015-08-09 23:55:55 +02:00
Gary Thomas
d676d54f04 sdcard_image: Fix sdcard image generation
Recent updates to the MSDOS tools (OE-core is now at 3.0.28) have made
it an error to overwrite an image using mkfs.vfat.  This patch fixes
that problem by removing any old/stale images, thus starting from scratch.

Signed-off-by: Gary Thomas <gary@mlbassoc.com>
2015-08-09 23:51:06 +02:00
Khem Raj
f188f3d756 userland: Fix POSIX compliance expectation
We have errors like below with glibc 2.22+

net_sockets_common.c:139:20: error: storage size of 'hints' isn't known
    struct addrinfo hints, *info, *p;
                        ^

newer glibc has now fixed the definitions of getaddrinfo and ilk to be
enabled with correct posix version.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2015-08-09 23:02:30 +02:00
Petter Mabäcker
7457bf182c wiringpi: Bump SRCREV
Update wiringpi to latest revision. Due to a refactoring of the build
procedure in wiringpi the integration patch 'makefile-install.patch'
didn't apply anymore. While migrating that patch it was simplified and
generated using 'git format-patch' instead, to make it easier to maintain
the patch in the future.

[Support #60]

Signed-off-by: Petter Mabäcker <petter@technux.se>
Acked-by: Andrei Gherzan <andrei@gherzan.ro>
2015-07-19 14:53:27 +02:00
Petter Mabäcker
b78459f260 omxplayer: Bump SRCREV
[Support #60]

Signed-off-by: Petter Mabäcker <petter@technux.se>
Acked-by: Andrei Gherzan <andrei@gherzan.ro>
2015-07-19 14:52:37 +02:00
Petter Mabäcker
83c9ed7dc7 userland: bump SRCREV
Update to latest version of userland for rpi.

[Support #60]

Signed-off-by: Petter Mabäcker <petter@technux.se>
Acked-by: Andrei Gherzan <andrei@gherzan.ro>
2015-07-19 14:52:19 +02:00
Petter Mabäcker
9182a217c9 rpi-gpio: update version to 0.5.11
[Support #60]

Signed-off-by: Petter Mabäcker <petter@technux.se>
Acked-by: Andrei Gherzan <andrei@gherzan.ro>
2015-07-19 14:52:00 +02:00
Petter Mabäcker
27a8acecf5 pi-blaster: bump to latest version
Removed 'enable-autotools-support.patch' since it is included in latest
upstream. Also fix a cross compiling issue.

[Support #60]

Signed-off-by: Petter Mabäcker <petter@technux.se>
Acked-by: Andrei Gherzan <andrei@gherzan.ro>
2015-07-19 14:51:35 +02:00
Petter Mabäcker
5f057d9343 bcm2835: update version to 1.44
[Support #60]

Signed-off-by: Petter Mabäcker <petter@technux.se>
Acked-by: Andrei Gherzan <andrei@gherzan.ro>
2015-07-19 14:48:31 +02:00
Petter Mabäcker
3eafe9d57a rpi-mkimage: Bump SRCREV
Update to latest version of rpi-mkimg

[Support #60]

Signed-off-by: Petter Mabäcker <petter@technux.se>
Acked-by: Andrei Gherzan <andrei@gherzan.ro>
2015-07-19 14:47:58 +02:00
Petter Mabäcker
25d8f0b8d8 bcm: Bump SRCREV
Update to latest version of firmware.git

[Support #60]

Signed-off-by: Petter Mabäcker <petter@technux.se>
Acked-by: Andrei Gherzan <andrei@gherzan.ro>
2015-07-19 14:46:02 +02:00
Thomas Perrot
c8532df1c2 If SERIAL_CONSOLE is already define by another layer, this value may not be good.
Signed-off-by: Thomas Perrot <thomas.perrot@tupi.fr>
2015-06-05 16:38:14 +02:00
Trevor Woerner
0fc2b1c3ac bcm2835: update SRC_URI
It appears as though the location of this tarball has changed. The current
SRC_URI works but is redirected to this new location.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2015-06-05 16:32:38 +02:00
Petter Mabäcker
bfd50c24a2 README: fix outdated device tree info
After '6392a63 rpi-base.inc: Use KERNEL_DEVICETREE by default' was
introduced, the default value for 3.18+ kernels was changed. Ensure this
is reflected in the README.

Signed-off-by: Petter Mabäcker <petter@technux.se>
2015-06-05 14:49:47 +02:00
Petter Mabäcker
4a4373c02d devicetree: auto-disable dts for old kernels
After '6392a63 rpi-base.inc: Use KERNEL_DEVICETREE by default' was
introduced, kernel versions < 3.18 might not be buildable. Since full
device tree support was introduced in 3.18 this change ensures that all
kernel < 3.18 will automatically disable device tree.

Signed-off-by: Petter Mabäcker <petter@technux.se>
2015-06-05 14:49:46 +02:00
Petter Mabäcker
6ef9d94a2c linux-raspberrypi: Update 3.12 branch to latest
Update linux-raspberrypi_3.12 to latest revision.

Remove sl030raspberrypii2ckernel.patch since it will not apply anymore
and its content seems to be obsolite after
'558d0bf Fix grabbing lock from atomic context in i2c driver' was
merged to 3.12.

[Support #60]

Signed-off-by: Petter Mabäcker <petter@technux.se>
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-05-18 00:48:49 +02:00
Petter Mabäcker
bcae58ba84 linux-raspberrypi: Drop support for old kernel versions
meta-raspberrypi currently supports too many versions in order to ensure
that all of them are frequently tested and updated. Change to only
support latest stable + 2 long term versions.

[Support #59]

Signed-off-by: Petter Mabäcker <petter@technux.se>
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-05-18 00:48:49 +02:00
Petter Mabäcker
e1c5efc658 linux-raspberrypi: Add 3.14 support
Add basic support for Linux 3.14, cherry-pick changes from 3.18.y in
order to solve some debugfs warnings and get better support
for i2s for BCM2708.

- 3.14 lacks BCM2709 support and will not by default be able to use for
raspberry pi 2.

Below warnings still exists they are harmless and exists due to that
snd_soc_pcm512x is triggered to be loaded twice. The problem is solved
after device tree support for the driver was introduced in 3.18.y and no
easy solution exists to solve this problem on older kernel versions (see
https://github.com/raspberrypi/linux/issues/662 for more info).

   pcm512x 1-004c: Failed to reset device: -5
   pcm512x: probe of 1-004c failed with error

Remove sl030raspberrypii2ckernel.patch since it will not apply anymore
and its content seems to be obsolite after cherry-picking
'558d0bf Fix grabbing lock from atomic context in i2c driver'.

[Support #57]

Signed-off-by: Petter Mabäcker <petter@technux.se>
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-05-18 00:48:49 +02:00
Petter Mabäcker
c9f29df249 linux-raspberrypi: Update 3.18 branch to 3.18.11
Update linux-raspberrypi_3.18 to latest version.
Remove sl030raspberrypii2ckernel.patch since it will not apply anymore
and its content seems to be obsolite in later kernel versions.

[Support #56]

Change-Id: I91e57f4e65d9c1c9d12014f5d11b0acd950e2d1d
Signed-off-by: Petter Mabäcker <petter@technux.se>
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-04-30 21:55:02 +02:00
Andrei Gherzan
b896a7da70 .gitignore: Ignore some stuff
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-03-12 22:20:51 +01:00
Andrei Gherzan
a7ce059274 rpi-basic-image: Define rpi SPLASH specific package
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-03-12 22:20:51 +01:00
Andrei Gherzan
d1fa1c0b75 vc-graphics: Move to recipes-graphics
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-03-12 22:20:51 +01:00
Andrei Gherzan
ddd1f03373 firmware.inc: Move to recipes-bsp
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-03-12 22:20:51 +01:00
Andrei Gherzan
5810be737d bootfiles: Move to recipes-bsp
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-03-12 22:20:51 +01:00
Andrei Gherzan
c0ee9c7641 bcm2835: More recipe to devtools
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-03-12 22:20:51 +01:00
Petter Mabäcker
df7eeb6f86 xserver-xf86-config: add rpi2 awareness
Use a MACHINEOVERRIDE that is visible for both raspberrypi
and raspberrypi2.

[Bug #52]

Signed-off-by: Petter Mabäcker <petter@technux.se>
2015-03-12 22:20:51 +01:00
Andrei Gherzan
57c8e6bffb rpi-base.inc: Include the RPI2 DTB
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-03-01 22:43:40 +01:00
Andrei Gherzan
4e59c28f70 README: Layer now depends on meta-oe too
Samba is a build dependency for omxplayer.

Signed-off-by: Andrei Gherzan <andrei@resin.io>
2015-03-01 01:28:28 +01:00
Andrei Gherzan
23add242bc README: Remove info about gerrit server
We are not using the gerrit server anymore.
Send patches using the mailing list.

Signed-off-by: Andrei Gherzan <andrei@resin.io>
2015-03-01 01:21:06 +01:00
Petter Mabäcker
7146e12374 layer.conf: set high layer priority
Set a high layer prio to ensure that meta-raspberrypi addons
are always prioritized above the depended layers.

Signed-off-by: Petter Mabäcker <petter@technux.se>
2015-03-01 01:13:43 +01:00
Andrei Gherzan
1350ba8acf raspberrypi.conf: Use arm1176jzfshf as default tune
Reformat the tune-arm1176jzf-s.inc file.
There is not 'PACKAGE_EXTRA_ARCHS_tune-armv6hf-vfp'. Replace it by
'PACKAGE_EXTRA_ARCHS_tune-armv6hf'.

Change-Id: I0dd63b1dd3e1ebc7fe0600e93fb9d27a6a833cd9
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-03-01 00:59:51 +01:00
Andrei Gherzan
6392a63985 rpi-base.inc: Use KERNEL_DEVICETREE by default
We already switched to kernel v3.18 by default so we can activate
KERNEL_DEVICETREE by default too.

Change-Id: I69612be72f8254d462421112cf851e17a1ef24f8
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-03-01 00:59:50 +01:00
Andrei Gherzan
1949a0d5ba userland: Fix build for armv7
[Bug #49]

Change-Id: I340b4134ae4227f315c1c3df1345b04ebd4b874b
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-03-01 00:59:48 +01:00
Andrei Gherzan
ba383ecd35 linux-raspberrypi: Refactor kernel recipes
We use this to simplify the update process. Updating a kernel version will not
require renaming the recipe but only tweaking LINUX_VERSION.

Update kernel version:
        - bump SRCREV
        - bump LINUX_VERSION if needed

[Support #26]

Change-Id: I7565ddd1f03cc34c34aa5da92664a0057b415c9a
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-03-01 00:48:34 +01:00
Andrei Gherzan
4147bd7214 userland: Bump SRCREV
Change-Id: If1d2608322749db4baa445ba94bc471a0ac86a5c
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-03-01 00:43:33 +01:00
Andrei Gherzan
fde4b34aa2 bcm2835: Update to v1.38
Change-Id: Iebac94415602454dd4e2808c8e02d0083f804029
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-03-01 00:43:31 +01:00
Andrei Gherzan
72c43866c1 rpi-gpio: Update to v0.5.9
Change-Id: Ifc455b9106f07583ccaf3fe82723baaeb5e04d2e
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-03-01 00:43:29 +01:00
Andrei Gherzan
b7c3a935cc omxplayer: Bump SRCREV
Add a patch to fix the pkg-config mechanism in ffmpeg.

Change-Id: Ib506bb4e26a8a0c5c294ed55da0a0da8dc67a2d7
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-03-01 00:43:26 +01:00
Andrei Gherzan
d8bf60ce6c README: Github repo changed
Change-Id: If16b5a782d7154c05f6502554a03d215774e4c07
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-02-14 02:00:57 +01:00
Andrei Gherzan
463d0e2d7d README: As users asked - bitbucket mirror
Change-Id: I240e5686d4740a84c35e5063ba08bff363b1b91e
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-02-11 21:19:40 +01:00
Andrei Gherzan
54c5451a04 Add support for Raspberry PI 2
Add machine configuration file.
Change the kernel image name on SD card.
Use the defconfig for this machine (bcm2709_defconfig).

Change-Id: I6549d5f49b1ed32ef4d44aca6f7af4234618c1a8
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-02-08 14:46:42 +02:00
Andrei Gherzan
dedd45f4f8 Use variable for kernel image deployed name on SD card
Change-Id: I4a55b53d337930aae3351629a902dbac832ac958
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-02-08 00:30:40 +02:00
Andrei Gherzan
8c8a5cd64c linux-raspberrypi.inc: Make KERNEL_DEFCONFIG machine specific
Change-Id: I241a8adead67717f31d1b2e66a71bd5c3edfa9fd
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-02-08 00:28:37 +02:00
Andrei Gherzan
318f1b3994 firmware: Update to HEAD
Change-Id: I682365b514f233616ac7eb07667edc4ca6afcdfa
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-02-08 00:19:54 +02:00
Andrei Gherzan
7089e6a891 linux-raspberrypi.inc: Remove machine specific CMDLINE definition
This is already a raspberrypi specific recipe. So this is useless and would
break other machines.

Change-Id: Ie1d627384255660d7e213833fd4433f47c0edc1d
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-02-08 00:14:05 +02:00
Andrei Gherzan
18e5856a25 rpi-default-versions.inc: Use kernel v3.18 by default
Change-Id: If3ff46ae10b7bee2decead6dfa408833713d16f8
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-02-08 00:09:41 +02:00
Andrei Gherzan
e1d4448ce8 xserver-xf86-config: Use SOC specific assignements
In this way the modifications will be used on all RPI boards.

Change-Id: Ife10db876db85c1c4944028a0b49ccae4d8c0d41
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-02-08 00:06:36 +02:00
Andrei Gherzan
b89a2743fb raspberrypi.conf: Split in specific and common conf. files
*.conf files should hold board specific stuff while rpi-base.inc should
include configuration that is common for all Raspberry Pi boards.

Remove MACHINE_KERNEL_PR as we don't use it anymore.

Minor tweaks.

Change-Id: I5e1b12c1d224ac003d2890544beb036f1d5d8643
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-02-08 00:01:36 +02:00
Andrei Gherzan
b99a09b257 Merge "devicetree: Add support for DT overlays with RPi bootloader" 2015-02-07 22:14:22 +01:00
Francois Muller
2dbc974596 devicetree: Add support for DT overlays with RPi bootloader
Compile overlay device trees and put them in 'overlays/' folder
on sdcard RPi boot partition.

Change-Id: I3da0032b3c2618165008eec1fc94e97824d09099
Signed-off-by: Francois Muller <francois@concept-embarque.fr>
2015-02-07 20:54:37 +01:00
Petter Mabäcker
4905c7cc2b README: add info about device tree support
Add basic info about device tree support for RPi and how to use
KERNEL_DEVICETREE.

Also fix minor typo in the section about redmine.

Change-Id: Ibfee31e319c421c09d6e9cbfbe83364e8d055b95
Signed-off-by: Petter Mabäcker <petter@technux.se>
2015-02-06 23:33:52 +01:00
Francois Muller
4dc75cedf7 devicetree: Add minimal support with RPi bootloader
[RPi DT info] https://github.com/raspberrypi/documentation/blob/master/configuration/device-tree.md#part-3-using-device-trees-on-raspberry-pi

RPi bootloader detects a DT-ready kernel by checking for a specific trailer in kernel.img.
Using latest raspberrypi/firmware (firmware.inc) enables this check ability.
Using latest raspberrypi/tools (rpi-mkimage.bb) gives access to mkknlimg for adding the
required trailer to kernel image.


If KERNEL_DEVICETREE is filled in, 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).
If KERNEL_DEVICETREE is empty, this new process isn't operated, legacy one does.

KERNEL_DEVICETREE for RPi is really supported only starting from linux-rapsberry 3.18+
kernels, so as for now it defaults to empty (in machine config file).

Change-Id: Ifea71bbda729b8f3c47be7ba0ba03be5ad2ceeaa
Signed-off-by: Francois Muller <francois@concept-embarque.fr>
2015-02-05 14:07:00 +01:00
Andrei Gherzan
327c0c12b5 README: Fix redmine tag
Change-Id: I90d520c66f03503b225f42ac772b3b22cf461626
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-02-05 12:07:52 +02:00
Petter Mabäcker
dc6327683e linux-raspberrypi: Update 3.12 branch to 3.12.36
Update linux-raspberrypi_3.12 to latest version.

[ISSUE #10]

Change-Id: Ifd7e86587b3239a3b1240d2b8461560b16e08d08
Signed-off-by: Petter Mabäcker <petter@technux.se>
2015-02-05 09:59:52 +01:00
Petter Mabäcker
2adea22b46 Revert "linux-raspberrypi: Change to Linux Yocto style kernel recipes"
This reverts commit 67a1c4eaaf.

[ISSUE #39]

Conflicts:
	recipes-kernel/linux/linux-raspberrypi_3.2.27.bb

Change-Id: I03ae6b9c96894509a4fecd24eef8740889238730
Signed-off-by: Petter Mabäcker <petter@technux.se>
2015-02-05 09:59:40 +01:00
Andrei Gherzan
4535ac053f README: Commit log issue tag
Change-Id: I5c981a799abe709cac8e134ffb7b24fb21160de6
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-02-04 01:28:21 +02:00
Andrei Gherzan
12eeae3bdf Merge "linux-raspberrypi: Remove old v3.2.27" 2015-02-03 19:20:27 +01:00
Andrei Gherzan
b9a3b88ff9 Merge "linux-raspberrypi: Change to Linux Yocto style kernel recipes" 2015-02-03 19:20:15 +01:00
Andrei Gherzan
9ac77c112e README: Introduce redmine
Replace the ASCI graphics by some useful quick links.
Some minor other changes.

Change-Id: I7e1f118f22c60a5218751323c6cbebdc86e8e119
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-02-03 17:39:27 +02:00
Andrei Gherzan
a335bf5fe6 linux-raspberrypi: Remove old v3.2.27
Change-Id: If5e0a88acdfe67903d1a11133849f35f453904ac
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-02-01 04:03:12 +02:00
Alex J Lennon
67a1c4eaaf linux-raspberrypi: Change to Linux Yocto style kernel recipes
Yocto style recipes provide support for application of kernel
configuration fragments which is achieved with this change.

For further details see the Yocto Linux Kernel Development Manual

ref: http://www.yoctoproject.org/docs/1.6/kernel-dev/kernel-dev.html

In addition .bb files are simplified to take a SRCBRANCH which is
used by the SRC_URI set in linux-raspberrypi.inc and together with
the existing SRCREV define a checkout from the linux-raspberrypi
git repository.

A default configuration, defconfig, is provided as a baseline.
This is generated from bcmrpi_defconfig, as used in the existing
recipes, and so configuration options should be the same.

To change the kernel configuration a new configuration fragment
may be generated, as explained in the kernel development documentation
above, and this file then added to the SRC_URI via a .bbappend.

Added some minor refactoring and removed some useless code.

Change-Id: Ic72e14ec14ec3f042aeda0c6820f896be9c02e69
Signed-off-by: Alex J Lennon <ajlennon@dynamicdevices.co.uk>
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-01-31 18:07:58 +02:00
Andrei Gherzan
b6d899e4d2 README: Fix typo
Patch pulled from github:
https://github.com/djwillis/meta-raspberrypi/pull/101

Change-Id: I9aaa3687c30d0fde5e981e7cafbabad7dc24ce50
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-01-31 17:01:57 +02:00
113 changed files with 6639 additions and 704 deletions

5
.gitignore vendored Normal file
View File

@@ -0,0 +1,5 @@
build*
*~
.*.swp
*.orig
*.rej

322
README
View File

@@ -1,52 +1,44 @@
.8MMMMMMMM MMMMMMMM8. Quick links
MMM77$$$$$$7MM MM$$$$$$$$$MMM ===========
MM$$$$$$$$$$$$M M$$$$$$$$$$$$MM Git repository web frontend:
MO7$$$$$8$$$$$MMM$$$$$N7$$$$7DM http://git.yoctoproject.org/cgit/cgit.cgi/meta-raspberrypi/
M7$$$$$$$M7$$MMM$$7M$$$$$$$7M. Mailing list (yocto mailing list):
M7$$$$$$$$MMMMMMM$$$$$$$$7M. yocto@yoctoproject.org
MM$$$$$$7MMMMMMM$$$$$$$MM Issues management (redmine):
.MM$7MMMMMMMMMMMMM7$MM. http://redmine.gherzan.ro/projects/meta-raspberrypi
.MM8ZZZMMZZZZZZZMZZZ$MM.
.MOZZZZMMZZZZZZZZZM8ZZZZMM
MZZMMMZZZZ8MMMMM$ZZZ$MMZZMM
.MMMMMZZZZZZZZMMMZZZZZZZMMMMM:
M8ZZMMZZZZZZZZNMZZZZZZZZZMMZZMM
MZZZZMZZZZZZZZZMMMZZZZZZZZ8MZZZMM
.MZZZZMZZZZZZZZZMMMZZZZZZZZMMZZZ8M
.MZZZMMMZZZZZZZMMMMM$ZZZZZ$MMZZZMM
MMZZMMMMMM8MMNZZZZZ8MMMMMMMMMZZM
MMMMZMMMMMMZZZZZZZZZMMMM$ZZZMM.
MMZZZZZMMMZZZZZZZZZMMMZZZZZMM
MZZZZZZZMNZZZZZZZMMZZZZZZZM.
MMMMMZZZZZZZZZMMMM.
.MMDZZZZZZZMMD
.MMMMMMMM,
....
Contents: Contents:
========= =========
1. Description 1. Description
2. Yocto BSP Layer - RaspberryPi 2. Yocto BSP Layer - Raspberry Pi
2.A. Compressed deployed files 2.A. How to use it
2.B. GPU memory 2.B. Images
2.C. Add purchased license codecs 3. Optional build configuration
2.D. Disable overscan 3.A. Compressed deployed files
2.E. Set overclocking options 3.B. GPU memory
2.F. Optional - Video camera support with V4L2 drivers 3.C. Add purchased license codecs
2.G. Optional - Enable offline compositing support 3.D. Disable overscan
2.H. Images 3.E. Set overclocking options
2.I. Boot to U-Boot 3.F. Video camera support with V4L2 drivers
2.J. Image with Initramfs 3.G. Enable offline compositing support
3. Extra apps 3.H. Enable kgdb over console support
3.A. omxplayer 3.I. Boot to U-Boot
4. Source code and mirrors 3.J. Image with Initramfs
5. Contribution 3.K. Device tree support
5.A. Mailing List 3.L. Enable SPI bus
5.B. Gerrit Review Server 3.M. Enable I2C
5.C. Trello Board 3.N. Enable PiTFT support
6. Maintainers 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. Redmine
8. Maintainers
1. Description 1. Description
@@ -73,22 +65,43 @@ branch: master
revision: HEAD revision: HEAD
URI: git://git.openembedded.org/meta-openembedded URI: git://git.openembedded.org/meta-openembedded
layers: meta-multimedia layers: meta-oe, meta-multimedia
branch: master branch: master
revision: HEAD revision: HEAD
How to use it: 2.A. How to use it
==================
1. source poky/oe-init-build-env rpi-build a. source poky/oe-init-build-env rpi-build
2. Add needed layer to bblayers.conf: b. Add needed layer to bblayers.conf:
- meta-raspberrypi - meta-raspberrypi
3 Set MACHINE to raspberrypi in local.conf c. Set MACHINE in local.conf to one of the supported boards:
4. bitbake rpi-hwup-image - raspberrypi
5. dd to a SD card the generated sdimg file (use xzcat if rpi-sdimg.xz is used) - raspberrypi0
6. Boot your RPI. - raspberrypi2
- raspberrypi3
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.A. Optional - compressed deployed files: 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 1. Overwrite IMAGE_FSTYPES in local.conf
IMAGE_FSTYPES = "tar.bz2 ext3.xz" IMAGE_FSTYPES = "tar.bz2 ext3.xz"
2. Overwrite SDIMG_ROOTFS_TYPE in local.conf 2. Overwrite SDIMG_ROOTFS_TYPE in local.conf
@@ -97,8 +110,8 @@ How to use it:
SDIMG_COMPRESSION = "xz" SDIMG_COMPRESSION = "xz"
*Accommodate the values above to your own needs (ex: ext3 / ext4). *Accommodate the values above to your own needs (ex: ext3 / ext4).
2.B. Optional - GPU memory: 3.B. GPU memory
=========================== ===============
Variable : Details Variable : Details
GPU_MEM : GPU memory in megabyte. Sets the memory split between the ARM and 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. ARM gets the remaining memory. Min 16. Default 64.
@@ -106,9 +119,11 @@ 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. 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 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. 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.
2.C.Optional - Add purchased license codecs: 3.C. Add purchased license codecs
============================================ =================================
To add you own licenses use variables KEY_DECODE_MPG2 and KEY_DECODE_WVC1 in To add you own licenses use variables KEY_DECODE_MPG2 and KEY_DECODE_WVC1 in
local.conf. Example: local.conf. Example:
KEY_DECODE_MPG2 = "12345678" KEY_DECODE_MPG2 = "12345678"
@@ -116,15 +131,15 @@ KEY_DECODE_WVC1 = "12345678"
You can supply more licenses separated by comma. Example: You can supply more licenses separated by comma. Example:
KEY_DECODE_WVC1 = "0x12345678,0xabcdabcd,0x87654321" KEY_DECODE_WVC1 = "0x12345678,0xabcdabcd,0x87654321"
2.D. Optional - Disable overscan: 3.D. Disable overscan
================================= =====================
By default the GPU adds a black border around the video output to compensate for 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 TVs which cut off part of the image. To disable this set this variable in
local.conf: local.conf:
DISALE_OVERSCAN = "0" DISABLE_OVERSCAN = "1"
2.E. Optional - Set overclocking options: 3.E. Set overclocking options
========================================= =============================
The Raspberry PI can be overclocked. As of now overclocking up to the "Turbo 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. 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: Check the config.txt for a detailed description of options and modes. Example:
@@ -134,14 +149,13 @@ CORE_FREQ = "500"
SDRAM_FREQ = "500" SDRAM_FREQ = "500"
OVER_VOLTAGE = "6" OVER_VOLTAGE = "6"
2.F. Optional - Video camera support with V4L2 drivers 3.F. Video camera support with V4L2 drivers
====================================================== ===========================================
Set this variable to enable support for the video camera (Linux 3.12.4+ required) Set this variable to enable support for the video camera (Linux 3.12.4+ required)
VIDEO_CAMERA = "1" VIDEO_CAMERA = "1"
2.G. Optional - Enable offline compositing support 3.G. Enable offline compositing support
================================================== =======================================
Set this variable to enable support for dispmanx offline compositing Set this variable to enable support for dispmanx offline compositing
DISMANX_OFFLINE = "1" DISMANX_OFFLINE = "1"
@@ -155,17 +169,13 @@ Heavily recommended for Wayland/Weston.
See: http://wayland.freedesktop.org/raspberrypi.html See: http://wayland.freedesktop.org/raspberrypi.html
2.H. Images 3.H. Enable kgdb over console support
=========== =====================================
* rpi-hwup-image To add the kdbg over console (kgdboc) parameter to the kernel command line,
Hardware up image set this variable in local.conf:
* rpi-basic-image ENABLE_KGDB = "1"
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.
2.I. Boot to U-Boot 3.I. Boot to U-Boot
=================== ===================
To have u-boot load kernel image, set in your local.conf To have u-boot load kernel image, set in your local.conf
KERNEL_IMAGETYPE = "uImage" KERNEL_IMAGETYPE = "uImage"
@@ -173,7 +183,7 @@ KERNEL_IMAGETYPE = "uImage"
This will make kernel.img be u-boot image which will load 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). By default, kernel.img is the actual kernel image (ex. Image).
2.J. Image with Initramfs 3.J. Image with Initramfs
========================= =========================
To build an initramfs image : To build an initramfs image :
* Set this 3 kernel variables (in linux-raspberrypi.inc for example) * Set this 3 kernel variables (in linux-raspberrypi.inc for example)
@@ -186,18 +196,102 @@ To build an initramfs image :
* Set the meta-rasberrypi variable (in raspberrypi.conf for example) * Set the meta-rasberrypi variable (in raspberrypi.conf for example)
- KERNEL_INITRAMFS = "-initramfs" - KERNEL_INITRAMFS = "-initramfs"
3. Extra apps 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 1, 2 and CM will have UART console enabled by default.
RaspberryPi 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
============= =============
3.A. omxplayer 4.A. omxplayer
============== ==============
omxplayer depends on libav which has a commercial license. So in order to be 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 able to compile omxplayer you will need to whiteflag the commercial license
adding to you local.conf: adding to you local.conf:
LICENSE_FLAGS_WHITELIST = "commercial" LICENSE_FLAGS_WHITELIST = "commercial"
5. Board Configuration
======================
4. Source code and mirrors 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: Main repo:
@@ -205,59 +299,51 @@ Main repo:
http://git.yoctoproject.org/git/meta-raspberrypi http://git.yoctoproject.org/git/meta-raspberrypi
Github mirror: Github mirror:
https://github.com/djwillis/meta-raspberrypi https://github.com/agherzan/meta-raspberrypi
Gerrit review repo: Bitbucket mirror:
https://review.gherzan.ro:8443/meta-raspberrypi https://bitbucket.org/agherzan/meta-raspberrypi
5. Contributing 7. Contributing
=============== ===============
5.A. Mailing list 7.A. Mailing list
================= =================
To contribute to this layer you should send the patches for review to the The main communication tool we use is a mailing list:
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.
To contribute to this layer you should send the patches for review to the
above specified mailing list.
The patches should be compliant with the openembedded patch guidelines: The patches should be compliant with the openembedded patch guidelines:
http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Mailing list:
https://lists.yoctoproject.org/listinfo/yocto
To send changes to mailing list use something like: When creating patches, please use something like:
git send-email --to yocto@yoctoproject.org \
--subject-prefix='meta-raspberrypi][PATCH'
OPTIONALLY push changes to gerrit (help maintainers merge and review patches git format-patch -s --subject-prefix='meta-raspberrypi][PATCH' origin
easier in this way).
git push ssh://<username>@review.gherzan.ro:29418/meta-raspberrypi
<local-branch>:refs/for/master
See 5.B. Gerrit Review Server.
5.B. Gerrit Review Server When sending patches to mailing list, please use something like:
=========================
We have a gerrit server configured at review.gherzan.ro. Changes made in gerrit
are merged in git.yoctoproject.org/meta-raspberrypi.
You can setup a gerrit account in less than 2 minutes: git send-email --to yocto@yoctoproject.org <generated patch>
A) Login / Register on https://review.gherzan.ro:8443.
B) Add your PUBLIC key in Settings/SSH Public Keys.
C) Add remote in your local repo:
git remote add gherzan ssh://<username>@review.gherzan.ro:29418/meta-raspberrypi
D) Push changes to gerrit using:
git push gherzan <local-branch>:refs/for/master
Please check your spam folder for gerrit messages. Sometimes they end up there. 7.B. Github issues
==================
In order to manage and trace the meta-raspberrypi issues, we use github issues:
https://github.com/agherzan/meta-raspberrypi/issues
5.C. Trello Board 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
A public Trello board is set to manage tasks and bugs. Join us there: for a bug:
https://trello.com/b/QsYeVjVe/meta-raspberrypi [Issue #13]
6. Maintainers 8. Maintainers
============== ==============
John Willis <John.Willis at distant-earth.com>
Andrei Gherzan <andrei at gherzan.ro> Andrei Gherzan <andrei at gherzan.ro>

View File

@@ -0,0 +1,39 @@
inherit linux-kernel-base
def get_dts(d, ver):
staging_dir = d.getVar("STAGING_KERNEL_BUILDDIR", True)
dts = d.getVar("KERNEL_DEVICETREE", True)
# d.getVar() might return 'None' as a normal string
# leading to 'is None' check isn't enough.
# TODO: Investigate if this is a bug in bitbake
if ver is None or ver == "None":
''' if 'ver' isn't set try to grab the kernel version
from the kernel staging '''
ver = get_kernelversion_file(staging_dir)
if ver is not None:
min_ver = ver.split('.', 3)
else:
return dts
# Always turn off device tree support for kernel's < 3.18
try:
if int(min_ver[0]) <= 3:
if int(min_ver[1]) < 18:
dts = ""
except IndexError:
min_ver = None
return dts
def split_overlays(d, out):
dts = get_dts(d, None)
if out:
overlays = oe.utils.str_filter_out('\S+\-overlay\.dtb$', dts, d)
else:
overlays = oe.utils.str_filter('\S+\-overlay\.dtb$', dts, d)
return overlays

View File

@@ -1,4 +1,5 @@
inherit image_types inherit image_types
inherit linux-raspberrypi-base
# #
# Create an image that can by written onto a SD card using dd. # Create an image that can by written onto a SD card using dd.
@@ -13,14 +14,14 @@ inherit image_types
# Default Free space = 1.3x # Default Free space = 1.3x
# Use IMAGE_OVERHEAD_FACTOR to add more space # Use IMAGE_OVERHEAD_FACTOR to add more space
# <---------> # <--------->
# 4MiB 20MiB SDIMG_ROOTFS # 4MiB 40MiB SDIMG_ROOTFS
# <-----------------------> <----------> <----------------------> # <-----------------------> <----------> <---------------------->
# ------------------------ ------------ ------------------------ # ------------------------ ------------ ------------------------
# | IMAGE_ROOTFS_ALIGNMENT | BOOT_SPACE | ROOTFS_SIZE | # | IMAGE_ROOTFS_ALIGNMENT | BOOT_SPACE | ROOTFS_SIZE |
# ------------------------ ------------ ------------------------ # ------------------------ ------------ ------------------------
# ^ ^ ^ ^ # ^ ^ ^ ^
# | | | | # | | | |
# 0 4MiB 4MiB + 20MiB 4MiB + 20Mib + SDIMG_ROOTFS # 0 4MiB 4MiB + 40MiB 4MiB + 40Mib + SDIMG_ROOTFS
# This image depends on the rootfs image # This image depends on the rootfs image
IMAGE_TYPEDEP_rpi-sdimg = "${SDIMG_ROOTFS_TYPE}" IMAGE_TYPEDEP_rpi-sdimg = "${SDIMG_ROOTFS_TYPE}"
@@ -31,11 +32,15 @@ IMAGE_BOOTLOADER ?= "bcm2835-bootfiles"
# Set initramfs extension # Set initramfs extension
KERNEL_INITRAMFS ?= "" KERNEL_INITRAMFS ?= ""
# Kernel image name
SDIMG_KERNELIMAGE_raspberrypi ?= "kernel.img"
SDIMG_KERNELIMAGE_raspberrypi2 ?= "kernel7.img"
# Boot partition volume id # Boot partition volume id
BOOTDD_VOLUME_ID ?= "${MACHINE}" BOOTDD_VOLUME_ID ?= "${MACHINE}"
# Boot partition size [in KiB] (will be rounded up to IMAGE_ROOTFS_ALIGNMENT) # Boot partition size [in KiB] (will be rounded up to IMAGE_ROOTFS_ALIGNMENT)
BOOT_SPACE ?= "20480" BOOT_SPACE ?= "40960"
# Set alignment to 4MB [in KiB] # Set alignment to 4MB [in KiB]
IMAGE_ROOTFS_ALIGNMENT = "4096" IMAGE_ROOTFS_ALIGNMENT = "4096"
@@ -48,9 +53,9 @@ IMAGE_DEPENDS_rpi-sdimg = " \
parted-native \ parted-native \
mtools-native \ mtools-native \
dosfstools-native \ dosfstools-native \
virtual/kernel \ virtual/kernel:do_deploy \
${IMAGE_BOOTLOADER} \ ${IMAGE_BOOTLOADER} \
${@base_contains("KERNEL_IMAGETYPE", "uImage", "u-boot", "",d)} \ ${@bb.utils.contains('KERNEL_IMAGETYPE', 'uImage', 'u-boot', '',d)} \
" "
# SD card image name # SD card image name
@@ -66,20 +71,17 @@ SDIMG = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.rpi-sdimg"
# Additional files and/or directories to be copied into the vfat partition from the IMAGE_ROOTFS. # Additional files and/or directories to be copied into the vfat partition from the IMAGE_ROOTFS.
FATPAYLOAD ?= "" FATPAYLOAD ?= ""
IMAGEDATESTAMP = "${@time.strftime('%Y.%m.%d',time.gmtime())}"
IMAGE_CMD_rpi-sdimg () { IMAGE_CMD_rpi-sdimg () {
# Align partitions # Align partitions
BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE} + ${IMAGE_ROOTFS_ALIGNMENT} - 1) BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE} + ${IMAGE_ROOTFS_ALIGNMENT} - 1)
BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE_ALIGNED} - ${BOOT_SPACE_ALIGNED} % ${IMAGE_ROOTFS_ALIGNMENT}) BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE_ALIGNED} - ${BOOT_SPACE_ALIGNED} % ${IMAGE_ROOTFS_ALIGNMENT})
ROOTFS_SIZE=`du -bks ${SDIMG_ROOTFS} | awk '{print $1}'` SDIMG_SIZE=$(expr ${IMAGE_ROOTFS_ALIGNMENT} + ${BOOT_SPACE_ALIGNED} + $ROOTFS_SIZE)
# Round up RootFS size to the alignment size as well
ROOTFS_SIZE_ALIGNED=$(expr ${ROOTFS_SIZE} + ${IMAGE_ROOTFS_ALIGNMENT} - 1)
ROOTFS_SIZE_ALIGNED=$(expr ${ROOTFS_SIZE_ALIGNED} - ${ROOTFS_SIZE_ALIGNED} % ${IMAGE_ROOTFS_ALIGNMENT})
SDIMG_SIZE=$(expr ${IMAGE_ROOTFS_ALIGNMENT} + ${BOOT_SPACE_ALIGNED} + ${ROOTFS_SIZE_ALIGNED})
echo "Creating filesystem with Boot partition ${BOOT_SPACE_ALIGNED} KiB and RootFS ${ROOTFS_SIZE_ALIGNED} KiB" echo "Creating filesystem with Boot partition ${BOOT_SPACE_ALIGNED} KiB and RootFS $ROOTFS_SIZE KiB"
# Check if we are building with device tree support
DTS="${@get_dts(d, None)}"
# Initialize sdcard image file # Initialize sdcard image file
dd if=/dev/zero of=${SDIMG} bs=1024 count=0 seek=${SDIMG_SIZE} dd if=/dev/zero of=${SDIMG} bs=1024 count=0 seek=${SDIMG_SIZE}
@@ -95,15 +97,36 @@ IMAGE_CMD_rpi-sdimg () {
# Create a vfat image with boot files # Create a vfat image with boot files
BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDIMG} unit b print | awk '/ 1 / { print substr($4, 1, length($4 -1)) / 512 /2 }') BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDIMG} unit b print | awk '/ 1 / { print substr($4, 1, length($4 -1)) / 512 /2 }')
rm -f ${WORKDIR}/boot.img
mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/* ::/ mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/* ::/
if test -n "${DTS}"; then
# Device Tree Overlays are assumed to be suffixed by '-overlay.dtb' string and will be put in a dedicated folder
DT_OVERLAYS="${@split_overlays(d, 0)}"
DT_ROOT="${@split_overlays(d, 1)}"
# Copy board device trees to root folder
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
done
# Copy device tree overlays to dedicated folder
mmd -i ${WORKDIR}/boot.img overlays
for DTB in ${DT_OVERLAYS}; do
DTB_BASE_NAME=`basename ${DTB} .dtb`
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTB_BASE_NAME}.dtb ::overlays/${DTB_BASE_NAME}.dtb
done
fi
case "${KERNEL_IMAGETYPE}" in case "${KERNEL_IMAGETYPE}" in
"uImage") "uImage")
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/u-boot.img ::kernel.img mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/u-boot.bin ::${SDIMG_KERNELIMAGE}
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::uImage mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::uImage
;; ;;
*) *)
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::kernel.img mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::${SDIMG_KERNELIMAGE}
;; ;;
esac esac
@@ -116,8 +139,8 @@ IMAGE_CMD_rpi-sdimg () {
fi fi
# Add stamp file # Add stamp file
echo "${IMAGE_NAME}-${IMAGEDATESTAMP}" > ${WORKDIR}/image-version-info echo "${IMAGE_NAME}" > ${WORKDIR}/image-version-info
mcopy -i ${WORKDIR}/boot.img -v ${WORKDIR}//image-version-info :: mcopy -i ${WORKDIR}/boot.img -v ${WORKDIR}/image-version-info ::
# Burn Partitions # Burn Partitions
dd if=${WORKDIR}/boot.img of=${SDIMG} conv=notrunc seek=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync dd if=${WORKDIR}/boot.img of=${SDIMG} conv=notrunc seek=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync

View File

@@ -7,7 +7,7 @@ BBFILES += "${LAYERDIR}/recipes*/*/*.bb \
BBFILE_COLLECTIONS += "raspberrypi" BBFILE_COLLECTIONS += "raspberrypi"
BBFILE_PATTERN_raspberrypi := "^${LAYERDIR}/" BBFILE_PATTERN_raspberrypi := "^${LAYERDIR}/"
BBFILE_PRIORITY_raspberrypi = "6" BBFILE_PRIORITY_raspberrypi = "9"
# Additional license directories. # Additional license directories.
LICENSE_PATH += "${LAYERDIR}/files/custom-licenses" LICENSE_PATH += "${LAYERDIR}/files/custom-licenses"

View File

@@ -0,0 +1,53 @@
include conf/machine/include/rpi-default-settings.inc
include conf/machine/include/rpi-default-versions.inc
include conf/machine/include/rpi-default-providers.inc
SOC_FAMILY = "rpi"
include conf/machine/include/soc-family.inc
IMAGE_FSTYPES ?= "tar.bz2 ext3 rpi-sdimg"
XSERVER = " \
xserver-xorg \
xf86-input-evdev \
xf86-input-mouse \
xf86-input-keyboard \
xf86-video-fbdev \
"
# Really supported starting from linux-raspberrypi 3.18.y only
KERNEL_DEVICETREE ?= " \
bcm2708-rpi-b.dtb \
bcm2708-rpi-b-plus.dtb \
bcm2709-rpi-2-b.dtb \
bcm2710-rpi-3-b.dtb \
\
overlays/hifiberry-amp-overlay.dtb \
overlays/hifiberry-dac-overlay.dtb \
overlays/hifiberry-dacplus-overlay.dtb \
overlays/hifiberry-digi-overlay.dtb \
overlays/i2c-rtc-overlay.dtb \
overlays/iqaudio-dac-overlay.dtb \
overlays/iqaudio-dacplus-overlay.dtb \
overlays/lirc-rpi-overlay.dtb \
overlays/pitft22-overlay.dtb \
overlays/pitft28-resistive-overlay.dtb \
overlays/pps-gpio-overlay.dtb \
overlays/rpi-ft5406-overlay.dtb \
overlays/w1-gpio-overlay.dtb \
overlays/w1-gpio-pullup-overlay.dtb \
overlays/pi3-miniuart-bt-overlay.dtb \
"
KERNEL_IMAGETYPE ?= "Image"
MACHINE_FEATURES += "apm usbhost keyboard vfat ext2 screen touchscreen alsa bluetooth wifi sdio"
# Raspberry Pi has no hardware clock
MACHINE_FEATURES_BACKFILL_CONSIDERED = "rtc"
MACHINE_EXTRA_RRECOMMENDS += " kernel-modules"
# Set Raspberrypi splash image
SPLASH = "psplash-raspberrypi"
IMAGE_BOOT_FILES ?= "bcm2835-bootfiles/* ${KERNEL_IMAGETYPE};${SDIMG_KERNELIMAGE}"

View File

@@ -1,10 +1,9 @@
# RaspberryPi BSP default providers # RaspberryPi BSP default providers
PREFERRED_PROVIDER_virtual/kernel = "linux-raspberrypi" PREFERRED_PROVIDER_virtual/kernel ?= "linux-raspberrypi"
PREFERRED_PROVIDER_u-boot = "u-boot-rpi" PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
PREFERRED_PROVIDER_virtual/egl ?= "userland" PREFERRED_PROVIDER_virtual/egl ?= "userland"
PREFERRED_PROVIDER_virtual/libgles2 ?= "userland" PREFERRED_PROVIDER_virtual/libgles2 ?= "userland"
PREFERRED_PROVIDER_virtual/libgl ?= "mesa-gl" PREFERRED_PROVIDER_virtual/libgl ?= "mesa-gl"
PREFERRED_PROVIDER_virtual/mesa ?= "mesa-gl" PREFERRED_PROVIDER_virtual/mesa ?= "mesa-gl"
PREFERRED_PROVIDER_jpeg = "jpeg" PREFERRED_PROVIDER_jpeg ?= "jpeg"

View File

@@ -1,3 +1,3 @@
# RaspberryPi BSP default versions # RaspberryPi BSP default versions
PREFERRED_VERSION_linux-raspberrypi ?= "3.12.%" PREFERRED_VERSION_linux-raspberrypi ?= "4.1.%"

View File

@@ -6,13 +6,10 @@ TUNEVALID[arm1176jzfs] = "Enable arm1176jzfs specific processor optimizations"
TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "arm1176jzfs", "-mtune=arm1176jzf-s", "", d)}" TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "arm1176jzfs", "-mtune=arm1176jzf-s", "", d)}"
TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "vfp", "-mfpu=vfp", "", d)}" TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "vfp", "-mfpu=vfp", "", d)}"
AVAILTUNES += "arm1176jzfs" AVAILTUNES += "arm1176jzfs arm1176jzfshf"
TUNE_FEATURES_tune-arm1176jzfs = "${TUNE_FEATURES_tune-armv6} arm1176jzfs"
ARMPKGARCH_tune-arm1176jzfs = "arm1176jzfs" ARMPKGARCH_tune-arm1176jzfs = "arm1176jzfs"
PACKAGE_EXTRA_ARCHS_tune-arm1176jzfs = "${PACKAGE_EXTRA_ARCHS_tune-armv6}"
AVAILTUNES += "arm1176jzfshf"
TUNE_FEATURES_tune-arm1176jzfshf = "${TUNE_FEATURES_tune-arm1176jzfs} callconvention-hard"
ARMPKGARCH_tune-arm1176jzfshf = "arm1176jzfs" ARMPKGARCH_tune-arm1176jzfshf = "arm1176jzfs"
PACKAGE_EXTRA_ARCHS_tune-arm1176jzfshf = "${PACKAGE_EXTRA_ARCHS_tune-armv6hf-vfp} arm1176jzfshf-vfp" TUNE_FEATURES_tune-arm1176jzfs = "${TUNE_FEATURES_tune-armv6} arm1176jzfs"
TUNE_FEATURES_tune-arm1176jzfshf = "${TUNE_FEATURES_tune-arm1176jzfs} callconvention-hard"
PACKAGE_EXTRA_ARCHS_tune-arm1176jzfs = "${PACKAGE_EXTRA_ARCHS_tune-armv6}"
PACKAGE_EXTRA_ARCHS_tune-arm1176jzfshf = "${PACKAGE_EXTRA_ARCHS_tune-armv6hf} arm1176jzfshf-vfp"

View File

@@ -1,39 +1,12 @@
#@TYPE: Machine #@TYPE: Machine
#@NAME: RaspberryPi Development Board #@NAME: RaspberryPi Development Board
#@DESCRIPTION: Machine configuration for the RaspberryPi http://www.raspberrypi.org/ Board #@DESCRIPTION: Machine configuration for the RaspberryPi http://www.raspberrypi.org/ Board
#@MAINTAINER: John Willis
include conf/machine/include/rpi-default-settings.inc DEFAULTTUNE ?= "arm1176jzfshf"
include conf/machine/include/rpi-default-versions.inc
include conf/machine/include/rpi-default-providers.inc
require conf/machine/include/tune-arm1176jzf-s.inc require conf/machine/include/tune-arm1176jzf-s.inc
include conf/machine/include/rpi-base.inc
IMAGE_FSTYPES ?= "tar.bz2 ext3 rpi-sdimg"
SERIAL_CONSOLE = "115200 ttyAMA0" SERIAL_CONSOLE = "115200 ttyAMA0"
MACHINE_KERNEL_PR = "r5" UBOOT_MACHINE = "rpi_config"
XSERVER = " \
xserver-xorg \
xf86-input-evdev \
xf86-input-mouse \
xf86-input-keyboard \
xf86-video-fbdev \
"
KERNEL_IMAGETYPE ?= "Image"
MACHINE_FEATURES = "kernel26 apm usbhost keyboard vfat ext2 screen touchscreen alsa bluetooth wifi sdio"
#RaspberryPi has no hardware clock
MACHINE_FEATURES_BACKFILL_CONSIDERED = "rtc"
MACHINE_EXTRA_RRECOMMENDS += " \
kernel-modules \
"
# Set raspberrypi splash image
SPLASH = "psplash-raspberrypi"
IMAGE_BOOT_FILES ?= "bcm2835-bootfiles/* ${KERNEL_IMAGETYPE};kernel.img"

View File

@@ -0,0 +1,8 @@
#@TYPE: Machine
#@NAME: RaspberryPi Zero Development Board
#@DESCRIPTION: Machine configuration for the RaspberryPi Zero board (https://www.raspberrypi.org/blog/raspberry-pi-zero)
MACHINEOVERRIDES = "raspberrypi:${MACHINE}"
include conf/machine/raspberrypi.conf
SERIAL_CONSOLE = "115200 ttyAMA0"

View File

@@ -0,0 +1,12 @@
#@TYPE: Machine
#@NAME: RaspberryPi 2 Development Board
#@DESCRIPTION: Machine configuration for the RaspberryPi 2
DEFAULTTUNE ?= "cortexa7thf-neon-vfpv4"
require conf/machine/include/tune-cortexa7.inc
include conf/machine/include/rpi-base.inc
SERIAL_CONSOLE = "115200 ttyAMA0"
UBOOT_MACHINE = "rpi_2_config"

View File

@@ -0,0 +1,11 @@
#@TYPE: Machine
#@NAME: RaspberryPi 3 Development Board
#@DESCRIPTION: Machine configuration for the RaspberryPi 3
MACHINEOVERRIDES = "raspberrypi2:${MACHINE}"
MACHINE_EXTRA_RRECOMMENDS += "linux-firmware-brcm43430"
include conf/machine/raspberrypi2.conf
SERIAL_CONSOLE = "115200 ttyS0"

View File

@@ -1,11 +1,11 @@
DESCRIPTION = "Closed source binary files to help boot the ARM on the BCM2835." DESCRIPTION = "Closed source binary files to help boot the ARM on the BCM2835."
LICENSE = "Proprietary" LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://LICENCE.broadcom;md5=e86e693d19572ee64cc8b17fb062faa9" LIC_FILES_CHKSUM = "file://LICENCE.broadcom;md5=4a4d169737c0786fb9482bb6d30401d1"
inherit deploy inherit deploy
include ../common/firmware.inc include recipes-bsp/common/firmware.inc
RDEPENDS_${PN} = "rpi-config" RDEPENDS_${PN} = "rpi-config"

View File

@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384
COMPATIBLE_MACHINE = "raspberrypi" COMPATIBLE_MACHINE = "raspberrypi"
SRCREV = "5d2ca5f9bcb1b239c051e20c05a233fd79cf09d5" SRCREV = "648ffc470824c43eb0d16c485f4c24816b32cd6f"
SRC_URI = "git://github.com/Evilpaul/RPi-config.git;protocol=git;branch=master \ SRC_URI = "git://github.com/Evilpaul/RPi-config.git;protocol=git;branch=master \
" "
@@ -15,6 +15,10 @@ S = "${WORKDIR}/git"
PR = "r4" PR = "r4"
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)}"
inherit deploy inherit deploy
do_deploy() { do_deploy() {
@@ -26,7 +30,7 @@ do_deploy() {
sed -i '/#decode_MPG2/ c\decode_MPG2=${KEY_DECODE_MPG2}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt sed -i '/#decode_MPG2/ c\decode_MPG2=${KEY_DECODE_MPG2}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi fi
if [ -n "${KEY_DECODE_WVC1}" ]; then if [ -n "${KEY_DECODE_WVC1}" ]; then
sed -i '/#decode_WVC1/ c\decode_MVC1=${KEY_DECODE_WVC1}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt sed -i '/#decode_WVC1/ c\decode_WVC1=${KEY_DECODE_WVC1}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi fi
if [ -n "${DISABLE_OVERSCAN}" ]; then if [ -n "${DISABLE_OVERSCAN}" ]; then
sed -i '/#disable_overscan/ c\disable_overscan=${DISABLE_OVERSCAN}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt sed -i '/#disable_overscan/ c\disable_overscan=${DISABLE_OVERSCAN}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
@@ -54,6 +58,9 @@ do_deploy() {
if [ -n "${GPU_MEM_512}" ]; then if [ -n "${GPU_MEM_512}" ]; then
sed -i '/#gpu_mem_512/ c\gpu_mem_512=${GPU_MEM_512}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt sed -i '/#gpu_mem_512/ c\gpu_mem_512=${GPU_MEM_512}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi fi
if [ -n "${GPU_MEM_1024}" ]; then
sed -i '/#gpu_mem_1024/ c\gpu_mem_1024=${GPU_MEM_1024}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
# Video camera support # Video camera support
if [ -n "${VIDEO_CAMERA}" ]; then if [ -n "${VIDEO_CAMERA}" ]; then
@@ -66,6 +73,35 @@ do_deploy() {
echo "# Enable offline compositing" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt echo "# Enable offline compositing" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
echo "dispmanx_offline=1" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt echo "dispmanx_offline=1" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi fi
# SPI bus support
if [ -n "${ENABLE_SPI_BUS}" ] || [ "${PITFT}" = "1" ]; then
echo "# Enable SPI bus" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
echo "dtparam=spi=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
if [ -n "${ENABLE_I2C}" ] || [ "${PITFT}" = "1" ]; then
echo "# Enable I2C" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
echo "dtparam=i2c1=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
echo "dtparam=i2c_arm=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
# PiTFT22 display support
if [ "${PITFT22}" = "1" ]; then
echo "# Enable PITFT22 display" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
echo "dtoverlay=pitft22,rotate=270,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
if [ "${PITFT28r}" = "1" ]; then
echo "# Enable PITFT28r display" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
echo "dtoverlay=pitft28-resistive,rotate=90,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
# UART support
if [ "${ENABLE_UART}" = "1" ]; then
echo "# Enable UART" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
echo "enable_uart=1" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
} }
addtask deploy before do_package after do_install addtask deploy before do_package after do_install

View File

@@ -1,5 +1,5 @@
RPIFW_SRCREV ?= "43c5b2fc9bdb0a43ba67661b8677445e71ae9e82" RPIFW_SRCREV ?= "390f53ed0fd79df274bdcc81d99e09fa262f03ab"
RPIFW_DATE ?= "20140817" RPIFW_DATE ?= "20160622"
RPIFW_SRC_URI ?= "git://github.com/raspberrypi/firmware.git;protocol=git;branch=master" RPIFW_SRC_URI ?= "git://github.com/raspberrypi/firmware.git;protocol=git;branch=master"
RPIFW_S ?= "${WORKDIR}/git" RPIFW_S ?= "${WORKDIR}/git"

View File

@@ -1,25 +0,0 @@
Copyright (c) 2012, Broadcom Europe Ltd
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the copyright holder nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -1,17 +0,0 @@
When using open, use path relative to imagetool-uncompressed.py
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Index: git/mkimage/imagetool-uncompressed.py
===================================================================
--- a/mkimage/imagetool-uncompressed.py
+++ b/mkimage/imagetool-uncompressed.py
@@ -18,7 +18,7 @@ re_line = re.compile(r"0x(?P<value>[0-9a
mem = [0 for i in range(32768)]
def load_to_mem(name, addr):
- f = open(name)
+ f = open(os.path.dirname(__file__) + '/' + name)
for l in f.readlines():
m = re_line.match(l)

View File

@@ -1,22 +0,0 @@
SUMMARY = "RaspberryPi tool to produce kernel.img"
LICENSE = "Broadcom"
LIC_FILES_CHKSUM = "file://${WORKDIR}/License;md5=957f6640d5e2d2acfce73a36a56cb32f"
SECTION = "bootloader"
DEPENDS = "python"
SRCREV = "330c72c2412f75a32932c4d9b51c9c678bce4180"
SRC_URI = " \
git://github.com/raspberrypi/tools.git;branch=master;protocol=git \
file://License \
file://open-files-relative-to-script.patch \
"
S = "${WORKDIR}/git"
do_install () {
install -d ${D}${libexecdir}
cp ./mkimage/* ${D}${libexecdir}
}
BBCLASSEXTEND = "native"

View File

@@ -1,29 +0,0 @@
DESCRIPTION = "U-Boot port for RaspberryPi"
require recipes-bsp/u-boot/u-boot.inc
DEPENDS += "rpi-mkimage-native"
PROVIDES += "u-boot"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb"
SRCREV = "6709570cdc947c2a546f96d571551acf4474778c"
SRC_URI = "git://github.com/gonzoua/u-boot-pi.git;branch=rpi"
S = "${WORKDIR}/git"
UBOOT_MACHINE = "rpi_b"
UBOOT_MAKE_TARGET = "u-boot.bin"
UBOOT_SUFFIX = "img"
PACKAGE_ARCH = "${MACHINE_ARCH}"
COMPATIBLE_MACHINE = "raspberrypi"
do_compile_append() {
# Create kernel.img from uboot.bin and name it u-boot.img
${STAGING_DIR_NATIVE}/usr/lib/rpi-mkimage/imagetool-uncompressed.py u-boot.bin
mv kernel.img u-boot.img
}

View File

@@ -0,0 +1,26 @@
From b4f2b77472aeb967d3a7595e8a965785c7a37c87 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.org>
Date: Tue, 16 Feb 2016 16:40:46 +0000
Subject: [PATCH 1/4] bcm43xx: Add bcm43xx-3wire variant
---
tools/hciattach.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/hciattach.c b/tools/hciattach.c
index 59a76a7..5861d33 100644
--- a/tools/hciattach.c
+++ b/tools/hciattach.c
@@ -1144,6 +1144,9 @@ struct uart_t uart[] = {
{ "bcm43xx", 0x0000, 0x0000, HCI_UART_H4, 115200, 3000000,
FLOW_CTL, DISABLE_PM, NULL, bcm43xx, NULL },
+ { "bcm43xx-3wire", 0x0000, 0x0000, HCI_UART_3WIRE, 115200, 3000000,
+ 0, DISABLE_PM, NULL, bcm43xx, NULL },
+
{ "ath3k", 0x0000, 0x0000, HCI_UART_ATH3K, 115200, 115200,
FLOW_CTL, DISABLE_PM, NULL, ath3k_ps, ath3k_pm },
--
1.9.1

View File

@@ -0,0 +1,37 @@
From e145c9621f976063e5c573db1f2053d906f63427 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.org>
Date: Tue, 16 Feb 2016 16:39:09 +0000
Subject: [PATCH 2/4] bcm43xx: The UART speed must be reset after the firmware download
---
tools/hciattach_bcm43xx.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/tools/hciattach_bcm43xx.c b/tools/hciattach_bcm43xx.c
index 81f38cb..0b792e0 100644
--- a/tools/hciattach_bcm43xx.c
+++ b/tools/hciattach_bcm43xx.c
@@ -366,11 +366,8 @@ int bcm43xx_init(int fd, int def_speed, int speed, struct termios *ti,
return -1;
if (bcm43xx_locate_patch(FIRMWARE_DIR, chip_name, fw_path)) {
- fprintf(stderr, "Patch not found, continue anyway\n");
+ fprintf(stderr, "Patch not found for %s, continue anyway\n", chip_name);
} else {
- if (bcm43xx_set_speed(fd, ti, speed))
- return -1;
-
if (bcm43xx_load_firmware(fd, fw_path))
return -1;
@@ -380,6 +377,7 @@ int bcm43xx_init(int fd, int def_speed, int speed, struct termios *ti,
return -1;
}
+ sleep(1);
if (bcm43xx_reset(fd))
return -1;
}
--
1.9.1

View File

@@ -0,0 +1,25 @@
From d41dc2046dd08d8c95197f677e224506f5b39bdd Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.org>
Date: Wed, 20 Jan 2016 16:00:37 +0000
Subject: [PATCH 3/4] Increase firmware load timeout to 30s
---
tools/hciattach.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/hciattach.c b/tools/hciattach.c
index 5861d33..4141796 100644
--- a/tools/hciattach.c
+++ b/tools/hciattach.c
@@ -1293,7 +1293,7 @@ int main(int argc, char *argv[])
{
struct uart_t *u = NULL;
int detach, printpid, raw, opt, i, n, ld, err;
- int to = 10;
+ int to = 30;
int init_speed = 0;
int send_break = 0;
pid_t pid;
--
1.9.1

View File

@@ -0,0 +1,25 @@
From 76681284b0ea49852041fdb97a35175089a08781 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.org>
Date: Tue, 23 Feb 2016 17:52:29 +0000
Subject: [PATCH 4/4] Move the 43xx firmware into /lib/firmware
---
tools/hciattach_bcm43xx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/hciattach_bcm43xx.c b/tools/hciattach_bcm43xx.c
index 0b792e0..207f668 100644
--- a/tools/hciattach_bcm43xx.c
+++ b/tools/hciattach_bcm43xx.c
@@ -43,7 +43,7 @@
#include "hciattach.h"
#ifndef FIRMWARE_DIR
-#define FIRMWARE_DIR "/etc/firmware"
+#define FIRMWARE_DIR "/lib/firmware"
#endif
#define FW_EXT ".hcd"
--
1.9.1

Binary file not shown.

View File

@@ -0,0 +1,12 @@
[Unit]
Description=Broadcom BCM43438 bluetooth HCI
ConditionPathIsDirectory=/proc/device-tree/soc/gpio@7e200000/bt_pins
Before=bluetooth.service
After=dev-ttyAMA0.device
[Service]
Type=simple
ExecStart=/usr/bin/hciattach -n /dev/ttyAMA0 bcm43xx 921600 noflow -
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,26 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI_append_raspberrypi3 = " \
file://BCM43430A1.hcd \
file://0001-bcm43xx-Add-bcm43xx-3wire-variant.patch \
file://0002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch \
file://0003-Increase-firmware-load-timeout-to-30s.patch \
file://0004-Move-the-43xx-firmware-into-lib-firmware.patch \
file://brcm43438.service \
"
do_install_append_raspberrypi3() {
install -d ${D}/lib/firmware/brcm/
install -m 0644 ${WORKDIR}/BCM43430A1.hcd ${D}/lib/firmware/brcm/BCM43430A1.hcd
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
install -d ${D}${systemd_unitdir}/system
install -m 0644 ${WORKDIR}/brcm43438.service ${D}${systemd_unitdir}/system
fi
}
FILES_${PN}_append_raspberrypi3 = " \
/lib/firmware/brcm/BCM43430A1.hcd \
"
SYSTEMD_SERVICE_${PN}_raspberrypi3 += "brcm43438.service"

View File

@@ -1,4 +1,6 @@
# Base this image on rpi-hwup-image # Base this image on rpi-hwup-image
include rpi-hwup-image.bb include rpi-hwup-image.bb
SPLASH = "psplash-raspberrypi"
IMAGE_FEATURES += "ssh-server-dropbear splash" IMAGE_FEATURES += "ssh-server-dropbear splash"

View File

@@ -1,6 +1,6 @@
DESCRIPTION = "RaspberryPi Test Packagegroup" DESCRIPTION = "RaspberryPi Test Packagegroup"
LICENSE = "MIT" LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
inherit packagegroup inherit packagegroup
@@ -10,10 +10,18 @@ RDEPENDS_${PN} = "\
wiringpi \ wiringpi \
rpio \ rpio \
rpi-gpio \ rpi-gpio \
pi-blaster \
python-rtimu \
python-sense-hat \
connman \
connman-client \
crda \
bluez5 \
" "
RRECOMMENDS_${PN} = "\ RRECOMMENDS_${PN} = "\
bigbuckbunny-1080p \ bigbuckbunny-1080p \
bigbuckbunny-480p \ bigbuckbunny-480p \
bigbuckbunny-720p \ bigbuckbunny-720p \
${MACHINE_EXTRA_RRECOMMENDS} \
" "

View File

@@ -10,10 +10,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
COMPATIBLE_MACHINE = "raspberrypi" COMPATIBLE_MACHINE = "raspberrypi"
SRC_URI = "http://www.open.com.au/mikem/bcm2835/bcm2835-${PV}.tar.gz" SRC_URI = "http://www.airspayce.com/mikem/bcm2835/bcm2835-${PV}.tar.gz"
SRC_URI[md5sum] = "3299ddaef60f80b7f85de3318f08dee7" SRC_URI[md5sum] = "258caf3437012d09a651e1852d0bd60c"
SRC_URI[sha256sum] = "b4dfcdb453d44ba9ff55634ce7e0ddca21b96355ab61e40b4c3afb9406d4b8d2" SRC_URI[sha256sum] = "52180b8a61b6546c1df4aed259d0a4d2fa56e50605e0d4d967a76bf2b23dafb8"
inherit autotools inherit autotools
@@ -21,7 +21,7 @@ do_compile_append() {
# Now compiling the examples provided by the package # Now compiling the examples provided by the package
mkdir -p ${B}/examples mkdir -p ${B}/examples
for file in `ls ${S}/examples`; do for file in `ls ${S}/examples`; do
${CC} ${S}/examples/${file}/${file}.c -o ${B}/examples/${file} -Bstatic -L${B}/src -lbcm2835 -I${S}/src ${CC} ${LDFLAGS} ${S}/examples/${file}/${file}.c -o ${B}/examples/${file} -Bstatic -L${B}/src -lbcm2835 -I${S}/src
done done
} }

View File

@@ -1,77 +0,0 @@
Add autotools configuration files to simplify cross-compilation
Upstream-Status: Submitted [https://github.com/sarfata/pi-blaster/pull/25]
Signed-off-by: Alex Lennon <ajlennon@dynamicdevices.co.uk>
diff -Nur git.org/Makefile git.new/Makefile
--- git.org/Makefile 2014-06-11 15:42:26.490930706 +0100
+++ git.new/Makefile 1970-01-01 01:00:00.000000000 +0100
@@ -1,23 +0,0 @@
-.PHONY: all
-all: pi-blaster
-
-REVISION=$(shell egrep -q '000f$$' /proc/cpuinfo && echo 2 || echo 1)
-
-pi-blaster: pi-blaster.c
- gcc -Wall -g -O2 -o $@ $< -DREVISION=$(REVISION)
-
-clean:
- rm -f pi-blaster
-
-install: pi-blaster
- cp -f pi-blaster.boot.sh /etc/init.d/pi-blaster
- chmod +x /etc/init.d/pi-blaster
- cp -f pi-blaster /usr/sbin/pi-blaster
- update-rc.d pi-blaster defaults
- /etc/init.d/pi-blaster start
-
-uninstall:
- -/etc/init.d/pi-blaster stop
- rm /usr/sbin/pi-blaster
- rm /etc/init.d/pi-blaster
- update-rc.d pi-blaster remove
diff -Nur git.org/Makefile.am git.new/Makefile.am
--- git.org/Makefile.am 1970-01-01 01:00:00.000000000 +0100
+++ git.new/Makefile.am 2014-06-11 15:40:16.562930372 +0100
@@ -0,0 +1,9 @@
+AUTOMAKE_OPTIONS = foreign
+
+CFLAGS = -Wall -pedantic
+
+sbin_PROGRAMS = pi-blaster
+pi_blaster_SOURCES = pi-blaster.c
+
+init_ddir = $(sysconfdir)/init.d
+init_d_SCRIPTS = pi-blaster.boot.sh
diff -Nur git.org/autogen.sh git.new/autogen.sh
--- git.org/autogen.sh 1970-01-01 01:00:00.000000000 +0100
+++ git.new/autogen.sh 2014-06-11 15:35:57.798929684 +0100
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+echo "Generating configure files... may take a while."
+
+autoreconf --install --force && \
+ echo "Preparing was successful if there was no error messages above." && \
+ echo "Now type:" && \
+ echo " ./configure && make" && \
+ echo "Run './configure --help' for more information"
diff -Nur git.org/configure.ac git.new/configure.ac
--- git.org/configure.ac 1970-01-01 01:00:00.000000000 +0100
+++ git.new/configure.ac 2014-06-11 15:35:53.154929717 +0100
@@ -0,0 +1,14 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ([2.69])
+AC_INIT(pi-blaster, 0.1.0)
+AC_CONFIG_SRCDIR([pi-blaster.c])
+AC_CONFIG_HEADERS([config.h])
+AM_INIT_AUTOMAKE
+
+# Checks for programs.
+AC_PROG_CC
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT

View File

@@ -2,10 +2,9 @@ DESCRIPTION = "This project enables PWM on the GPIO pins you request of a Raspbe
HOMEPAGE = "https://github.com/sarfata/pi-blaster/" HOMEPAGE = "https://github.com/sarfata/pi-blaster/"
SECTION = "devel/libs" SECTION = "devel/libs"
LICENSE = "MIT" LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://README.md;beginline=138;endline=151;md5=e0f0f92050a87a160939707c60940307" LIC_FILES_CHKSUM = "file://README.md;beginline=157;endline=170;md5=f20832f31126609af5a7bf2340014540"
SRC_URI = "git://github.com/sarfata/pi-blaster \ SRC_URI = "git://github.com/sarfata/pi-blaster \
file://enable-autotools-support.patch \
file://remove-initscript-lsb-dependency.patch \ file://remove-initscript-lsb-dependency.patch \
" "

View File

@@ -1,3 +1,3 @@
require pi-blaster.inc require pi-blaster.inc
SRCREV = "177cef81774d6df5c6284c198ff818515281db14" SRCREV = "ec5e1b4c6191d8f9a538497dbbb86f9cf0de7016"

View File

@@ -0,0 +1,33 @@
From c3aa4af56652b403e304ea5f321acfe289e42922 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 30 Jan 2016 16:07:14 -0800
Subject: [PATCH] include asm/ioctl.h for ioctl() define
also fixes errors e.g.
../../RTIMULib/RTIMUHal.cpp:208:29: error: '_IOC_SIZEBITS' was not
declared in this scope
return ioctl(m_SPI, SPI_IOC_MESSAGE(1), &wrIOC);
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Upstream-Status: Submitted
RTIMULib/RTIMUHal.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/RTIMULib/RTIMUHal.cpp b/RTIMULib/RTIMUHal.cpp
index f9c3d15..d968326 100644
--- a/RTIMULib/RTIMUHal.cpp
+++ b/RTIMULib/RTIMUHal.cpp
@@ -29,6 +29,7 @@
#if !defined(WIN32) && !defined(__APPLE__)
#include <linux/spi/spidev.h>
+#include <asm/ioctl.h>
RTIMUHal::RTIMUHal()
{
--
2.7.0

View File

@@ -0,0 +1,15 @@
DESCRIPTION = "RTIMULib is a C++ and Python library that makes it easy to use 9-dof and \
10-dof IMUs with embedded Linux systems"
HOMEPAGE = "https://github.com/RPi-Distro/RTIMULib/"
SECTION = "devel/python"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://../../LICENSE;md5=96cdecb41125f498958e09b72faf318e"
SRC_URI = "git://github.com/RPi-Distro/RTIMULib.git;protocol=http;branch=master \
file://0001-include-asm-ioctl.h-for-ioctl-define.patch;patchdir=../.. \
"
SRCREV = "b949681af69b45f0f7f4bb53b6770037b5b02178"
S = "${WORKDIR}/git/Linux/python/"
inherit setuptools

View File

@@ -0,0 +1,28 @@
SUMMARY = "Python module to control the Raspberry Pi Sense HAT used in the Astro Pi mission"
HOMEPAGE = "https://github.com/RPi-Distro/python-sense-hat"
SECTION = "devel/python"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://LICENCE.txt;md5=d80fe312e1ff5fbd97369b093bf21cda"
SRCNAME = "sense-hat"
SRC_URI = "https://pypi.python.org/packages/source/s/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
SRC_URI[md5sum] = "71217f15ea963040f06e2f50722186ca"
SRC_URI[sha256sum] = "c6c76707c0ea514e4b0f1f96f1b5b79755875891aae037df7434b6aad7b9dbca"
S = "${WORKDIR}/${SRCNAME}-${PV}"
inherit setuptools
DEPENDS += " \
jpeg \
zlib \
freetype \
"
RDEPENDS_${PN} += " \
python-numpy \
python-rtimu \
python-imaging \
"

View File

@@ -0,0 +1,294 @@
From 23d7ab77865f8b17042f5cd4c6720cca475e0eb5 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 13 Jan 2016 14:27:10 -0800
Subject: [PATCH] Remove nested functions
nested functions are not supported on llvm/clang compiler, replacing
them helps make code portable and be compilable with non-gcc compilers
additionally fix the diagnostic messages clang reported
source/c_gpio.c:130:18: warning: comparison of distinct pointer types
('volatile uint32_t *' (aka 'volatile unsigned int *') an
d 'void *') [-Wcompare-distinct-pointer-types]
if (gpio_map < MAP_FAILED)
~~~~~~~~ ^ ~~~~~~~~~~
source/c_gpio.c:89:13: warning: variable 'peri_base' is used
uninitialized whenever 'if' condition is false [-Wsometimes-uninit
ialized]
if (fread(buf, 1, sizeof buf, fp) == sizeof buf) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
source/c_gpio.c:116:17: note: uninitialized use occurs here
gpio_base = peri_base + GPIO_BASE_OFFSET;
^~~~~~~~~
source/c_gpio.c:89:9: note: remove the 'if' if its condition is always
true
if (fread(buf, 1, sizeof buf, fp) == sizeof buf) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
source/c_gpio.c:64:23: note: initialize the variable 'peri_base' to
silence this warning
uint32_t peri_base;
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Upstream-Status: Submitted
source/c_gpio.c | 6 +--
source/py_gpio.c | 135 ++++++++++++++++++++++++++++---------------------------
2 files changed, 71 insertions(+), 70 deletions(-)
diff --git a/source/c_gpio.c b/source/c_gpio.c
index c96a2b0..b69880f 100644
--- a/source/c_gpio.c
+++ b/source/c_gpio.c
@@ -61,7 +61,7 @@ int setup(void)
{
int mem_fd;
uint8_t *gpio_mem;
- uint32_t peri_base;
+ uint32_t peri_base = 0;
uint32_t gpio_base;
unsigned char buf[4];
FILE *fp;
@@ -73,7 +73,7 @@ int setup(void)
if ((mem_fd = open("/dev/gpiomem", O_RDWR|O_SYNC)) > 0)
{
gpio_map = (uint32_t *)mmap(NULL, BLOCK_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED, mem_fd, 0);
- if ((uint32_t)gpio_map < 0) {
+ if (gpio_map == MAP_FAILED) {
return SETUP_MMAP_FAIL;
} else {
return SETUP_OK;
@@ -127,7 +127,7 @@ int setup(void)
gpio_map = (uint32_t *)mmap( (void *)gpio_mem, BLOCK_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_FIXED, mem_fd, gpio_base);
- if ((uint32_t)gpio_map < 0)
+ if (gpio_map == MAP_FAILED)
return SETUP_MMAP_FAIL;
return SETUP_OK;
diff --git a/source/py_gpio.c b/source/py_gpio.c
index d54cc7f..007bad5 100644
--- a/source/py_gpio.c
+++ b/source/py_gpio.c
@@ -69,6 +69,20 @@ static int mmap_gpio_mem(void)
return 0;
}
}
+static inline int cleanup_one(unsigned int gpio)
+{
+ // clean up any /sys/class exports
+ event_cleanup(gpio);
+
+ // set everything back to input
+ if (gpio_direction[gpio] != -1) {
+ setup_gpio(gpio, INPUT, PUD_OFF);
+ gpio_direction[gpio] = -1;
+ return 1;
+ }
+ return 0;
+}
+
// python function cleanup(channel=None)
static PyObject *py_cleanup(PyObject *self, PyObject *args, PyObject *kwargs)
@@ -83,19 +97,6 @@ static PyObject *py_cleanup(PyObject *self, PyObject *args, PyObject *kwargs)
PyObject *tempobj;
static char *kwlist[] = {"channel", NULL};
- void cleanup_one(void)
- {
- // clean up any /sys/class exports
- event_cleanup(gpio);
-
- // set everything back to input
- if (gpio_direction[gpio] != -1) {
- setup_gpio(gpio, INPUT, PUD_OFF);
- gpio_direction[gpio] = -1;
- found = 1;
- }
- }
-
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O", kwlist, &chanlist))
return NULL;
@@ -140,7 +141,7 @@ static PyObject *py_cleanup(PyObject *self, PyObject *args, PyObject *kwargs)
} else if (channel != -666) { // channel was an int indicating single channel
if (get_gpio_number(channel, &gpio))
return NULL;
- cleanup_one();
+ found = cleanup_one(gpio);
} else { // channel was a list/tuple
for (i=0; i<chancount; i++) {
if (chanlist) {
@@ -169,7 +170,7 @@ static PyObject *py_cleanup(PyObject *self, PyObject *args, PyObject *kwargs)
if (get_gpio_number(channel, &gpio))
return NULL;
- cleanup_one();
+ found = cleanup_one(gpio);
}
}
}
@@ -182,6 +183,37 @@ static PyObject *py_cleanup(PyObject *self, PyObject *args, PyObject *kwargs)
Py_RETURN_NONE;
}
+static inline int setup_one(unsigned int *gpio, int channel, int pud, int direction, int initial) {
+ if (get_gpio_number(channel, gpio))
+ return 0;
+
+ int func = gpio_function(*gpio);
+ if (gpio_warnings && // warnings enabled and
+ ((func != 0 && func != 1) || // (already one of the alt functions or
+ (gpio_direction[*gpio] == -1 && func == 1))) // already an output not set from this program)
+ {
+ PyErr_WarnEx(NULL, "This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings.", 1);
+ }
+
+ // warn about pull/up down on i2c channels
+ if (gpio_warnings) {
+ if (rpiinfo.p1_revision == 0) { // compute module - do nothing
+ } else if ((rpiinfo.p1_revision == 1 && (*gpio == 0 || *gpio == 1)) ||
+ (*gpio == 2 || *gpio == 3)) {
+ if (pud == PUD_UP || pud == PUD_DOWN)
+ PyErr_WarnEx(NULL, "A physical pull up resistor is fitted on this channel!", 1);
+ }
+ }
+
+ if (direction == OUTPUT && (initial == LOW || initial == HIGH)) {
+ output_gpio(*gpio, initial);
+ }
+ setup_gpio(*gpio, direction, pud);
+ gpio_direction[*gpio] = direction;
+ return 1;
+}
+
+
// python function setup(channel(s), direction, pull_up_down=PUD_OFF, initial=None)
static PyObject *py_setup_channel(PyObject *self, PyObject *args, PyObject *kwargs)
{
@@ -195,37 +227,6 @@ static PyObject *py_setup_channel(PyObject *self, PyObject *args, PyObject *kwar
int pud = PUD_OFF + PY_PUD_CONST_OFFSET;
int initial = -1;
static char *kwlist[] = {"channel", "direction", "pull_up_down", "initial", NULL};
- int func;
-
- int setup_one(void) {
- if (get_gpio_number(channel, &gpio))
- return 0;
-
- func = gpio_function(gpio);
- if (gpio_warnings && // warnings enabled and
- ((func != 0 && func != 1) || // (already one of the alt functions or
- (gpio_direction[gpio] == -1 && func == 1))) // already an output not set from this program)
- {
- PyErr_WarnEx(NULL, "This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings.", 1);
- }
-
- // warn about pull/up down on i2c channels
- if (gpio_warnings) {
- if (rpiinfo.p1_revision == 0) { // compute module - do nothing
- } else if ((rpiinfo.p1_revision == 1 && (gpio == 0 || gpio == 1)) ||
- (gpio == 2 || gpio == 3)) {
- if (pud == PUD_UP || pud == PUD_DOWN)
- PyErr_WarnEx(NULL, "A physical pull up resistor is fitted on this channel!", 1);
- }
- }
-
- if (direction == OUTPUT && (initial == LOW || initial == HIGH)) {
- output_gpio(gpio, initial);
- }
- setup_gpio(gpio, direction, pud);
- gpio_direction[gpio] = direction;
- return 1;
- }
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "Oi|ii", kwlist, &chanlist, &direction, &pud, &initial))
return NULL;
@@ -290,7 +291,7 @@ static PyObject *py_setup_channel(PyObject *self, PyObject *args, PyObject *kwar
} else if (chantuple) {
chancount = PyTuple_Size(chantuple);
} else {
- if (!setup_one())
+ if (!setup_one(&gpio, channel, pud, direction, initial))
return NULL;
Py_RETURN_NONE;
}
@@ -320,12 +321,29 @@ static PyObject *py_setup_channel(PyObject *self, PyObject *args, PyObject *kwar
return NULL;
}
- if (!setup_one())
+ if (!setup_one(&gpio, channel, pud, direction, initial))
return NULL;
}
Py_RETURN_NONE;
}
+static inline int output_val(unsigned int *gpio, int channel, int value) {
+ if (get_gpio_number(channel, gpio))
+ return 0;
+
+ if (gpio_direction[*gpio] != OUTPUT)
+ {
+ PyErr_SetString(PyExc_RuntimeError, "The GPIO channel has not been set up as an OUTPUT");
+ return 0;
+ }
+
+ if (check_gpio_priv())
+ return 0;
+
+ output_gpio(*gpio, value);
+ return 1;
+}
+
// python function output(channel(s), value(s))
static PyObject *py_output_gpio(PyObject *self, PyObject *args)
@@ -342,23 +360,6 @@ static PyObject *py_output_gpio(PyObject *self, PyObject *args)
int chancount = -1;
int valuecount = -1;
- int output(void) {
- if (get_gpio_number(channel, &gpio))
- return 0;
-
- if (gpio_direction[gpio] != OUTPUT)
- {
- PyErr_SetString(PyExc_RuntimeError, "The GPIO channel has not been set up as an OUTPUT");
- return 0;
- }
-
- if (check_gpio_priv())
- return 0;
-
- output_gpio(gpio, value);
- return 1;
- }
-
if (!PyArg_ParseTuple(args, "OO", &chanlist, &valuelist))
return NULL;
@@ -416,7 +417,7 @@ static PyObject *py_output_gpio(PyObject *self, PyObject *args)
}
if (chancount == -1) {
- if (!output())
+ if (!output_val(&gpio, channel, value))
return NULL;
Py_RETURN_NONE;
}
@@ -472,7 +473,7 @@ static PyObject *py_output_gpio(PyObject *self, PyObject *args)
return NULL;
}
}
- if (!output())
+ if (!output_val(&gpio, channel, value))
return NULL;
}
--
2.7.0

View File

@@ -2,18 +2,20 @@ DESCRIPTION = "A module to control Raspberry Pi GPIO channels"
HOMEPAGE = "http://code.google.com/p/raspberry-gpio-python/" HOMEPAGE = "http://code.google.com/p/raspberry-gpio-python/"
SECTION = "devel/python" SECTION = "devel/python"
LICENSE = "MIT" LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENCE.txt;md5=35af90ff2a10e8bdc967653b9dfcb22a" LIC_FILES_CHKSUM = "file://LICENCE.txt;md5=9b95630a648966b142f1a0dcea001cb7"
SRCNAME = "RPi.GPIO" SRCNAME = "RPi.GPIO"
SRC_URI = "\ SRC_URI = "\
http://pypi.python.org/packages/source/R/RPi.GPIO/${SRCNAME}-${PV}.tar.gz \ 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"
S = "${WORKDIR}/${SRCNAME}-${PV}" S = "${WORKDIR}/${SRCNAME}-${PV}"
inherit distutils inherit distutils
COMPATIBLE_MACHINE = "raspberrypi" COMPATIBLE_MACHINE = "raspberrypi"
SRC_URI[md5sum] = "cbdff15871230ceef29bb407d31da485"
SRC_URI[sha256sum] = "36b64a9485d6a0dc8f24cfca6af45759ee367ce412b952ebcf0409364e05813a"

View File

@@ -0,0 +1,30 @@
From c86bfacc98d58244f532626954ed00d84ecfa82d Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 30 Jan 2016 17:12:37 -0800
Subject: [PATCH] include sys/types.h explicitly for getting caddr_t definition
Helps fixing build on musl where sys/types.h is not included indirectly
as happening on glibc
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Upstream-Status: Submitted
source/c_gpio/c_gpio.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/source/c_gpio/c_gpio.c b/source/c_gpio/c_gpio.c
index 25a04ca..70df632 100644
--- a/source/c_gpio/c_gpio.c
+++ b/source/c_gpio/c_gpio.c
@@ -29,6 +29,7 @@
#include <stdint.h>
#include <stdlib.h>
#include <fcntl.h>
+#include <sys/types.h>
#include <sys/mman.h>
#include "c_gpio.h"
--
2.7.0

View File

@@ -7,8 +7,8 @@ LIC_FILES_CHKSUM = "file://README.rst;beginline=41;endline=53;md5=d5d95d7486a4d9
SRCNAME = "RPIO" SRCNAME = "RPIO"
SRC_URI = "\ SRC_URI = "http://pypi.python.org/packages/source/R/RPIO/${SRCNAME}-${PV}.tar.gz \
http://pypi.python.org/packages/source/R/RPIO/${SRCNAME}-${PV}.tar.gz \ file://0001-include-sys-types.h-explicitly-for-getting-caddr_t-d.patch \
" "
S = "${WORKDIR}/${SRCNAME}-${PV}" S = "${WORKDIR}/${SRCNAME}-${PV}"

View File

@@ -0,0 +1,410 @@
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)
---
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(-)
diff --git a/devLib/Makefile b/devLib/Makefile
index 0fb0033..cbea759 100644
--- a/devLib/Makefile
+++ b/devLib/Makefile
@@ -31,15 +31,19 @@ ifneq ($V,1)
Q ?= @
endif
-STATIC=libwiringPiDev.a
-DYNAMIC=libwiringPiDev.so.$(VERSION)
+INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include
+LIB_DIR?=$(DESTDIR)$(PREFIX)/lib
-#DEBUG = -g -O0
-DEBUG = -O2
-CC = gcc
-INCLUDE = -I.
-DEFS = -D_GNU_SOURCE
-CFLAGS = $(DEBUG) $(DEFS) -Wformat=2 -Wall -Winline $(INCLUDE) -pipe -fPIC
+BASE_NAME=libwiringPiDev
+STATIC=$(BASE_NAME).a
+DYNAMIC=$(BASE_NAME).so.$(VERSION)
+
+#DEBUG ?= -g -O0
+DEBUG ?= -O2
+CC ?= gcc
+INCLUDE ?= -I.
+DEFS ?= -D_GNU_SOURCE
+CFLAGS ?= $(DEBUG) $(DEFS) -Wformat=2 -Wall -Winline $(INCLUDE) -pipe -fPIC
LIBS =
@@ -66,16 +70,16 @@ $(STATIC): $(OBJ)
$(DYNAMIC): $(OBJ)
$Q echo "[Link (Dynamic)]"
- $Q $(CC) -shared -Wl,-soname,libwiringPiDev.so$(WIRINGPI_SONAME_SUFFIX) -o libwiringPiDev.so.$(VERSION) -lpthread $(OBJ)
+ $Q $(CC) -shared $(LDFLAGS) -Wl,-soname,$(BASE_NAME).so.$(DYN_VERS_MAJ) -o $(BASE_NAME).so -lpthread $(OBJ)
.c.o:
$Q echo [Compile] $<
- $Q $(CC) -c $(CFLAGS) $< -o $@
+ $Q $(CC) -c $(CFLAGS) -fPIC $< -o $@
.PHONY: clean
clean:
$Q echo "[Clean]"
- $Q rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak libwiringPiDev.*
+ $Q rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak $(BASE_NAME).so* $(BASE_NAME).a
.PHONY: tags
tags: $(SRC)
@@ -86,22 +90,22 @@ tags: $(SRC)
.PHONY: install
install: $(DYNAMIC)
$Q echo "[Install Headers]"
- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/include
- $Q install -m 0644 $(HEADERS) $(DESTDIR)$(PREFIX)/include
+ $Q install -m 0755 -d $(INCLUDE_DIR)
+ $Q install -m 0644 $(HEADERS) $(INCLUDE_DIR)
$Q echo "[Install Dynamic Lib]"
- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/lib
- $Q install -m 0755 libwiringPiDev.so.$(VERSION) $(DESTDIR)$(PREFIX)/lib/libwiringPiDev.so.$(VERSION)
- $Q ln -sf $(DESTDIR)$(PREFIX)/lib/libwiringPiDev.so.$(VERSION) $(DESTDIR)/lib/libwiringPiDev.so
- $Q $(LDCONFIG)
+ $Q install -m 0755 -d $(LIB_DIR)
+ $Q install -m 0755 $(BASE_NAME).so $(LIB_DIR)/$(DYNAMIC)
+ $Q ln -sf $(DYNAMIC) $(LIB_DIR)/$(BASE_NAME).so
+ $Q ln -sf $(DYNAMIC) $(LIB_DIR)/$(BASE_NAME).so.$(DYN_VERS_MAJ)
.PHONY: install-static
install-static: $(STATIC)
$Q echo "[Install Headers]"
- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/include
- $Q install -m 0644 $(HEADERS) $(DESTDIR)$(PREFIX)/include
+ $Q install -m 0755 -d $(INCLUDE_DIR)
+ $Q install -m 0644 $(HEADERS) $(INCLUDE_DIR)
$Q echo "[Install Static Lib]"
- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/lib
- $Q install -m 0755 libwiringPiDev.a $(DESTDIR)$(PREFIX)/lib
+ $Q install -m 0755 -d $(LIB_DIR)
+ $Q install -m 0755 $(STATIC) $(LIB_DIR)
.PHONY: install-deb
install-deb: $(DYNAMIC)
@@ -116,9 +120,11 @@ install-deb: $(DYNAMIC)
.PHONY: uninstall
uninstall:
$Q echo "[UnInstall]"
- $Q cd $(DESTDIR)$(PREFIX)/include/ && rm -f $(HEADERS)
- $Q cd $(DESTDIR)$(PREFIX)/lib/ && rm -f libwiringPiDev.*
- $Q $(LDCONFIG)
+ $Q cd $(INCLUDE_DIR) && rm -f $(HEADERS)
+ $Q rm -f $(LIB_DIR)/$(STATIC)
+ $Q rm -f $(LIB_DIR)/$(DYNAMIC)
+ $Q rm -f $(LIB_DIR)/$(BASE_NAME).so
+ $Q rm -f $(LIB_DIR)/$(BASE_NAME).so.$(DYN_VERS_MAJ)
.PHONY: depend
diff --git a/examples/Gertboard/Makefile b/examples/Gertboard/Makefile
index 1939ad6..98d1415 100644
--- a/examples/Gertboard/Makefile
+++ b/examples/Gertboard/Makefile
@@ -9,14 +9,20 @@ ifneq ($V,1)
Q ?= @
endif
-#DEBUG = -g -O0
-DEBUG = -O3
-CC = gcc
-INCLUDE = -I/usr/local/include
-CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
-
-LDFLAGS = -L/usr/local/lib
-LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm
+DESTDIR?=/usr
+PREFIX?=/local
+
+INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include
+LIB_DIR?=$(DESTDIR)$(PREFIX)/lib
+
+#DEBUG ?= -g -O0
+DEBUG ?= -O3
+CC ?= gcc
+INCLUDE ?= -I$(INCLUDE_DIR)
+CFLAGS ?= $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
+
+LDFLAGS ?= -L$(LIB_DIR)
+LDLIBS ?= -lwiringPi -lwiringPiDev -lpthread -lm
# Should not alter anything below this line
###############################################################################
diff --git a/examples/Makefile b/examples/Makefile
index e6b9b71..931b167 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -26,14 +26,20 @@ ifneq ($V,1)
Q ?= @
endif
-#DEBUG = -g -O0
-DEBUG = -O3
-CC = gcc
-INCLUDE = -I/usr/local/include
-CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
-
-LDFLAGS = -L/usr/local/lib
-LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm
+DESTDIR?=/usr
+PREFIX?=/local
+
+INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include
+LIB_DIR?=$(DESTDIR)$(PREFIX)/lib
+
+#DEBUG ?= -g -O0
+DEBUG ?= -O3
+CC ?= gcc
+INCLUDE ?= -I$(INCLUDE_DIR)
+CFLAGS ?= $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
+
+LDFLAGS ?= -L$(LIB_DIR)
+LDLIBS ?= -lwiringPi -lwiringPiDev -lpthread -lm
# Should not alter anything below this line
###############################################################################
diff --git a/examples/PiFace/Makefile b/examples/PiFace/Makefile
index 4685adc..cfaf902 100644
--- a/examples/PiFace/Makefile
+++ b/examples/PiFace/Makefile
@@ -26,14 +26,20 @@ ifneq ($V,1)
Q ?= @
endif
-#DEBUG = -g -O0
-DEBUG = -O3
-CC = gcc
-INCLUDE = -I/usr/local/include
-CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
-
-LDFLAGS = -L/usr/local/lib
-LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm
+DESTDIR?=/usr
+PREFIX?=/local
+
+INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include
+LIB_DIR?=$(DESTDIR)$(PREFIX)/lib
+
+#DEBUG ?= -g -O0
+DEBUG ?= -O3
+CC ?= gcc
+INCLUDE ?= -I$(INCLUDE_DIR)
+CFLAGS ?= $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
+
+LDFLAGS ?= -L$(LIB_DIR)
+LDLIBS ?= -lwiringPi -lwiringPiDev -lpthread -lm
# Should not alter anything below this line
###############################################################################
diff --git a/examples/PiGlow/Makefile b/examples/PiGlow/Makefile
index acd4818..dabd64e 100644
--- a/examples/PiGlow/Makefile
+++ b/examples/PiGlow/Makefile
@@ -29,10 +29,10 @@ endif
#DEBUG = -g -O0
DEBUG = -O3
CC = gcc
-INCLUDE = -I/usr/local/include
+INCLUDE = -I../wiringPi -I../wiringPiDev
CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
-LDFLAGS = -L/usr/local/lib
+LDFLAGS = -L../wiringPi -L../wiringPiDev
LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm
# Should not alter anything below this line
diff --git a/examples/q2w/Makefile b/examples/q2w/Makefile
index 6f50fa0..c5e9f6e 100644
--- a/examples/q2w/Makefile
+++ b/examples/q2w/Makefile
@@ -29,10 +29,10 @@ endif
#DEBUG = -g -O0
DEBUG = -O3
CC = gcc
-INCLUDE = -I/usr/local/include
+INCLUDE = -I../wiringPi -I../devLib
CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
-LDFLAGS = -L/usr/local/lib
+LDFLAGS = -L../wiringPi -L../devLib
LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm
###############################################################################
diff --git a/gpio/Makefile b/gpio/Makefile
index 7dcd090..83ec454 100644
--- a/gpio/Makefile
+++ b/gpio/Makefile
@@ -30,13 +30,17 @@ ifneq ($V,1)
Q ?= @
endif
-#DEBUG = -g -O0
-DEBUG = -O2
-CC = gcc
-INCLUDE = -I$(DESTDIR)$(PREFIX)/include
-CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
+INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include
+LIB_DIR?=$(DESTDIR)$(PREFIX)/lib
+BIN_DIR?=$(DESTDIR)$(PREFIX)/bin
-LDFLAGS = -L$(DESTDIR)$(PREFIX)/lib
+#DEBUG ?= -g -O0
+DEBUG ?= -O2
+CC ?= gcc
+INCLUDE ?= -I$(INCLUDE_DIR)
+CFLAGS ?= $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
+
+LDFLAGS ?= -L$(LIB_DIR)
LIBS = -lwiringPi -lwiringPiDev -lpthread
# May not need to alter anything below this line
@@ -72,13 +76,10 @@ tags: $(SRC)
.PHONY: install
install: gpio
$Q echo "[Install]"
- $Q cp gpio $(DESTDIR)$(PREFIX)/bin
-ifneq ($(WIRINGPI_SUID),0)
- $Q chown root.root $(DESTDIR)$(PREFIX)/bin/gpio
- $Q chmod 4755 $(DESTDIR)$(PREFIX)/bin/gpio
-endif
- $Q mkdir -p $(DESTDIR)$(PREFIX)/man/man1
- $Q cp gpio.1 $(DESTDIR)$(PREFIX)/man/man1
+ $Q install -d $(BIN_DIR)
+ $Q install -m 4755 -o root -g root gpio $(BIN_DIR)
+ $Q install -d $(DESTDIR)$(PREFIX)/share/man/man1
+ $Q install -m 644 -o root -g root gpio.1 $(DESTDIR)$(PREFIX)/share/man/man1
.PHONY: install-deb
install-deb: gpio
@@ -89,7 +90,7 @@ install-deb: gpio
.PHONY: uninstall
uninstall:
$Q echo "[UnInstall]"
- $Q rm -f $(DESTDIR)$(PREFIX)/bin/gpio
+ $Q rm -f $(BIN_DIR)/gpio
$Q rm -f $(DESTDIR)$(PREFIX)/man/man1/gpio.1
.PHONY: depend
diff --git a/wiringPi/Makefile b/wiringPi/Makefile
index 6bbcc5d..5355b74 100644
--- a/wiringPi/Makefile
+++ b/wiringPi/Makefile
@@ -25,19 +25,23 @@ VERSION=$(shell cat ../VERSION)
DESTDIR?=/usr
PREFIX?=/local
+INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include
+LIB_DIR?=$(DESTDIR)$(PREFIX)/lib
+
LDCONFIG?=ldconfig
ifneq ($V,1)
Q ?= @
endif
-STATIC=libwiringPi.a
-DYNAMIC=libwiringPi.so.$(VERSION)
+BASE_NAME=libwiringPi
+STATIC=$(BASE_NAME).a
+DYNAMIC=$(BASE_NAME).so.$(VERSION)
-#DEBUG = -g -O0
-DEBUG = -O2
-CC = gcc
-INCLUDE = -I.
+#DEBUG ?= -g -O0
+DEBUG ?= -O2
+CC ?= gcc
+INCLUDE ?= -I.
DEFS = -D_GNU_SOURCE
CFLAGS = $(DEBUG) $(DEFS) -Wformat=2 -Wall -Winline $(INCLUDE) -pipe -fPIC
@@ -89,17 +93,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)
.c.o:
$Q echo [Compile] $<
- $Q $(CC) -c $(CFLAGS) $< -o $@
+ $Q $(CC) -c $(CFLAGS) -fPIC $< -o $@
.PHONY: clean
clean:
$Q echo "[Clean]"
- $Q rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak libwiringPi.*
+ $Q rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak $(BASE_NAME).so* $(BASE_NAME).a
.PHONY: tags
tags: $(SRC)
@@ -110,22 +114,22 @@ tags: $(SRC)
.PHONY: install
install: $(DYNAMIC)
$Q echo "[Install Headers]"
- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/include
- $Q install -m 0644 $(HEADERS) $(DESTDIR)$(PREFIX)/include
+ $Q install -m 0755 -d $(INCLUDE_DIR)
+ $Q install -m 0644 $(HEADERS) $(INCLUDE_DIR)
$Q echo "[Install Dynamic Lib]"
- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/lib
- $Q install -m 0755 libwiringPi.so.$(VERSION) $(DESTDIR)$(PREFIX)/lib/libwiringPi.so.$(VERSION)
- $Q ln -sf $(DESTDIR)$(PREFIX)/lib/libwiringPi.so.$(VERSION) $(DESTDIR)/lib/libwiringPi.so
- $Q $(LDCONFIG)
+ $Q install -m 0755 -d $(LIB_DIR)
+ $Q install -m 0755 $(BASE_NAME).so $(LIB_DIR)/$(DYNAMIC)
+ $Q ln -sf $(DYNAMIC) $(LIB_DIR)/$(BASE_NAME).so
+ $Q ln -sf $(DYNAMIC) $(LIB_DIR)/$(BASE_NAME).so.$(DYN_VERS_MAJ)
.PHONY: install-static
install-static: $(STATIC)
$Q echo "[Install Headers]"
- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/include
- $Q install -m 0644 $(HEADERS) $(DESTDIR)$(PREFIX)/include
+ $Q install -m 0755 -d $(INCLUDE_DIR)
+ $Q install -m 0644 $(HEADERS) $(INCLUDE_DIR)
$Q echo "[Install Static Lib]"
- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/lib
- $Q install -m 0755 libwiringPi.a $(DESTDIR)$(PREFIX)/lib
+ $Q install -m 0755 -d $(LIB_DIR)
+ $Q install -m 0755 $(STATIC) $(LIB_DIR)
.PHONY: install-deb
install-deb: $(DYNAMIC)
@@ -140,9 +144,11 @@ install-deb: $(DYNAMIC)
.PHONY: uninstall
uninstall:
$Q echo "[UnInstall]"
- $Q cd $(DESTDIR)$(PREFIX)/include/ && rm -f $(HEADERS)
- $Q cd $(DESTDIR)$(PREFIX)/lib/ && rm -f libwiringPi.*
- $Q $(LDCONFIG)
+ $Q cd $(INCLUDE_DIR) && rm -f $(HEADERS)
+ $Q rm -f $(LIB_DIR)/$(STATIC)
+ $Q rm -f $(LIB_DIR)/$(DYNAMIC)
+ $Q rm -f $(LIB_DIR)/$(BASE_NAME).so
+ $Q rm -f $(LIB_DIR)/$(BASE_NAME).so.$(DYN_VERS_MAJ)
.PHONY: depend
--
2.1.4

View File

@@ -1,202 +0,0 @@
diff --git a/examples/Makefile b/examples/Makefile
index defd510..b84f3de 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -26,10 +26,10 @@
#DEBUG = -g -O0
DEBUG = -O3
CC = gcc
-INCLUDE = -I/usr/local/include
+INCLUDE = -I../wiringPi
CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
-LDFLAGS = -L/usr/local/lib
+LDFLAGS = -L../wiringPi
LDLIBS = -lwiringPi -lpthread -lm
# Should not alter anything below this line
diff --git a/gpio/Makefile b/gpio/Makefile
index a043962..b1539d9 100644
--- a/gpio/Makefile
+++ b/gpio/Makefile
@@ -23,13 +23,16 @@
#################################################################################
+DESTDIR?=/usr
+PREFIX?=/local
+
#DEBUG = -g -O0
-DEBUG = -O2
-CC = gcc
-INCLUDE = -I/usr/local/include
-CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
+DEBUG ?= -O2
+CC ?= gcc
+INCLUDE ?= -I../wiringPi
+CFLAGS ?= $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
-LDFLAGS = -L/usr/local/lib
+LDFLAGS ?= -L../wiringPi
LIBS = -lwiringPi -lpthread -lm
# May not need to alter anything below this line
@@ -61,17 +64,16 @@ tags: $(SRC)
.PHONEY: install
install:
@echo "[Install]"
- @cp gpio /usr/local/bin
- @chown root.root /usr/local/bin/gpio
- @chmod 4755 /usr/local/bin/gpio
- @mkdir -p /usr/local/man/man1
- @cp gpio.1 /usr/local/man/man1
+ @install -d $(DESTDIR)$(PREFIX)/bin
+ @install -m 4755 -o root -g root gpio $(DESTDIR)$(PREFIX)/bin
+ @install -d $(DESTDIR)$(PREFIX)/share/man/man1
+ @install -m 644 -o root -g root gpio.1 $(DESTDIR)$(PREFIX)/share/man/man1
.PHONEY: uninstall
uninstall:
@echo "[UnInstall]"
- @rm -f /usr/local/bin/gpio
- @rm -f /usr/local/man/man1/gpio.1
+ @rm -f $(DESTDIR)$(PREFIX)/bin/gpio
+ @rm -f $(DESTDIR)$(PREFIX)/share/man/man1/gpio.1
.PHONEY: depend
depend:
diff --git a/wiringPi/Makefile b/wiringPi/Makefile
index c6a4555..2c7ae82 100644
--- a/wiringPi/Makefile
+++ b/wiringPi/Makefile
@@ -25,17 +25,20 @@ DYN_VERS_MAJ=1
DYN_VERS_MIN=0
VERSION=$(DYN_VERS_MAJ).$(DYN_VERS_MIN)
-DESTDIR=/usr
-PREFIX=/local
+DESTDIR?=/usr
+PREFIX?=/local
+INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include
+LIB_DIR?=$(DESTDIR)$(PREFIX)/lib
-STATIC=libwiringPi.a
-DYNAMIC=libwiringPi.so.$(VERSION)
+BASE_NAME=libwiringPi
+STATIC=$(BASE_NAME).a
+DYNAMIC=$(BASE_NAME).so.$(VERSION)
#DEBUG = -g -O0
-DEBUG = -O2
-CC = gcc
-INCLUDE = -I.
-CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe -fPIC
+DEBUG ?= -O2
+CC ?= gcc
+INCLUDE ?= -I.
+CFLAGS ?= $(DEBUG) -Wall $(INCLUDE) -Winline -pipe -fPIC
LIBS =
@@ -67,19 +70,19 @@ $(STATIC): $(OBJ)
$(DYNAMIC): $(OBJ)
@echo "[Link (Dynamic)]"
- @$(CC) -shared -Wl,-soname,libwiringPi.so.1 -o libwiringPi.so.1.0 -lpthread $(OBJ)
+ @$(CC) -shared -Wl,-soname,$(BASE_NAME).so.$(DYN_VERS_MAJ) -o $(BASE_NAME).so -lpthread $(OBJ)
i2c: $(OBJ) $(OBJ_I2C)
@echo "[Link (Dynamic + I2C)]"
- @$(CC) -shared -Wl,-soname,libwiringPi.so.1 -o libwiringPi.so.1.0 -lpthread $(OBJ) $(OBJ_I2C)
+ @$(CC) -shared -Wl,-soname,$(BASE_NAME).so.$(DYN_VERS_MAJ) -o $(BASE_NAME).so -lpthread $(OBJ) $(OBJ_I2C)
.c.o:
@echo [Compile] $<
- @$(CC) -c $(CFLAGS) $< -o $@
+ @$(CC) -c $(CFLAGS) -fPIC $< -o $@
.PHONEY: clean
clean:
- rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak libwiringPi.*
+ rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak $(BASE_NAME).so* $(BASE_NAME).a
.PHONEY: tags
tags: $(SRC)
@@ -89,45 +92,46 @@ tags: $(SRC)
.PHONEY: install
install: $(DYNAMIC)
@echo "[Install]"
- @install -m 0755 -d $(DESTDIR)$(PREFIX)/lib
- @install -m 0755 -d $(DESTDIR)$(PREFIX)/include
- @install -m 0644 wiringPi.h $(DESTDIR)$(PREFIX)/include
- @install -m 0644 wiringSerial.h $(DESTDIR)$(PREFIX)/include
- @install -m 0644 wiringShift.h $(DESTDIR)$(PREFIX)/include
- @install -m 0644 gertboard.h $(DESTDIR)$(PREFIX)/include
- @install -m 0644 piNes.h $(DESTDIR)$(PREFIX)/include
- @install -m 0644 softPwm.h $(DESTDIR)$(PREFIX)/include
- @install -m 0644 softServo.h $(DESTDIR)$(PREFIX)/include
- @install -m 0644 softTone.h $(DESTDIR)$(PREFIX)/include
- @install -m 0644 lcd.h $(DESTDIR)$(PREFIX)/include
- @install -m 0644 wiringPiSPI.h $(DESTDIR)$(PREFIX)/include
- @install -m 0644 wiringPiI2C.h $(DESTDIR)$(PREFIX)/include
- @install -m 0755 libwiringPi.so.$(VERSION) $(DESTDIR)$(PREFIX)/lib
- @ln -sf $(DESTDIR)$(PREFIX)/lib/libwiringPi.so.$(VERSION) $(DESTDIR)/lib/libwiringPi.so
- @ln -sf $(DESTDIR)$(PREFIX)/lib/libwiringPi.so.$(VERSION) $(DESTDIR)/lib/libwiringPi.so.1
- @ldconfig
+ @install -m 0755 -d $(LIB_DIR)
+ @install -m 0755 -d $(INCLUDE_DIR)
+ @install -m 0644 wiringPi.h $(INCLUDE_DIR)
+ @install -m 0644 wiringSerial.h $(INCLUDE_DIR)
+ @install -m 0644 wiringShift.h $(INCLUDE_DIR)
+ @install -m 0644 gertboard.h $(INCLUDE_DIR)
+ @install -m 0644 piNes.h $(INCLUDE_DIR)
+ @install -m 0644 softPwm.h $(INCLUDE_DIR)
+ @install -m 0644 softServo.h $(INCLUDE_DIR)
+ @install -m 0644 softTone.h $(INCLUDE_DIR)
+ @install -m 0644 lcd.h $(INCLUDE_DIR)
+ @install -m 0644 wiringPiSPI.h $(INCLUDE_DIR)
+ @install -m 0644 wiringPiI2C.h $(INCLUDE_DIR)
+ @install -m 0755 $(BASE_NAME).so $(LIB_DIR)/$(DYNAMIC)
+ @ln -sf $(DYNAMIC) $(LIB_DIR)/$(BASE_NAME).so
+ @ln -sf $(DYNAMIC) $(LIB_DIR)/$(BASE_NAME).so.$(DYN_VERS_MAJ)
.PHONEY: install-static
install-static: $(STATIC)
@echo "[Install Static]"
- @install -m 0755 libwiringPi.a $(DESTDIR)$(PREFIX)/lib
+ @install -m 0644 $(STATIC) $(LIB_DIR)
.PHONEY: uninstall
uninstall:
@echo "[UnInstall]"
- @rm -f $(DESTDIR)$(PREFIX)/include/wiringPi.h
- @rm -f $(DESTDIR)$(PREFIX)/include/wiringSerial.h
- @rm -f $(DESTDIR)$(PREFIX)/include/wiringShift.h
- @rm -f $(DESTDIR)$(PREFIX)/include/gertboard.h
- @rm -f $(DESTDIR)$(PREFIX)/include/piNes.h
- @rm -f $(DESTDIR)$(PREFIX)/include/softPwm.h
- @rm -f $(DESTDIR)$(PREFIX)/include/softServo.h
- @rm -f $(DESTDIR)$(PREFIX)/include/softTone.h
- @rm -f $(DESTDIR)$(PREFIX)/include/lcd.h
- @rm -f $(DESTDIR)$(PREFIX)/include/wiringPiSPI.h
- @rm -f $(DESTDIR)$(PREFIX)/include/wiringPiI2C.h
- @rm -f $(DESTDIR)$(PREFIX)/lib/libwiringPi.*
- @ldconfig
+ @rm -f $(INCLUDE_DIR)/wiringPi.h
+ @rm -f $(INCLUDE_DIR)/wiringSerial.h
+ @rm -f $(INCLUDE_DIR)/wiringShift.h
+ @rm -f $(INCLUDE_DIR)/gertboard.h
+ @rm -f $(INCLUDE_DIR)/piNes.h
+ @rm -f $(INCLUDE_DIR)/softPwm.h
+ @rm -f $(INCLUDE_DIR)/softServo.h
+ @rm -f $(INCLUDE_DIR)/softTone.h
+ @rm -f $(INCLUDE_DIR)/lcd.h
+ @rm -f $(INCLUDE_DIR)/wiringPiSPI.h
+ @rm -f $(INCLUDE_DIR)/wiringPiI2C.h
+ @rm -f $(LIB_DIR)/$(STATIC)
+ @rm -f $(LIB_DIR)/$(DYNAMIC)
+ @rm -f $(LIB_DIR)/$(BASE_NAME).so
+ @rm -f $(LIB_DIR)/$(BASE_NAME).so.$(DYN_VERS_MAJ)
.PHONEY: depend

View File

@@ -0,0 +1,58 @@
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

View File

@@ -4,28 +4,31 @@ SECTION = "devel/libs"
LICENSE = "LGPLv3+" LICENSE = "LGPLv3+"
LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=e6a600fd5e1d9cbde2d983680233ad02" LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=e6a600fd5e1d9cbde2d983680233ad02"
SRCREV = "98bcb20d9391ebde24f9eb1244f0d238fb1a1dab" # tag 2.32
SRCREV = "b0a60c3302973ca1878d149d61f2f612c8f27fac"
S = "${WORKDIR}/git" S = "${WORKDIR}/git"
SRC_URI = "\ SRC_URI = "git://git.drogon.net/wiringPi \
git://git.drogon.net/wiringPi \ file://0001-Add-initial-cross-compile-support.patch \
file://Makefiles-install.patch \ file://0001-include-asm-ioctl.h-directly-for-_IOC_SIZEBITS.patch \
" "
COMPATIBLE_MACHINE = "raspberrypi" COMPATIBLE_MACHINE = "raspberrypi"
CFLAGS_prepend = "-I${S}/wiringPi" CFLAGS_prepend = "-I${S}/wiringPi -I${S}/devLib "
EXTRA_OEMAKE += "'INCLUDE_DIR=${D}${includedir}' 'LIB_DIR=${D}${libdir}'" EXTRA_OEMAKE += "'INCLUDE_DIR=${D}${includedir}' 'LIB_DIR=${D}${libdir}'"
EXTRA_OEMAKE += "'DESTDIR=${D}/usr' 'PREFIX=""'" EXTRA_OEMAKE += "'DESTDIR=${D}/usr' 'PREFIX=""'"
do_compile() { do_compile() {
oe_runmake -C devLib
oe_runmake -C wiringPi oe_runmake -C wiringPi
oe_runmake -C gpio 'LDFLAGS=${LDFLAGS} -L${S}/wiringPi' oe_runmake -C gpio 'LDFLAGS=${LDFLAGS} -L${S}/wiringPi -L${S}/devLib'
} }
do_install() { do_install() {
oe_runmake -C devLib install
oe_runmake -C wiringPi install oe_runmake -C wiringPi install
oe_runmake -C gpio install oe_runmake -C gpio install
} }

View File

@@ -0,0 +1 @@
EGLINFO_DEVICE_rpi = "raspberrypi"

View File

@@ -0,0 +1,2 @@
EGLINFO_DEVICE_rpi = "raspberrypi"
ASNEEDED = ""

View File

@@ -0,0 +1,208 @@
From 83c5ac5892d0cd29caa8922ff8b639b9a373c3cb 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/13] Allow applications to set next resource handle
This patch adds provisions in userland to
let apps callers set the next rendereing dispmanx resource.
It's useful for implementing, say, a buffer carousel.
---
interface/khronos/common/khrn_client_rpc.h | 2 ++
interface/khronos/common/khrn_int_ids.h | 2 ++
interface/khronos/egl/egl_client.c | 30 +++++++++++++++++++++++++++---
interface/khronos/egl/egl_client_surface.c | 24 +++++++++++++++++++++++-
interface/khronos/egl/egl_client_surface.h | 3 ++-
interface/khronos/egl/egl_int_impl.h | 5 +++--
6 files changed, 59 insertions(+), 7 deletions(-)
diff --git a/interface/khronos/common/khrn_client_rpc.h b/interface/khronos/common/khrn_client_rpc.h
index 418aa67..a7557a8 100644
--- a/interface/khronos/common/khrn_client_rpc.h
+++ b/interface/khronos/common/khrn_client_rpc.h
@@ -683,6 +683,7 @@ static INLINE void rpc_call12_out_ctrl(CLIENT_THREAD_STATE_T *thread,uint32_t id
static INLINE void rpc_call13_out_ctrl(CLIENT_THREAD_STATE_T *thread,uint32_t id, uint32_t p0, uint32_t p1, uint32_t p2, uint32_t p3, uint32_t p4, uint32_t p5, uint32_t p6, uint32_t p7, uint32_t p8, uint32_t p9, uint32_t p10, uint32_t p11, void *out) { rpc_begin(thread); RPC_CALL(thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); rpc_recv(thread, out, NULL, (RPC_RECV_FLAG_T)(RPC_RECV_FLAG_CTRL | RPC_RECV_FLAG_LEN)); rpc_end(thread); }
static INLINE void rpc_call14_out_ctrl(CLIENT_THREAD_STATE_T *thread,uint32_t id, uint32_t p0, uint32_t p1, uint32_t p2, uint32_t p3, uint32_t p4, uint32_t p5, uint32_t p6, uint32_t p7, uint32_t p8, uint32_t p9, uint32_t p10, uint32_t p11, uint32_t p12, void *out) { rpc_begin(thread); RPC_CALL(thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); rpc_recv(thread, out, NULL, (RPC_RECV_FLAG_T)(RPC_RECV_FLAG_CTRL | RPC_RECV_FLAG_LEN)); rpc_end(thread); }
static INLINE void rpc_call15_out_ctrl(CLIENT_THREAD_STATE_T *thread,uint32_t id, uint32_t p0, uint32_t p1, uint32_t p2, uint32_t p3, uint32_t p4, uint32_t p5, uint32_t p6, uint32_t p7, uint32_t p8, uint32_t p9, uint32_t p10, uint32_t p11, uint32_t p12, uint32_t p13, void *out) { rpc_begin(thread); RPC_CALL(thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13); rpc_recv(thread, out, NULL, (RPC_RECV_FLAG_T)(RPC_RECV_FLAG_CTRL | RPC_RECV_FLAG_LEN)); rpc_end(thread); }
+static INLINE void rpc_call16_out_ctrl(CLIENT_THREAD_STATE_T *thread,uint32_t id, uint32_t p0, uint32_t p1, uint32_t p2, uint32_t p3, uint32_t p4, uint32_t p5, uint32_t p6, uint32_t p7, uint32_t p8, uint32_t p9, uint32_t p10, uint32_t p11, uint32_t p12, uint32_t p13, uint32_t p14, void *out) { rpc_begin(thread); RPC_CALL(thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14); rpc_recv(thread, out, NULL, (RPC_RECV_FLAG_T)(RPC_RECV_FLAG_CTRL | RPC_RECV_FLAG_LEN)); rpc_end(thread); }
#endif
#define RPC_CALL1_OUT_CTRL(fn, thread, id, out) rpc_call1_out_ctrl(thread, id, out)
@@ -700,6 +701,7 @@ static INLINE void rpc_call15_out_ctrl(CLIENT_THREAD_STATE_T *thread,uint32_t id
#define RPC_CALL13_OUT_CTRL(fn, thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, out) rpc_call13_out_ctrl(thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, out)
#define RPC_CALL14_OUT_CTRL(fn, thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, out) rpc_call14_out_ctrl(thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, out)
#define RPC_CALL15_OUT_CTRL(fn, thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, out) rpc_call15_out_ctrl(thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, out)
+#define RPC_CALL16_OUT_CTRL(fn, thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, out) rpc_call16_out_ctrl(thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, out)
# if !defined(__SYMBIAN32__) //use functions defined in khrpc.cpp
static INLINE uint32_t rpc_call1_out_ctrl_res(CLIENT_THREAD_STATE_T *thread,uint32_t id, void *out) { uint32_t res; rpc_begin(thread); RPC_CALL(thread, id); res = rpc_recv(thread, out, NULL, (RPC_RECV_FLAG_T)(RPC_RECV_FLAG_RES | RPC_RECV_FLAG_CTRL | RPC_RECV_FLAG_LEN)); rpc_end(thread); return res; }
diff --git a/interface/khronos/common/khrn_int_ids.h b/interface/khronos/common/khrn_int_ids.h
index 8378f4a..ec961e0 100644
--- a/interface/khronos/common/khrn_int_ids.h
+++ b/interface/khronos/common/khrn_int_ids.h
@@ -367,6 +367,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#define EGLINTCREATESURFACE_ID 0x4000
+#define EGLINTCREATESURFACE_ID_V2 0x4100
#define EGLINTCREATEGLES11_ID 0x4001
#define EGLINTCREATEGLES20_ID 0x4002
#define EGLINTCREATEVG_ID 0x4003
@@ -377,6 +378,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define EGLINTMAKECURRENT_ID 0x4008
#define EGLINTFLUSHANDWAIT_ID 0x4009
#define EGLINTSWAPBUFFERS_ID 0x400a
+#define EGLINTSWAPBUFFERS_ID_V2 0x410a
#define EGLINTSELECTMIPMAP_ID 0x400b
#define EGLINTFLUSH_ID 0x400c
#define EGLINTGETCOLORDATA_ID 0x400d
diff --git a/interface/khronos/egl/egl_client.c b/interface/khronos/egl/egl_client.c
index 472ef0c..234da65 100644
--- a/interface/khronos/egl/egl_client.c
+++ b/interface/khronos/egl/egl_client.c
@@ -162,6 +162,17 @@ static void egl_current_release(CLIENT_PROCESS_STATE_T *process, EGL_CURRENT_T *
void egl_gl_flush_callback(bool wait);
void egl_vg_flush_callback(bool wait);
+#include "interface/vmcs_host/vc_dispmanx_types.h"
+/**HACKHACK - give us the ability to inject a DispmanX
+ * resource handle into the CreateWindowSurface and
+ * SwapBuffers calls */
+static DISPMANX_RESOURCE_HANDLE_T next_resource_handle;
+
+EGLAPI EGLBoolean EGLAPIENTRY eglSetNextResourceHandle(DISPMANX_RESOURCE_HANDLE_T handle)
+{
+ next_resource_handle = handle;
+}
+
/*
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?)
@@ -644,7 +655,8 @@ EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy, EGLConfig c
false,
EGL_NO_TEXTURE,
EGL_NO_TEXTURE,
- 0, 0);
+ 0, 0,
+ next_resource_handle);
if (surface) {
if (khrn_pointer_map_insert(&process->surfaces, process->next_surface, surface)) {
@@ -889,7 +901,7 @@ EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig
mipmap_texture,
texture_format,
texture_target,
- 0, 0);
+ 0, 0, 0);
if (surface) {
if (khrn_pointer_map_insert(&process->surfaces, process->next_surface, surface)) {
@@ -1031,7 +1043,7 @@ EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig c
false,
EGL_NO_TEXTURE,
EGL_NO_TEXTURE,
- pixmap, ((server_handle[0] == 0) && (server_handle[1] == (uint32_t)(-1))) ? NULL : server_handle);
+ pixmap, ((server_handle[0] == 0) && (server_handle[1] == (uint32_t)(-1))) ? NULL : server_handle, 0);
if (surface) {
if (khrn_pointer_map_insert(&process->surfaces, process->next_surface, surface)) {
@@ -2303,6 +2315,18 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surf)
vcos_log_trace("eglSwapBuffers server call");
+ if (next_resource_handle)
+ RPC_CALL7(eglIntSwapBuffers_impl,
+ thread,
+ EGLINTSWAPBUFFERS_ID_V2,
+ RPC_UINT(surface->serverbuffer),
+ RPC_UINT(surface->width),
+ RPC_UINT(surface->height),
+ RPC_UINT(surface->internal_handle),
+ RPC_UINT(surface->swap_behavior == EGL_BUFFER_PRESERVED ? 1 : 0),
+ RPC_UINT(khrn_platform_get_window_position(surface->win)),
+ RPC_INT(next_resource_handle));
+ else
RPC_CALL6(eglIntSwapBuffers_impl,
thread,
EGLINTSWAPBUFFERS_ID,
diff --git a/interface/khronos/egl/egl_client_surface.c b/interface/khronos/egl/egl_client_surface.c
index 0fa1fd1..0dc10e2 100644
--- a/interface/khronos/egl/egl_client_surface.c
+++ b/interface/khronos/egl/egl_client_surface.c
@@ -314,7 +314,8 @@ EGL_SURFACE_T *egl_surface_create(
EGLenum texture_format,
EGLenum texture_target,
EGLNativePixmapType pixmap,
- const uint32_t *pixmap_server_handle)
+ const uint32_t *pixmap_server_handle,
+ DISPMANX_RESOURCE_HANDLE_T next_resource_handle)
{
KHRN_IMAGE_FORMAT_T color;
KHRN_IMAGE_FORMAT_T depth;
@@ -473,6 +474,27 @@ EGL_SURFACE_T *egl_surface_create(
#endif
uint32_t results[3];
+ if (next_resource_handle)
+ RPC_CALL16_OUT_CTRL(eglIntCreateSurface_impl,
+ thread,
+ EGLINTCREATESURFACE_ID_V2,
+ RPC_UINT(serverwin),
+ RPC_UINT(buffers),
+ RPC_UINT(width),
+ RPC_UINT(height),
+ RPC_UINT(color),
+ RPC_UINT(depth),
+ RPC_UINT(mask),
+ RPC_UINT(multi),
+ RPC_UINT(largest_pbuffer),
+ RPC_UINT(mipmap_texture),
+ RPC_UINT(config_depth_bits),
+ RPC_UINT(config_stencil_bits),
+ RPC_UINT(sem_name),
+ RPC_UINT(type),
+ RPC_INT(next_resource_handle),
+ results);
+ else
RPC_CALL15_OUT_CTRL(eglIntCreateSurface_impl,
thread,
EGLINTCREATESURFACE_ID,
diff --git a/interface/khronos/egl/egl_client_surface.h b/interface/khronos/egl/egl_client_surface.h
index c99d44c..b5bf70a 100644
--- a/interface/khronos/egl/egl_client_surface.h
+++ b/interface/khronos/egl/egl_client_surface.h
@@ -322,7 +322,8 @@ extern EGL_SURFACE_T *egl_surface_create(
EGLenum texture_format,
EGLenum texture_target,
EGLNativePixmapType pixmap,
- const uint32_t *pixmap_server_handle);
+ const uint32_t *pixmap_server_handle,
+ DISPMANX_RESOURCE_HANDLE_T next_resource_handle);
extern EGL_SURFACE_T *egl_surface_from_vg_image(
VGImage vg_handle,
EGLSurface name,
diff --git a/interface/khronos/egl/egl_int_impl.h b/interface/khronos/egl/egl_int_impl.h
index 8a5734c..51b3580 100644
--- a/interface/khronos/egl/egl_int_impl.h
+++ b/interface/khronos/egl/egl_int_impl.h
@@ -56,7 +56,8 @@ FN(int, eglIntCreateSurface_impl, (
uint32_t config_stencil_bits,
uint32_t sem,
uint32_t type,
- uint32_t *results))
+ uint32_t *results,
+ DISPMANX_RESOURCE_HANDLE_T next_resource_handle))
FN(int, eglIntCreatePbufferFromVGImage_impl, (
VGImage vg_handle,
@@ -110,7 +111,7 @@ FN(void, eglIntMakeCurrent_impl, (uint32_t pid_0, uint32_t pid_1, uint32_t glver
FN(int, eglIntFlushAndWait_impl, (uint32_t flushgl, uint32_t flushvg))
FN(void, eglIntFlush_impl, (uint32_t flushgl, uint32_t flushvg))
-FN(void, eglIntSwapBuffers_impl, (EGL_SURFACE_ID_T s, uint32_t width, uint32_t height, uint32_t handle, uint32_t preserve, uint32_t position))
+FN(void, eglIntSwapBuffers_impl, (EGL_SURFACE_ID_T s, uint32_t width, uint32_t height, uint32_t handle, uint32_t preserve, uint32_t position, DISPMANX_RESOURCE_HANDLE_T new_back_buffer))
FN(void, eglIntSelectMipmap_impl, (EGL_SURFACE_ID_T s, int level))
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.9.0

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,28 @@
From e3df3fec01aefac3ec301f6f3d5ec3e91652b9c5 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/13] 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
lets add the dependency on bcm_host module which should do it
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
interface/khronos/wayland-egl/wayland-egl.pc.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/interface/khronos/wayland-egl/wayland-egl.pc.in b/interface/khronos/wayland-egl/wayland-egl.pc.in
index 8bafc15..fd259c9 100644
--- a/interface/khronos/wayland-egl/wayland-egl.pc.in
+++ b/interface/khronos/wayland-egl/wayland-egl.pc.in
@@ -6,5 +6,6 @@ includedir=${prefix}/include
Name: wayland-egl
Description: VideoCore wayland-egl library
Version: @PROJECT_APIVER@
+Requires: bcm_host
Libs: -L${libdir} -lwayland-egl
Cflags: -I${includedir}
--
2.9.0

View File

@@ -0,0 +1,29 @@
From 6c9d407c9ec0859380e7bcf35cf915cef4b3687b 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/13] interface: remove faulty assert() to make weston happy
at runtime
This was removed after a discussion on IRC with the weston guys
('daniels' on irc.freenode.net/#wayland).
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
interface/vmcs_host/vc_vchi_dispmanx.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/interface/vmcs_host/vc_vchi_dispmanx.c b/interface/vmcs_host/vc_vchi_dispmanx.c
index 3e668f5..8e065dc 100755
--- a/interface/vmcs_host/vc_vchi_dispmanx.c
+++ b/interface/vmcs_host/vc_vchi_dispmanx.c
@@ -1304,7 +1304,6 @@ static void *dispmanx_notify_func( void *arg ) {
// Decrement the use count - the corresponding "use" is in vc_dispmanx_update_submit.
vchi_service_release(dispmanx_client.notify_handle[0]);
if (dispmanx_client.update_callback ) {
- vcos_assert( dispmanx_client.pending_update_handle == handle);
dispmanx_client.update_callback(handle, dispmanx_client.update_callback_param);
}
} else {
--
2.9.0

View File

@@ -0,0 +1,33 @@
From e3ffe9438fe8417586d0045d00eb1368ca3a71b6 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/13] zero-out wl buffers in egl_surface_free
origins from buildroot
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
interface/khronos/egl/egl_client_surface.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/interface/khronos/egl/egl_client_surface.c b/interface/khronos/egl/egl_client_surface.c
index 49cf7e5..512c83b 100644
--- a/interface/khronos/egl/egl_client_surface.c
+++ b/interface/khronos/egl/egl_client_surface.c
@@ -690,11 +690,13 @@ void egl_surface_free(EGL_SURFACE_T *surface)
if (surface->back_wl_buffer) {
wl_buffer_destroy(surface->back_wl_buffer->wl_buffer);
free(surface->back_wl_buffer);
+ surface->back_wl_buffer = 0;
}
if (surface->front_wl_buffer) {
wl_buffer_destroy(surface->front_wl_buffer->wl_buffer);
free(surface->front_wl_buffer);
+ surface->front_wl_buffer = 0;
}
#endif
}
--
2.9.0

View File

@@ -0,0 +1,34 @@
From ed31a6a206c9e205bd5316e95788e5d7bb837e38 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/13] initialize front back wayland buffers
origins from metrological wayland support
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
interface/khronos/egl/egl_client_surface.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/interface/khronos/egl/egl_client_surface.c b/interface/khronos/egl/egl_client_surface.c
index 512c83b..a429724 100644
--- a/interface/khronos/egl/egl_client_surface.c
+++ b/interface/khronos/egl/egl_client_surface.c
@@ -401,11 +401,14 @@ EGL_SURFACE_T *egl_surface_create(
#ifdef BUILD_WAYLAND
if (type == WINDOW && wl_display) {
surface->wl_egl_window = (struct wl_egl_window*)win;
+ surface->front_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->back_wl_buffer = NULL;
resource = DISPMANX_NO_HANDLE;
}
#endif
--
2.9.0

View File

@@ -0,0 +1,27 @@
From 6e173040a825185013ccbbb33113442207f10eeb 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/13] Remove RPC_FLUSH
Origins from buildroot
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
interface/khronos/ext/gl_oes_egl_image_client.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/interface/khronos/ext/gl_oes_egl_image_client.c b/interface/khronos/ext/gl_oes_egl_image_client.c
index f9b7287..b04ffef 100644
--- a/interface/khronos/ext/gl_oes_egl_image_client.c
+++ b/interface/khronos/ext/gl_oes_egl_image_client.c
@@ -107,7 +107,6 @@ GL_API void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageO
GLEGLIMAGETARGETTEXTURE2DOES_ID,
RPC_ENUM(target),
RPC_EGLID(image));
- RPC_FLUSH(thread);
#if EGL_BRCM_global_image
}
#endif
--
2.9.0

View File

@@ -0,0 +1,78 @@
From c4217231fd78daee83b0c0f312c1d392aa6e0f47 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/13] fix cmake dependency race
Fixes errors like
/a/builder/mnt/build-oe/tmp-glibc/work/raspberrypi2-oe-linux-gnueabi/userland/git-r5/git/interface/vmcs_host/vc_vchi_dispmanx.h:72:66:
fatal error: interface/vmcs_host/wayland-dispmanx-server-protocol.h: No
such file or directory
compilation terminated.
interface/khronos/CMakeFiles/EGL_static.dir/build.make:773: recipe for
target 'interface/khronos/CMakeFiles/EGL_static.dir/ext/egl_wayland.c.o'
failed
make[2]: ***
[interface/khronos/CMakeFiles/EGL_static.dir/ext/egl_wayland.c.o] Error 1
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
interface/vcos/pthreads/CMakeLists.txt | 8 ++++++++
interface/vmcs_host/CMakeLists.txt | 8 --------
interface/vmcs_host/vc_vchi_dispmanx.h | 2 +-
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/interface/vcos/pthreads/CMakeLists.txt b/interface/vcos/pthreads/CMakeLists.txt
index 1d81ca3..d6cd415 100644
--- a/interface/vcos/pthreads/CMakeLists.txt
+++ b/interface/vcos/pthreads/CMakeLists.txt
@@ -33,6 +33,14 @@ set (SOURCES
../generic/vcos_generic_blockpool.c
)
+if (BUILD_WAYLAND)
+wayland_add_protocol_server(
+ SOURCES
+ ../../../interface/wayland/dispmanx.xml
+ dispmanx
+)
+endif ()
+
if (VCOS_PTHREADS_BUILD_SHARED)
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 35150ed..22949a8 100755
--- a/interface/vmcs_host/CMakeLists.txt
+++ b/interface/vmcs_host/CMakeLists.txt
@@ -17,14 +17,6 @@ set(VCHOSTIF_SOURCE
# ${VMCS_TARGET}/vmcs_main.c
# vc_vchi_haud.c
-if (BUILD_WAYLAND)
-wayland_add_protocol_server(
- VCHOSTIF_SOURCE
- ../../interface/wayland/dispmanx.xml
- dispmanx
-)
-endif ()
-
add_library(vchostif ${VCHOSTIF_SOURCE})
#add_library(bufman vc_vchi_bufman.c )
diff --git a/interface/vmcs_host/vc_vchi_dispmanx.h b/interface/vmcs_host/vc_vchi_dispmanx.h
index f0bae30..8c44c58 100644
--- a/interface/vmcs_host/vc_vchi_dispmanx.h
+++ b/interface/vmcs_host/vc_vchi_dispmanx.h
@@ -69,7 +69,7 @@ typedef struct {
#ifdef BUILD_WAYLAND
/* XXX: This should be in a private header that can be included from EGL and vc_* */
#include <wayland-server.h>
-#include "interface/vmcs_host/wayland-dispmanx-server-protocol.h"
+#include "interface/vcos/pthreads/wayland-dispmanx-server-protocol.h"
struct wl_dispmanx_server_buffer {
struct wl_resource *resource;
struct wl_dispmanx *dispmanx;
--
2.9.0

View File

@@ -0,0 +1,99 @@
From 377f6aada3b7569e3d662fc830e01b8c5ba8a15d Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 18 Feb 2016 09:04:46 +0000
Subject: [PATCH 10/13] Fix enum conversion warnings
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
interface/mmal/openmaxil/mmalomx_core.c | 4 ++--
interface/mmal/openmaxil/mmalomx_parameters.c | 6 +++---
interface/mmal/openmaxil/mmalomx_util_params_video.c | 8 ++++----
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/interface/mmal/openmaxil/mmalomx_core.c b/interface/mmal/openmaxil/mmalomx_core.c
index 9bc632b..20d4fc7 100644
--- a/interface/mmal/openmaxil/mmalomx_core.c
+++ b/interface/mmal/openmaxil/mmalomx_core.c
@@ -281,7 +281,7 @@ static OMX_ERRORTYPE mmalomx_ComponentGetParameter(
{
OMX_PARAM_PORTDEFINITIONTYPE *param = (OMX_PARAM_PORTDEFINITIONTYPE *)pParam;
PARAM_GET_PORT(port, component, param->nPortIndex);
- return mmalil_error_to_mmal(mmalomx_get_port_settings(port, param));
+ return mmalil_error_to_omx(mmalomx_get_port_settings(port, param));
}
return OMX_ErrorNone;
break;
@@ -475,7 +475,7 @@ static OMX_ERRORTYPE mmalomx_ComponentSetParameter(
{
OMX_PARAM_PORTDEFINITIONTYPE *param = (OMX_PARAM_PORTDEFINITIONTYPE *)pParam;
PARAM_GET_PORT(port, component, param->nPortIndex);
- return mmalil_error_to_mmal(mmalomx_set_port_settings(port, param));
+ return mmalil_error_to_omx(mmalomx_set_port_settings(port, param));
}
return OMX_ErrorNone;
break;
diff --git a/interface/mmal/openmaxil/mmalomx_parameters.c b/interface/mmal/openmaxil/mmalomx_parameters.c
index a20a5bd..c4f97d4 100644
--- a/interface/mmal/openmaxil/mmalomx_parameters.c
+++ b/interface/mmal/openmaxil/mmalomx_parameters.c
@@ -170,7 +170,7 @@ static OMX_ERRORTYPE mmalomx_parameter_get_xlat(MMALOMX_COMPONENT_T *component,
if (xlat->fn.custom)
{
- return mmalil_error_to_mmal(xlat->fn.custom(MMALOMX_PARAM_MAPPING_TO_OMX, xlat, mmal_header,
+ return mmalil_error_to_omx(xlat->fn.custom(MMALOMX_PARAM_MAPPING_TO_OMX, xlat, mmal_header,
pParam, mmal_port));
}
@@ -554,14 +554,14 @@ OMX_ERRORTYPE mmalomx_parameter_set(MMALOMX_COMPONENT_T *component,
port->mmal->format->es->video.par.num = param->nX;
port->mmal->format->es->video.par.den = param->nY;
mmal_rational_simplify(&port->mmal->format->es->video.par);
- return mmalil_error_to_mmal(mmal_port_format_commit(port->mmal));
+ return mmalil_error_to_omx(mmal_port_format_commit(port->mmal));
}
case OMX_IndexParamColorSpace:
{
OMX_PARAM_COLORSPACETYPE *param = (OMX_PARAM_COLORSPACETYPE *)pParam;
PARAM_GET_PORT(port, component, param->nPortIndex);
port->mmal->format->es->video.color_space = mmalil_omx_color_space_to_mmal(param->eColorSpace);
- return mmalil_error_to_mmal(mmal_port_format_commit(port->mmal));
+ return mmalil_error_to_omx(mmal_port_format_commit(port->mmal));
}
case OMX_IndexParamBrcmVideoCroppingDisable:
{
diff --git a/interface/mmal/openmaxil/mmalomx_util_params_video.c b/interface/mmal/openmaxil/mmalomx_util_params_video.c
index f088296..83e3724 100644
--- a/interface/mmal/openmaxil/mmalomx_util_params_video.c
+++ b/interface/mmal/openmaxil/mmalomx_util_params_video.c
@@ -56,11 +56,11 @@ static MMAL_STATUS_T mmalomx_param_mapping_displayregion(MMALOMX_PARAM_MAPPING_D
mmal->set = omx->set;
mmal->display_num = omx->num;
mmal->fullscreen = omx->fullscreen;
- mmal->transform = omx->transform;
+ mmal->transform = (MMAL_DISPLAYTRANSFORM_T)omx->transform;
rect_to_mmal(&mmal->dest_rect, &omx->dest_rect);
rect_to_mmal(&mmal->src_rect, &omx->src_rect);
mmal->noaspect = omx->noaspect;
- mmal->mode = omx->mode;
+ mmal->mode = (MMAL_DISPLAYMODE_T)omx->mode;
mmal->pixel_x = omx->pixel_x;
mmal->pixel_y = omx->pixel_y;
mmal->layer = omx->layer;
@@ -72,11 +72,11 @@ static MMAL_STATUS_T mmalomx_param_mapping_displayregion(MMALOMX_PARAM_MAPPING_D
omx->set = mmal->set;
omx->num = mmal->display_num;
omx->fullscreen = mmal->fullscreen;
- omx->transform = mmal->transform;
+ omx->transform = (OMX_DISPLAYTRANSFORMTYPE)mmal->transform;
rect_to_omx(&omx->dest_rect, &mmal->dest_rect);
rect_to_omx(&omx->src_rect, &mmal->src_rect);
omx->noaspect = mmal->noaspect;
- omx->mode = mmal->mode;
+ omx->mode = (OMX_DISPLAYMODETYPE)mmal->mode;
omx->pixel_x = mmal->pixel_x;
omx->pixel_y = mmal->pixel_y;
omx->layer = mmal->layer;
--
2.9.0

View File

@@ -0,0 +1,60 @@
From 6e634184ee4b3d2c98c3213a3931845ec3014754 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 11/13] Fix for framerate with nested composition
frame rate appears irregular and lower than expected when using nested composition.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
interface/khronos/egl/egl_client.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/interface/khronos/egl/egl_client.c b/interface/khronos/egl/egl_client.c
index 024f3ed..83970ec 100644
--- a/interface/khronos/egl/egl_client.c
+++ b/interface/khronos/egl/egl_client.c
@@ -2342,6 +2342,9 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surf)
surface->back_wl_buffer = buffer;
}
+ glFlush();
+ glFinish();
+
RPC_CALL7(eglIntSwapBuffers_impl,
thread,
EGLINTSWAPBUFFERS_ID_V2,
@@ -2353,6 +2356,8 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surf)
RPC_UINT(khrn_platform_get_window_position(surface->win)),
RPC_INT(surface->back_wl_buffer->resource));
+ RPC_FLUSH(thread);
+
surface->front_wl_buffer->in_use = 1;
wl_surface_attach(wl_egl_window->wl_surface,
surface->front_wl_buffer->wl_buffer,
@@ -2360,11 +2365,13 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surf)
wl_surface_damage(wl_egl_window->wl_surface, 0, 0,
surface->width, surface->height);
wl_surface_commit(wl_egl_window->wl_surface);
+ wl_display_flush(wl_display);
while(ret != -1 && surface->back_wl_buffer->in_use)
ret = wl_display_dispatch_queue(wl_display, process->wl_queue);
} else
#endif
+ {
RPC_CALL6(eglIntSwapBuffers_impl,
thread,
EGLINTSWAPBUFFERS_ID,
@@ -2376,6 +2383,7 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surf)
RPC_UINT(khrn_platform_get_window_position(surface->win)));
RPC_FLUSH(thread);
+ }
#ifdef ANDROID
CLIENT_UNLOCK();
--
2.9.0

View File

@@ -0,0 +1,28 @@
From 559209ce15027b3370466ccb56223a7a66d2a40c 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 12/13] build shared library for vchostif
Fixes #149
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
interface/vmcs_host/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/interface/vmcs_host/CMakeLists.txt b/interface/vmcs_host/CMakeLists.txt
index 22949a8..f8c2f2f 100755
--- a/interface/vmcs_host/CMakeLists.txt
+++ b/interface/vmcs_host/CMakeLists.txt
@@ -17,7 +17,7 @@ set(VCHOSTIF_SOURCE
# ${VMCS_TARGET}/vmcs_main.c
# vc_vchi_haud.c
-add_library(vchostif ${VCHOSTIF_SOURCE})
+add_library(vchostif SHARED ${VCHOSTIF_SOURCE})
#add_library(bufman vc_vchi_bufman.c )
--
2.9.0

View File

@@ -0,0 +1,92 @@
From 5b55a152651eece345d9ea1e0e40ecd9fc4ca2d5 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 13/13] implement buffer wrapping interface for dispmanx
Courtesy: Zan Dobersek
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
interface/khronos/ext/egl_wayland.c | 42 +++++++++++++++++++++++++++++++++++++
interface/wayland/dispmanx.xml | 10 +++++++++
2 files changed, 52 insertions(+)
diff --git a/interface/khronos/ext/egl_wayland.c b/interface/khronos/ext/egl_wayland.c
index 5730743..9ef89cd 100644
--- a/interface/khronos/ext/egl_wayland.c
+++ b/interface/khronos/ext/egl_wayland.c
@@ -133,8 +133,50 @@ dispmanx_create_buffer(struct wl_client *client, struct wl_resource *resource,
buffer->handle);
}
+static void
+dispmanx_wrap_buffer(struct wl_client *client, struct wl_resource *resource,
+ uint32_t id, uint32_t handle, int32_t width, int32_t height,
+ uint32_t stride, uint32_t buffer_height, uint32_t format)
+{
+ struct wl_dispmanx_server_buffer *buffer;
+ VC_IMAGE_TYPE_T vc_format = get_vc_format(format);
+ uint32_t dummy;
+
+ if(vc_format == VC_IMAGE_MIN) {
+ wl_resource_post_error(resource,
+ WL_DISPMANX_ERROR_INVALID_FORMAT,
+ "invalid format");
+ return;
+ }
+
+ buffer = calloc(1, sizeof *buffer);
+ if (buffer == NULL) {
+ wl_resource_post_no_memory(resource);
+ return;
+ }
+
+ buffer->handle = handle;
+ buffer->width = width;
+ buffer->height = height;
+ buffer->format = format;
+
+ buffer->resource = wl_resource_create(resource->client, &wl_buffer_interface,
+ 1, id);
+ if (!buffer->resource) {
+ wl_resource_post_no_memory(resource);
+ vc_dispmanx_resource_delete(buffer->handle);
+ free(buffer);
+ return;
+ }
+
+ wl_resource_set_implementation(buffer->resource,
+ (void (**)(void)) &dispmanx_buffer_interface,
+ buffer, destroy_buffer);
+}
+
static const struct wl_dispmanx_interface dispmanx_interface = {
dispmanx_create_buffer,
+ dispmanx_wrap_buffer,
};
static void
diff --git a/interface/wayland/dispmanx.xml b/interface/wayland/dispmanx.xml
index c18626d..11ed1ef 100644
--- a/interface/wayland/dispmanx.xml
+++ b/interface/wayland/dispmanx.xml
@@ -118,6 +118,16 @@
<arg name="buffer" type="object" interface="wl_buffer"/>
<arg name="handle" type="uint"/>
</event>
+
+ <request name="wrap_buffer">
+ <arg name="id" type="new_id" interface="wl_buffer"/>
+ <arg name="handle" type="uint"/>
+ <arg name="width" type="int"/>
+ <arg name="height" type="int"/>
+ <arg name="stride" type="uint"/>
+ <arg name="buffer_height" type="uint"/>
+ <arg name="format" type="uint"/>
+ </request>
</interface>
</protocol>
--
2.9.0

View File

@@ -2,40 +2,74 @@ DESCRIPTION = "This repository contains the source code for the ARM side \
libraries used on Raspberry Pi. These typically are installed in /opt/vc/lib \ libraries used on Raspberry Pi. These typically are installed in /opt/vc/lib \
and includes source for the ARM side code to interface to: EGL, mmal, GLESv2,\ and includes source for the ARM side code to interface to: EGL, mmal, GLESv2,\
vcos, openmaxil, vchiq_arm, bcm_host, WFC, OpenVG." vcos, openmaxil, vchiq_arm, bcm_host, WFC, OpenVG."
LICENSE = "Broadcom" LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENCE;md5=957f6640d5e2d2acfce73a36a56cb32f" LIC_FILES_CHKSUM = "file://LICENCE;md5=0448d6488ef8cc380632b1569ee6d196"
PR = "r4" PR = "r5"
PROVIDES = "virtual/libgles2 \ PROVIDES = "virtual/libgles2 \
virtual/egl" virtual/egl"
RPROVIDES_${PN} += "libgles2 libgl"
COMPATIBLE_MACHINE = "raspberrypi" COMPATIBLE_MACHINE = "raspberrypi"
SRCBRANCH = "master" SRCBRANCH = "master"
SRCFORK = "raspberrypi" SRCFORK = "raspberrypi"
SRCREV = "85441185e653347e6b3c2bbc7494f5e29a6ca4a2" SRCREV = "0147f98bdd4fdc822d25d8a70cf5adc5adb89096"
SRC_URI = "git://github.com/${SRCFORK}/userland.git;protocol=git;branch=${SRCBRANCH} \ SRC_URI = "\
" git://github.com/${SRCFORK}/userland.git;protocol=git;branch=${SRCBRANCH} \
file://0001-Allow-applications-to-set-next-resource-handle.patch \
file://0002-wayland-Add-support-for-the-Wayland-winsys.patch \
file://0003-wayland-Add-Wayland-example.patch \
file://0004-wayland-egl-Add-bcm_host-to-dependencies.patch \
file://0005-interface-remove-faulty-assert-to-make-weston-happy-.patch \
file://0006-zero-out-wl-buffers-in-egl_surface_free.patch \
file://0007-initialize-front-back-wayland-buffers.patch \
file://0008-Remove-RPC_FLUSH.patch \
file://0009-fix-cmake-dependency-race.patch \
file://0010-Fix-enum-conversion-warnings.patch \
file://0011-Fix-for-framerate-with-nested-composition.patch \
file://0012-build-shared-library-for-vchostif.patch \
file://0013-implement-buffer-wrapping-interface-for-dispmanx.patch \
"
S = "${WORKDIR}/git" S = "${WORKDIR}/git"
inherit cmake inherit cmake pkgconfig
EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release -DCMAKE_EXE_LINKER_FLAGS='-Wl,--no-as-needed'" EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release -DCMAKE_EXE_LINKER_FLAGS='-Wl,--no-as-needed' \
-DVMCS_INSTALL_PREFIX=${exec_prefix} \
"
# The compiled binaries don't provide sonames. PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)}"
SOLIBS = "${SOLIBSDEV}"
do_install_append() { PACKAGECONFIG[wayland] = "-DBUILD_WAYLAND=TRUE -DWAYLAND_SCANNER_EXECUTABLE:FILEPATH=${STAGING_BINDIR_NATIVE}/wayland-scanner,,wayland-native wayland"
mkdir -p ${D}/${prefix}
mv ${D}/opt/vc/* ${D}/${prefix} CFLAGS_append = " -fPIC"
rm -rf ${D}/opt
do_install_append () {
for f in `find ${D}${includedir}/interface/vcos/ -name "*.h"`; do
sed -i 's/include "vcos_platform.h"/include "pthreads\/vcos_platform.h"/g' ${f}
sed -i 's/include "vcos_futex_mutex.h"/include "pthreads\/vcos_futex_mutex.h"/g' ${f}
sed -i 's/include "vcos_platform_types.h"/include "pthreads\/vcos_platform_types.h"/g' ${f}
done
} }
FILES_${PN} += "${libdir}/*${SOLIBS}" # Shared libs from userland package build aren't versioned, so we need
FILES_${PN}-dev = "${includedir} \ # to force the .so files into the runtime package (and keep them
# out of -dev package).
FILES_SOLIBSDEV = ""
INSANE_SKIP_${PN} += "dev-so"
FILES_${PN} += " \
${libdir}/*.so \
${libdir}/plugins"
FILES_${PN}-dev += "${includedir} \
${prefix}/src" ${prefix}/src"
FILES_${PN}-doc += "${datadir}/install" FILES_${PN}-doc += "${datadir}/install"
FILES_${PN}-dbg += "${libdir}/plugins/.debug"
PACKAGE_ARCH = "${MACHINE_ARCH}" PACKAGE_ARCH = "${MACHINE_ARCH}"
RDEPENDS_${PN} += "bash"

View File

@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENCE;md5=86e53f5f5909ee66900418028de11780"
PROVIDES = "virtual/libgles2 virtual/egl" PROVIDES = "virtual/libgles2 virtual/egl"
COMPATIBLE_MACHINE = "raspberrypi" COMPATIBLE_MACHINE = "raspberrypi"
include ../common/firmware.inc include recipes-bsp/common/firmware.inc
SRC_URI += " \ SRC_URI += " \
file://egl.pc \ file://egl.pc \
@@ -49,6 +49,8 @@ INITSCRIPT_PARAMS = "start 03 S ."
FILES_${PN} = "${bindir}/* \ FILES_${PN} = "${bindir}/* \
${sbindir}/* \ ${sbindir}/* \
${libdir}/lib*.so \ ${libdir}/lib*.so \
${sysconfdir}/init.d" ${sysconfdir}/init.d \
${libdir}/plugins"
FILES_${PN}-dev = "${libdir}/pkgconfig \ FILES_${PN}-dev = "${libdir}/pkgconfig \
${includedir}" ${includedir}"
FILES_${PN}-dbg += "${libdir}/plugins/.debug"

View File

@@ -0,0 +1,4 @@
EXTRA_OECONF_append_rpi = "\
--enable-rpi-compositor \
WESTON_NATIVE_BACKEND=rpi-backend.so \
"

View File

@@ -0,0 +1,7 @@
EXTRA_OECONF += "--enable-rpi-compositor \
--disable-resize-optimization \
--disable-setuid-install \
--disable-xwayland-test \
--disable-simple-egl-clients \
WESTON_NATIVE_BACKEND=rpi-backend.so \
"

View File

@@ -0,0 +1,5 @@
Section "Device"
Identifier "Adafruit PiTFT"
Driver "fbdev"
Option "fbdev" "/dev/fb1"
EndSection

View File

@@ -0,0 +1,6 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "stmpe-ts"
Option "Calibration" "3800 200 200 3800"
Option "SwapAxes" "1"
EndSection

View File

@@ -1,10 +1,19 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI_append_raspberrypi = " file://xorg.conf.d/10-evdev.conf " SRC_URI_append_rpi = " file://xorg.conf.d/10-evdev.conf \
file://xorg.conf.d/98-pitft.conf \
file://xorg.conf.d/99-calibration.conf \
"
do_install_append_raspberrypi () { do_install_append_rpi () {
install -d ${D}/${sysconfdir}/X11/xorg.conf.d/ install -d ${D}/${sysconfdir}/X11/xorg.conf.d/
install -m 0644 ${WORKDIR}/xorg.conf.d/* ${D}/${sysconfdir}/X11/xorg.conf.d/ install -m 0644 ${WORKDIR}/xorg.conf.d/10-evdev.conf ${D}/${sysconfdir}/X11/xorg.conf.d/
PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}"
if [ "${PITFT}" = "1" ]; then
install -m 0644 ${WORKDIR}/xorg.conf.d/98-pitft.conf ${D}/${sysconfdir}/X11/xorg.conf.d/
install -m 0644 ${WORKDIR}/xorg.conf.d/99-calibration.conf ${D}/${sysconfdir}/X11/xorg.conf.d/
fi
} }
FILES_${PN}_raspberrypi += "${sysconfdir}/X11/xorg.conf ${sysconfdir}/X11/xorg.conf.d/*" FILES_${PN}_rpi += "${sysconfdir}/X11/xorg.conf ${sysconfdir}/X11/xorg.conf.d/*"

View File

@@ -0,0 +1,205 @@
SOFTWARE LICENSE AGREEMENT
Unless you and Broadcom Corporation (“Broadcom”) execute a separate written
software license agreement governing use of the accompanying software, this
software is licensed to you under the terms of this Software License Agreement
(“Agreement”).
ANY USE, REPRODUCTION OR DISTRIBUTION OF THE SOFTWARE CONSTITUTES YOUR
ACCEPTANCE OF THIS AGREEMENT.
1. DEFINITIONS.
1.1. “Broadcom Product” means any of the proprietary integrated circuit
product(s) sold by Broadcom with which the Software was designed to be used, or
their successors.
1.2. “Licensee” means you or if you are accepting on behalf of an entity
then the entity and its affiliates exercising rights under, and complying with
all of the terms of this Agreement.
1.3. “Software” shall mean that software made available by Broadcom to
Licensee in binary code form with this Agreement.
2. LICENSE GRANT; OWNERSHIP
2.1. License Grants. Subject to the terms and conditions of this Agreement,
Broadcom hereby grants to Licensee a non-exclusive, non-transferable,
royalty-free license (i) to use and integrate the Software in conjunction with
any other software; and (ii) to reproduce and distribute the Software complete,
unmodified and as provided by Broadcom, and only for use with a Broadcom
Product.
2.2. Restriction on Modification. Licensee may not make any modifications
to the Software.
2.3. Restriction on Distribution. Licensee shall only distribute the
Software under the terms of this Agreement and a copy of this Agreement
accompanies such distribution.
2.4. Proprietary Notices. Licensee shall not remove, efface or obscure any
copyright or trademark notices from the Software. Licensee shall include
reproductions of the Broadcom copyright notice with each copy of the Software,
except where such Software is embedded in a manner not readily accessible to
the end user. Licensee acknowledges that any symbols, trademarks, tradenames,
and service marks adopted by Broadcom to identify the Software belong to
Broadcom and that Licensee shall have no rights therein.
2.5. Ownership. Broadcom shall retain all right, title and interest,
including all intellectual property rights, in and to the Software. Licensee
hereby covenants that it will not assert any claim that the Software created by
or for Broadcom infringe any intellectual property right owned or controlled by
Licensee; provided however, the foregoing shall not apply in case the Agreement
is terminated.
2.6. No Other Rights Granted; Restrictions. Apart from the license rights
expressly set forth in this Agreement, Broadcom does not grant and Licensee
does not receive any ownership right, title or interest nor any security
interest or other interest in any intellectual property rights relating to the
Software, nor in any copy of any part of the foregoing. No license is granted
to Licensee in any human readable code of the Software (source code). Licensee
shall not (i) use, license, sell or otherwise distribute the Software except as
provided in this Agreement, (ii) attempt to modify in any way, reverse
engineer, decompile or disassemble any portion of the Software; or (iii) use
the Software or other material in violation of any applicable law or
regulation, including but not limited to any regulatory agency, such as FCC,
rules.
3. NO WARRANTY OR SUPPORT
3.1. No Warranty. THE SOFTWARE IS OFFERED “AS IS,” AND BROADCOM GRANTS AND
LICENSEE RECEIVES NO WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, BY STATUTE,
COMMUNICATION OR CONDUCT WITH LICENSEE, OR OTHERWISE. BROADCOM SPECIFICALLY
DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A SPECIFIC
PURPOSE OR NONINFRINGEMENT CONCERNING THE SOFTWARE OR ANY UPGRADES TO OR
DOCUMENTATION FOR THE SOFTWARE. WITHOUT LIMITATION OF THE ABOVE, BROADCOM
GRANTS NO WARRANTY THAT THE SOFTWARE IS ERROR-FREE OR WILL OPERATE WITHOUT
INTERRUPTION, AND GRANTS NO WARRANTY REGARDING ITS USE OR THE RESULTS THEREFROM
INCLUDING, WITHOUT LIMITATION, ITS CORRECTNESS, ACCURACY OR RELIABILITY.
3.2. No Support. Nothing in this agreement shall obligate Broadcom to
provide any support for the Software. Broadcom may, but shall be under no
obligation to, correct any defects in the Software and/or provide updates to
licensees of the Software. Licensee shall make reasonable efforts to promptly
report to Broadcom any defects it finds in the Software, as an aid to creating
improved revisions of the Software.
3.3. Dangerous Applications. The Software is not designed, intended, or
certified for use in components of systems intended for the operation of
weapons, weapons systems, nuclear installations, means of mass transportation,
aviation, life-support computers or equipment (including resuscitation
equipment and surgical implants), pollution control, hazardous substances
management, or for any other dangerous application in which the failure of the
Software could create a situation where personal injury or death may occur. 
Licensee understands that use of the Software in such applications is fully at
the risk of Licensee.
4. TERM AND TERMINATION
4.1. Termination. This Agreement will automatically terminate if Licensee
fails to comply with any of the terms and conditions hereof. In such event,
Licensee must destroy all copies of the Software and all of its component
parts.
4.2. Effect Of Termination. Upon any termination of this Agreement, the
rights and licenses granted to Licensee under this Agreement shall immediately
terminate.
4.3. Survival. The rights and obligations under this Agreement which by
their nature should survive termination will remain in effect after expiration
or termination of this Agreement.
5. CONFIDENTIALITY
5.1. Obligations. Licensee acknowledges and agrees that any documentation
relating to the Software, and any other information (if such other information
is identified as confidential or should be recognized as confidential under the
circumstances) provided to Licensee by Broadcom hereunder (collectively,
“Confidential Information”) constitute the confidential and proprietary
information of Broadcom, and that Licensees protection thereof is an essential
condition to Licensees use and possession of the Software. Licensee shall
retain all Confidential Information in strict confidence and not disclose it to
any third party or use it in any way except under a written agreement with
terms and conditions at least as protective as the terms of this Section.
Licensee will exercise at least the same amount of diligence in preserving the
secrecy of the Confidential Information as it uses in preserving the secrecy of
its own most valuable confidential information, but in no event less than
reasonable diligence. Information shall not be considered Confidential
Information if and to the extent that it: (i) was in the public domain at the
time it was disclosed or has entered the public domain through no fault of
Licensee; (ii) was known to Licensee, without restriction, at the time of
disclosure as proven by the files of Licensee in existence at the time of
disclosure; or (iii) becomes known to Licensee, without restriction, from a
source other than Broadcom without breach of this Agreement by Licensee and
otherwise not in violation of Broadcoms rights.
5.2. Return of Confidential Information. Notwithstanding the foregoing, all
documents and other tangible objects containing or representing Broadcom
Confidential Information and all copies thereof which are in the possession of
Licensee shall be and remain the property of Broadcom, and shall be promptly
returned to Broadcom upon written request by Broadcom or upon termination of
this Agreement.
6. LIMITATION OF LIABILITY TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO
EVENT SHALL BROADCOM OR ANY OF BROADCOMS LICENSORS HAVE ANY LIABILITY FOR ANY
INDIRECT, INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES, HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER FOR BREACH OF CONTRACT, TORT (INCLUDING
NEGLIGENCE) OR OTHERWISE, ARISING OUT OF THIS AGREEMENT, INCLUDING BUT NOT
LIMITED TO LOSS OF PROFITS, EVEN IF SUCH PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES. IN NO EVENT WILL BROADCOMS LIABILITY WHETHER IN
CONTRACT, TORT (INCLUDING NEGLIGENCE), OR OTHERWISE, EXCEED THE AMOUNT PAID BY
LICENSEE FOR SOFTWARE UNDER THIS AGREEMENT. THESE LIMITATIONS SHALL APPLY
NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF ANY LIMITED REMEDY.
7. MISCELLANEOUS
7.1. Export Regulations. YOU UNDERSTAND AND AGREE THAT THE SOFTWARE IS
SUBJECT TO UNITED STATES AND OTHER APPLICABLE EXPORT-RELATED LAWS AND
REGULATIONS AND THAT YOU MAY NOT EXPORT, RE-EXPORT OR TRANSFER THE SOFTWARE OR
ANY DIRECT PRODUCT OF THE SOFTWARE EXCEPT AS PERMITTED UNDER THOSE LAWS.
WITHOUT LIMITING THE FOREGOING, EXPORT, RE-EXPORT OR TRANSFER OF THE SOFTWARE
TO CUBA, IRAN, NORTH KOREA, SUDAN AND SYRIA IS PROHIBITED.
7.2 Assignment. This Agreement shall be binding upon and inure to the
benefit of the parties and their respective successors and assigns, provided,
however that Licensee may not assign this Agreement or any rights or obligation
hereunder, directly or indirectly, by operation of law or otherwise, without
the prior written consent of Broadcom, and any such attempted assignment shall
be void. Notwithstanding the foregoing, Licensee may assign this Agreement to
a successor to all or substantially all of its business or assets to which this
Agreement relates that is not a competitor of Broadcom.
7.3. Governing Law; Venue. This Agreement shall be governed by the laws of
California without regard to any conflict-of-laws rules, and the United Nations
Convention on Contracts for the International Sale of Goods is hereby excluded.
The sole jurisdiction and venue for actions related to the subject matter
hereof shall be the state and federal courts located in the County of Orange,
California, and both parties hereby consent to such jurisdiction and venue.
7.4. Severability. All terms and provisions of this Agreement shall, if
possible, be construed in a manner which makes them valid, but in the event any
term or provision of this Agreement is found by a court of competent
jurisdiction to be illegal or unenforceable, the validity or enforceability of
the remainder of this Agreement shall not be affected if the illegal or
unenforceable provision does not materially affect the intent of this
Agreement. If the illegal or unenforceable provision materially affects the
intent of the parties to this Agreement, this Agreement shall become
terminated.
7.5. Equitable Relief. Licensee hereby acknowledges that its breach of this
Agreement would cause irreparable harm and significant injury to Broadcom that
may be difficult to ascertain and that a remedy at law would be inadequate.
Accordingly, Licensee agrees that Broadcom shall have the right to seek and
obtain immediate injunctive relief to enforce obligations under the Agreement
in addition to any other rights and remedies it may have.
7.6. Waiver. The waiver of, or failure to enforce, any breach or default
hereunder shall not constitute the waiver of any other or subsequent breach or
default.
7.7. Entire Agreement. This Agreement sets forth the entire Agreement
between the parties and supersedes any and all prior proposals, agreements and
representations between them, whether written or oral concerning the Software.
This Agreement may be changed only by mutual agreement of the parties in
writing.

View File

@@ -0,0 +1,66 @@
# NVRAM file for BCM943430WLPTH
# 2.4 GHz, 20 MHz BW mode
# The following parameter values are just placeholders, need to be updated.
manfid=0x2d0
prodid=0x0727
vendid=0x14e4
devid=0x43e2
boardtype=0x0727
boardrev=0x1101
boardnum=22
macaddr=00:90:4c:c5:12:38
sromrev=11
boardflags=0x00404201
boardflags3=0x08000000
xtalfreq=37400
nocrc=1
ag0=255
aa2g=1
ccode=ALL
pa0itssit=0x20
extpagain2g=0
#PA parameters for 2.4GHz, measured at CHIP OUTPUT
pa2ga0=-168,7161,-820
AvVmid_c0=0x0,0xc8
cckpwroffset0=5
# PPR params
maxp2ga0=84
txpwrbckof=6
cckbw202gpo=0
legofdmbw202gpo=0x66111111
mcsbw202gpo=0x77711111
propbw202gpo=0xdd
# OFDM IIR :
ofdmdigfilttype=18
ofdmdigfilttypebe=18
# PAPD mode:
papdmode=1
papdvalidtest=1
pacalidx2g=42
papdepsoffset=-22
papdendidx=58
# LTECX flags
ltecxmux=0
ltecxpadnum=0x0102
ltecxfnsel=0x44
ltecxgcigpio=0x01
il0macaddr=00:90:4c:c5:12:38
wl0id=0x431b
deadman_to=0xffffffff
# muxenab: 0x1 for UART enable, 0x2 for GPIOs, 0x8 for JTAG
muxenab=0x1
# CLDO PWM voltage settings - 0x4 - 1.1 volt
#cldo_pwm=0x4
#VCO freq 326.4MHz
spurconfig=0x3
edonthd20l=-75
edoffthd20ul=-80

View File

@@ -0,0 +1,33 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
LICENSE_append = " & Firmware-broadcom_brcm80211"
LIC_FILES_CHKSUM_append = " file://${WORKDIR}/LICENSE.broadcom_brcm80211;md5=8cba1397cda6386db37210439a0da3eb"
NO_GENERIC_LICENSE[Firmware-broadcom_brcm80211] = "LICENSE.broadcom_brcm80211"
SRC_URI_append = " \
file://brcmfmac43430-sdio.bin \
file://brcmfmac43430-sdio.txt \
file://LICENSE.broadcom_brcm80211 \
"
do_install_append() {
cp ${WORKDIR}/brcmfmac43430-sdio.* ${D}/lib/firmware/brcm/
cp ${WORKDIR}/LICENSE.broadcom_brcm80211 ${D}/lib/firmware/
}
PACKAGES =+ "${PN}-brcm43430 ${PN}-brcm43430-license"
LICENSE_${PN}-brcm43430 = "Firmware-broadcom_brcm80211"
FILES_${PN}-brcm43430-license = "/lib/firmware/LICENSE.broadcom_brcm80211"
FILES_${PN}-brcm43430 = " \
/lib/firmware/brcm/brcmfmac43430-sdio.bin \
/lib/firmware/brcm/brcmfmac43430-sdio.txt \
"
RDEPENDS_${PN}-brcm43430 += "${PN}-brcm43430-license"
ALTERNATIVE_LINK_NAME[brcmfmac-sdio.bin] = "/lib/firmware/brcm/brcmfmac-sdio.bin"
ALTERNATIVE_TARGET_linux-firmware-brcm43430[brcmfmac-sdio.bin] = "/lib/firmware/brcm/brcmfmac43430-sdio.bin"
ALTERNATIVE_linux-firmware-brcm43430 = "brcmfmac-sdio.bin"

View File

@@ -0,0 +1,110 @@
From 2f44861e2a2d651a9aa62a75343a032fee33e93b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petter=20Mab=C3=A4cker?= <petter@technux.se>
Date: Fri, 8 Jan 2016 09:02:44 +0100
Subject: [PATCH] dts: add overlay for pitft22 in linux 3.18
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Upstream-Status: Pending
Add the pitft22 overlay from adafruit Adafruit-Pi-Kernel-o-Matic repo:
https://github.com/adafruit/Adafruit-Pi-Kernel-o-Matic
Signed-off-by: Petter Mabäcker <petter@technux.se>
---
arch/arm/boot/dts/overlays/Makefile | 1 +
arch/arm/boot/dts/overlays/pitft22-overlay.dts | 69 ++++++++++++++++++++++++++
2 files changed, 70 insertions(+)
create mode 100755 arch/arm/boot/dts/overlays/pitft22-overlay.dts
diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile
index c766616..1eaaf81 100644
--- a/arch/arm/boot/dts/overlays/Makefile
+++ b/arch/arm/boot/dts/overlays/Makefile
@@ -27,6 +27,7 @@ dtb-$(RPI_DT_OVERLAYS) += mcp2515-can0-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += mmc-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += mz61581-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += piscreen-overlay.dtb
+dtb-$(RPI_DT_OVERLAYS) += pitft22-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += pitft28-resistive-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += pps-gpio-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += rpi-dac-overlay.dtb
diff --git a/arch/arm/boot/dts/overlays/pitft22-overlay.dts b/arch/arm/boot/dts/overlays/pitft22-overlay.dts
new file mode 100755
index 0000000..894ba22
--- /dev/null
+++ b/arch/arm/boot/dts/overlays/pitft22-overlay.dts
@@ -0,0 +1,69 @@
+/*
+ * Device Tree overlay for pitft by Adafruit
+ *
+ */
+
+/dts-v1/;
+/plugin/;
+
+/ {
+ compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
+
+ fragment@0 {
+ target = <&spi0>;
+ __overlay__ {
+ status = "okay";
+
+ spidev@0{
+ status = "disabled";
+ };
+
+ spidev@1{
+ status = "disabled";
+ };
+ };
+ };
+
+ fragment@1 {
+ target = <&gpio>;
+ __overlay__ {
+ pitft_pins: pitft_pins {
+ brcm,pins = <25>;
+ brcm,function = <1>; /* out */
+ brcm,pull = <0>; /* none */
+ };
+ };
+ };
+
+ fragment@2 {
+ target = <&spi0>;
+ __overlay__ {
+ /* needed to avoid dtc warning */
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pitft: pitft@0{
+ compatible = "ilitek,ili9340";
+ reg = <0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pitft_pins>;
+
+ spi-max-frequency = <32000000>;
+ rotate = <90>;
+ fps = <25>;
+ bgr;
+ buswidth = <8>;
+ dc-gpios = <&gpio 25 0>;
+ debug = <0>;
+ };
+
+ };
+ };
+
+ __overrides__ {
+ speed = <&pitft>,"spi-max-frequency:0";
+ rotate = <&pitft>,"rotate:0";
+ fps = <&pitft>,"fps:0";
+ debug = <&pitft>,"debug:0";
+ };
+};
--
1.9.1

View File

@@ -0,0 +1,110 @@
From a28bd410022b32a64e208f04b45add6326990332 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petter=20Mab=C3=A4cker?= <petter@technux.se>
Date: Fri, 8 Jan 2016 09:02:44 +0100
Subject: [PATCH] dts: add overlay for pitft22
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Upstream-Status: Pending
Add the pitft22 overlay from adafruit Adafruit-Pi-Kernel-o-Matic repo:
https://github.com/adafruit/Adafruit-Pi-Kernel-o-Matic
Signed-off-by: Petter Mabäcker <petter@technux.se>
---
arch/arm/boot/dts/overlays/Makefile | 1 +
arch/arm/boot/dts/overlays/pitft22-overlay.dts | 69 ++++++++++++++++++++++++++
2 files changed, 70 insertions(+)
create mode 100755 arch/arm/boot/dts/overlays/pitft22-overlay.dts
diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile
index 1a60e9c..a2535a2 100644
--- a/arch/arm/boot/dts/overlays/Makefile
+++ b/arch/arm/boot/dts/overlays/Makefile
@@ -37,6 +37,7 @@ dtb-$(RPI_DT_OVERLAYS) += mmc-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += mz61581-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += piscreen-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += piscreen2r-overlay.dtb
+dtb-$(RPI_DT_OVERLAYS) += pitft22-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += pitft28-capacitive-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += pitft28-resistive-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += pps-gpio-overlay.dtb
diff --git a/arch/arm/boot/dts/overlays/pitft22-overlay.dts b/arch/arm/boot/dts/overlays/pitft22-overlay.dts
new file mode 100755
index 0000000..894ba22
--- /dev/null
+++ b/arch/arm/boot/dts/overlays/pitft22-overlay.dts
@@ -0,0 +1,69 @@
+/*
+ * Device Tree overlay for pitft by Adafruit
+ *
+ */
+
+/dts-v1/;
+/plugin/;
+
+/ {
+ compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
+
+ fragment@0 {
+ target = <&spi0>;
+ __overlay__ {
+ status = "okay";
+
+ spidev@0{
+ status = "disabled";
+ };
+
+ spidev@1{
+ status = "disabled";
+ };
+ };
+ };
+
+ fragment@1 {
+ target = <&gpio>;
+ __overlay__ {
+ pitft_pins: pitft_pins {
+ brcm,pins = <25>;
+ brcm,function = <1>; /* out */
+ brcm,pull = <0>; /* none */
+ };
+ };
+ };
+
+ fragment@2 {
+ target = <&spi0>;
+ __overlay__ {
+ /* needed to avoid dtc warning */
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pitft: pitft@0{
+ compatible = "ilitek,ili9340";
+ reg = <0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pitft_pins>;
+
+ spi-max-frequency = <32000000>;
+ rotate = <90>;
+ fps = <25>;
+ bgr;
+ buswidth = <8>;
+ dc-gpios = <&gpio 25 0>;
+ debug = <0>;
+ };
+
+ };
+ };
+
+ __overrides__ {
+ speed = <&pitft>,"spi-max-frequency:0";
+ rotate = <&pitft>,"rotate:0";
+ fps = <&pitft>,"fps:0";
+ debug = <&pitft>,"debug:0";
+ };
+};
--
1.9.1

View File

@@ -0,0 +1,31 @@
The code using it also ifdef'ed with 0, anyyd gcc 6
complains
error: 'sm_cache_map_vector' defined but not used
The code using it also ifdef'ed out
Upstream-status: Denied [https://github.com/raspberrypi/linux/pull/1528]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
drivers/char/broadcom/vc_sm/vmcs_sm.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/char/broadcom/vc_sm/vmcs_sm.c
+++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c
@@ -197,12 +197,14 @@ struct SM_STATE_T {
static struct SM_STATE_T *sm_state;
static int sm_inited;
+#if 0
static const char *const sm_cache_map_vector[] = {
"(null)",
"host",
"videocore",
"host+videocore",
};
+#endif
/* ---- Private Function Prototypes -------------------------------------- */

View File

@@ -0,0 +1,78 @@
Fix compile with GCC6
Upstream-status: Denied [https://github.com/raspberrypi/linux/pull/1528]
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Index: source/include/linux/compiler-gcc6.h
===================================================================
--- /dev/null
+++ source/include/linux/compiler-gcc6.h
@@ -0,0 +1,67 @@
+#ifndef __LINUX_COMPILER_H
+#error "Please don't include <linux/compiler-gcc5.h> directly, include <linux/compiler.h> instead."
+#endif
+
+#define __used __attribute__((__used__))
+#define __must_check __attribute__((warn_unused_result))
+#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
+
+/* Mark functions as cold. gcc will assume any path leading to a call
+ to them will be unlikely. This means a lot of manual unlikely()s
+ are unnecessary now for any paths leading to the usual suspects
+ like BUG(), printk(), panic() etc. [but let's keep them for now for
+ older compilers]
+
+ Early snapshots of gcc 4.3 don't support this and we can't detect this
+ in the preprocessor, but we can live with this because they're unreleased.
+ Maketime probing would be overkill here.
+
+ gcc also has a __attribute__((__hot__)) to move hot functions into
+ a special section, but I don't see any sense in this right now in
+ the kernel context */
+#define __cold __attribute__((__cold__))
+
+#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
+
+#ifndef __CHECKER__
+# define __compiletime_warning(message) __attribute__((warning(message)))
+# define __compiletime_error(message) __attribute__((error(message)))
+#endif /* __CHECKER__ */
+
+/*
+ * Mark a position in code as unreachable. This can be used to
+ * suppress control flow warnings after asm blocks that transfer
+ * control elsewhere.
+ *
+ * Early snapshots of gcc 4.5 don't support this and we can't detect
+ * this in the preprocessor, but we can live with this because they're
+ * unreleased. Really, we need to have autoconf for the kernel.
+ */
+#define unreachable() __builtin_unreachable()
+
+/* Mark a function definition as prohibited from being cloned. */
+#define __noclone __attribute__((__noclone__))
+
+/*
+ * Tell the optimizer that something else uses this function or variable.
+ */
+#define __visible __attribute__((externally_visible))
+
+/*
+ * GCC 'asm goto' miscompiles certain code sequences:
+ *
+ * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670
+ *
+ * Work it around via a compiler barrier quirk suggested by Jakub Jelinek.
+ *
+ * (asm goto is automatically volatile - the naming reflects this.)
+ */
+#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
+
+#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP
+#define __HAVE_BUILTIN_BSWAP32__
+#define __HAVE_BUILTIN_BSWAP64__
+#define __HAVE_BUILTIN_BSWAP16__
+#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */
+
+#define KASAN_ABI_VERSION 4

View File

@@ -1,4 +1,5 @@
require linux.inc require linux-rpi.inc
inherit linux-raspberrypi-base
DESCRIPTION = "Linux Kernel for Raspberry Pi" DESCRIPTION = "Linux Kernel for Raspberry Pi"
SECTION = "kernel" SECTION = "kernel"
@@ -11,16 +12,31 @@ SRC_URI += " \
COMPATIBLE_MACHINE = "raspberrypi" COMPATIBLE_MACHINE = "raspberrypi"
PV_append = "+git${SRCREV}" PE = "1"
PV = "${LINUX_VERSION}+git${SRCPV}"
# NOTE: For now we pull in the default config from the RPi kernel GIT tree. # NOTE: For now we pull in the default config from the RPi kernel GIT tree.
KERNEL_DEFCONFIG = "bcmrpi_defconfig" KERNEL_DEFCONFIG_raspberrypi ?= "bcmrpi_defconfig"
KERNEL_DEFCONFIG_raspberrypi2 ?= "bcm2709_defconfig"
# CMDLINE for raspberrypi # CMDLINE for raspberrypi
CMDLINE_raspberrypi = "dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,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)}'
UDEV_GE_141 ?= "1" UDEV_GE_141 ?= "1"
KERNEL_MODULE_AUTOLOAD += "${@bb.utils.contains("MACHINE_FEATURES", "pitft28r", "stmpe-ts", "", d)}"
# 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))
d.setVar("KERNEL_DEVICETREE", kerneldt)
}
do_kernel_configme_prepend() { do_kernel_configme_prepend() {
install -m 0644 ${S}/arch/${ARCH}/configs/${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig || die "No default configuration for ${MACHINE} / ${KERNEL_DEFCONFIG} available." install -m 0644 ${S}/arch/${ARCH}/configs/${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig || die "No default configuration for ${MACHINE} / ${KERNEL_DEFCONFIG} available."
} }
@@ -32,5 +48,22 @@ do_install_prepend() {
do_deploy_append() { do_deploy_append() {
# Deploy cmdline.txt # Deploy cmdline.txt
install -d ${DEPLOYDIR}/bcm2835-bootfiles install -d ${DEPLOYDIR}/bcm2835-bootfiles
echo "${CMDLINE}" > ${DEPLOYDIR}/bcm2835-bootfiles/cmdline.txt PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}"
if [ ${PITFT} = "1" ]; then
PITFT_PARAMS="fbcon=map:10 fbcon=font:VGA8x8"
fi
echo "${CMDLINE}${PITFT_PARAMS}" > ${DEPLOYDIR}/bcm2835-bootfiles/cmdline.txt
}
do_bundle_initramfs_append() {
if [ ! -z "${INITRAMFS_IMAGE}" -a x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; then
if test "x${KERNEL_IMAGETYPE}" != "xuImage" ; then
if test -n "${KERNEL_DEVICETREE}"; then
# Add RPi bootloader trailer to kernel image to enable DeviceTree support
for type in ${KERNEL_IMAGETYPES} ; do
${STAGING_BINDIR_NATIVE}/mkknlimg --dtok ${KERNEL_OUTPUT_DIR}/$type.initramfs ${KERNEL_OUTPUT_DIR}/$type.initramfs
done
fi
fi
fi
} }

View File

@@ -1,32 +0,0 @@
Fix i2c timing errors.
When Transmitting: Make SDA valid quarter of a cycle after the falling edge of SCL.
When Receiving: Sample SDA Quarter of a cycle after the rising edge of SCL.
Upstream-Status: Pending
RP 2013/04/21
Index: git/drivers/i2c/busses/i2c-bcm2708.c
===================================================================
--- git.orig/drivers/i2c/busses/i2c-bcm2708.c 2013-01-06 17:15:00.754954587 +0000
+++ git/drivers/i2c/busses/i2c-bcm2708.c 2013-01-06 17:50:09.794905741 +0000
@@ -150,6 +150,7 @@
unsigned long bus_hz;
u32 cdiv;
u32 c = BSC_C_I2CEN | BSC_C_INTD | BSC_C_ST | BSC_C_CLEAR_1;
+ u32 cdel;
bus_hz = clk_get_rate(bi->clk);
cdiv = bus_hz / baudrate;
@@ -163,6 +164,10 @@
bcm2708_wr(bi, BSC_A, bi->msg->addr);
bcm2708_wr(bi, BSC_DLEN, bi->msg->len);
bcm2708_wr(bi, BSC_C, c);
+
+ cdel = (cdiv / 4) & 0xffff;
+ cdel = cdel << 16 | cdel;
+ bcm2708_wr(bi, BSC_DEL, cdel);
}
static irqreturn_t bcm2708_i2c_interrupt(int irq, void *dev_id)

View File

@@ -1,6 +0,0 @@
SRCREV = "1b49b450222df26e4abf7abb6d9302f72b2ed386"
SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.10.y \
file://sl030raspberrypii2ckernel.patch \
"
require linux-raspberrypi.inc

View File

@@ -1,6 +0,0 @@
SRCREV = "f03cd5e1012d3fe8314a944879308cf0f3d9e29b"
SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.12.y \
file://sl030raspberrypii2ckernel.patch \
"
require linux-raspberrypi.inc

View File

@@ -1,6 +0,0 @@
SRCREV = "377c82aa1d31b37f1096096b0e4c65beb0bc5c49"
SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.16.y \
file://sl030raspberrypii2ckernel.patch \
"
require linux-raspberrypi.inc

View File

@@ -0,0 +1,14 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"
LINUX_VERSION ?= "3.18.16"
SRCREV = "1bb18c8f721ef674a447f3622273f2e2de7a205c"
SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.18.y \
file://0001-dts-add-overlay-for-pitft22.patch \
"
require linux-raspberrypi.inc
# Create missing out of tree 'overlays' directory prior to install step
do_compile_prepend() {
mkdir -p ${B}/arch/arm/boot/dts/overlays
}

View File

@@ -1,6 +0,0 @@
SRCREV = "ada8b4415ff44d535d63e4291a0eca733bc2ad0f"
SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.2.27 \
file://sl030raspberrypii2ckernel.patch \
"
require linux-raspberrypi.inc

View File

@@ -1,6 +0,0 @@
SRCREV = "2a8d45ec0883e3cbdce920855b3461ac77308a5f"
SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.6.y \
file://sl030raspberrypii2ckernel.patch \
"
require linux-raspberrypi.inc

View File

@@ -1,6 +0,0 @@
SRCREV = "d996a1b91b2bf3dc06f4f4f822a56f4496457aa1"
SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.8.y \
file://sl030raspberrypii2ckernel.patch \
"
require linux-raspberrypi.inc

View File

@@ -0,0 +1,12 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"
LINUX_VERSION ?= "4.1.21"
SRCREV = "ff45bc0e8917c77461b2901e2743e6339bb70413"
SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-4.1.y \
file://0001-dts-add-overlay-for-pitft22.patch \
file://0002-vmcs-Remove-unused-sm_cache_map_vector-definition.patch \
file://0003-fix-gcc6.patch \
"
require linux-raspberrypi.inc

View File

@@ -0,0 +1,8 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"
LINUX_VERSION ?= "4.4.13"
SRCREV = "680be5e27a9593cf26079c6e5744a04cc2809d13"
SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-4.4.y \
"
require linux-raspberrypi.inc

View File

@@ -18,6 +18,8 @@ UDEV_GE_141 ?= "1"
CMDLINE_DEBUG ?= '${@base_conditional("DISTRO_TYPE", "release", "quiet", "debug", d)}' CMDLINE_DEBUG ?= '${@base_conditional("DISTRO_TYPE", "release", "quiet", "debug", d)}'
CMDLINE_append = " ${CMDLINE_DEBUG}" CMDLINE_append = " ${CMDLINE_DEBUG}"
KERNEL_INITRAMFS ?= '${@base_conditional("INITRAMFS_IMAGE_BUNDLE", "1", "1", "", d)}'
# Set a variable in .configure # Set a variable in .configure
# $1 - Configure variable to be set # $1 - Configure variable to be set
# $2 - value [n/y/value] # $2 - value [n/y/value]
@@ -38,17 +40,12 @@ do_configure_prepend() {
CONF_SED_SCRIPT="" CONF_SED_SCRIPT=""
# oabi / eabi support # oabi / eabi support
if [ "${TARGET_OS}" = "linux-gnueabi" -o "${TARGET_OS}" = "linux-uclibceabi" ]; then
kernel_configure_variable AEABI y kernel_configure_variable AEABI y
if [ "${ARM_KEEP_OABI}" = "1" ] ; then if [ "${ARM_KEEP_OABI}" = "1" ] ; then
kernel_configure_variable OABI_COMPAT y kernel_configure_variable OABI_COMPAT y
else else
kernel_configure_variable OABI_COMPAT n kernel_configure_variable OABI_COMPAT n
fi fi
else
kernel_configure_variable AEABI n
kernel_configure_variable OABI_COMPAT n
fi
# Set cmdline # Set cmdline
kernel_configure_variable CMDLINE "\"${CMDLINE}\"" kernel_configure_variable CMDLINE "\"${CMDLINE}\""
@@ -103,7 +100,14 @@ do_configure_prepend() {
kernel_configure_variable ROOT_NFS y kernel_configure_variable ROOT_NFS y
kernel_configure_variable CMDLINE "\"${CMDLINE_NFSROOT_USB}\"" kernel_configure_variable CMDLINE "\"${CMDLINE_NFSROOT_USB}\""
fi fi
if [ ! -z "${KERNEL_INITRAMFS}" ]; then
kernel_configure_variable BLK_DEV_INITRD y
kernel_configure_variable INITRAMFS_SOURCE ""
kernel_configure_variable RD_GZIP y
kernel_configure_variable OVERLAY_FS y
kernel_configure_variable SQUASHFS y
kernel_configure_variable UBIFS_FS y
fi
# Activate CONFIG_LEGACY_PTYS # Activate CONFIG_LEGACY_PTYS
kernel_configure_variable LEGACY_PTYS y kernel_configure_variable LEGACY_PTYS y
@@ -129,4 +133,6 @@ python () {
if 'CONFIG_KERNEL_LZO=y\n' in configfile.readlines(): if 'CONFIG_KERNEL_LZO=y\n' in configfile.readlines():
depends = d.getVar('DEPENDS', False) depends = d.getVar('DEPENDS', False)
d.setVar('DEPENDS', depends + ' lzop-native') d.setVar('DEPENDS', depends + ' lzop-native')
configfile.close()
} }

View File

@@ -0,0 +1,48 @@
From 2e111e52f96f0b942abda120c30a876629bd73fc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= <eocanha@igalia.com>
Date: Mon, 25 May 2015 14:53:35 +0200
Subject: [PATCH] Don't try to acquire buffer when src pad isn't active
This solves a race condition when setting the pipeline from PAUSE to
NULL while the decoder loop is still running. Without this patch, the
thread which interacts with the decode sink pad gets blocked here:
gst_element_change_state()
gst_element_change_state_func()
gst_element_pads_activate() --> Deactivating pads
activate_pads()
gst_pad_set_active()
gst_pad_activate_mode()
post_activate()
GST_PAD_STREAM_LOCK()
while gst_omx_port_acquire_buffer() gets stalled forever in
gst_omx_component_wait_message() waiting for a message that will never
arrive:
gst_omx_video_dec_loop()
gst_omx_port_acquire_buffer()
gst_omx_component_wait_message()
---
omx/gstomxvideodec.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c
index cd24944..57a61dd 100644
--- a/omx/gstomxvideodec.c
+++ b/omx/gstomxvideodec.c
@@ -1247,6 +1247,11 @@ gst_omx_video_dec_loop (GstOMXVideoDec * self)
GstClockTimeDiff deadline;
OMX_ERRORTYPE err;
+ if (!gst_pad_is_active(GST_VIDEO_DECODER_SRC_PAD (self))) {
+ GST_DEBUG_OBJECT (self, "Src pad not active, not acquiring buffer and flushing instead");
+ goto flushing;
+ }
+
#if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL)
port = self->eglimage ? self->egl_out_port : self->dec_out_port;
#else
--
1.8.3.2

View File

@@ -0,0 +1,137 @@
--- a/config/bellagio/gstomx.conf
+++ b/config/bellagio/gstomx.conf
@@ -1,6 +1,6 @@
[omxmpeg4videodec]
type-name=GstOMXMPEG4VideoDec
-core-name=/usr/local/lib/libomxil-bellagio.so.0
+core-name=/usr/lib/libomxil-bellagio.so.0
component-name=OMX.st.video_decoder.mpeg4
rank=256
in-port-index=0
@@ -9,7 +9,7 @@
[omxh264dec]
type-name=GstOMXH264Dec
-core-name=/usr/local/lib/libomxil-bellagio.so.0
+core-name=/usr/lib/libomxil-bellagio.so.0
component-name=OMX.st.video_decoder.avc
rank=256
in-port-index=0
@@ -18,7 +18,7 @@
[omxmpeg4videoenc]
type-name=GstOMXMPEG4VideoEnc
-core-name=/usr/local/lib/libomxil-bellagio.so.0
+core-name=/usr/lib/libomxil-bellagio.so.0
component-name=OMX.st.video_encoder.mpeg4
rank=0
in-port-index=0
@@ -27,7 +27,7 @@
[omxaacenc]
type-name=GstOMXAACEnc
-core-name=/usr/local/lib/libomxil-bellagio.so.0
+core-name=/usr/lib/libomxil-bellagio.so.0
component-name=OMX.st.audio_encoder.aac
rank=0
in-port-index=0
--- a/config/rpi/gstomx.conf
+++ b/config/rpi/gstomx.conf
@@ -1,6 +1,6 @@
[omxmpeg2videodec]
type-name=GstOMXMPEG2VideoDec
-core-name=/opt/vc/lib/libopenmaxil.so
+core-name=/usr/lib/libopenmaxil.so
component-name=OMX.broadcom.video_decode
rank=257
in-port-index=130
@@ -9,7 +9,7 @@
[omxmpeg4videodec]
type-name=GstOMXMPEG4VideoDec
-core-name=/opt/vc/lib/libopenmaxil.so
+core-name=/usr/lib/libopenmaxil.so
component-name=OMX.broadcom.video_decode
rank=257
in-port-index=130
@@ -18,7 +18,7 @@
[omxh263dec]
type-name=GstOMXH263Dec
-core-name=/opt/vc/lib/libopenmaxil.so
+core-name=/usr/lib/libopenmaxil.so
component-name=OMX.broadcom.video_decode
rank=257
in-port-index=130
@@ -27,7 +27,7 @@
[omxh264dec]
type-name=GstOMXH264Dec
-core-name=/opt/vc/lib/libopenmaxil.so
+core-name=/usr/lib/libopenmaxil.so
component-name=OMX.broadcom.video_decode
rank=257
in-port-index=130
@@ -36,7 +36,7 @@
[omxtheoradec]
type-name=GstOMXTheoraDec
-core-name=/opt/vc/lib/libopenmaxil.so
+core-name=/usr/lib/libopenmaxil.so
component-name=OMX.broadcom.video_decode
rank=257
in-port-index=130
@@ -45,7 +45,7 @@
[omxvp8dec]
type-name=GstOMXVP8Dec
-core-name=/opt/vc/lib/libopenmaxil.so
+core-name=/usr/lib/libopenmaxil.so
component-name=OMX.broadcom.video_decode
rank=257
in-port-index=130
@@ -54,7 +54,7 @@
[omxmjpegdec]
type-name=GstOMXMJPEGDec
-core-name=/opt/vc/lib/libopenmaxil.so
+core-name=/usr/lib/libopenmaxil.so
component-name=OMX.broadcom.video_decode
rank=257
in-port-index=130
@@ -63,7 +63,7 @@
[omxvc1dec]
type-name=GstOMXWMVDec
-core-name=/opt/vc/lib/libopenmaxil.so
+core-name=/usr/lib/libopenmaxil.so
component-name=OMX.broadcom.video_decode
rank=256
in-port-index=130
@@ -73,7 +73,7 @@
[omxh264enc]
type-name=GstOMXH264Enc
-core-name=/opt/vc/lib/libopenmaxil.so
+core-name=/usr/lib/libopenmaxil.so
component-name=OMX.broadcom.video_encode
rank=257
in-port-index=200
@@ -82,7 +82,7 @@
[omxanalogaudiosink]
type-name=GstOMXAnalogAudioSink
-core-name=/opt/vc/lib/libopenmaxil.so
+core-name=/usr/lib/libopenmaxil.so
component-name=OMX.broadcom.audio_render
rank=256
in-port-index=100
@@ -92,7 +92,7 @@
[omxhdmiaudiosink]
type-name=GstOMXHdmiAudioSink
-core-name=/opt/vc/lib/libopenmaxil.so
+core-name=/usr/lib/libopenmaxil.so
component-name=OMX.broadcom.audio_render
rank=257
in-port-index=100

View File

@@ -0,0 +1,16 @@
diff --git a/omx/gstomx.c b/omx/gstomx.c
index 69696c4..c382019 100644
--- a/omx/gstomx.c
+++ b/omx/gstomx.c
@@ -1508,8 +1508,8 @@ gst_omx_port_set_flushing (GstOMXPort * port, GstClockTime timeout,
last_error = OMX_ErrorNone;
gst_omx_component_handle_messages (comp);
while (signalled && last_error == OMX_ErrorNone && !port->flushed
- && port->buffers
- && port->buffers->len > g_queue_get_length (&port->pending_buffers)) {
+ /* && port->buffers
+ && port->buffers->len > g_queue_get_length (&port->pending_buffers) */) {
signalled = gst_omx_component_wait_message (comp, timeout);
if (signalled)
gst_omx_component_handle_messages (comp);

View File

@@ -0,0 +1,16 @@
diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c
index 0d4e7a1..a0d9c74 100644
--- a/omx/gstomxvideodec.c
+++ b/omx/gstomxvideodec.c
@@ -1697,9 +1697,9 @@ gst_omx_video_dec_stop (GstVideoDecoder * decoder)
g_cond_broadcast (&self->drain_cond);
g_mutex_unlock (&self->drain_lock);
- gst_omx_component_get_state (self->dec, 5 * GST_SECOND);
+ gst_omx_component_get_state (self->dec, 0);
#if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL)
- gst_omx_component_get_state (self->egl_render, 1 * GST_SECOND);
+ gst_omx_component_get_state (self->egl_render, 0);
#endif
gst_buffer_replace (&self->codec_data, NULL);

View File

@@ -0,0 +1,69 @@
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

View File

@@ -0,0 +1,30 @@
From 12103842d5f347cf245e71071d0c44297bcdb1f9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= <eocanha@igalia.com>
Date: Fri, 4 Dec 2015 18:39:59 +0100
Subject: [PATCH] Don't abort gst_omx_video_dec_set_format() if there's a
timeout releasing the buffers taken by the egl_render out port
---
omx/gstomxvideodec.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c
index 2368f34..da35e0d 100644
--- a/omx/gstomxvideodec.c
+++ b/omx/gstomxvideodec.c
@@ -1905,8 +1905,11 @@ gst_omx_video_dec_set_format (GstVideoDecoder * decoder,
5 * GST_SECOND) != OMX_ErrorNone)
return FALSE;
if (gst_omx_port_wait_buffers_released (out_port,
- 1 * GST_SECOND) != OMX_ErrorNone)
+ 1 * GST_SECOND) != OMX_ErrorNone) {
+#if !(defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL))
return FALSE;
+#endif
+ }
if (gst_omx_port_deallocate_buffers (self->dec_in_port) != OMX_ErrorNone)
return FALSE;
if (gst_omx_video_dec_deallocate_output_buffers (self) != OMX_ErrorNone)
--
2.1.4

View File

@@ -0,0 +1,48 @@
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, &params);
- if (allocator
- && g_strcmp0 (allocator->mem_type,
- GST_EGL_IMAGE_MEMORY_TYPE) == 0) {
- found = TRUE;
- gst_query_set_nth_allocation_param (query, 0, allocator, &params);
- 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, &params);
+ 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

View File

@@ -0,0 +1,115 @@
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, &params) != 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, &params);
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, &params);
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

Some files were not shown because too many files have changed in this diff Show More