summaryrefslogtreecommitdiff
path: root/meta-openembedded/meta-oe/recipes-extended/upm
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2018-12-17 04:11:34 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2019-01-09 02:21:44 +0300
commit1a4b7ee28bf7413af6513fb45ad0d0736048f866 (patch)
tree79f6d8ea698cab8f2eaf4f54b793d2ca7a1451ce /meta-openembedded/meta-oe/recipes-extended/upm
parent5b9ede0403237c7dace972affa65cf64a1aadd0e (diff)
downloadopenbmc-1a4b7ee28bf7413af6513fb45ad0d0736048f866.tar.xz
reset upstream subtrees to yocto 2.6
Reset the following subtrees on thud HEAD: poky: 87e3a9739d meta-openembedded: 6094ae18c8 meta-security: 31dc4e7532 meta-raspberrypi: a48743dc36 meta-xilinx: c42016e2e6 Also re-apply backports that didn't make it into thud: poky: 17726d0 systemd-systemctl-native: handle Install wildcards meta-openembedded: 4321a5d libtinyxml2: update to 7.0.1 042f0a3 libcereal: Add native and nativesdk classes e23284f libcereal: Allow empty package 030e8d4 rsyslog: curl-less build with fmhttp PACKAGECONFIG 179a1b9 gtest: update to 1.8.1 Squashed OpenBMC subtree compatibility updates: meta-aspeed: Brad Bishop (1): aspeed: add yocto 2.6 compatibility meta-ibm: Brad Bishop (1): ibm: prepare for yocto 2.6 meta-ingrasys: Brad Bishop (1): ingrasys: set layer compatibility to yocto 2.6 meta-openpower: Brad Bishop (1): openpower: set layer compatibility to yocto 2.6 meta-phosphor: Brad Bishop (3): phosphor: set layer compatibility to thud phosphor: libgpg-error: drop patches phosphor: react to fitimage artifact rename Ed Tanous (4): Dropbear: upgrade options for latest upgrade yocto2.6: update openssl options busybox: remove upstream watchdog patch systemd: Rebase CONFIG_CGROUP_BPF patch Change-Id: I7b1fe71cca880d0372a82d94b5fd785323e3a9e7 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-extended/upm')
-rw-r--r--meta-openembedded/meta-oe/recipes-extended/upm/upm/0001-Replace-strncpy-with-memcpy.patch49
-rw-r--r--meta-openembedded/meta-oe/recipes-extended/upm/upm/0001-include-sys-types.h-for-uint-definition.patch33
-rw-r--r--meta-openembedded/meta-oe/recipes-extended/upm/upm_git.bb10
3 files changed, 87 insertions, 5 deletions
diff --git a/meta-openembedded/meta-oe/recipes-extended/upm/upm/0001-Replace-strncpy-with-memcpy.patch b/meta-openembedded/meta-oe/recipes-extended/upm/upm/0001-Replace-strncpy-with-memcpy.patch
new file mode 100644
index 000000000..4b17087ef
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-extended/upm/upm/0001-Replace-strncpy-with-memcpy.patch
@@ -0,0 +1,49 @@
+From d314f26e024aaf15bf4ab22ceb98501148d0eac8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 7 May 2018 19:53:33 -0700
+Subject: [PATCH] Replace strncpy with memcpy
+
+gcc8 detects that strncpy is overwiritng the null terminating character
+the source strings are already initialized to 0 so memcpy would do the same
+job
+
+Fixes
+rn2903.c:153:5: error: 'strncpy' output may be truncated copying 16 bytes from a string of length 511 [-Werror=stringop-truncation]
+ strncpy(dev->hardware_eui, dev->resp_data, RN2903_MAX_HEX_EUI64);
+ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/ecezo/ecezo.c | 2 +-
+ src/rn2903/rn2903.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/ecezo/ecezo.c b/src/ecezo/ecezo.c
+index 6a195fc1..56c6dab3 100644
+--- a/src/ecezo/ecezo.c
++++ b/src/ecezo/ecezo.c
+@@ -488,7 +488,7 @@ int ecezo_send_command(const ecezo_context dev, char *cmd, char *buffer,
+ // our write buffer
+ char writeBuffer[ECEZO_MAX_BUFFER_LEN];
+
+- strncpy(writeBuffer, cmd, ECEZO_MAX_BUFFER_LEN);
++ memcpy(writeBuffer, cmd, ECEZO_MAX_BUFFER_LEN-1);
+ writeBuffer[ECEZO_MAX_BUFFER_LEN - 1] = 0;
+
+ int writelen = strlen(writeBuffer);
+diff --git a/src/rn2903/rn2903.c b/src/rn2903/rn2903.c
+index f30a33ae..01a011da 100644
+--- a/src/rn2903/rn2903.c
++++ b/src/rn2903/rn2903.c
+@@ -150,7 +150,7 @@ static rn2903_context _rn2903_postinit(rn2903_context dev,
+ rn2903_close(dev);
+ return NULL;
+ }
+- strncpy(dev->hardware_eui, dev->resp_data, RN2903_MAX_HEX_EUI64);
++ memcpy(dev->hardware_eui, dev->resp_data, RN2903_MAX_HEX_EUI64);
+
+ return dev;
+ }
+--
+2.17.0
+
diff --git a/meta-openembedded/meta-oe/recipes-extended/upm/upm/0001-include-sys-types.h-for-uint-definition.patch b/meta-openembedded/meta-oe/recipes-extended/upm/upm/0001-include-sys-types.h-for-uint-definition.patch
new file mode 100644
index 000000000..a0a47411d
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-extended/upm/upm/0001-include-sys-types.h-for-uint-definition.patch
@@ -0,0 +1,33 @@
+From 48a580bd402cf6a3ee9e42013653219bfeb3caf6 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 21 Jun 2018 18:39:16 -0700
+Subject: [PATCH] include sys/types.h for uint definition
+
+uint is defined in sys/types.h, therefore this
+header needs to be included, it gets exposed with
+musl where this header is not getting included indirectly
+as it is happening when building on glibc
+
+Fixes build errors on musl e.g.
+upm/src/kx122/kx122.hpp:456:31: error: 'uint' has not been declared
+| void setBufferThreshold(uint samples);
+| ^~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted [https://github.com/intel-iot-devkit/upm/pull/656]
+ src/kx122/kx122.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/kx122/kx122.h b/src/kx122/kx122.h
+index 1622ed50..56e5215e 100644
+--- a/src/kx122/kx122.h
++++ b/src/kx122/kx122.h
+@@ -31,6 +31,7 @@ extern "C"{
+ #include <assert.h>
+ #include <unistd.h>
+ #include <math.h>
++#include <sys/types.h>
+
+ #include <mraa/i2c.h>
+ #include <mraa/spi.h>
diff --git a/meta-openembedded/meta-oe/recipes-extended/upm/upm_git.bb b/meta-openembedded/meta-oe/recipes-extended/upm/upm_git.bb
index d742a5e46..babe5f489 100644
--- a/meta-openembedded/meta-oe/recipes-extended/upm/upm_git.bb
+++ b/meta-openembedded/meta-oe/recipes-extended/upm/upm_git.bb
@@ -7,12 +7,13 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=66493d54e65bfc12c7983ff2e884f37f"
DEPENDS = "libjpeg-turbo mraa"
-SRCREV = "cc7fec9ae0228add9011bf1c2cd5e0ca2ba0d4f0"
+SRCREV = "dc45cd78595c7c24c8a8574c63bb48b5bb99c5aa"
PV = "1.6.0-git${SRCPV}"
-SRC_URI = " \
- git://github.com/intel-iot-devkit/${BPN}.git;protocol=http \
-"
+SRC_URI = "git://github.com/intel-iot-devkit/${BPN}.git;protocol=http \
+ file://0001-Replace-strncpy-with-memcpy.patch \
+ file://0001-include-sys-types.h-for-uint-definition.patch \
+ "
S = "${WORKDIR}/git"
@@ -21,7 +22,6 @@ COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*)-linux"
inherit distutils3-base cmake
-
# override this in local.conf to get needed bindings.
# BINDINGS_pn-upm="python"
# will result in only the python bindings being built/packaged.