summaryrefslogtreecommitdiff
path: root/recipes-devtools
diff options
context:
space:
mode:
authorNorbert Wesp <n.wesp@phytec.de>2018-12-10 17:02:11 +0100
committerStefan Müller-Klieser <s.mueller-klieser@phytec.de>2018-12-11 15:50:00 +0100
commit8f9db83717141be85d283cc38934d06d7b84125d (patch)
tree8ada5f50123372ad4a279d790fe6250928144a30 /recipes-devtools
parentbe4f16c09172baea5cfa0a9454d41f0eab38ce86 (diff)
downloadmeta-yogurt-8f9db83717141be85d283cc38934d06d7b84125d.tar.bz2
meta-yogurt-8f9db83717141be85d283cc38934d06d7b84125d.zip
mraa: Add missing patches for phyboard MIRA
Rework of patches, so that they can be applied for new v2.0.0 of mraa. Signed-off-by: Norbert Wesp <n.wesp@phytec.de> Signed-off-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de>
Diffstat (limited to 'recipes-devtools')
-rw-r--r--recipes-devtools/mraa/mraa/0001-FindNodejs.cmake-parse-V8_MAJOR_VERSION-from-nodejs-.patch37
-rw-r--r--recipes-devtools/mraa/mraa/0002-phyboard-mira-add-platform-support.patch109
-rw-r--r--recipes-devtools/mraa/mraa_2.0.0.bb3
3 files changed, 76 insertions, 73 deletions
diff --git a/recipes-devtools/mraa/mraa/0001-FindNodejs.cmake-parse-V8_MAJOR_VERSION-from-nodejs-.patch b/recipes-devtools/mraa/mraa/0001-FindNodejs.cmake-parse-V8_MAJOR_VERSION-from-nodejs-.patch
index 72641ab..b2d0990 100644
--- a/recipes-devtools/mraa/mraa/0001-FindNodejs.cmake-parse-V8_MAJOR_VERSION-from-nodejs-.patch
+++ b/recipes-devtools/mraa/mraa/0001-FindNodejs.cmake-parse-V8_MAJOR_VERSION-from-nodejs-.patch
@@ -1,8 +1,7 @@
-From f55d2ec308fcf5115715985c4f9aa36fb16306c1 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Stefan=20M=C3=BCller-Klieser?= <s.mueller-klieser@phytec.de>
-Date: Mon, 13 Feb 2017 16:05:53 +0100
-Subject: [PATCH 1/2] FindNodejs.cmake: parse V8_MAJOR_VERSION from nodejs
- header
+From a8c6e746a18898be3c59adc4f6e20d0d1b5a51cf Mon Sep 17 00:00:00 2001
+From: Norbert Wesp <n.wesp@phytec.de>
+Date: Mon, 10 Dec 2018 16:12:30 +0100
+Subject: [PATCH] FindNodejs.cmake: parse V8_MAJOR_VERSION from nodejs header
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@@ -14,40 +13,42 @@ version gets used in the current src tree, only convert V8 major for a
start.
Signed-off-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de>
+Signed-off-by: Norbert Wesp <n.wesp@phytec.de>
---
- cmake/modules/FindNodejs.cmake | 10 ++++++++--
- 1 file changed, 8 insertions(+), 2 deletions(-)
+ cmake/modules/FindNodejs.cmake | 12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/cmake/modules/FindNodejs.cmake b/cmake/modules/FindNodejs.cmake
-index f1fa1ca..304f5f5 100644
+index c7da092..841ff92 100644
--- a/cmake/modules/FindNodejs.cmake
+++ b/cmake/modules/FindNodejs.cmake
-@@ -43,6 +43,10 @@ find_path (V8_ROOT_DIR "v8.h" PATHS ${NODEJS_INCLUDE_DIRS})
+@@ -47,6 +47,10 @@ find_path (V8_ROOT_DIR "v8.h" PATHS ${NODEJS_INCLUDE_DIRS})
if (NOT V8_ROOT_DIR)
- unset(NODEJS_INCLUDE_DIRS)
- message(ERROR " - v8.h not found")
+ unset(NODEJS_INCLUDE_DIRS)
+ message(ERROR " - v8.h not found")
+else()
-+ message(STATUS "Parsing v8 version from header...")
-+ file(STRINGS "${V8_ROOT_DIR}/v8-version.h" V8HEADER)
-+ STRING(REGEX REPLACE ".*V8_MAJOR_VERSION ([0-9]+).*" "\\1" V8_VERSION_MAJOR "${V8HEADER}")
++ message(STATUS "Parsing v8 version from header...")
++ file(STRINGS "${V8_ROOT_DIR}/v8-version.h" V8HEADER)
++ STRING(REGEX REPLACE ".*V8_MAJOR_VERSION ([0-9]+).*" "\\1" V8_VERSION_MAJOR "${V8HEADER}")
endif()
# Check that uv.h is in NODEJS_INCLUDE_DIRS
-@@ -82,10 +86,12 @@ if (NODEJS_EXECUTABLE)
+@@ -81,10 +85,12 @@ if (NODEJS_EXECUTABLE)
set (NODE_VERSION_MAJOR "0")
set (NODE_VERSION_MINOR "10")
set (NODE_VERSION_PATCH "30")
- set (V8_VERSION_MAJOR "3")
+- set (V8_VERSION_MINOR"14")
+ if ("${V8_VERSION_MAJOR}" STREQUAL "")
+ set (V8_VERSION_MAJOR "3")
+ endif()
- set (V8_VERSION_MINOR"14")
++ set (V8_VERSION_MINOR"14")
set (V8_VERSION_PATCH "5")
- set (V8_VERSION_STRING "3.28.72")
+ set (V8_VERSION_STRING "${V8_VERSION_MAJOR}.28.72")
- message ("defaulted to node 0.10.30")
+ message (STATUS "defaulted to node 0.10.30")
endif ()
string (REGEX REPLACE "\n" "" NODE_VERSION_STRING ${NODE_VERSION_STRING})
--
-1.9.1
+2.17.1
diff --git a/recipes-devtools/mraa/mraa/0002-phyboard-mira-add-platform-support.patch b/recipes-devtools/mraa/mraa/0002-phyboard-mira-add-platform-support.patch
index cb0a8aa..ab30f3b 100644
--- a/recipes-devtools/mraa/mraa/0002-phyboard-mira-add-platform-support.patch
+++ b/recipes-devtools/mraa/mraa/0002-phyboard-mira-add-platform-support.patch
@@ -1,24 +1,26 @@
-From c509e56fced476b63f9ec7e3e54e97b673783c12 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Stefan=20M=C3=BCller-Klieser?= <s.mueller-klieser@phytec.de>
-Date: Tue, 14 Feb 2017 15:16:56 +0100
+From 46f3c16465ff77ab3a36125791c98af71dd23ad8 Mon Sep 17 00:00:00 2001
+From: Norbert Wesp <n.wesp@phytec.de>
+Date: Mon, 10 Dec 2018 16:00:41 +0100
Subject: [PATCH] phyboard-mira: add platform support
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
-Signed-off-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de>
+Add platform support in mraa v2.0.0
+Signed-off-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de>
+Signed-off-by: Norbert Wesp <n.wesp@phytec.de>
---
- README.md | 1 +
+ README.md | 2 +
api/mraa/types.h | 1 +
api/mraa/types.hpp | 1 +
docs/index.java.md | 1 +
docs/index.md | 1 +
- docs/phyboard-mira.md | 153 ++++++++++++++++++++++++++++
- include/arm/mira.h | 51 ++++++++++
+ docs/phyboard-mira.md | 151 ++++++++++++++++++++++
+ include/arm/mira.h | 51 ++++++++
src/CMakeLists.txt | 1 +
- src/arm/arm.c | 7 +-
- src/arm/mira.c | 205 ++++++++++++++++++++++++++++++++++++++
+ src/arm/arm.c | 8 +-
+ src/arm/mira.c | 205 ++++++++++++++++++++++++++++++
src/arm/phyboard.c | 1 +
src/python/python2/docs/index.rst | 1 +
12 files changed, 423 insertions(+), 1 deletion(-)
@@ -27,46 +29,47 @@ Signed-off-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de>
create mode 100644 src/arm/mira.c
diff --git a/README.md b/README.md
-index c50f081..ece8354 100644
+index 1f6b9e5..20b8a69 100644
--- a/README.md
+++ b/README.md
-@@ -37,6 +37,7 @@ ARM
+@@ -40,6 +40,8 @@ ARM
* [Banana Pi](../master/docs/banana_pi.md)
* [Beaglebone Black](../master/docs/beaglebone.md)
* [phyBOARD-Wega](../master/docs/phyboard-wega.md)
+* [phyBOARD-Mira](../master/docs/phyboard-mira.md)
++
+ * [96Boards](../master/docs/96boards.md)
- USB
- ---
+ MIPS
diff --git a/api/mraa/types.h b/api/mraa/types.h
-index 3fd519b..41b9146 100644
+index f28ba51..75a9709 100644
--- a/api/mraa/types.h
+++ b/api/mraa/types.h
-@@ -55,6 +55,7 @@ typedef enum {
- MRAA_INTEL_GT_TUCHUCK = MRAA_INTEL_JOULE_EXPANSION, // deprecated
- #endif
- MRAA_PHYBOARD_WEGA = 14, /**< The phyBOARD-Wega */
-+ MRAA_PHYBOARD_MIRA = 15, /**< The phyBOARD-Mira */
+@@ -60,6 +60,7 @@ typedef enum {
+ MRAA_MTK_LINKIT = 17, /**< Mediatek MT7688 based Linkit boards */
+ MRAA_MTK_OMEGA2 = 18, /**< MT7688 based Onion Omega2 board */
+ MRAA_IEI_TANK = 19, /**< IEI Tank System*/
++ MRAA_PHYBOARD_MIRA = 20, /**< The phyBOARD-Mira */
// USB platform extenders start at 256
MRAA_FTDI_FT4222 = 256, /**< FTDI FT4222 USB to i2c bridge */
diff --git a/api/mraa/types.hpp b/api/mraa/types.hpp
-index dba427e..35c923e 100644
+index 18844b4..ffc6a38 100644
--- a/api/mraa/types.hpp
+++ b/api/mraa/types.hpp
-@@ -53,6 +53,7 @@ typedef enum {
- INTEL_UP = 12, /**< The UP Board */
- INTEL_JOULE_EXPANSION = 13, /**< The Intel Joule Expansion Board */
- PHYBOARD_WEGA = 14, /**< The phyBOARD-Wega */
-+ PHYBOARD_MIRA = 15, /**< The phyBOARD-Mira */
+@@ -58,6 +58,7 @@ typedef enum {
+ MTK_LINKIT = 17, /**< Mediatek MT7688 based Linkit boards */
+ MTK_OMEGA2 = 18, /**< MT7688 based Onion Omega2 board */
+ IEI_TANK = 19, /**< IEI Tank System*/
++ PHYBOARD_MIRA = 20, /**< The phyBOARD-Mira */
FTDI_FT4222 = 256, /**< FTDI FT4222 USB to i2c bridge */
diff --git a/docs/index.java.md b/docs/index.java.md
-index 2dfcc3e..a1cbb4e 100644
+index 366ed68..05f0483 100644
--- a/docs/index.java.md
+++ b/docs/index.java.md
-@@ -46,6 +46,7 @@ Specific platform information for supported platforms is documented here:
+@@ -47,6 +47,7 @@ Specific platform information for supported platforms is documented here:
- @ref bananapi
- @ref beaglebone
- @ref phyboard-wega
@@ -75,23 +78,23 @@ index 2dfcc3e..a1cbb4e 100644
- @ref up
- @ref joule
diff --git a/docs/index.md b/docs/index.md
-index ea9633a..8c86003 100644
+index 5e70308..f047b4a 100644
--- a/docs/index.md
+++ b/docs/index.md
-@@ -46,6 +46,7 @@ Specific platform information for supported platforms is documented here:
+@@ -47,6 +47,7 @@ Specific platform information for supported platforms is documented here:
- @ref bananapi
- @ref beaglebone
- @ref phyboard-wega
+- @ref phyboard-mira
- @ref nuc5
- @ref up
- - @ref joule
+ - @ref up2
diff --git a/docs/phyboard-mira.md b/docs/phyboard-mira.md
new file mode 100644
-index 0000000..2dc0446
+index 0000000..95e1fd4
--- /dev/null
+++ b/docs/phyboard-mira.md
-@@ -0,0 +1,153 @@
+@@ -0,0 +1,151 @@
+phyBOARD-Mira {#phyboard-mira}
+=============
+
@@ -243,8 +246,6 @@ index 0000000..2dc0446
+Connector X13 and X14 are used for high speed A/V Expansions. Connector
+X3 is used for CAN and is not supported in mraa. Connector X23 is used
+for RS232 and RS485 and is not yet supported in mraa.
-+
-+
diff --git a/include/arm/mira.h b/include/arm/mira.h
new file mode 100644
index 0000000..554270f
@@ -303,22 +304,22 @@ index 0000000..554270f
+}
+#endif
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index a1ff292..b92f226 100644
+index 35c5488..ecf7204 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
-@@ -82,6 +82,7 @@ set (mraa_LIB_ARM_SRCS_NOAUTO
+@@ -99,6 +99,7 @@ set (mraa_LIB_ARM_SRCS_NOAUTO
${PROJECT_SOURCE_DIR}/src/arm/raspberry_pi.c
${PROJECT_SOURCE_DIR}/src/arm/beaglebone.c
${PROJECT_SOURCE_DIR}/src/arm/phyboard.c
+ ${PROJECT_SOURCE_DIR}/src/arm/mira.c
${PROJECT_SOURCE_DIR}/src/arm/banana.c
+ ${PROJECT_SOURCE_DIR}/src/arm/de_nano_soc.c
)
-
diff --git a/src/arm/arm.c b/src/arm/arm.c
-index acfc3e3..fbf80e1 100644
+index 62d6b2e..eb6753e 100644
--- a/src/arm/arm.c
+++ b/src/arm/arm.c
-@@ -30,10 +30,10 @@
+@@ -31,6 +31,7 @@
#include "arm/banana.h"
#include "arm/beaglebone.h"
#include "arm/phyboard.h"
@@ -326,29 +327,27 @@ index acfc3e3..fbf80e1 100644
#include "arm/raspberry_pi.h"
#include "mraa_internal.h"
--
- mraa_platform_t
- mraa_arm_platform()
- {
-@@ -89,6 +89,8 @@ mraa_arm_platform()
+@@ -102,6 +103,8 @@ mraa_arm_platform()
platform_type = MRAA_96BOARDS;
else if (mraa_file_contains("/proc/device-tree/compatible", "raspberrypi,"))
platform_type = MRAA_RASPBERRY_PI;
-+ else if (mraa_file_contains("/sys/firmware/devicetree/base/model", "phyBOARD-MIRA"))
++ else if (mraa_file_contains("/sys/firmware/devicetree/base/model", "phyBOARD-MIRA"))
+ platform_type = MRAA_PHYBOARD_MIRA;
}
switch (platform_type) {
-@@ -100,6 +102,9 @@ mraa_arm_platform()
- break;
+@@ -114,7 +117,10 @@ mraa_arm_platform()
case MRAA_PHYBOARD_WEGA:
plat = mraa_phyboard();
-+ break;
+ break;
+- case MRAA_BANANA:
+ case MRAA_PHYBOARD_MIRA:
+ plat = mraa_mira();
- break;
- case MRAA_BANANA:
++ break;
++ case MRAA_BANANA:
plat = mraa_banana();
+ break;
+ case MRAA_96BOARDS:
diff --git a/src/arm/mira.c b/src/arm/mira.c
new file mode 100644
index 0000000..a9ce89e
@@ -561,10 +560,10 @@ index 0000000..a9ce89e
+ return NULL;
+};
diff --git a/src/arm/phyboard.c b/src/arm/phyboard.c
-index 7ead282..b7300ca 100644
+index 726eaa6..93fc765 100644
--- a/src/arm/phyboard.c
+++ b/src/arm/phyboard.c
-@@ -166,6 +166,7 @@ mraa_phyboard()
+@@ -165,6 +165,7 @@ mraa_phyboard()
if (b == NULL) {
return NULL;
}
@@ -573,7 +572,7 @@ index 7ead282..b7300ca 100644
b->phy_pin_count = MRAA_PHYBOARD_WEGA_PINCOUNT;
diff --git a/src/python/python2/docs/index.rst b/src/python/python2/docs/index.rst
-index a693f8c..2835dd8 100644
+index 4a4ff77..5cb7321 100644
--- a/src/python/python2/docs/index.rst
+++ b/src/python/python2/docs/index.rst
@@ -28,6 +28,7 @@ Supported Platforms
@@ -583,7 +582,7 @@ index a693f8c..2835dd8 100644
+ * `phyBOARD-Mira <../phyboard-mira.html>`_
* `Intel NUC NUC5i5MYBE <../nuc5.html>`_
* `UP <../up.html>`_
- * `FTDI FT4222H <../ft4222.html>`_
+ * `UP Squared<../up2.html>`_
--
-1.9.1
+2.17.1
diff --git a/recipes-devtools/mraa/mraa_2.0.0.bb b/recipes-devtools/mraa/mraa_2.0.0.bb
index 97d9274..0baadcb 100644
--- a/recipes-devtools/mraa/mraa_2.0.0.bb
+++ b/recipes-devtools/mraa/mraa_2.0.0.bb
@@ -8,6 +8,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4b92a3b497d7943042a6db40c088c3f2"
SRC_URI = "https://github.com/intel-iot-devkit/mraa/archive/v${PV}.tar.gz"
SRC_URI[md5sum] = "1a5d8eaab441655c1e8741e35a702b3e"
SRC_URI[sha256sum] = "c9f3c3741c6894be5516adecfe6b55a38960b6718b268a9afd645f7955e5a716"
+SRC_URI += "\
+ file://0001-FindNodejs.cmake-parse-V8_MAJOR_VERSION-from-nodejs-.patch \
+ file://0002-phyboard-mira-add-platform-support.patch"
S = "${WORKDIR}/${PN}-${PV}"