Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

layer.conf: Fix the syntax for SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS #157

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
From 6f0aafeccb99b6c92a48ee1c775afdc0f16a1ce6 Mon Sep 17 00:00:00 2001
From: Khem Raj <[email protected]>
Date: Fri, 13 Dec 2019 08:46:39 -0800
Subject: [PATCH] check for reallocarray before using it

in kplot there is a runtime check for reallocarray which actually wont
work in cross compile mode, luckily it does check for HAVE_REALLOCARRAY
before usng the results of runtime check. So here add a configure time
check for presense of reallocarray

Fixes

TOPDIR/build/tmp/work/core2-32-yoe-linux/libegt/0.8-r0/recipe-sysroot/usr/include/stdlib.h:559:14: error: exception specification in declaration does not match previous declaration
extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
^
../external/kplot/compat.h:24:7: note: previous declaration is here
void *reallocarray(void *optr, size_t nmemb, size_t size);
^

Upstream-Status: Submitted [https://github.com/linux4sam/egt/pull/2]
Signed-off-by: Khem Raj <[email protected]>
---
configure.ac | 2 +-
src/chart.cpp | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 81410c78..65873d8b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -210,7 +210,7 @@ AC_TYPE_UINT8_T

# Checks for library functions.
AC_FUNC_MMAP
-AC_CHECK_FUNCS([floor memmove memset munmap select setlocale sqrt strerror])
+AC_CHECK_FUNCS([floor memmove memset munmap reallocarray select setlocale sqrt strerror])

AX_PTHREAD([LIBS="$PTHREAD_LIBS $LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"], AC_MSG_ERROR(Can not find pthreads. This is required.))
diff --git a/src/chart.cpp b/src/chart.cpp
index 7578ea29..0faf65e8 100644
--- a/src/chart.cpp
+++ b/src/chart.cpp
@@ -3,6 +3,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
+#include "config.h"
#include "compat.h"
#include "egt/chart.h"
#include "egt/detail/meta.h"
--
2.24.1

1 change: 1 addition & 0 deletions recipes-graphics/libegt/libegt_0.8.bb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ DEPENDS_append_at91sam9 = " tslib"

SRC_URI = "gitsm://github.com/linux4sam/egt.git;protocol=https \
file://0001-link-libudev-for-udev_unref-and-udev_new.patch \
file://0001-check-for-reallocarray-before-using-it.patch \
"

SRCREV = "be50eef497a0900cf90b60a2da4aad30ba0e3663"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
From ba4cc0d7b08efecd2b2bfb04c7a70187d7056304 Mon Sep 17 00:00:00 2001
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel that this patch would better go directly to https://github.com/linux4sam/libplanes . What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

already done linux4sam/libplanes#3

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I can merge the first commit while the pull request on libplanes gets accepted...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, we need the second commit for it to work with master OE-Core/yocto since py2 is being thrown out next week. So I would suggest taking both. If libplane commit requires changes after review, I will update the patch here as well accordingly.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to make more tests with python3 and see if everything is fine, so I will postpone your pull request until then.

From: Khem Raj <[email protected]>
Date: Tue, 26 Nov 2019 11:18:39 -0800
Subject: [PATCH] Use python3 by default

python2 is on its way out

Upstream-Status: Submitted [https://github.com/linux4sam/libplanes/pull/3]
Signed-off-by: Khem Raj <[email protected]>
---
configure.ac | 2 +-
python/Makefile.am | 2 +-
scripts/planes-loop.py | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 69e9478..ba0d2e7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -129,7 +129,7 @@ if test "x$PYTHON" = xyes; then

if test "x$have_python" = "xyes"; then
AC_MSG_CHECKING([for Python site-packages path])
- PYTHON_VERSION='2.7'
+ PYTHON_VERSION=`$PKG_CONFIG --modversion python3`
PYTHON_SITE_PKG=${prefix}/lib/python${PYTHON_VERSION}/site-packages
AC_MSG_RESULT([$PYTHON_SITE_PKG])
AC_SUBST([PYTHON_SITE_PKG])
diff --git a/python/Makefile.am b/python/Makefile.am
index 63c737f..015fc26 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -4,7 +4,7 @@ if HAVE_PYTHON
SWIG_SRC = planes.i

SWIG=swig
-PYTHON=python
+PYTHON=python3

SWIG_V_GEN = $(swig_v_GEN_$(V))
swig_v_GEN_ = $(swig_v_GEN_$(AM_DEFAULT_VERBOSITY))
diff --git a/scripts/planes-loop.py b/scripts/planes-loop.py
index ded88d4..4c6904e 100755
--- a/scripts/planes-loop.py
+++ b/scripts/planes-loop.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3

from mpio import *
import glob
--
2.24.0

12 changes: 7 additions & 5 deletions recipes-graphics/libplanes/libplanes_0.0.3.bb
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,20 @@ PACKAGES = "${PN}-dbg ${PN} ${PN}-python"

PR = "r1"

DEPENDS = "libdrm cairo cjson lua swig-native python"
DEPENDS = "libdrm cairo cjson lua swig-native python3"

RDEPENDS_${PN} = "python udev-rules-at91"
RDEPENDS_${PN} = "python3 udev-rules-at91"

SRC_URI = "git://github.com/linux4sam/libplanes.git;protocol=https"
SRC_URI = "git://github.com/linux4sam/libplanes.git;protocol=https \
file://0001-Use-python3-by-default.patch \
"
PV = "0.0.3+git${SRCPV}"

SRCREV = "96a3e46c175a5dd02d3cb04a9ef9f5f201a684a6"

S = "${WORKDIR}/git"

inherit pkgconfig autotools
inherit pkgconfig autotools python3-dir

EXTRA_OECONF += "--enable-shared --disable-static"

Expand Down Expand Up @@ -46,7 +48,7 @@ do_install_append() {
install -Dm 0755 ${S}/scripts/planes-loop.sh ${D}/opt/planes/planes-loop.sh
install -Dm 0755 ${S}/scripts/planes-loop.py ${D}/opt/planes/planes-loop.py
install -Dm 0755 ${S}/python/examples/splash.py ${D}/usr/share/planes/splash.py
rm -f ${D}/usr/lib/python2.7/site-packages/planes/_planes.a
rm -f ${D}/usr/lib/python*/site-packages/planes/_planes.a
rm -f ${D}/usr/lib/libplanes.a
}

12 changes: 7 additions & 5 deletions recipes-graphics/libplanes/libplanes_1.0.0.bb
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,19 @@ LIC_FILES_CHKSUM = "file://COPYING;endline=20;md5=b884a464579c410fd1dace93db8e97

PACKAGES = "${PN}-dbg ${PN} ${PN}-python"

DEPENDS = "libdrm cairo cjson lua swig-native python"
DEPENDS = "libdrm cairo cjson lua swig-native python3"

RDEPENDS_${PN} = "python udev-rules-at91"
RDEPENDS_${PN} = "python3 udev-rules-at91"

SRC_URI = "git://github.com/linux4sam/libplanes.git;protocol=https"
SRC_URI = "git://github.com/linux4sam/libplanes.git;protocol=https \
file://0001-Use-python3-by-default.patch \
"

SRCREV = "632fb3bf52838f9bd0531fc2040b3b2ec448f70f"

S = "${WORKDIR}/git"

inherit pkgconfig autotools
inherit pkgconfig autotools python3-dir

EXTRA_OECONF += "--enable-shared --disable-static"

Expand Down Expand Up @@ -43,6 +45,6 @@ do_install_append() {
install -Dm 0755 ${S}/scripts/planes-loop.sh ${D}/opt/planes/planes-loop.sh
install -Dm 0755 ${S}/scripts/planes-loop.py ${D}/opt/planes/planes-loop.py
install -Dm 0755 ${S}/python/examples/splash.py ${D}/usr/share/planes/splash.py
rm -f ${D}/usr/lib/python2.7/site-packages/planes/_planes.a
rm -f ${D}/usr/lib/python*/site-packages/planes/_planes.a
rm -f ${D}/usr/lib/libplanes.a
}
33 changes: 33 additions & 0 deletions recipes-utils/9bit/9bit/0001-include-asm-generic-ioctls.h.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
From f35a891637ced372fa6f8b2e74c2bc4327ac3761 Mon Sep 17 00:00:00 2001
From: Khem Raj <[email protected]>
Date: Wed, 18 Dec 2019 18:24:03 -0800
Subject: [PATCH] include asm-generic/ioctls.h

This helps in including definitions for TCGETS2 TCSETSW2 and TCSETSF2

Fixes

custom_termios2.c:14:19: error: use of undeclared identifier 'TCGETS2' return ioctl(fd, TCGETS2, termios); ^ custom_termios2.c:24:9: error: use of undeclared identifier 'TCSETS2' cmd = TCSETS2; ^ custom_termios2.c:27:9: error: use of undeclared identifier 'TCSETSW2' cmd = TCSETSW2; ^ custom_termios2.c:30:9: error: use of undeclared identifier 'TCSETSF2' cmd = TCSETSF2;
^
Upstream-Status: Submitted [https://github.com/linux4sam/9bit/pull/1]

Signed-off-by: Khem Raj <[email protected]>
---
custom_termios2.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/custom_termios2.c b/custom_termios2.c
index 3eb3049..ba0171a 100644
--- a/custom_termios2.c
+++ b/custom_termios2.c
@@ -5,6 +5,7 @@
*/
#include "custom_termios2.h"
#include <asm/ioctls.h>
+#include <asm-generic/ioctls.h>
#include <errno.h>
#include <sys/ioctl.h>

--
2.24.1

12 changes: 7 additions & 5 deletions recipes-utils/9bit/9bit_git.bb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ DESCRIPTION = "Demo apps for SAMA5 9-bit / Multidrop Serial Mode"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=fbe63b61f5a0d24e651c8be602a7c3f8"

SRC_URI = "git://github.com/linux4sam/9bit.git;protocol=https"
SRC_URI = "git://github.com/linux4sam/9bit.git;protocol=https \
file://0001-include-asm-generic-ioctls.h.patch \
"

PV = "1.0+git${SRCPV}"
SRCREV = "df45b743003a78bb735eb3c2cb294f3cce3ae43a"
SRCREV = "f4cd916c8c58300ea1cbb398f0b40fe43a70d6d6"

S = "${WORKDIR}/git"

Expand All @@ -15,8 +17,8 @@ do_compile () {

do_install () {
install -d ${D}${bindir}
install senda_example ${D}${bindir}
install p9bit_example ${D}${bindir}
install user_example ${D}${bindir}
install -m 0755 senda_example ${D}${bindir}
install -m 0755 p9bit_example ${D}${bindir}
install -m 0755 user_example ${D}${bindir}
}