From eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 Mon Sep 17 00:00:00 2001 From: Dave Cobbley Date: Tue, 14 Aug 2018 10:05:37 -0700 Subject: [Subtree] Removing import-layers directory As part of the move to subtrees, need to bring all the import layers content to the top level. Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f Signed-off-by: Dave Cobbley Signed-off-by: Brad Bishop --- ...0001-include-asm-ioctl.h-for-ioctl-define.patch | 33 +++ .../recipes-devtools/python/python-rtimu_git.bb | 15 ++ .../python/python-sense-hat_2.2.0.bb | 24 ++ .../rpi-gpio/0001-Remove-nested-functions.patch | 294 +++++++++++++++++++++ .../recipes-devtools/python/rpi-gpio_0.6.3.bb | 14 + ...-types.h-explicitly-for-getting-caddr_t-d.patch | 30 +++ .../recipes-devtools/python/rpio_0.10.0.bb | 23 ++ 7 files changed, 433 insertions(+) create mode 100644 meta-raspberrypi/recipes-devtools/python/python-rtimu/0001-include-asm-ioctl.h-for-ioctl-define.patch create mode 100644 meta-raspberrypi/recipes-devtools/python/python-rtimu_git.bb create mode 100644 meta-raspberrypi/recipes-devtools/python/python-sense-hat_2.2.0.bb create mode 100644 meta-raspberrypi/recipes-devtools/python/rpi-gpio/0001-Remove-nested-functions.patch create mode 100644 meta-raspberrypi/recipes-devtools/python/rpi-gpio_0.6.3.bb create mode 100644 meta-raspberrypi/recipes-devtools/python/rpio/0001-include-sys-types.h-explicitly-for-getting-caddr_t-d.patch create mode 100644 meta-raspberrypi/recipes-devtools/python/rpio_0.10.0.bb (limited to 'meta-raspberrypi/recipes-devtools/python') diff --git a/meta-raspberrypi/recipes-devtools/python/python-rtimu/0001-include-asm-ioctl.h-for-ioctl-define.patch b/meta-raspberrypi/recipes-devtools/python/python-rtimu/0001-include-asm-ioctl.h-for-ioctl-define.patch new file mode 100644 index 000000000..4a93a1ce9 --- /dev/null +++ b/meta-raspberrypi/recipes-devtools/python/python-rtimu/0001-include-asm-ioctl.h-for-ioctl-define.patch @@ -0,0 +1,33 @@ +From c3aa4af56652b403e304ea5f321acfe289e42922 Mon Sep 17 00:00:00 2001 +From: Khem Raj +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 +--- +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 ++#include + + RTIMUHal::RTIMUHal() + { +-- +2.7.0 + diff --git a/meta-raspberrypi/recipes-devtools/python/python-rtimu_git.bb b/meta-raspberrypi/recipes-devtools/python/python-rtimu_git.bb new file mode 100644 index 000000000..63c92b381 --- /dev/null +++ b/meta-raspberrypi/recipes-devtools/python/python-rtimu_git.bb @@ -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 diff --git a/meta-raspberrypi/recipes-devtools/python/python-sense-hat_2.2.0.bb b/meta-raspberrypi/recipes-devtools/python/python-sense-hat_2.2.0.bb new file mode 100644 index 000000000..f7c4e349d --- /dev/null +++ b/meta-raspberrypi/recipes-devtools/python/python-sense-hat_2.2.0.bb @@ -0,0 +1,24 @@ +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" + +inherit setuptools pypi + +PYPI_PACKAGE = "sense-hat" + +SRC_URI[md5sum] = "69929250cb72349a8a82edf2584b1d83" +SRC_URI[sha256sum] = "f000998d042d96ed722d459312e1bebd0107f9f3015cd34b3e4fabcab9c800af" + +DEPENDS += " \ + jpeg \ + zlib \ + freetype \ + " + +RDEPENDS_${PN} += " \ + python-numpy \ + python-rtimu \ + python-imaging \ + " diff --git a/meta-raspberrypi/recipes-devtools/python/rpi-gpio/0001-Remove-nested-functions.patch b/meta-raspberrypi/recipes-devtools/python/rpi-gpio/0001-Remove-nested-functions.patch new file mode 100644 index 000000000..bd971793a --- /dev/null +++ b/meta-raspberrypi/recipes-devtools/python/rpi-gpio/0001-Remove-nested-functions.patch @@ -0,0 +1,294 @@ +From 23d7ab77865f8b17042f5cd4c6720cca475e0eb5 Mon Sep 17 00:00:00 2001 +From: Khem Raj +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 +--- +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 +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 +--- +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 + #include + #include ++#include + #include + #include "c_gpio.h" + +-- +2.7.0 + diff --git a/meta-raspberrypi/recipes-devtools/python/rpio_0.10.0.bb b/meta-raspberrypi/recipes-devtools/python/rpio_0.10.0.bb new file mode 100644 index 000000000..c3254bcf9 --- /dev/null +++ b/meta-raspberrypi/recipes-devtools/python/rpio_0.10.0.bb @@ -0,0 +1,23 @@ +DESCRIPTION = "Advanced GPIO for the Raspberry Pi. Extends RPi.GPIO with PWM, \ +GPIO interrups, TCP socket interrupts, command line tools and more" +HOMEPAGE = "https://github.com/metachris/RPIO" +SECTION = "devel/python" +LICENSE = "LGPLv3+" +LIC_FILES_CHKSUM = "file://README.rst;beginline=41;endline=53;md5=d5d95d7486a4d98c999675c23196b25a" + +PYPI_PACKAGE = "RPIO" +inherit pypi + +SRC_URI += "file://0001-include-sys-types.h-explicitly-for-getting-caddr_t-d.patch" + +inherit setuptools + +COMPATIBLE_MACHINE = "^rpi$" + +RDEPENDS_${PN} = "\ + python-logging \ + python-threading \ +" + +SRC_URI[md5sum] = "cefc45422833dcafcd59b78dffc540f4" +SRC_URI[sha256sum] = "b89f75dec9de354681209ebfaedfe22b7c178aacd91a604a7bd6d92024e4cf7e" -- cgit v1.2.3