[yocto] [meta-mingw][PATCH] README: minor correction

2015-08-05 Thread Juro Bystricky
Fixed references to meta-darwin.

Signed-off-by: Juro Bystricky 
---
 README | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README b/README
index 61eda1b..96995b8 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-meta-darwin
+meta-mingw
 ==
 
 OpenEmbedded meta layer for mingw based SDKs
-- 
1.9.1

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-mingw][PATCH 0/6] mingw patches to build meta-toolchain

2015-08-05 Thread Juro Bystricky
Several recipes have been updated, so the corresponding .bbappend files became 
stale.
The attached patches correspond to various updated recipes.

I tested the patches with meta-mingw layer and:

SDKMACHINE="i686-mingw32"
bitbake meta-toolchain


Juro Bystricky (6):
  binutils-cross-canadian: upgrade to version 2.25
  gdb-cross-canadian_7.8.1: updated to gdb-cross-canadian_7.9.1
  nativesdk-libtool_2.4.2: updated nativesdk-libtool_2.4.6
  libmpc_1.0.2: updated to libmpc_1.0.3
  mpfr_3.1.2: updated to mpfr_3.1.3
  gettext_0.19.4.bbappend: support for mingw

 recipes-core/gettext/gettext_0.19.4.bbappend| 2 ++
 recipes-devtools/binutils/binutils-cross-canadian_2.24.bbappend | 5 -
 recipes-devtools/binutils/binutils-cross-canadian_2.25.bbappend | 5 +
 recipes-devtools/gdb/gdb-cross-canadian_7.8.1.bbappend  | 5 -
 recipes-devtools/gdb/gdb-cross-canadian_7.9.1.bbappend  | 5 +
 recipes-devtools/libtool/nativesdk-libtool_2.4.2.bbappend   | 1 -
 recipes-devtools/libtool/nativesdk-libtool_2.4.6.bbappend   | 1 +
 recipes-support/libmpc/libmpc_1.0.3.bbappend| 1 +
 recipes-support/mpc/libmpc_1.0.2.bbappend   | 1 -
 recipes-support/mpfr/mpfr_3.1.2.bbappend| 1 -
 recipes-support/mpfr/mpfr_3.1.3.bbappend| 1 +
 11 files changed, 15 insertions(+), 13 deletions(-)
 create mode 100644 recipes-core/gettext/gettext_0.19.4.bbappend
 delete mode 100644 
recipes-devtools/binutils/binutils-cross-canadian_2.24.bbappend
 create mode 100644 
recipes-devtools/binutils/binutils-cross-canadian_2.25.bbappend
 delete mode 100644 recipes-devtools/gdb/gdb-cross-canadian_7.8.1.bbappend
 create mode 100644 recipes-devtools/gdb/gdb-cross-canadian_7.9.1.bbappend
 delete mode 100644 recipes-devtools/libtool/nativesdk-libtool_2.4.2.bbappend
 create mode 100644 recipes-devtools/libtool/nativesdk-libtool_2.4.6.bbappend
 create mode 100644 recipes-support/libmpc/libmpc_1.0.3.bbappend
 delete mode 100644 recipes-support/mpc/libmpc_1.0.2.bbappend
 delete mode 100644 recipes-support/mpfr/mpfr_3.1.2.bbappend
 create mode 100644 recipes-support/mpfr/mpfr_3.1.3.bbappend

-- 
1.9.1

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-mingw][PATCH 1/6] binutils-cross-canadian: upgrade to version 2.25

2015-08-05 Thread Juro Bystricky
Renamed the file binutils-cross-canadian_2.24.bbappend to
binutils-cross-canadian_2.25.bbappend.

Signed-off-by: Juro Bystricky 
---
 recipes-devtools/binutils/binutils-cross-canadian_2.24.bbappend | 5 -
 recipes-devtools/binutils/binutils-cross-canadian_2.25.bbappend | 5 +
 2 files changed, 5 insertions(+), 5 deletions(-)
 delete mode 100644 
recipes-devtools/binutils/binutils-cross-canadian_2.24.bbappend
 create mode 100644 
recipes-devtools/binutils/binutils-cross-canadian_2.25.bbappend

diff --git a/recipes-devtools/binutils/binutils-cross-canadian_2.24.bbappend 
b/recipes-devtools/binutils/binutils-cross-canadian_2.24.bbappend
deleted file mode 100644
index 026c932..000
--- a/recipes-devtools/binutils/binutils-cross-canadian_2.24.bbappend
+++ /dev/null
@@ -1,5 +0,0 @@
-EXTRA_OECONF_append_sdkmingw32 = " --disable-plugins --disable-nls"
-LDFLAGS_append_sdkmingw32 = " -Wl,-static"
-
-DEPENDS_remove_sdkmingw32 = "nativesdk-gettext"
-DEPENDS_remove_sdkmingw32 = "nativesdk-flex"
diff --git a/recipes-devtools/binutils/binutils-cross-canadian_2.25.bbappend 
b/recipes-devtools/binutils/binutils-cross-canadian_2.25.bbappend
new file mode 100644
index 000..026c932
--- /dev/null
+++ b/recipes-devtools/binutils/binutils-cross-canadian_2.25.bbappend
@@ -0,0 +1,5 @@
+EXTRA_OECONF_append_sdkmingw32 = " --disable-plugins --disable-nls"
+LDFLAGS_append_sdkmingw32 = " -Wl,-static"
+
+DEPENDS_remove_sdkmingw32 = "nativesdk-gettext"
+DEPENDS_remove_sdkmingw32 = "nativesdk-flex"
-- 
1.9.1

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-mingw][PATCH 4/6] libmpc_1.0.2: updated to libmpc_1.0.3

2015-08-05 Thread Juro Bystricky
Renamed recipes-support/mpc/libmpc_1.0.2.bbappend to
recipes-support/libmpc/libmpc_1.0.3.bbappend to reflect the changed
location and version of the recipe libmpc_1.0.3.bb.

Signed-off-by: Juro Bystricky 
---
 recipes-support/libmpc/libmpc_1.0.3.bbappend | 1 +
 recipes-support/mpc/libmpc_1.0.2.bbappend| 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)
 create mode 100644 recipes-support/libmpc/libmpc_1.0.3.bbappend
 delete mode 100644 recipes-support/mpc/libmpc_1.0.2.bbappend

diff --git a/recipes-support/libmpc/libmpc_1.0.3.bbappend 
b/recipes-support/libmpc/libmpc_1.0.3.bbappend
new file mode 100644
index 000..0d289df
--- /dev/null
+++ b/recipes-support/libmpc/libmpc_1.0.3.bbappend
@@ -0,0 +1 @@
+EXTRA_OECONF_append_mingw32 = "--enable-static --disable-shared"
\ No newline at end of file
diff --git a/recipes-support/mpc/libmpc_1.0.2.bbappend 
b/recipes-support/mpc/libmpc_1.0.2.bbappend
deleted file mode 100644
index 0d289df..000
--- a/recipes-support/mpc/libmpc_1.0.2.bbappend
+++ /dev/null
@@ -1 +0,0 @@
-EXTRA_OECONF_append_mingw32 = "--enable-static --disable-shared"
\ No newline at end of file
-- 
1.9.1

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-mingw][PATCH 3/6] nativesdk-libtool_2.4.2: updated nativesdk-libtool_2.4.6

2015-08-05 Thread Juro Bystricky
Renamed nativesdk-libtool_2.4.2.bbappend to nativesdk-libtool_2.4.6.bbappend
in order to match the new recipe nativesdk-libtool_2.4.6.bb.

Signed-off-by: Juro Bystricky 
---
 recipes-devtools/libtool/nativesdk-libtool_2.4.2.bbappend | 1 -
 recipes-devtools/libtool/nativesdk-libtool_2.4.6.bbappend | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)
 delete mode 100644 recipes-devtools/libtool/nativesdk-libtool_2.4.2.bbappend
 create mode 100644 recipes-devtools/libtool/nativesdk-libtool_2.4.6.bbappend

diff --git a/recipes-devtools/libtool/nativesdk-libtool_2.4.2.bbappend 
b/recipes-devtools/libtool/nativesdk-libtool_2.4.2.bbappend
deleted file mode 100644
index 4252e8d..000
--- a/recipes-devtools/libtool/nativesdk-libtool_2.4.2.bbappend
+++ /dev/null
@@ -1 +0,0 @@
-EXTRA_OECONF_append_mingw32 = " --disable-shared"
\ No newline at end of file
diff --git a/recipes-devtools/libtool/nativesdk-libtool_2.4.6.bbappend 
b/recipes-devtools/libtool/nativesdk-libtool_2.4.6.bbappend
new file mode 100644
index 000..4252e8d
--- /dev/null
+++ b/recipes-devtools/libtool/nativesdk-libtool_2.4.6.bbappend
@@ -0,0 +1 @@
+EXTRA_OECONF_append_mingw32 = " --disable-shared"
\ No newline at end of file
-- 
1.9.1

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-mingw][PATCH 2/6] gdb-cross-canadian_7.8.1: updated to gdb-cross-canadian_7.9.1

2015-08-05 Thread Juro Bystricky
Renamed gdb-cross-canadian_7.8.1.bbappend to gdb-cross-canadian_7.9.1.bbappend,
to match the updated recipe  gdb-cross-canadian_7.9.1.bb.

Signed-off-by: Juro Bystricky 
---
 recipes-devtools/gdb/gdb-cross-canadian_7.8.1.bbappend | 5 -
 recipes-devtools/gdb/gdb-cross-canadian_7.9.1.bbappend | 5 +
 2 files changed, 5 insertions(+), 5 deletions(-)
 delete mode 100644 recipes-devtools/gdb/gdb-cross-canadian_7.8.1.bbappend
 create mode 100644 recipes-devtools/gdb/gdb-cross-canadian_7.9.1.bbappend

diff --git a/recipes-devtools/gdb/gdb-cross-canadian_7.8.1.bbappend 
b/recipes-devtools/gdb/gdb-cross-canadian_7.8.1.bbappend
deleted file mode 100644
index bf4bd75..000
--- a/recipes-devtools/gdb/gdb-cross-canadian_7.8.1.bbappend
+++ /dev/null
@@ -1,5 +0,0 @@
-LDFLAGS_append_sdkmingw32 = " -Wl,-static"
-EXEEXT_sdkmingw32 = ".exe"
-DEPENDS_remove_sdkmingw32 = "nativesdk-ncurses nativesdk-readline 
nativesdk-python"
-RDEPENDS_${PN}_remove_sdkmingw32 = "nativesdk-python-core 
nativesdk-python-lang nativesdk-python-re nativesdk-python-codecs 
nativesdk-python-netclient"
-EXTRA_OECONF_append_sdkmingw32 = "--without-curses --without-system-readline 
--with-python=no"
diff --git a/recipes-devtools/gdb/gdb-cross-canadian_7.9.1.bbappend 
b/recipes-devtools/gdb/gdb-cross-canadian_7.9.1.bbappend
new file mode 100644
index 000..bf4bd75
--- /dev/null
+++ b/recipes-devtools/gdb/gdb-cross-canadian_7.9.1.bbappend
@@ -0,0 +1,5 @@
+LDFLAGS_append_sdkmingw32 = " -Wl,-static"
+EXEEXT_sdkmingw32 = ".exe"
+DEPENDS_remove_sdkmingw32 = "nativesdk-ncurses nativesdk-readline 
nativesdk-python"
+RDEPENDS_${PN}_remove_sdkmingw32 = "nativesdk-python-core 
nativesdk-python-lang nativesdk-python-re nativesdk-python-codecs 
nativesdk-python-netclient"
+EXTRA_OECONF_append_sdkmingw32 = "--without-curses --without-system-readline 
--with-python=no"
-- 
1.9.1

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-mingw][PATCH 6/6] gettext_0.19.4.bbappend: support for mingw

2015-08-05 Thread Juro Bystricky
This patch solves various unresolved references:

 .libs/fstrcmp.o:fstrcmp.c:(.text+0x4b6): undefined reference to 
`_imp__pthread_key_create'
 .libs/fstrcmp.o:fstrcmp.c:(.text+0x5b2): undefined reference to 
`_imp__pthread_once'
 .libs/fstrcmp.o:fstrcmp.c:(.text+0x5c4): undefined reference to 
`_imp__pthread_getspecific'
 .libs/fstrcmp.o:fstrcmp.c:(.text+0x617): undefined reference to 
`_imp__pthread_setspecific'
 .libs/localename.o:localename.c:(.text+0x14f6): undefined reference to 
`_imp__pthread_mutex_lock'
 .libs/localename.o:localename.c:(.text+0x1576): undefined reference to 
`_imp__pthread_mutex_unlock'
 .libs/localename.o:localename.c:(.text+0x15c9): undefined reference to 
`_imp__pthread_mutex_unlock'
 glthread/.libs/lock.o:lock.c:(.text+0xe): undefined reference to 
`_imp__pthread_mutexattr_init'
 glthread/.libs/lock.o:lock.c:(.text+0x2d): undefined reference to 
`_imp__pthread_mutexattr_settype'
 glthread/.libs/lock.o:lock.c:(.text+0x44): undefined reference to 
`_imp__pthread_mutex_init'
 glthread/.libs/lock.o:lock.c:(.text+0x53): undefined reference to 
`_imp__pthread_mutexattr_destroy'
 glthread/.libs/lock.o:lock.c:(.text+0x62): undefined reference to 
`_imp__pthread_mutexattr_destroy'
 glthread/.libs/lock.o:lock.c:(.text+0x75): undefined reference to 
`_imp__pthread_mutexattr_dest

Signed-off-by: Juro Bystricky 
---
 recipes-core/gettext/gettext_0.19.4.bbappend | 2 ++
 1 file changed, 2 insertions(+)
 create mode 100644 recipes-core/gettext/gettext_0.19.4.bbappend

diff --git a/recipes-core/gettext/gettext_0.19.4.bbappend 
b/recipes-core/gettext/gettext_0.19.4.bbappend
new file mode 100644
index 000..ac76feb
--- /dev/null
+++ b/recipes-core/gettext/gettext_0.19.4.bbappend
@@ -0,0 +1,2 @@
+DEPENDS_append_mingw32 = " pthreads-win32"
+LDFLAGS_prepend_mingw32 = " -lpthread "
-- 
1.9.1

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-mingw][PATCH 5/6] mpfr_3.1.2: updated to mpfr_3.1.3

2015-08-05 Thread Juro Bystricky
Renamed mpfr_3.1.2.bbappend to mpfr_3.1.3.bbappend to match the new recipe
mpfr_3.1.3.bb.

Signed-off-by: Juro Bystricky 
---
 recipes-support/mpfr/mpfr_3.1.2.bbappend | 1 -
 recipes-support/mpfr/mpfr_3.1.3.bbappend | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)
 delete mode 100644 recipes-support/mpfr/mpfr_3.1.2.bbappend
 create mode 100644 recipes-support/mpfr/mpfr_3.1.3.bbappend

diff --git a/recipes-support/mpfr/mpfr_3.1.2.bbappend 
b/recipes-support/mpfr/mpfr_3.1.2.bbappend
deleted file mode 100644
index 4252e8d..000
--- a/recipes-support/mpfr/mpfr_3.1.2.bbappend
+++ /dev/null
@@ -1 +0,0 @@
-EXTRA_OECONF_append_mingw32 = " --disable-shared"
\ No newline at end of file
diff --git a/recipes-support/mpfr/mpfr_3.1.3.bbappend 
b/recipes-support/mpfr/mpfr_3.1.3.bbappend
new file mode 100644
index 000..4252e8d
--- /dev/null
+++ b/recipes-support/mpfr/mpfr_3.1.3.bbappend
@@ -0,0 +1 @@
+EXTRA_OECONF_append_mingw32 = " --disable-shared"
\ No newline at end of file
-- 
1.9.1

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-mingw][PATCH] additional license: ZPL

2015-08-08 Thread Juro Bystricky
mingw runtime and mingw headers are licensed under ZPL
license (Zope Public License). ZPL license is GPL compatible.
This patch puts the ZPL license into meta-mingw/files/additional-licenses
in order to  eliminate mingw warnings:

WARNING: nativesdk-mingw-w64-headers: No generic license file exists for: ZPL 
in any provider
WARNING: nativesdk-mingw-w64-runtime: No generic license file exists for: ZPL 
in any provider

Signed-off-by: Juro Bystricky 
---
 conf/layer.conf   |  1 +
 files/additional-licenses/ZPL | 43 +++
 2 files changed, 44 insertions(+)
 create mode 100644 files/additional-licenses/ZPL

diff --git a/conf/layer.conf b/conf/layer.conf
index a32fa82..7a4c142 100644
--- a/conf/layer.conf
+++ b/conf/layer.conf
@@ -7,3 +7,4 @@ BBFILES += "${LAYERDIR}/recipes*/*/*.bb 
${LAYERDIR}/recipes*/*/*.bbappend"
 BBFILE_COLLECTIONS += "meta-mingw"
 BBFILE_PATTERN_meta-mingw := "^${LAYERDIR}/"
 BBFILE_PRIORITY_meta-mingw = "8"
+LICENSE_PATH += "${LAYERDIR}/files/additional-licenses"
diff --git a/files/additional-licenses/ZPL b/files/additional-licenses/ZPL
new file mode 100644
index 000..28fa951
--- /dev/null
+++ b/files/additional-licenses/ZPL
@@ -0,0 +1,43 @@
+With exception of certain parts that are prominently marked as being
+in the Public Domain, BSD, or LGPL this Software is provided under the
+Zope Public License (ZPL) Version 2.1.
+
+Copyright (c) 2009 - 2013 by the mingw-w64 project
+
+See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+This license has been certified as open source. It has also been designated
+as GPL compatible by the Free Software Foundation (FSF).
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+   1. Redistributions in source code must retain the accompanying copyright
+  notice, this list of conditions, and the following disclaimer.
+   2. Redistributions in binary form must reproduce the accompanying
+  copyright notice, this list of conditions, and the following disclaimer
+  in the documentation and/or other materials provided with the
+  distribution.
+   3. Names of the copyright holders must not be used to endorse or promote
+  products derived from this software without prior written permission
+  from the copyright holders.
+   4. The right to distribute this software or to use it for any purpose does
+  not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+  the copyright holders.  Use of them is covered by separate agreement
+  with the copyright holders.
+   5. If any files are modified, you must cause the modified files to carry
+  prominent notices stating that you changed the files and the date of
+  any change.
+
+Disclaimer
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+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 HOLDERS 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.
-- 
1.9.1

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-darwin][PATCH] README: steps to create OSX-sdk.zip

2015-08-10 Thread Juro Bystricky
osx-runtime requires the file OSX-sdk.zip. This file must be created by the 
user.
This patch describes the typical steps to create this file using a Mac computer.

Signed-off-by: Juro Bystricky 
---
 README | 26 +-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/README b/README
index b7243cb..6e8d500 100644
--- a/README
+++ b/README
@@ -10,7 +10,31 @@ The odcctools2 version should be 64 bit safe and not need 
those workarounds.
 You also need a OS-X sysroot tarball/zip file generated (copied) from a target 
OS-X
 system. This is placed in the osx-runtime files directory and is used to 
compile the SDK
 against it. It needs to contain the system libraries (/usr/lib) and include 
files 
-(/usr/include).
+(/usr/include). This tarball is not part of this meta-darwin layer and must be
+created by the user. To create it, the user is required to have a legitimate 
Mac computer
+with OSX 10.8 or later and with Xcode 5.1.0 or later installed.
+
+To create the SDK tarball, perform the following steps using your Mac computer:
+
+1. Install Xcode 5.1.0 or later using App Store.
+
+2. Install the command-line development tools
+(Preferences -> Downloads -> Command-line tools)
+
+3. Use Terminal to create the file OSX-sdk.zip from the OSX SDK (this sample 
assumes
+   OSX 10.10):
+
+$ mkdir ~/Desktop/OSX-sdk
+$ cd ~/Desktop/OSX-sdk
+$ ditto `xcrun --sdk macosx10.10 --show-sdk-path` .
+$ cd ..
+$ zip -yr OSX-sdk OSX-sdk
+
+4. Copy the created OSX-sdk.zip file to your Yocto development machine, 
placing it into
+   meta-darwin layer:
+
+<...>/meta-darwin/recipes-devtools/osx-runtime/files
+
 
 This layer depends on:
 
-- 
1.9.1

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-darwin][PATCH] osx-runtime: OSX Yosemite v10.10

2015-08-11 Thread Juro Bystricky
Set of patches to allow building against OSX Yosemite v10.10 runtime.

Signed-off-by: Juro Bystricky 
---
 .../files/fix_typedef_dispatch_block_t.patch   |   16 +
 .../files/foundation_framework_headers_clang.patch | 1065 
 .../osx-runtime/files/fsevents-clang.patch |  135 +++
 ...vailability_with_message_for_gcc_osx10.10.patch |  128 +++
 .../osx-runtime/nativesdk-osx-runtime_10.10.bb |   70 ++
 5 files changed, 1414 insertions(+)
 create mode 100644 
recipes-devtools/osx-runtime/files/fix_typedef_dispatch_block_t.patch
 create mode 100644 
recipes-devtools/osx-runtime/files/foundation_framework_headers_clang.patch
 create mode 100644 recipes-devtools/osx-runtime/files/fsevents-clang.patch
 create mode 100644 
recipes-devtools/osx-runtime/files/remove_unsupported_attribute_availability_with_message_for_gcc_osx10.10.patch
 create mode 100644 recipes-devtools/osx-runtime/nativesdk-osx-runtime_10.10.bb

diff --git 
a/recipes-devtools/osx-runtime/files/fix_typedef_dispatch_block_t.patch 
b/recipes-devtools/osx-runtime/files/fix_typedef_dispatch_block_t.patch
new file mode 100644
index 000..6a1bace
--- /dev/null
+++ b/recipes-devtools/osx-runtime/files/fix_typedef_dispatch_block_t.patch
@@ -0,0 +1,16 @@
+Index: OSX-sdk/usr/include/dispatch/object.h
+===
+--- OSX-sdk.orig/usr/include/dispatch/object.h
 OSX-sdk/usr/include/dispatch/object.h
+@@ -140,7 +140,11 @@ typedef union {
+  * Instead, the block literal must be copied to the heap with the Block_copy()
+  * function or by sending it a -[copy] message.
+  */
++#if defined(__clang__)
+ typedef void (^dispatch_block_t)(void);
++#else
++typedef void* dispatch_block_t;
++#endif
+ 
+ __BEGIN_DECLS
+ 
diff --git 
a/recipes-devtools/osx-runtime/files/foundation_framework_headers_clang.patch 
b/recipes-devtools/osx-runtime/files/foundation_framework_headers_clang.patch
new file mode 100644
index 000..0f87c53
--- /dev/null
+++ 
b/recipes-devtools/osx-runtime/files/foundation_framework_headers_clang.patch
@@ -0,0 +1,1065 @@
+Index: 
OSX-sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSArray.h
+===
+--- 
OSX-sdk.orig/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSArray.h
 
OSX-sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSArray.h
+@@ -55,7 +55,7 @@
+ - (NSArray *)objectsAtIndexes:(NSIndexSet *)indexes;
+ 
+ - (id)objectAtIndexedSubscript:(NSUInteger)idx NS_AVAILABLE(10_8, 6_0);
+-
++#if defined(__clang__)
+ - (void)enumerateObjectsUsingBlock:(void (^)(id obj, NSUInteger idx, BOOL 
*stop))block NS_AVAILABLE(10_6, 4_0);
+ - (void)enumerateObjectsWithOptions:(NSEnumerationOptions)opts 
usingBlock:(void (^)(id obj, NSUInteger idx, BOOL *stop))block 
NS_AVAILABLE(10_6, 4_0);
+ - (void)enumerateObjectsAtIndexes:(NSIndexSet *)s 
options:(NSEnumerationOptions)opts usingBlock:(void (^)(id obj, NSUInteger idx, 
BOOL *stop))block NS_AVAILABLE(10_6, 4_0);
+@@ -67,7 +67,20 @@
+ - (NSIndexSet *)indexesOfObjectsPassingTest:(BOOL (^)(id obj, NSUInteger idx, 
BOOL *stop))predicate NS_AVAILABLE(10_6, 4_0);
+ - (NSIndexSet *)indexesOfObjectsWithOptions:(NSEnumerationOptions)opts 
passingTest:(BOOL (^)(id obj, NSUInteger idx, BOOL *stop))predicate 
NS_AVAILABLE(10_6, 4_0);
+ - (NSIndexSet *)indexesOfObjectsAtIndexes:(NSIndexSet *)s 
options:(NSEnumerationOptions)opts passingTest:(BOOL (^)(id obj, NSUInteger 
idx, BOOL *stop))predicate NS_AVAILABLE(10_6, 4_0);
++#else
++- (void)enumerateObjectsUsingBlock:(void *(id obj, NSUInteger idx, BOOL 
*stop))block NS_AVAILABLE(10_6, 4_0);
++- (void)enumerateObjectsWithOptions:(NSEnumerationOptions)opts 
usingBlock:(void *(id obj, NSUInteger idx, BOOL *stop))block NS_AVAILABLE(10_6, 
4_0);
++- (void)enumerateObjectsAtIndexes:(NSIndexSet *)s 
options:(NSEnumerationOptions)opts usingBlock:(void *(id obj, NSUInteger idx, 
BOOL *stop))block NS_AVAILABLE(10_6, 4_0);
++
++- (NSUInteger)indexOfObjectPassingTest:(BOOL *(id obj, NSUInteger idx, BOOL 
*stop))predicate NS_AVAILABLE(10_6, 4_0);
++- (NSUInteger)indexOfObjectWithOptions:(NSEnumerationOptions)opts 
passingTest:(BOOL *(id obj, NSUInteger idx, BOOL *stop))predicate 
NS_AVAILABLE(10_6, 4_0);
++- (NSUInteger)indexOfObjectAtIndexes:(NSIndexSet *)s 
options:(NSEnumerationOptions)opts passingTest:(BOOL *(id obj, NSUInteger idx, 
BOOL *stop))predicate NS_AVAILABLE(10_6, 4_0);
++
++- (NSIndexSet *)indexesOfObjectsPassingTest:(BOOL *(id obj, NSUInteger idx, 
BOOL *stop))predicate NS_AVAILABLE(10_6, 4_0);
++- (NSIndexSet *)indexesOfObjectsWithOptions:(NSEnumerationOptions)opts 
passingTest:(BOOL *(id obj, NSUInteger idx, BOOL *stop))predicate 
NS_AVAILABLE(10_6, 4_0);
++- (NSIndexSet *)indexesOfObjectsAtIndexes:(NSIndexSet *)s 
options:(NSEnumerationOptions)opts passingTest:(BOOL *(id obj, NSUInteger idx, 
BOOL *stop))predicate NS_AVAILABLE(10_6, 4_0

[yocto] [PSPLASH 1/2] psplash-fb.c: Fix BGR888 detection

2015-11-24 Thread Juro Bystricky
Signed-off-by: Juro Bystricky 
---
 psplash-fb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/psplash-fb.c b/psplash-fb.c
index bd9cd9d..e71af8f 100644
--- a/psplash-fb.c
+++ b/psplash-fb.c
@@ -185,7 +185,7 @@ psplash_fb_new (int angle)
  fb->rgbmode = RGB888;
   } else if (fb->red_offset == 0 && fb->red_length == 8 &&
   fb->green_offset == 8 && fb->green_length == 8 &&
-  fb->blue_offset == 8 && fb->blue_length == 8) {
+  fb->blue_offset == 16 && fb->blue_length == 8) {
  fb->rgbmode = BGR888;
   } else {
  fb->rgbmode = GENERIC;
-- 
1.9.1

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [PSPLASH 0/2] Few fixes for psplash

2015-11-24 Thread Juro Bystricky
These patches fix https://bugzilla.yoctoproject.org/show_bug.cgi?id=7236

Considering there was a bug in the BGR888 detection, it is probaly safe to 
assume it was never used. I modified handling of 24BPP modes somewhat as well,
but did not test it. 24BPP changes only affect big endian mode, little endian
should be the same as before. (If you are aware of anybody actually using 24BPP
modes, please let me know)
Tested with jethro/core-image-sato (qemuppc, qemumips, qemuarm).


Juro Bystricky (2):
  psplash-fb.c: Fix BGR888 detection
  psplash-fb.c: Fix some endian issues

 psplash-fb.c | 31 ++-
 1 file changed, 26 insertions(+), 5 deletions(-)

-- 
1.9.1

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [PSPLASH 2/2] psplash-fb.c: Fix some endian issues

2015-11-24 Thread Juro Bystricky
The routine psplash_fb_plot_pixel implicitly assumed little endian
format when plotting pixels in RGB888 or BGR888 modes.

Signed-off-by: Juro Bystricky 
---
 psplash-fb.c | 29 +
 1 file changed, 25 insertions(+), 4 deletions(-)

diff --git a/psplash-fb.c b/psplash-fb.c
index e71af8f..7b352e0 100644
--- a/psplash-fb.c
+++ b/psplash-fb.c
@@ -14,6 +14,8 @@
  *  GNU General Public License for more details.
  *
  */
+
+#include 
 #include "psplash.h"
 
 void
@@ -294,11 +296,21 @@ psplash_fb_plot_pixel (PSplashFB*fb,
 switch (fb->bpp)
   {
   case 24:
-  case 32:
-*(fb->data + off) = blue;
+#if __BYTE_ORDER == __BIG_ENDIAN
+*(fb->data + off + 0) = red;
+*(fb->data + off + 1) = green;
+*(fb->data + off + 2) = blue;
+#else
+*(fb->data + off + 0) = blue;
 *(fb->data + off + 1) = green;
 *(fb->data + off + 2) = red;
+#endif
+break;
+  case 32:
+*(volatile uint32_t *) (fb->data + off)
+  = (red << 16) | (green << 8) | (blue);
 break;
+
   case 16:
 *(volatile uint16_t *) (fb->data + off)
  = ((red >> 3) << 11) | ((green >> 2) << 5) | (blue >> 3);
@@ -311,10 +323,19 @@ psplash_fb_plot_pixel (PSplashFB*fb,
 switch (fb->bpp)
   {
   case 24:
-  case 32:
-*(fb->data + off) = red;
+#if __BYTE_ORDER == __BIG_ENDIAN
+*(fb->data + off + 0) = blue;
+*(fb->data + off + 1) = green;
+*(fb->data + off + 2) = red;
+#else
+*(fb->data + off + 0) = red;
 *(fb->data + off + 1) = green;
 *(fb->data + off + 2) = blue;
+#endif
+break;
+  case 32:
+*(volatile uint32_t *) (fb->data + off)
+  = (blue << 16) | (green << 8) | (red);
 break;
   case 16:
 *(volatile uint16_t *) (fb->data + off)
-- 
1.9.1

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-mingw][PATCH 0/7] Updates for krogoth/master

2016-08-20 Thread Juro Bystricky
Krogoth recipes fail to cross-compile for Windows using meta-mingw layer.
In particular, the following should/used to work (jethro with meta-mingw layer):

SDKMACHINE="i686-mingw32"
MACHINE="qemux86"
TCLIBC="baremetal"
bitbake gcc-cross-canadian-i586

SDKMACHINE="i686-mingw32"
MACHINE="qemux86"
bitbake meta-toolchain

This patchset updates meta-mingw layer so the above work for krogoth as well.
There is no "krogoth" branch for meta-mingw, these patches should go there once 
the
branch exists.
FWIW, I tested these patches with the current poky master as well, and succeed 
in cross-compiling
of the most common recipes (for both SDKMACHINE=i686-mingw32 and 
SDKMACHINE=x86_64-mingw32)
such as:
bitbake gcc-cross-canadian-i586
bitbake gdb-cross-canadian-i586
bitbake meta-toolchain
bitbake core-image-minimal -c populate_sdk

[YOCTO#10143]



Juro Bystricky (7):
  *-mingw32.conf: Upgrade for krogoth
  gettext_0.19.4.bbappend: Update for later versions
  binutils-cross-canadian_2.25%.bbappend: Work with all 2.2* versions
  gcc-runtime: Drop libitm for mingw32 runtime
  gmp_6.0.0.bbappend: Removed
  mpfr_3.1.3.bbappend: Work with all 3.1.% versions
  gdb-cross-canadian_7.9.1: Work with all 7.% versions

 conf/machine-sdk/i686-mingw32.conf   | 7 ++-
 conf/machine-sdk/x86_64-mingw32.conf | 7 ++-
 recipes-core/gettext/gettext_0.19.%.bbappend | 6 ++
 recipes-core/gettext/gettext_0.19.4.bbappend | 2 --
 recipes-devtools/binutils/binutils-cross-canadian_2.2%.bbappend  | 5 +
 recipes-devtools/binutils/binutils-cross-canadian_2.25%.bbappend | 5 -
 recipes-devtools/gcc/gcc-runtime_%.bbappend  | 1 +
 recipes-devtools/gdb/gdb-cross-canadian_7.%.bbappend | 7 +++
 recipes-devtools/gdb/gdb-cross-canadian_7.9.1.bbappend   | 5 -
 recipes-support/gmp/gmp_6.0.0.bbappend   | 3 ---
 recipes-support/mpfr/mpfr_3.1.%.bbappend | 1 +
 recipes-support/mpfr/mpfr_3.1.3.bbappend | 1 -
 12 files changed, 32 insertions(+), 18 deletions(-)
 create mode 100644 recipes-core/gettext/gettext_0.19.%.bbappend
 delete mode 100644 recipes-core/gettext/gettext_0.19.4.bbappend
 create mode 100644 
recipes-devtools/binutils/binutils-cross-canadian_2.2%.bbappend
 delete mode 100644 
recipes-devtools/binutils/binutils-cross-canadian_2.25%.bbappend
 create mode 100644 recipes-devtools/gdb/gdb-cross-canadian_7.%.bbappend
 delete mode 100644 recipes-devtools/gdb/gdb-cross-canadian_7.9.1.bbappend
 delete mode 100644 recipes-support/gmp/gmp_6.0.0.bbappend
 create mode 100644 recipes-support/mpfr/mpfr_3.1.%.bbappend
 delete mode 100644 recipes-support/mpfr/mpfr_3.1.3.bbappend

-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-mingw][PATCH 5/7] gmp_6.0.0.bbappend: Removed

2016-08-20 Thread Juro Bystricky
Not needed anymore.

Signed-off-by: Juro Bystricky 
---
 recipes-support/gmp/gmp_6.0.0.bbappend | 3 ---
 1 file changed, 3 deletions(-)
 delete mode 100644 recipes-support/gmp/gmp_6.0.0.bbappend

diff --git a/recipes-support/gmp/gmp_6.0.0.bbappend 
b/recipes-support/gmp/gmp_6.0.0.bbappend
deleted file mode 100644
index 7f25fe2..000
--- a/recipes-support/gmp/gmp_6.0.0.bbappend
+++ /dev/null
@@ -1,3 +0,0 @@
-do_install_append_mingw32 () {
-   ln -s libgmp.lib ${D}${libdir}/gmp.lib 
-}
\ No newline at end of file
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-mingw][PATCH 4/7] gcc-runtime: Drop libitm for mingw32 runtime

2016-08-20 Thread Juro Bystricky
libitm mingw build presently not supported, so don't build it.

Signed-off-by: Juro Bystricky 
---
 recipes-devtools/gcc/gcc-runtime_%.bbappend | 1 +
 1 file changed, 1 insertion(+)

diff --git a/recipes-devtools/gcc/gcc-runtime_%.bbappend 
b/recipes-devtools/gcc/gcc-runtime_%.bbappend
index b068dfd..df0ac9e 100644
--- a/recipes-devtools/gcc/gcc-runtime_%.bbappend
+++ b/recipes-devtools/gcc/gcc-runtime_%.bbappend
@@ -4,5 +4,6 @@ FILES_libssp_append_mingw32 = " ${bindir}/libssp*.dll"
 # FILES_libgomp_append_mingw32 = " ${bindir}/libgomp*.dll"
 
 RUNTIMETARGET_remove_mingw32 = "libatomic libgomp"
+RUNTIMETARGET_remove_mingw32 = "libitm"
 
 DEPENDS_append_mingw32 = " pthreads-win32"
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-mingw][PATCH 1/7] *-mingw32.conf: Upgrade for krogoth

2016-08-20 Thread Juro Bystricky
Use explicit mingw32 override for

   PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-initial

to avoid multiple providers and consequently broken builds.

Allow building static libraries, disabled by default.

Signed-off-by: Juro Bystricky 
---
 conf/machine-sdk/i686-mingw32.conf   | 7 ++-
 conf/machine-sdk/x86_64-mingw32.conf | 7 ++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/conf/machine-sdk/i686-mingw32.conf 
b/conf/machine-sdk/i686-mingw32.conf
index 0bdedaa..d426fe3 100644
--- a/conf/machine-sdk/i686-mingw32.conf
+++ b/conf/machine-sdk/i686-mingw32.conf
@@ -3,7 +3,8 @@ SDK_OS = "mingw32"
 
 GCCTHREADS_mingw32 = "win32"
 
-PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-for-gcc = 
"nativesdk-mingw-w64-runtime"
+PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-for-gcc_mingw32 = 
"nativesdk-mingw-w64-runtime"
+PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-initial_mingw32 = 
"nativesdk-mingw-w64-runtime"
 PREFERRED_PROVIDER_virtual/nativesdk-libc = "nativesdk-mingw-w64-runtime"
 PREFERRED_PROVIDER_virtual/nativesdk-libintl = "nativesdk-mingw-w64-runtime"
 PREFERRED_PROVIDER_virtual/nativesdk-libiconv = "nativesdk-libiconv"
@@ -29,3 +30,7 @@ export WINDRES = "${HOST_PREFIX}windres 
--include-dir=${STAGING_INCDIR}"
 export RC = "${WINDRES}"
 
 BB_HASHBASE_WHITELIST_append = " WINDRES RC"
+
+# Needed to override no-static-libs.inc
+DISABLE_STATIC_mingw32 = ""
+
diff --git a/conf/machine-sdk/x86_64-mingw32.conf 
b/conf/machine-sdk/x86_64-mingw32.conf
index 5e80dfa..b9706f9 100644
--- a/conf/machine-sdk/x86_64-mingw32.conf
+++ b/conf/machine-sdk/x86_64-mingw32.conf
@@ -3,7 +3,8 @@ SDK_OS = "mingw32"
 
 GCCTHREADS_mingw32 = "win32"
 
-PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-for-gcc = 
"nativesdk-mingw-w64-runtime"
+PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-for-gcc_mingw32 = 
"nativesdk-mingw-w64-runtime"
+PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-initial_mingw32 = 
"nativesdk-mingw-w64-runtime"
 PREFERRED_PROVIDER_virtual/nativesdk-libc = "nativesdk-mingw-w64-runtime"
 PREFERRED_PROVIDER_virtual/nativesdk-libintl = "nativesdk-mingw-w64-runtime"
 PREFERRED_PROVIDER_virtual/nativesdk-libiconv = "nativesdk-libiconv"
@@ -29,3 +30,7 @@ export WINDRES = "${HOST_PREFIX}windres 
--include-dir=${STAGING_INCDIR}"
 export RC = "${WINDRES}"
 
 BB_HASHBASE_WHITELIST_append = " WINDRES RC"
+
+# Needed to override no-static-libs.inc
+DISABLE_STATIC_mingw32 = ""
+
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-mingw][PATCH 3/7] binutils-cross-canadian_2.25%.bbappend: Work with all 2.2* versions

2016-08-20 Thread Juro Bystricky
Tested up to 2.27

Signed-off-by: Juro Bystricky 
---
 recipes-devtools/binutils/binutils-cross-canadian_2.2%.bbappend  | 5 +
 recipes-devtools/binutils/binutils-cross-canadian_2.25%.bbappend | 5 -
 2 files changed, 5 insertions(+), 5 deletions(-)
 create mode 100644 
recipes-devtools/binutils/binutils-cross-canadian_2.2%.bbappend
 delete mode 100644 
recipes-devtools/binutils/binutils-cross-canadian_2.25%.bbappend

diff --git a/recipes-devtools/binutils/binutils-cross-canadian_2.2%.bbappend 
b/recipes-devtools/binutils/binutils-cross-canadian_2.2%.bbappend
new file mode 100644
index 000..026c932
--- /dev/null
+++ b/recipes-devtools/binutils/binutils-cross-canadian_2.2%.bbappend
@@ -0,0 +1,5 @@
+EXTRA_OECONF_append_sdkmingw32 = " --disable-plugins --disable-nls"
+LDFLAGS_append_sdkmingw32 = " -Wl,-static"
+
+DEPENDS_remove_sdkmingw32 = "nativesdk-gettext"
+DEPENDS_remove_sdkmingw32 = "nativesdk-flex"
diff --git a/recipes-devtools/binutils/binutils-cross-canadian_2.25%.bbappend 
b/recipes-devtools/binutils/binutils-cross-canadian_2.25%.bbappend
deleted file mode 100644
index 026c932..000
--- a/recipes-devtools/binutils/binutils-cross-canadian_2.25%.bbappend
+++ /dev/null
@@ -1,5 +0,0 @@
-EXTRA_OECONF_append_sdkmingw32 = " --disable-plugins --disable-nls"
-LDFLAGS_append_sdkmingw32 = " -Wl,-static"
-
-DEPENDS_remove_sdkmingw32 = "nativesdk-gettext"
-DEPENDS_remove_sdkmingw32 = "nativesdk-flex"
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-mingw][PATCH 2/7] gettext_0.19.4.bbappend: Update for later versions

2016-08-20 Thread Juro Bystricky
Modified to work properly with later versions.
Only static build supported.
(Tested up to 0.19.8.1)

Signed-off-by: Juro Bystricky 
---
 recipes-core/gettext/gettext_0.19.%.bbappend | 6 ++
 recipes-core/gettext/gettext_0.19.4.bbappend | 2 --
 2 files changed, 6 insertions(+), 2 deletions(-)
 create mode 100644 recipes-core/gettext/gettext_0.19.%.bbappend
 delete mode 100644 recipes-core/gettext/gettext_0.19.4.bbappend

diff --git a/recipes-core/gettext/gettext_0.19.%.bbappend 
b/recipes-core/gettext/gettext_0.19.%.bbappend
new file mode 100644
index 000..efd10d6
--- /dev/null
+++ b/recipes-core/gettext/gettext_0.19.%.bbappend
@@ -0,0 +1,6 @@
+DEPENDS_append_mingw32 = " pthreads-win32"
+LDFLAGS_prepend_mingw32 = " -lpthread "
+
+CFLAGS_append_mingw32 = " -DLIBXML_STATIC"
+EXTRA_OECONF_append_mingw32 = " --enable-threads=windows --enable-static 
--disable-shared "
+
diff --git a/recipes-core/gettext/gettext_0.19.4.bbappend 
b/recipes-core/gettext/gettext_0.19.4.bbappend
deleted file mode 100644
index ac76feb..000
--- a/recipes-core/gettext/gettext_0.19.4.bbappend
+++ /dev/null
@@ -1,2 +0,0 @@
-DEPENDS_append_mingw32 = " pthreads-win32"
-LDFLAGS_prepend_mingw32 = " -lpthread "
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-mingw][PATCH 6/7] mpfr_3.1.3.bbappend: Work with all 3.1.% versions

2016-08-20 Thread Juro Bystricky
Tested with 3.1.4.

Signed-off-by: Juro Bystricky 
---
 recipes-support/mpfr/mpfr_3.1.%.bbappend | 1 +
 recipes-support/mpfr/mpfr_3.1.3.bbappend | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)
 create mode 100644 recipes-support/mpfr/mpfr_3.1.%.bbappend
 delete mode 100644 recipes-support/mpfr/mpfr_3.1.3.bbappend

diff --git a/recipes-support/mpfr/mpfr_3.1.%.bbappend 
b/recipes-support/mpfr/mpfr_3.1.%.bbappend
new file mode 100644
index 000..4252e8d
--- /dev/null
+++ b/recipes-support/mpfr/mpfr_3.1.%.bbappend
@@ -0,0 +1 @@
+EXTRA_OECONF_append_mingw32 = " --disable-shared"
\ No newline at end of file
diff --git a/recipes-support/mpfr/mpfr_3.1.3.bbappend 
b/recipes-support/mpfr/mpfr_3.1.3.bbappend
deleted file mode 100644
index 4252e8d..000
--- a/recipes-support/mpfr/mpfr_3.1.3.bbappend
+++ /dev/null
@@ -1 +0,0 @@
-EXTRA_OECONF_append_mingw32 = " --disable-shared"
\ No newline at end of file
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-mingw][PATCH 7/7] gdb-cross-canadian_7.9.1: Work with all 7.% versions

2016-08-20 Thread Juro Bystricky
Tested with 7.11.

Signed-off-by: Juro Bystricky 
---
 recipes-devtools/gdb/gdb-cross-canadian_7.%.bbappend   | 7 +++
 recipes-devtools/gdb/gdb-cross-canadian_7.9.1.bbappend | 5 -
 2 files changed, 7 insertions(+), 5 deletions(-)
 create mode 100644 recipes-devtools/gdb/gdb-cross-canadian_7.%.bbappend
 delete mode 100644 recipes-devtools/gdb/gdb-cross-canadian_7.9.1.bbappend

diff --git a/recipes-devtools/gdb/gdb-cross-canadian_7.%.bbappend 
b/recipes-devtools/gdb/gdb-cross-canadian_7.%.bbappend
new file mode 100644
index 000..54b975a
--- /dev/null
+++ b/recipes-devtools/gdb/gdb-cross-canadian_7.%.bbappend
@@ -0,0 +1,7 @@
+LDFLAGS_append_sdkmingw32 = " -Wl,-static"
+EXEEXT_sdkmingw32 = ".exe"
+DEPENDS_remove_sdkmingw32 = "nativesdk-ncurses nativesdk-readline 
nativesdk-python"
+RDEPENDS_${PN}_remove_sdkmingw32 = "nativesdk-python-core 
nativesdk-python-lang nativesdk-python-re nativesdk-python-codecs 
nativesdk-python-netclient"
+EXTRA_OECONF_append_sdkmingw32 = "--without-curses --without-system-readline 
--with-python=no"
+PACKAGECONFIG_remove_sdkmingw32 = "readline"
+PACKAGECONFIG_remove_sdkmingw32 = "python"
diff --git a/recipes-devtools/gdb/gdb-cross-canadian_7.9.1.bbappend 
b/recipes-devtools/gdb/gdb-cross-canadian_7.9.1.bbappend
deleted file mode 100644
index bf4bd75..000
--- a/recipes-devtools/gdb/gdb-cross-canadian_7.9.1.bbappend
+++ /dev/null
@@ -1,5 +0,0 @@
-LDFLAGS_append_sdkmingw32 = " -Wl,-static"
-EXEEXT_sdkmingw32 = ".exe"
-DEPENDS_remove_sdkmingw32 = "nativesdk-ncurses nativesdk-readline 
nativesdk-python"
-RDEPENDS_${PN}_remove_sdkmingw32 = "nativesdk-python-core 
nativesdk-python-lang nativesdk-python-re nativesdk-python-codecs 
nativesdk-python-netclient"
-EXTRA_OECONF_append_sdkmingw32 = "--without-curses --without-system-readline 
--with-python=no"
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-mingw][PATCH 1/3] mingw-64-runtime_3.1.bb: Adapt to SDK_ARCH -> SDK_SYS chanages for crosssdk

2016-10-05 Thread Juro Bystricky
With the change of crosssdk to use SDK_SYS instead of SDK_ARCH, we need to 
update
the recipe to match the changes in master.

[YOCTO #9281]

Signed-off-by: Juro Bystricky 
---
 recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_3.1.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_3.1.0.bb 
b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_3.1.0.bb
index ddffcf4..c4292ad 100644
--- a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_3.1.0.bb
+++ b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_3.1.0.bb
@@ -24,7 +24,7 @@ PROVIDES += "virtual/nativesdk-${SDK_PREFIX}libc-for-gcc"
 PROVIDES += "virtual/nativesdk-libintl"
 
 STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}"
-STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${TARGET_ARCH}"
+STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${SDK_SYS}"
 TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}"
 PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:"
 
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-mingw][PATCH 2/3] gcc-crosssdk_%.bbappend: Do not configure with initfini-array enabled.

2016-10-05 Thread Juro Bystricky
Default configuration for gcc-crosssddk is now to enable initfini-array.
However, this works only for Linux so we disable it for mingw32.
Otherwise we will eventually encounter build error such as:

 multiple definition of `__do_global_dtors'

Signed-off-by: Juro Bystricky 
---
 recipes-devtools/gcc/gcc-crosssdk_%.bbappend | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/recipes-devtools/gcc/gcc-crosssdk_%.bbappend 
b/recipes-devtools/gcc/gcc-crosssdk_%.bbappend
index 77ba57f..b3b843a 100644
--- a/recipes-devtools/gcc/gcc-crosssdk_%.bbappend
+++ b/recipes-devtools/gcc/gcc-crosssdk_%.bbappend
@@ -1 +1,4 @@
 EXTRA_OECONF_mingw32 := 
"${@oe_filter_out('--with-linker-hash-style=${LINKER_HASH_STYLE}', 
'${EXTRA_OECONF}', d)}"
+PACKAGECONFIG_CONFARGS ?= ""
+EXTRA_OECONF_remove_mingw32 = "--enable-initfini-array"
+EXTRA_OECONF_append_mingw32 = " --disable-initfini-array"
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-mingw][PATCH 3/3] gcc-crosssdk-initial_%.bbappend:Do not configure with initfini-array enabled

2016-10-05 Thread Juro Bystricky
Default configuration for gcc-crosssddk-initial is now to enable initfini-array.
However, this works only for Linux so we disable it for mingw32.
Otherwise, (with SDKMACHINE=x86_64-mingw32) we will eventually encounter errors 
such as:

 Assembler messages:
 Error: invalid instruction suffix for `push'
 Error: invalid instruction suffix for `pop'

Signed-off-by: Juro Bystricky 
---
 recipes-devtools/gcc/gcc-crosssdk-initial_%.bbappend | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/recipes-devtools/gcc/gcc-crosssdk-initial_%.bbappend 
b/recipes-devtools/gcc/gcc-crosssdk-initial_%.bbappend
index 1c09342..135a776 100644
--- a/recipes-devtools/gcc/gcc-crosssdk-initial_%.bbappend
+++ b/recipes-devtools/gcc/gcc-crosssdk-initial_%.bbappend
@@ -1 +1,3 @@
 DEPENDS_append_mingw32 = " nativesdk-mingw-w64-headers"
+EXTRA_OECONF_remove_mingw32 = "--enable-initfini-array"
+EXTRA_OECONF_append_mingw32 = " --disable-initfini-array"
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-mingw][PATCH 0/3] meta-mingw patches for master

2016-10-05 Thread Juro Bystricky
The current master deviated enough from krogoth that it needs new meta-mingw
patches (and a separate meta-mingw branch) in order to build (cross-compile)
anything.
Only the build itself was tested, not the actual functionality of the
resulting deployables. Nevertheless, correct functionality is predicated on
a successful build.

The patches were tested by building some common/likely mingw
targets for both SDKMACHINE=i686-mingw32 and SDKMACHINE=x86_64-mingw32:

TCLIBC="baremetal"
MACHINE ="qemux86"
bitbake gcc-cross-canadian-i586

TCLIBC="baremetal"
MACHINE ="qemuarm"
PACKAGE_CLASSES ="package_ipk"
bitbake gcc-cross-canadian-arm

MACHINE ="qemux86"
bitbake gdb-cross-canadian-i586
   
MACHINE ="qemux86"
bitbake meta-toolchain

MACHINE ="qemux86"
SDKTAROPTS_append_mingw32 = " -h --hard-dereference"
bitbake core-image-minimal -c populate_sdk

Presently all deployables may need to be manually re-packaged for deployment on
Windows as the packages are typically in *.tar.xz or .rpm format (possibly
containing symbolic links).

Juro Bystricky (3):
  mingw-64-runtime_3.1.bb: Adapt to SDK_ARCH -> SDK_SYS chanages for
crosssdk
  gcc-crosssdk_%.bbappend: Do not configure with initfini-array enabled.
  gcc-crosssdk-initial_%.bbappend:Do not configure with initfini-array
enabled

 recipes-devtools/gcc/gcc-crosssdk-initial_%.bbappend| 2 ++
 recipes-devtools/gcc/gcc-crosssdk_%.bbappend| 3 +++
 recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_3.1.0.bb | 2 +-
 3 files changed, 6 insertions(+), 1 deletion(-)

-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-mingw][PATCH] diffutils_3.6: build for mingw

2018-04-12 Thread Juro Bystricky
Build of diffutils was requested/broken for mingw because of the commit
"diffutils: allow native & nativesdk builds"

This patch implements neccessary steps needed to build diffutils executables:
cmp.exe
diff.exe
diff3.exe
sdiff.exe

[YOCTO #12662]

Signed-off-by: Juro Bystricky 
---
 .../diffutils/diffutils/sdiff-no-kill.patch| 18 ++
 recipes-extended/diffutils/diffutils_3.6.bbappend  | 18 ++
 2 files changed, 36 insertions(+)
 create mode 100644 recipes-extended/diffutils/diffutils/sdiff-no-kill.patch
 create mode 100644 recipes-extended/diffutils/diffutils_3.6.bbappend

diff --git a/recipes-extended/diffutils/diffutils/sdiff-no-kill.patch 
b/recipes-extended/diffutils/diffutils/sdiff-no-kill.patch
new file mode 100644
index 000..70e7caf
--- /dev/null
+++ b/recipes-extended/diffutils/diffutils/sdiff-no-kill.patch
@@ -0,0 +1,18 @@
+"kill" is not supported by mingw, so compile conditionally,
+(same condition as another instance of "kill" in the source code).
+
+Upstream-Status: Pending
+Signed-off-by: Juro Bystricky 
+
+--- a/src/sdiff.c
 b/src/sdiff.c
+@@ -805,7 +805,9 @@
+ 
+   /* Yield an exit status indicating that a signal was received.  */
+   untrapsig (s);
++#if HAVE_WORKING_FORK
+   kill (getpid (), s);
++#endif
+ 
+   /* That didn't work, so exit with error status.  */
+   exit (EXIT_TROUBLE);
diff --git a/recipes-extended/diffutils/diffutils_3.6.bbappend 
b/recipes-extended/diffutils/diffutils_3.6.bbappend
new file mode 100644
index 000..f301349
--- /dev/null
+++ b/recipes-extended/diffutils/diffutils_3.6.bbappend
@@ -0,0 +1,18 @@
+
+FILESEXTRAPATHS_prepend_mingw32 := "${THISDIR}/${BPN}:"
+
+SRC_URI_remove_mingw32 = 
"file://0001-explicitly-disable-replacing-getopt.patch"
+SRC_URI_append_mingw32 = " file://sdiff-no-kill.patch"
+
+CACHED_CONFIGUREVARS_append_mingw32 = " ac_cv_header_getopt_h=yes "
+
+# Add some definitions for POSIX signals..
+CFLAGS_append_mingw32 = " -DSIGALRM=14 -DSIGHUP=1 -DSIGQUIT=3 -DSIGPIPE=13 
-DSIGTSTP=18 -DSIGSTOP=17 "
+
+do_configure_prepend_mingw32 () {
+# Remove building of "man"
+sed -i -e 's:^SUBDIRS = lib src tests doc man po gnulib-test:SUBDIRS = lib 
src tests doc po gnulib-test:g' ${S}/Makefile.am
+}
+
+
+
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-mingw][PATCH] qemu_2.11.%.bbappend: fix broken qemu build for mingw

2018-04-12 Thread Juro Bystricky
The commit "qemu: Bump to version 2.11.0" in oe-core broke the
build of qemu for mingw, due to using "socketpair", which is
not supported by mingw. "socketpair" is used in a local patch,
not in the qemu upstream code. The original local patch had
conditional code to exclude "socketpair" for _WIN32, but the
modified patch for qemu 2.11.0 removed this.

The fix is to simply remove the offending patch.

Signed-off-by: Juro Bystricky 
---
 recipes-devtools/qemu/qemu_2.11.%.bbappend | 4 
 1 file changed, 4 insertions(+)
 create mode 100644 recipes-devtools/qemu/qemu_2.11.%.bbappend

diff --git a/recipes-devtools/qemu/qemu_2.11.%.bbappend 
b/recipes-devtools/qemu/qemu_2.11.%.bbappend
new file mode 100644
index 000..764b500
--- /dev/null
+++ b/recipes-devtools/qemu/qemu_2.11.%.bbappend
@@ -0,0 +1,4 @@
+
+
+SRC_URI_remove_mingw32 = 
"file://chardev-connect-socket-to-a-spawned-command.patch"
+ 
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-mingw][PATCH] nativesdk-packagegroup-sdk-host: add qemu

2018-04-12 Thread Juro Bystricky
Now that we can build qemu for mingw, include it in SDK.

Signed-off-by: Juro Bystricky 
---
 recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend 
b/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend
index 9629354..ad69b13 100644
--- a/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend
+++ b/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend
@@ -1,4 +1,5 @@
 RDEPENDS_${PN}_mingw32 = "\
 nativesdk-pkgconfig \
 nativesdk-libtool \
+nativesdk-qemu \
 "
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-mingw][PATCH 0/1 Add QEMU to SDK

2018-04-18 Thread Juro Bystricky
Now that we can build QEMU for mingw, also include it in the SDK.
We have been able to build QEMU for Windows for a while now, but only
via a standalone recipe. QEMU has never been a part of SDK (as we were not
able to build it). The Autobuilder does test SDK build for mingw, but
does not test building of QEMU. Any QEMU build breakage (and there are 
occasional
ones) went unnoticed for periods of time and then we usually needed to bisect
the commits to find the culprit that broke the build.
So including QEMU in the SDK will have a nice sideffect: building QEMU will be 
tested
by the Autobuilder as well


Juro Bystricky (1):
  nativesdk-packagegroup-sdk-host: add qemu to SDK

 recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend | 1 +
 1 file changed, 1 insertion(+)

-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-mingw][PATCH 1/1] nativesdk-packagegroup-sdk-host: add qemu to SDK

2018-04-18 Thread Juro Bystricky
Now that we can build qemu for mingw, include it in SDK.

Signed-off-by: Juro Bystricky 
---
 recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend 
b/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend
index 9629354..ad69b13 100644
--- a/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend
+++ b/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend
@@ -1,4 +1,5 @@
 RDEPENDS_${PN}_mingw32 = "\
 nativesdk-pkgconfig \
 nativesdk-libtool \
+nativesdk-qemu \
 "
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-mingw][sumo][PATCH 0/1] openssl for Windows

2018-07-11 Thread Juro Bystricky
Patch to allow building openssl for Windows.
openssl can also become part of SDK, i.e:

SDKMACHINE="x86_64-mingw32"
MACHINE = "qemux86-64"
TOOLCHAIN_HOST_TASK_append = " nativesdk-openssl "


Juro Bystricky (1):
  openssl: build for mingw

 .../openssl/openssl/mingw-targets.patch   | 13 +
 recipes-connectivity/openssl/openssl_1.0.2o.bbappend  | 19 +++
 2 files changed, 32 insertions(+)
 create mode 100644 recipes-connectivity/openssl/openssl/mingw-targets.patch
 create mode 100644 recipes-connectivity/openssl/openssl_1.0.2o.bbappend

-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-mingw][sumo][PATCH 1/1] openssl: build for mingw

2018-07-11 Thread Juro Bystricky
Build openssl.exe and several .dll files needed to run openssl
under Windows

Signed-off-by: Juro Bystricky 
---
 .../openssl/openssl/mingw-targets.patch   | 13 +
 recipes-connectivity/openssl/openssl_1.0.2o.bbappend  | 19 +++
 2 files changed, 32 insertions(+)
 create mode 100644 recipes-connectivity/openssl/openssl/mingw-targets.patch
 create mode 100644 recipes-connectivity/openssl/openssl_1.0.2o.bbappend

diff --git a/recipes-connectivity/openssl/openssl/mingw-targets.patch 
b/recipes-connectivity/openssl/openssl/mingw-targets.patch
new file mode 100644
index 000..a9d98db
--- /dev/null
+++ b/recipes-connectivity/openssl/openssl/mingw-targets.patch
@@ -0,0 +1,13 @@
+--- a/Configure
 b/Configure
+@@ -672,6 +668,10 @@ my %table=(
+ 
+ # MinGW
+ "mingw", "gcc:-mno-cygwin -DL_ENDIAN -DWIN32_LEAN_AND_MEAN 
-fomit-frame-pointer -O3 -march=i486 -Wall::-D_MT:MINGW32:-lws2_32 -lgdi32 
-lcrypt32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts} 
EXPORT_VAR_AS_FN:${x86_asm}:coff:win32:cygwin-shared:-D_WINDLL 
-DOPENSSL_USE_APPLINK:-mno-cygwin:.dll.a",
++"mingw32-x86_64","gcc:-mno-cygwin -DL_ENDIAN -O3 -Wall -DWIN32_LEAN_AND_MEAN 
-DUNICODE -D_UNICODE::-D_MT:MINGW64:-lws2_32 -lgdi32 -lcrypt32:SIXTY_FOUR_BIT 
RC4_CHUNK_LL DES_INT 
EXPORT_VAR_AS_FN:${x86_64_asm}:mingw64:win32:cygwin-shared:-D_WINDLL:-mno-cygwin:.dll.a",
++"i686-pokysdk-mingw32", "gcc:-mno-cygwin -DL_ENDIAN -DWIN32_LEAN_AND_MEAN 
-fomit-frame-pointer -O3 -march=i486 -Wall::-D_MT:MINGW32:-lws2_32 -lgdi32 
-lcrypt32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts} 
EXPORT_VAR_AS_FN:${x86_asm}:coff:win32:cygwin-shared:-D_WINDLL 
-DOPENSSL_USE_APPLINK:-mno-cygwin:.dll.a",
++"mingw32-i686", "gcc:-mno-cygwin -DL_ENDIAN -DWIN32_LEAN_AND_MEAN 
-fomit-frame-pointer -O3 -march=i686 -Wall::-D_MT:MINGW32:-lws2_32 -lgdi32 
-lcrypt32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts} 
EXPORT_VAR_AS_FN:${x86_asm}:coff:win32:cygwin-shared:-D_WINDLL 
-DOPENSSL_USE_APPLINK:-mno-cygwin:.dll.a",
++
+ # As for OPENSSL_USE_APPLINK. Applink makes it possible to use .dll
+ # compiled with one compiler with application compiled with another
+ # compiler. It's possible to engage Applink support in mingw64 build,
diff --git a/recipes-connectivity/openssl/openssl_1.0.2o.bbappend 
b/recipes-connectivity/openssl/openssl_1.0.2o.bbappend
new file mode 100644
index 000..0e4485c
--- /dev/null
+++ b/recipes-connectivity/openssl/openssl_1.0.2o.bbappend
@@ -0,0 +1,19 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI_append_mingw32 = " file://mingw-targets.patch"
+
+EXTRA_LIBS_mingw32 = "-lws2_32 -lgdi32 -lcrypt32 -lgcc"
+
+CFLAG_remove_mingw32 = " -DTERMIO"
+CFLAG_remove_mingw32 = " -DHAVE_CRYPTODEV"
+CFLAG_remove_mingw32 = " -Wa,--noexecstack"
+CFLAG_append_mingw32 = " -DNOCRYPT -mno-cygwin -DWIN32_LEAN_AND_MEAN" 
+
+do_compile_prepend_mingw32 () {
+   export EX_LIBS="${EXTRA_LIBS}"
+}
+
+do_install_prepend_mingw32 () {
+   export EX_LIBS="${EXTRA_LIBS}"
+}
+
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-mingw][krogoth][PATCH 0/1] binutils: enable plugins

2016-10-20 Thread Juro Bystricky
This meta-mingw patch for jethro by Mark Hatle is also needed for
krogoth and morty/master as well, otherwise the linker will fail, not being able
to load lto plugins.

Original patch:
https://git.yoctoproject.org/cgit/cgit.cgi/meta-mingw-contrib/commit/?h=mgh/jetho/meta-mingw



Juro Bystricky (1):
  binutils-cross-canadian: Fix LTO failure

 recipes-devtools/binutils/binutils-cross-canadian_2.2%.bbappend | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-mingw][PATCH 1/1] binutils-cross-canadian: Fix LTO failure

2016-10-20 Thread Juro Bystricky
GCC was failing with a message similar to:

e:/windri~1/lx8.sdk/qemux8~1.800/sysroots/i686-w~1/usr/bin/i586-w~3/../../libexec/i586-wrs-linux/gcc/i586-wrs-linux/5.2.0/real-ld.exe:
 unrecognized option '-plugin'

The issue was that by default plugin support was disabled in binutils.  By
enabling the plugin support, the LTO support should also now work properly.

Signed-off-by: Mark Hatle 
Signed-off-by: Juro Bystricky 
---
 recipes-devtools/binutils/binutils-cross-canadian_2.2%.bbappend | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/recipes-devtools/binutils/binutils-cross-canadian_2.2%.bbappend 
b/recipes-devtools/binutils/binutils-cross-canadian_2.2%.bbappend
index 026c932..5845fe0 100644
--- a/recipes-devtools/binutils/binutils-cross-canadian_2.2%.bbappend
+++ b/recipes-devtools/binutils/binutils-cross-canadian_2.2%.bbappend
@@ -1,4 +1,4 @@
-EXTRA_OECONF_append_sdkmingw32 = " --disable-plugins --disable-nls"
+EXTRA_OECONF_append_sdkmingw32 = " --disable-nls"
 LDFLAGS_append_sdkmingw32 = " -Wl,-static"
 
 DEPENDS_remove_sdkmingw32 = "nativesdk-gettext"
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-zephyr][PATCH 1/7] qemu-cortex-m3: new MACHINE

2017-01-14 Thread Juro Bystricky
Various changes to properly handle QEMU for Cortex M3.
This was solved by creating a new MACHINE qemu-cortex-m3.
Specifying MACHINE=qemu-cortex-m3 will select proper tuning
for the cross-compiler.

Typical usage:

$ MACHINE=qemu-cortex-m3 bitbake zephyr-philosophers

Signed-off-by: Juro Bystricky 
---
 README.txt| 12 
 conf/distro/machine/include/tune-cortexm3.inc | 20 
 conf/distro/zephyr.conf   |  4 
 conf/machine/include/tune-cortexm3.inc| 20 
 conf/machine/qemu-cortex-m3.conf  | 11 +++
 lib/oeqa/utils/qemuzephyrrunner.py|  2 +-
 6 files changed, 36 insertions(+), 33 deletions(-)
 delete mode 100644 conf/distro/machine/include/tune-cortexm3.inc
 create mode 100644 conf/machine/include/tune-cortexm3.inc
 create mode 100644 conf/machine/qemu-cortex-m3.conf

diff --git a/README.txt b/README.txt
index ccdcc49..cb9a36a 100644
--- a/README.txt
+++ b/README.txt
@@ -13,10 +13,6 @@ Building and Running Zephyr tests
 =
 Presently only toolchains for ARM and x86 are supported.
 (For ARM we use CortexM3 toolchain)
-The toolchain is selected via the MACHINE variable:
-
-MACHINE=qemux86 : selects x86 toolchain
-MACHINE=qemuarm : selects ARM CortexM3 toolchain
 
 Default Zephyr BOARD is selected as follows:
 
@@ -35,8 +31,8 @@ zephyr-kernel-test.inc). For example:
 $ MACHINE=qemux86 bitbake zephyr-kernel-test-all
 $ MACHINE=qemux86 bitbake zephyr-kernel-test-all -ctestimage
 or 
-$ MACHINE=qemuarm bitbake zephyr-kernel-test-all
-$ MACHINE=qemuarm bitbake zephyr-kernel-test-all -ctestimage
+$ MACHINE=qemu-cortex-m3 bitbake zephyr-kernel-test-all
+$ MACHINE=qemu-cortex-m3 bitbake zephyr-kernel-test-all -ctestimage
 
 
 
@@ -56,8 +52,8 @@ the various paths have to be entered manually):
-no-acpi -balloon none
 
 The same sample, for ARM image:
-$ MACHINE=qemuarm bitbake zephyr-philosophers
+$ MACHINE=qemu-cortex-m3 bitbake zephyr-philosophers
 $ ./tmp/sysroots/x86_64-linux/usr/bin/qemu-system-arm  \
-   -kernel ./tmp/deploy/images/qemuarm/philosophers.elf \
+   -kernel ./tmp/deploy/images/qemu-cortex-m3/philosophers.elf \
-cpu cortex-m3 -machine lm3s6965evb -nographic -vga none
 
diff --git a/conf/distro/machine/include/tune-cortexm3.inc 
b/conf/distro/machine/include/tune-cortexm3.inc
deleted file mode 100644
index 7714ee3..000
--- a/conf/distro/machine/include/tune-cortexm3.inc
+++ /dev/null
@@ -1,20 +0,0 @@
-DEFAULTTUNE ?= "cortexm3"
-
-#require conf/machine/include/arm/arch-armv7a.inc
-
-TUNEVALID[cortexm3] = "Enable Cortex-M3 specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexm3', ' 
-mcpu=cortex-m3', '', d)}"
-AVAILTUNES += "cortexm3"
-
-TUNEVALID[armv7m] = "Enable Cortex-M3 specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7m', ' 
-march=armv7-m', '', d)}"
-MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv7m', 
'armv7m:', '' ,d)}"
-
-TUNE_PKGARCH_tune-cortexm3 = "cortexm3"
-
-ARMPKGARCH_tune-cortexm3 = "armv7m"
-PACKAGE_EXTRA_ARCHS_tune-cortexm3 ="cortexm3"
-
-TUNE_FEATURES_tune-cortexm3 = "armv7m vfp cortexm3"
-PACKAGE_EXTRA_ARCHS_tune-cortexm3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7at} 
armv7m-vfp"
-
diff --git a/conf/distro/zephyr.conf b/conf/distro/zephyr.conf
index b97e967..9f57c9e 100644
--- a/conf/distro/zephyr.conf
+++ b/conf/distro/zephyr.conf
@@ -1,6 +1,4 @@
 
-require conf/distro/machine/include/tune-cortexm3.inc
-
 DISTRO = "zephyr"
 DISTRO_NAME = "Zephyr"
 DISTRO_VERSION = "1.0"
@@ -13,7 +11,5 @@ TCLIBCAPPEND = ""
 TEST_TARGET = "QemuTargetZephyr"
 TEST_SUITES = "zephyr"
 
-DEFAULTTUNE_arm ?= "cortexm3"
-
 BOARD_arm ?= "qemu_cortex_m3"
 BOARD_x86 ?= "qemu_x86"
diff --git a/conf/machine/include/tune-cortexm3.inc 
b/conf/machine/include/tune-cortexm3.inc
new file mode 100644
index 000..25d7590
--- /dev/null
+++ b/conf/machine/include/tune-cortexm3.inc
@@ -0,0 +1,20 @@
+DEFAULTTUNE ?= "cortexm3"
+
+require conf/machine/include/arm/arch-armv7a.inc
+
+TUNEVALID[cortexm3] = "Enable Cortex-M3 specific processor optimizations"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexm3', ' 
-mcpu=cortex-m3', '', d)}"
+AVAILTUNES += "cortexm3"
+
+TUNEVALID[armv7m] = "Enable Cortex-M3 specific processor optimizations"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7m', ' 
-marc

[yocto] [meta-zephyr][PATCH 0/7] Consolidated pull

2017-01-14 Thread Juro Bystricky
This patchset consolidates various fixes and improvements in meta-zephyr.
Notably, it implements support for the Arduino 101 Board. This board contains
a SoC with two CPU cores: Intel MCU ("lakemont") and a Synopsys ARC core.
To support the board, two new toolchains needed to be built as well: One for
Intel IAMCU and one for ARC, none of which is nativelly supported by 
oe-embedded.
The IAMCU toolchain is built usig standard upstream repositories, but the ARC 
toolchain
needs to be built using Synopsys ARC repos.
To build Zephyr images for this board, two new MACHINES were implemented:

$ MACHINE=arduino-101 bitbake xxx  : build image for IAMCU core
$ MACHINE=arduino-101-sss bitbake xxx  : build image for ARC core

In general, each BOARD supported by Zephyr needs a corresponding MACHINE
in meta-zephyr. There is a 1:1 mapping between these two, except for some
minor naming discrepancies.

This patch series also contains definitions for a new MACHINE=qemu-cortex-m3,
corresponding to Zephyr BOARD=qemu_cortex_m3.

The patch series was successfully tested with real harware, where the resulting
images were flashed and functioned as expected (kudos to Henry Bruce).



Juro Bystricky (7):
  qemu-cortex-m3: new MACHINE
  zephyr-kernel: refactor common code
  meta-zephyr: Select BOARD via MACHINE
  arduino-101: New MACHINE
  meta-zephyr: Support for ARC toolchain
  arduino-101-sss: New MACHINE
  zephyr-philosophers: also deploy binary image

 README.txt | 12 +--
 conf/distro/machine/include/tune-cortexm3.inc  | 20 -
 conf/distro/zephyr.conf|  6 --
 conf/machine/arduino-101-sss.conf  | 18 +
 conf/machine/arduino-101.conf  | 10 +++
 conf/machine/include/tune-arc.inc  | 34 +
 conf/machine/include/tune-cortexm3.inc | 20 +
 conf/machine/include/tune-iamcu.inc| 19 +
 conf/machine/qemu-cortex-m3.conf   | 11 +++
 lib/oeqa/utils/qemuzephyrrunner.py |  2 +-
 recipes-devtools-arc/binutils/binutils-2.26arc.inc | 37 +
 .../binutils/binutils-cross-canadian_2.26arc.bb|  7 ++
 .../binutils/binutils-cross_2.26arc.bb |  5 ++
 .../cbd8e54244cd02bdcf4f1057be3ce96631f35ac3.patch | 83 
 recipes-devtools-arc/gcc/gcc-6.x.arc.inc   | 88 ++
 .../gcc/gcc-cross-canadian_6.x.arc.bb  |  8 ++
 recipes-devtools-arc/gcc/gcc-cross_6.x.arc .bb | 11 +++
 recipes-devtools-arc/gcc/gcc-source_6.x.arc.bb |  2 +
 recipes-devtools-arc/gcc/libgcc_6.x.arc.bb | 14 
 recipes-kernel/zephyr-kernel/zephyr-image.inc  | 21 +-
 .../zephyr-kernel/zephyr-kernel-common.inc | 30 
 recipes-kernel/zephyr-kernel/zephyr-kernel.inc |  4 -
 .../zephyr-kernel/zephyr-philosophers.bb   | 26 +--
 .../zephyr-getchar/zephyr-getchar_git.bb   | 16 +---
 24 files changed, 408 insertions(+), 96 deletions(-)
 delete mode 100644 conf/distro/machine/include/tune-cortexm3.inc
 create mode 100644 conf/machine/arduino-101-sss.conf
 create mode 100644 conf/machine/arduino-101.conf
 create mode 100644 conf/machine/include/tune-arc.inc
 create mode 100644 conf/machine/include/tune-cortexm3.inc
 create mode 100644 conf/machine/include/tune-iamcu.inc
 create mode 100644 conf/machine/qemu-cortex-m3.conf
 create mode 100644 recipes-devtools-arc/binutils/binutils-2.26arc.inc
 create mode 100644 
recipes-devtools-arc/binutils/binutils-cross-canadian_2.26arc.bb
 create mode 100644 recipes-devtools-arc/binutils/binutils-cross_2.26arc.bb
 create mode 100644 
recipes-devtools-arc/gcc/files/cbd8e54244cd02bdcf4f1057be3ce96631f35ac3.patch
 create mode 100644 recipes-devtools-arc/gcc/gcc-6.x.arc.inc
 create mode 100644 recipes-devtools-arc/gcc/gcc-cross-canadian_6.x.arc.bb
 create mode 100644 recipes-devtools-arc/gcc/gcc-cross_6.x.arc .bb
 create mode 100644 recipes-devtools-arc/gcc/gcc-source_6.x.arc.bb
 create mode 100644 recipes-devtools-arc/gcc/libgcc_6.x.arc.bb
 create mode 100644 recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc

-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-zephyr][PATCH 4/7] arduino-101: New MACHINE

2017-01-14 Thread Juro Bystricky
Support for Arduino-101 board, Intel MCU CPU.
This board needs IAMCU cross-compiler.

[YOCTO#10658]

Signed-off-by: Juro Bystricky 
---
 conf/machine/arduino-101.conf   | 10 ++
 conf/machine/include/tune-iamcu.inc | 19 +++
 2 files changed, 29 insertions(+)
 create mode 100644 conf/machine/arduino-101.conf
 create mode 100644 conf/machine/include/tune-iamcu.inc

diff --git a/conf/machine/arduino-101.conf b/conf/machine/arduino-101.conf
new file mode 100644
index 000..543a41e
--- /dev/null
+++ b/conf/machine/arduino-101.conf
@@ -0,0 +1,10 @@
+#@TYPE: Machine
+#@NAME: arduino-101
+
+#@DESCRIPTION: Machine configuration for Arduino 101 Board.
+
+TARGET_OS_arduino-101 = "elfiamcu"
+require conf/machine/include/tune-iamcu.inc
+TUNE_PKGARCH_arduino-101 = "iamcu"
+
+TARGET_LINK_HASH_STYLE = ""
diff --git a/conf/machine/include/tune-iamcu.inc 
b/conf/machine/include/tune-iamcu.inc
new file mode 100644
index 000..59160c3
--- /dev/null
+++ b/conf/machine/include/tune-iamcu.inc
@@ -0,0 +1,19 @@
+DEFAULTTUNE ?= "iamcu"
+
+TARGET_OS_iamcu = "elfiamcu"
+TARGET_ARCH = "i586"
+
+TUNE_FEATURES_tune-iamcu = "iamcu"
+TUNE_CCARGS = "-miamcu -m32"
+TUNE_ARCH = "i586"
+TUNEVALID[iamcu] = "Intel MCU"
+
+def iamcu_siteinfo_setfunc(archinfo, osinfo, targetinfo, d):
+   archinfo['iamcu'] = "endian-little bit-32 "
+   osinfo['linux'] = "common-linux common-glibc"
+   targetinfo['iamcu-linux'] = "iamcu-linux"
+   return archinfo, osinfo, targetinfo
+
+SITEINFO_EXTRA_DATAFUNCS = "iamcu_siteinfo_setfunc"
+PACKAGE_EXTRA_ARCHS_tune-iamcu = "iamcu"
+
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-zephyr][PATCH 6/7] arduino-101-sss: New MACHINE

2017-01-14 Thread Juro Bystricky
Added support for Zephyr arduino_101_sss board (ARC core).
The support requires ARC toolchain.

Signed-off-by: Juro Bystricky 
---
 conf/machine/arduino-101-sss.conf | 18 ++
 conf/machine/include/tune-arc.inc | 34 ++
 2 files changed, 52 insertions(+)
 create mode 100644 conf/machine/arduino-101-sss.conf
 create mode 100644 conf/machine/include/tune-arc.inc

diff --git a/conf/machine/arduino-101-sss.conf 
b/conf/machine/arduino-101-sss.conf
new file mode 100644
index 000..cab5a3f
--- /dev/null
+++ b/conf/machine/arduino-101-sss.conf
@@ -0,0 +1,18 @@
+#@TYPE: Machine
+#@NAME: arduino-101-sss
+
+#@DESCRIPTION: Machine configuration for Arduino 101 Board (ARC Core).
+
+TUNE_FEATURES ="arc quark-se no-sdata no-delete-null-pointer-checks"
+
+require conf/machine/include/tune-arc.inc
+PACKAGE_EXTRA_ARCHS_tune-arc = "arc"
+
+PREFERRED_VERSION_gcc-cross-${TARGET_ARCH} = "6.x.arc"
+PREFERRED_VERSION_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "6.x.arc"
+PREFERRED_VERSION_libgcc = "6.x.arc"
+
+PREFERRED_VERSION_binutils-cross-${TARGET_ARCH} = "2.26+gitarc"
+PREFERRED_VERSION_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = 
"2.26+gitarc"
+
+TARGET_LINK_HASH_STYLE = ""
diff --git a/conf/machine/include/tune-arc.inc 
b/conf/machine/include/tune-arc.inc
new file mode 100644
index 000..56ddd3b
--- /dev/null
+++ b/conf/machine/include/tune-arc.inc
@@ -0,0 +1,34 @@
+DEFAULTTUNE ?= "arc"
+
+TUNE_ARCH = "arc"
+TUNE_PKGARCH = "arc"
+TUNE_FEATURES_tune-arc = "littleendian"
+TUNE_CCARGS = ""
+
+TUNEVALID[littleendian] = "Little endian mode"
+
+TUNEVALID[quark-se] = "Intel Quark SE support (ARC core)"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'quark-se', ' 
-mcpu=quarkse_em', '', d)}"
+AVAILTUNES += "quark-se"
+
+TUNEVALID[nodata] = "ARC mo-sdata"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'no-sdata', ' 
-mno-sdata', '', d)}"
+AVAILTUNES += "no-sdata"
+
+TUNEVALID[nodata] = "ARC no-delete-null-pointer-checks"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 
'no-delete-null-pointer-checks', ' -fno-delete-null-pointer-checks', '', d)}"
+AVAILTUNES += "no-delete-null-pointer-checks"
+
+def arc_siteinfo_setfunc(archinfo, osinfo, targetinfo, d):
+   archinfo['arc'] = "endian-little bit-32 "
+   osinfo['linux'] = "common-linux common-glibc"
+   targetinfo['arc-linux'] = "arc-linux"
+   return archinfo, osinfo, targetinfo
+
+SITEINFO_EXTRA_DATAFUNCS = "arc_siteinfo_setfunc"
+
+def arc_machdata_setfunc(machdata, d):
+machdata["elf"] = { "arc" : (195,0,0,  True,  32), }
+return machdata
+
+PACKAGEQA_EXTRA_MACHDEFFUNCS = "arc_machdata_setfunc"
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-zephyr][PATCH 5/7] meta-zephyr: Support for ARC toolchain

2017-01-14 Thread Juro Bystricky
Added support for ARC toolchains: binutils, gcc, libgcc.
These are not upstreamed, but taken from Symantec ARC repos.

[YOCTO#10659]

Signed-off-by: Juro Bystricky 
---
 recipes-devtools-arc/binutils/binutils-2.26arc.inc | 37 +
 .../binutils/binutils-cross-canadian_2.26arc.bb|  7 ++
 .../binutils/binutils-cross_2.26arc.bb |  5 ++
 .../cbd8e54244cd02bdcf4f1057be3ce96631f35ac3.patch | 83 
 recipes-devtools-arc/gcc/gcc-6.x.arc.inc   | 88 ++
 .../gcc/gcc-cross-canadian_6.x.arc.bb  |  8 ++
 recipes-devtools-arc/gcc/gcc-cross_6.x.arc .bb | 11 +++
 recipes-devtools-arc/gcc/gcc-source_6.x.arc.bb |  2 +
 recipes-devtools-arc/gcc/libgcc_6.x.arc.bb | 14 
 9 files changed, 255 insertions(+)
 create mode 100644 recipes-devtools-arc/binutils/binutils-2.26arc.inc
 create mode 100644 
recipes-devtools-arc/binutils/binutils-cross-canadian_2.26arc.bb
 create mode 100644 recipes-devtools-arc/binutils/binutils-cross_2.26arc.bb
 create mode 100644 
recipes-devtools-arc/gcc/files/cbd8e54244cd02bdcf4f1057be3ce96631f35ac3.patch
 create mode 100644 recipes-devtools-arc/gcc/gcc-6.x.arc.inc
 create mode 100644 recipes-devtools-arc/gcc/gcc-cross-canadian_6.x.arc.bb
 create mode 100644 recipes-devtools-arc/gcc/gcc-cross_6.x.arc .bb
 create mode 100644 recipes-devtools-arc/gcc/gcc-source_6.x.arc.bb
 create mode 100644 recipes-devtools-arc/gcc/libgcc_6.x.arc.bb

diff --git a/recipes-devtools-arc/binutils/binutils-2.26arc.inc 
b/recipes-devtools-arc/binutils/binutils-2.26arc.inc
new file mode 100644
index 000..c0c575b
--- /dev/null
+++ b/recipes-devtools-arc/binutils/binutils-2.26arc.inc
@@ -0,0 +1,37 @@
+LIC_FILES_CHKSUM="\
+file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
+file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674\
+file://COPYING3;md5=d32239bcb673463ab874e80d47fae504\
+file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6\
+file://gas/COPYING;md5=d32239bcb673463ab874e80d47fae504\
+file://include/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
+file://include/COPYING3;md5=d32239bcb673463ab874e80d47fae504\
+file://libiberty/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7\
+file://bfd/COPYING;md5=d32239bcb673463ab874e80d47fae504\
+"
+
+def binutils_branch_version(d):
+pvsplit = d.getVar('PV', True).split('.')
+return pvsplit[0] + "_" + pvsplit[1]
+
+BINUPV = "${@binutils_branch_version(d)}"
+
+PV = "2.26+gitarc"
+
+#SRCREV = "bcbe0bfce780e426f2e3b78013cb49326ee76824"
+SRCREV="3bfd1155a7f0ff9e10c5ba91f089ae0bb5bfbde1"
+SRC_URI = "\
+ 
git://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb.git;branch=arc-2.26-dev
 \
+ "
+
+S  = "${WORKDIR}/git"
+
+do_configure_prepend () {
+rm -rf ${S}/gdb ${S}/libdecnumber ${S}/readline ${S}/sim
+}
+
+CONFIG_SHELL = "/bin/bash"
+
+sysroot_stage_all_append() {
+   sysroot_stage_dir ${D}${exec_prefix}/extlib 
${SYSROOT_DESTDIR}${exec_prefix}/extlib
+}
diff --git a/recipes-devtools-arc/binutils/binutils-cross-canadian_2.26arc.bb 
b/recipes-devtools-arc/binutils/binutils-cross-canadian_2.26arc.bb
new file mode 100644
index 000..24f35fe
--- /dev/null
+++ b/recipes-devtools-arc/binutils/binutils-cross-canadian_2.26arc.bb
@@ -0,0 +1,7 @@
+require recipes-devtools/binutils/binutils.inc
+require recipes-devtools-arc/binutils/binutils-2.26arc.inc
+require recipes-devtools/binutils/binutils-cross-canadian.inc
+
+do_install_append () {
+   rm -f ${D}/${libdir}/../lib/libiberty*
+}
diff --git a/recipes-devtools-arc/binutils/binutils-cross_2.26arc.bb 
b/recipes-devtools-arc/binutils/binutils-cross_2.26arc.bb
new file mode 100644
index 000..f3695c2
--- /dev/null
+++ b/recipes-devtools-arc/binutils/binutils-cross_2.26arc.bb
@@ -0,0 +1,5 @@
+require recipes-devtools/binutils/binutils.inc
+require binutils-2.26arc.inc
+require recipes-devtools/binutils/binutils-cross.inc
+
+#COMPATIBLE_MACHINE = "arc"
diff --git 
a/recipes-devtools-arc/gcc/files/cbd8e54244cd02bdcf4f1057be3ce96631f35ac3.patch 
b/recipes-devtools-arc/gcc/files/cbd8e54244cd02bdcf4f1057be3ce96631f35ac3.patch
new file mode 100644
index 000..d709cd0
--- /dev/null
+++ 
b/recipes-devtools-arc/gcc/files/cbd8e54244cd02bdcf4f1057be3ce96631f35ac3.patch
@@ -0,0 +1,83 @@
+From cbd8e54244cd02bdcf4f1057be3ce96631f35ac3 Mon Sep 17 00:00:00 2001
+From: Claudiu Zissulescu 
+Date: Tue, 3 Jan 2017 12:06:28 -0500
+Subject: [PATCH] [ARC] Prevent moving stores to the frame before the stack
+ adjustment.
+
+If the stack pointer is needed, emit a special barrier that will prevent
+the scheduler from moving stores to the frame before the stack adjustment.
+
+2017-01-03  Claudiu Zissulescu  
+
+   * config/arc/arc.c (arc_expand_prologue): Emit a special barrier
+   to prevent store reordering.
+   * config/arc/arc.md (U

[yocto] [meta-zephyr][PATCH 2/7] zephyr-kernel: refactor common code

2017-01-14 Thread Juro Bystricky
Several changes to simplify recipes by refactoring
common code. The code common to all Zephyr builds is
now in the file "zephyr-kernel-common.inc".

Signed-off-by: Juro Bystricky 
---
 recipes-kernel/zephyr-kernel/zephyr-image.inc  | 21 +
 .../zephyr-kernel/zephyr-kernel-common.inc | 27 ++
 recipes-kernel/zephyr-kernel/zephyr-kernel.inc |  4 
 .../zephyr-kernel/zephyr-philosophers.bb   | 25 +---
 .../zephyr-getchar/zephyr-getchar_git.bb   | 16 +++--
 5 files changed, 32 insertions(+), 61 deletions(-)
 create mode 100644 recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc

diff --git a/recipes-kernel/zephyr-kernel/zephyr-image.inc 
b/recipes-kernel/zephyr-kernel/zephyr-image.inc
index 1e630e5..d365c9c 100644
--- a/recipes-kernel/zephyr-kernel/zephyr-image.inc
+++ b/recipes-kernel/zephyr-kernel/zephyr-image.inc
@@ -1,33 +1,14 @@
 require zephyr-kernel.inc
+require zephyr-kernel-common.inc
 
 inherit testimage
 inherit deploy
 
-INHIBIT_DEFAULT_DEPS = "1"
-DEPENDS += "gcc-cross-${TARGET_ARCH} libgcc"
-
-CROSS_COMPILE = "${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}"
 QEMU_BIN_PATH = "${STAGING_BINDIR_NATIVE}"
 
 OE_TERMINAL_EXPORTS += "CROSS_COMPILE"
 OE_TERMINAL_EXPORTS += "BOARD"
 
-# oe_runmake isn't used because of the make -e causing issues with some
-# make variables.
-MAKE_COMMAND = "make -j V=1 BOARD=${BOARD} CROSS_COMPILE=${CROSS_COMPILE}"
-
-do_configure[noexec] = "1"
-
-# The makefiles are explicit about the flags they want, so don't unset
-# them so zephyr flags actually get used.
-# This is done here rather than in the task so that things still work
-# in devshell.
-python () {
-d.delVar('CFLAGS')
-d.delVar('CXXFLAGS')
-d.delVar('LDFLAGS')
-}
-
 do_compile () {
 cd ${S}
 export ZEPHYR_BASE=${S}
diff --git a/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc 
b/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
new file mode 100644
index 000..6fe44b5
--- /dev/null
+++ b/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
@@ -0,0 +1,27 @@
+# Common settings for all Zephyr recipes
+
+# There shouldn't be a manifest for zephyr kernels since there is no root
+# filesystem.
+IMAGE_NO_MANIFEST = "1"
+
+# oe_runmake isn't used because of the make -e causing issues with some
+# make variables.
+MAKE_COMMAND = "make -j V=1 BOARD=${BOARD} CROSS_COMPILE=${CROSS_COMPILE}"
+
+# We always need a toolchain to cross-compile.
+INHIBIT_DEFAULT_DEPS = "1"
+DEPENDS += "gcc-cross-${TARGET_ARCH} libgcc"
+CROSS_COMPILE = "${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}"
+
+do_configure[noexec] = "1"
+
+# The makefiles are explicit about the flags they want, so don't unset
+# them so zephyr flags actually get used.
+# This is done here rather than in the task so that things still work
+# in devshell.
+
+python () {
+d.delVar('CFLAGS')
+d.delVar('CXXFLAGS')
+d.delVar('LDFLAGS')
+}
diff --git a/recipes-kernel/zephyr-kernel/zephyr-kernel.inc 
b/recipes-kernel/zephyr-kernel/zephyr-kernel.inc
index aa450ca..71c7a29 100644
--- a/recipes-kernel/zephyr-kernel/zephyr-kernel.inc
+++ b/recipes-kernel/zephyr-kernel/zephyr-kernel.inc
@@ -10,10 +10,6 @@ PV = "1.6.0"
 
 S = "${WORKDIR}/git"
 
-# There shouldn't be a manifest for zephyr kernels since there is no root
-# filesystem.
-IMAGE_NO_MANIFEST = "1"
-
 do_compile_prepend() {
 cp ${WORKDIR}/Makefile.toolchain.yocto ${S}/scripts
 }
diff --git a/recipes-kernel/zephyr-kernel/zephyr-philosophers.bb 
b/recipes-kernel/zephyr-kernel/zephyr-philosophers.bb
index ac0b2a7..f9e9282 100644
--- a/recipes-kernel/zephyr-kernel/zephyr-philosophers.bb
+++ b/recipes-kernel/zephyr-kernel/zephyr-philosophers.bb
@@ -1,30 +1,7 @@
 require zephyr-kernel.inc
-
+require zephyr-kernel-common.inc
 inherit deploy
 
-INHIBIT_DEFAULT_DEPS = "1"
-
-DEPENDS += "gcc-cross-${TARGET_ARCH} libgcc"
-
-# The makefiles are explicit about the flags they want, so don't unset
-# them so zephyr flags actually get used.
-# This is done here rather than in the task so that things still work
-# in devshell.
-python () {
-d.delVar('CFLAGS')
-d.delVar('CXXFLAGS')
-d.delVar('LDFLAGS')
-}
-
-do_configure[noexec] = "1"
-
-CROSS_COMPILE="${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}"
-
-# oe_runmake isn't used because of the make -e causing issues with some
-# make variables.
-
-MAKE_COMMAND = "make -j V=1 BOARD=${BOARD} CROSS_COMPILE=${CROSS_COMPILE}"
-
 do_compile () {
 cd ${S}
 export ZEPHYR_BASE=${S}
diff --git a/recipes-zephyr/zephyr-getchar/zephyr-getchar_git.bb 
b/recipes-zephyr/zephyr-getchar/zephyr-getcha

[yocto] [meta-zephyr][PATCH 7/7] zephyr-philosophers: also deploy binary image

2017-01-14 Thread Juro Bystricky
Deploy both binary and ELF images in order to make
it easier to flash the image on an actual board, such as Arduino-101.
(Some flashing tools require binary image)

Signed-off-by: Juro Bystricky 
---
 recipes-kernel/zephyr-kernel/zephyr-philosophers.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/recipes-kernel/zephyr-kernel/zephyr-philosophers.bb 
b/recipes-kernel/zephyr-kernel/zephyr-philosophers.bb
index f9e9282..7fb0ea4 100644
--- a/recipes-kernel/zephyr-kernel/zephyr-philosophers.bb
+++ b/recipes-kernel/zephyr-kernel/zephyr-philosophers.bb
@@ -12,6 +12,7 @@ do_compile () {
 
 do_deploy () {
 install -D samples/philosophers/outdir/${BOARD}/zephyr.elf 
${DEPLOYDIR}/philosophers.elf
+install -D samples/philosophers/outdir/${BOARD}/zephyr.bin 
${DEPLOYDIR}/philosophers.bin
 export DEPLOY_DIR_IMAGE=${DEPLOYDIR}/philosophers.elf
 }
 
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-zephyr][PATCH 3/7] meta-zephyr: Select BOARD via MACHINE

2017-01-14 Thread Juro Bystricky
The meaning of BOARD in Zephyr environment is equivalent to MACHINE
in Yocto environment.
Specifying MACHINE will implicitly determine cross-compiler toolchain as well.

There is 1:1 correspondence between Zephyr BOARD and Yocto MACHINE so
a lookup table BOARD:MACHINE may be needed in the future, presently all
that is required is to convert "-" to "_". (Dash to undersocre)

This means that in order to support a new Zephyr board, we simply need to
create a corresponding MACHINE.conf file.

[YOCTO#10894]

Signed-off-by: Juro Bystricky 
---
 conf/distro/zephyr.conf   | 2 --
 recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc | 3 +++
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/conf/distro/zephyr.conf b/conf/distro/zephyr.conf
index 9f57c9e..4a832db 100644
--- a/conf/distro/zephyr.conf
+++ b/conf/distro/zephyr.conf
@@ -11,5 +11,3 @@ TCLIBCAPPEND = ""
 TEST_TARGET = "QemuTargetZephyr"
 TEST_SUITES = "zephyr"
 
-BOARD_arm ?= "qemu_cortex_m3"
-BOARD_x86 ?= "qemu_x86"
diff --git a/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc 
b/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
index 6fe44b5..30c1a5a 100644
--- a/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
+++ b/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
@@ -4,6 +4,9 @@
 # filesystem.
 IMAGE_NO_MANIFEST = "1"
 
+# Zephyr BOARD is basically our MACHINE, except we must use "-" instead of "_"
+BOARD="$(echo ${MACHINE} | tr - _)"
+
 # oe_runmake isn't used because of the make -e causing issues with some
 # make variables.
 MAKE_COMMAND = "make -j V=1 BOARD=${BOARD} CROSS_COMPILE=${CROSS_COMPILE}"
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-zephyr][PATCH 1/5] qemu-cortex-m3.conf: updated NAME/DESCRIPTION

2017-01-19 Thread Juro Bystricky
Signed-off-by: Juro Bystricky 
---
 conf/machine/qemu-cortex-m3.conf | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/conf/machine/qemu-cortex-m3.conf b/conf/machine/qemu-cortex-m3.conf
index 13f76af..aeb9a69 100644
--- a/conf/machine/qemu-cortex-m3.conf
+++ b/conf/machine/qemu-cortex-m3.conf
@@ -1,6 +1,6 @@
 #@TYPE: Machine
-#@NAME: lm3s6965evb
-#@DESCRIPTION: lm3s6965evb
+#@NAME: qemu-cortex-m3
+#@DESCRIPTION: Machine for Zephyr BOARD qemu_cortex_m3
 
 require conf/machine/include/qemu.inc
 require conf/machine/include/tune-cortexm3.inc
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-zephyr][PATCH 0/5] Consolidated pull

2017-01-19 Thread Juro Bystricky
This set of patches provides:

1. Support for Zephyr menuconfig and devshell.
   These are meant to modify project settings: menuconfig is used to change
   kernel configuration, devshell makes it easier to manually edit Zephyr
   prj.conf files

2. New MACHINE qemu-x86, corresponding to the zephyr BOARD qemu_x86

3. Support for "newlib", for all supported toolchains: x86, IAMCU, ARM and ARC.

4. Minor housekeeping (removed unneeded patches, modified descriptions, etc.)



Juro Bystricky (5):
  qemu-cortex-m3.conf: updated NAME/DESCRIPTION
  qemu-x86.conf: New MACHINE
  gcc (ARC): removed unneeded patches
  zephyr.bbclass: support for image configuration
  meta-zephyr: newlib support

 classes/zephyr.bbclass |  53 +++
 conf/distro/zephyr.conf|   1 +
 conf/machine/qemu-cortex-m3.conf   |   4 +-
 conf/machine/qemu-x86.conf |  11 +
 recipes-core/newlib/newlib/assert-fiprintf.patch   |  23 ++
 .../newlib/newlib/gettimeofday-header-fix.patch|  20 ++
 .../newlib/newlib/iamcu-commit-5d3ad3b.patch   | 399 +
 recipes-core/newlib/newlib_2.%.bb  |  83 +
 recipes-core/newlib/newlib_2.%.bbappend|  23 ++
 recipes-devtools-arc/gcc/gcc-6.x.arc.inc   |   2 -
 recipes-devtools/gcc/libgcc_6.%.bbappend   |   3 +
 .../zephyr-kernel/files/Makefile.toolchain.yocto   |  19 +-
 recipes-kernel/zephyr-kernel/zephyr-image.inc  |   8 +-
 .../zephyr-kernel/zephyr-kernel-common.inc |  19 +-
 .../zephyr-kernel/zephyr-philosophers.bb   |  10 +-
 .../zephyr-getchar/zephyr-getchar_git.bb   |  10 +-
 16 files changed, 657 insertions(+), 31 deletions(-)
 create mode 100644 classes/zephyr.bbclass
 create mode 100644 conf/machine/qemu-x86.conf
 create mode 100644 recipes-core/newlib/newlib/assert-fiprintf.patch
 create mode 100644 recipes-core/newlib/newlib/gettimeofday-header-fix.patch
 create mode 100644 recipes-core/newlib/newlib/iamcu-commit-5d3ad3b.patch
 create mode 100644 recipes-core/newlib/newlib_2.%.bb
 create mode 100644 recipes-core/newlib/newlib_2.%.bbappend
 create mode 100644 recipes-devtools/gcc/libgcc_6.%.bbappend

-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-zephyr][PATCH 3/5] gcc (ARC): removed unneeded patches

2017-01-19 Thread Juro Bystricky
Signed-off-by: Juro Bystricky 
---
 recipes-devtools-arc/gcc/gcc-6.x.arc.inc | 2 --
 1 file changed, 2 deletions(-)

diff --git a/recipes-devtools-arc/gcc/gcc-6.x.arc.inc 
b/recipes-devtools-arc/gcc/gcc-6.x.arc.inc
index 5453373..adad25a 100644
--- a/recipes-devtools-arc/gcc/gcc-6.x.arc.inc
+++ b/recipes-devtools-arc/gcc/gcc-6.x.arc.inc
@@ -28,8 +28,6 @@ SRCREV="11f277e211411c21808cbb9f6cf165902edefea3"
 
 SRC_URI = "\
 
git://github.com/foss-for-synopsys-dwc-arc-processors/gcc.git;protocol=https;nobranch=1
 \
-file://0036-libcc1-fix-libcc1-s-install-path-and-rpath.patch \
-file://0039-Fix-various-_FOR_BUILD-and-related-variables.patch \
 file://cbd8e54244cd02bdcf4f1057be3ce96631f35ac3.patch \
 "
 
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-zephyr][PATCH 2/5] qemu-x86.conf: New MACHINE

2017-01-19 Thread Juro Bystricky
MACHINE definition for Zephyr BOARD qemu_x86

Signed-off-by: Juro Bystricky 
---
 conf/machine/qemu-x86.conf | 11 +++
 1 file changed, 11 insertions(+)
 create mode 100644 conf/machine/qemu-x86.conf

diff --git a/conf/machine/qemu-x86.conf b/conf/machine/qemu-x86.conf
new file mode 100644
index 000..0d595a1
--- /dev/null
+++ b/conf/machine/qemu-x86.conf
@@ -0,0 +1,11 @@
+#@TYPE: Machine
+#@NAME: qemu-x86
+#@DESCRIPTION: Machine for Zephyr BOARD qemu_x86
+
+require conf/machine/include/qemu.inc
+require conf/machine/include/tune-i586.inc
+
+# For runqemu (TBD)
+QB_SYSTEM_NAME = "qemu-system-i386"
+QB_MACHINE = "-machine pc-0.14"
+QB_OPT_APPEND = "-nographic -display none -clock dynticks -no-acpi -balloon 
none"
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-zephyr][PATCH 4/5] zephyr.bbclass: support for image configuration

2017-01-19 Thread Juro Bystricky
New class to support commands such as:

$ MACHINE=xxx bitbake yyy -c menuconfig
$ MACHINE=xxx bitbake yyy -c devshell

Kernel options are typically configured via menuconfig.
The file "prj.conf" must be edited manually, hence the need for devshell.
Once in devshell, user can use their favorite editor to edit the file.

For proper operation, these two variables need to be set in
recipes:

ZEPHYR_SRC_DIR : path to the source, typically place with prj.conf
ZEPHYR_BASE: Zephyr kernel tree location

[YOCTO#10657]

Signed-off-by: Juro Bystricky 
---
 classes/zephyr.bbclass | 53 ++
 recipes-kernel/zephyr-kernel/zephyr-image.inc  |  8 +---
 .../zephyr-kernel/zephyr-kernel-common.inc | 13 +++---
 .../zephyr-kernel/zephyr-philosophers.bb   | 10 ++--
 .../zephyr-getchar/zephyr-getchar_git.bb   | 10 ++--
 5 files changed, 72 insertions(+), 22 deletions(-)
 create mode 100644 classes/zephyr.bbclass

diff --git a/classes/zephyr.bbclass b/classes/zephyr.bbclass
new file mode 100644
index 000..3ea0746
--- /dev/null
+++ b/classes/zephyr.bbclass
@@ -0,0 +1,53 @@
+
+
+inherit terminal
+
+OE_TERMINAL_EXPORTS += "HOST_EXTRACFLAGS HOSTLDFLAGS TERMINFO CROSS_CURSES_LIB 
CROSS_CURSES_INC"
+HOST_EXTRACFLAGS = "${BUILD_CFLAGS} ${BUILD_LDFLAGS}"
+HOSTLDFLAGS = "${BUILD_LDFLAGS}"
+CROSS_CURSES_LIB = "-lncurses -ltinfo"
+CROSS_CURSES_INC = '-DCURSES_LOC=""'
+TERMINFO = "${STAGING_DATADIR_NATIVE}/terminfo"
+
+KCONFIG_CONFIG_COMMAND ??= "menuconfig"
+
+python () {
+# Translate MACHINE into Zephyr BOARD
+# Zephyr BOARD is basically our MACHINE, except we must use "-" instead of 
"_"
+board = d.getVar('MACHINE',True)
+board = board.replace('-', '_')
+d.setVar('BOARD',board)
+}
+
+python do_menuconfig() {
+os.chdir(d.getVar('ZEPHYR_SRC_DIR', True))
+configdir = d.getVar('ZEPHYR_SRC_DIR', True) + '/outdir/' + 
d.getVar('BOARD', True)
+try:
+mtime = os.path.getmtime(configdir +"/.config")
+except OSError:
+mtime = 0
+
+oe_terminal("${SHELL} -c \"ZEPHYR_BASE=%s make BOARD=%s %s; if [ \$? -ne 0 
]; then echo 'Command failed.'; \
+printf 'Press any key to continue... '; \
+read r; fi\"" % (d.getVar('ZEPHYR_BASE', True), 
d.getVar('BOARD', True),d.getVar('KCONFIG_CONFIG_COMMAND', True)),
+d.getVar('PN', True) + ' Configuration', d)
+
+try:
+newmtime = os.path.getmtime(configdir +"/.config")
+except OSError:
+newmtime = 0
+
+if newmtime > mtime:
+bb.warn("Configuration changed, recompile will be forced")
+bb.build.write_taint('do_compile', d)
+}
+do_menuconfig[depends] += "ncurses-native:do_populate_sysroot"
+do_menuconfig[nostamp] = "1"
+do_menuconfig[dirs] = "${B}"
+addtask menuconfig after do_configure
+
+python do_devshell_prepend () {
+# Most likely we need to manually edit prj.conf...
+os.chdir(d.getVar('ZEPHYR_SRC_DIR', True))
+}
+
diff --git a/recipes-kernel/zephyr-kernel/zephyr-image.inc 
b/recipes-kernel/zephyr-kernel/zephyr-image.inc
index d365c9c..cf57dbf 100644
--- a/recipes-kernel/zephyr-kernel/zephyr-image.inc
+++ b/recipes-kernel/zephyr-kernel/zephyr-image.inc
@@ -6,15 +6,11 @@ inherit deploy
 
 QEMU_BIN_PATH = "${STAGING_BINDIR_NATIVE}"
 
-OE_TERMINAL_EXPORTS += "CROSS_COMPILE"
-OE_TERMINAL_EXPORTS += "BOARD"
+ZEPHYR_BASE = "${S}"
 
 do_compile () {
 cd ${S}
-export ZEPHYR_BASE=${S}
-export ZEPHYR_GCC_VARIANT="yocto"
-${MAKE_COMMAND} -C ${ZEPHYR_IMAGE_SRCDIR} pristine
-${MAKE_COMMAND} -C ${ZEPHYR_IMAGE_SRCDIR}
+ oe_runmake ${ZEPHYR_MAKE_ARGS} -C ${ZEPHYR_IMAGE_SRCDIR}
 }
 
 do_deploy () {
diff --git a/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc 
b/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
index 30c1a5a..b2dc48a 100644
--- a/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
+++ b/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
@@ -1,15 +1,12 @@
 # Common settings for all Zephyr recipes
 
+inherit zephyr
+
 # There shouldn't be a manifest for zephyr kernels since there is no root
 # filesystem.
 IMAGE_NO_MANIFEST = "1"
 
-# Zephyr BOARD is basically our MACHINE, except we must use "-" instead of "_"
-BOARD="$(echo ${MACHINE} | tr - _)"
-
-# oe_runmake isn't used because of the make -e causing issues with some
-# make variables.
-MAKE_COMMAND = "make -j V=1 BOARD=${BOARD} CROSS_COMPILE=${CROSS_COMPILE}"
+ZEPHYR_MAKE_ARGS = " V=1 BOARD=${BOARD} CROSS_COMPILE=${CROSS_COMPIL

[yocto] [meta-zephyr][PATCH 5/5] meta-zephyr: newlib support

2017-01-19 Thread Juro Bystricky
This patch adds newlib libraries for cortex-m3, x86, IAMCU and ARC toolchains.

[YOCTO#10662]

Signed-off-by: Juro Bystricky 
---
 conf/distro/zephyr.conf|   1 +
 recipes-core/newlib/newlib/assert-fiprintf.patch   |  23 ++
 .../newlib/newlib/gettimeofday-header-fix.patch|  20 ++
 .../newlib/newlib/iamcu-commit-5d3ad3b.patch   | 399 +
 recipes-core/newlib/newlib_2.%.bb  |  83 +
 recipes-core/newlib/newlib_2.%.bbappend|  23 ++
 recipes-devtools/gcc/libgcc_6.%.bbappend   |   3 +
 .../zephyr-kernel/files/Makefile.toolchain.yocto   |  19 +-
 .../zephyr-kernel/zephyr-kernel-common.inc |  10 +-
 9 files changed, 574 insertions(+), 7 deletions(-)
 create mode 100644 recipes-core/newlib/newlib/assert-fiprintf.patch
 create mode 100644 recipes-core/newlib/newlib/gettimeofday-header-fix.patch
 create mode 100644 recipes-core/newlib/newlib/iamcu-commit-5d3ad3b.patch
 create mode 100644 recipes-core/newlib/newlib_2.%.bb
 create mode 100644 recipes-core/newlib/newlib_2.%.bbappend
 create mode 100644 recipes-devtools/gcc/libgcc_6.%.bbappend

diff --git a/conf/distro/zephyr.conf b/conf/distro/zephyr.conf
index 4a832db..0c6a8b3 100644
--- a/conf/distro/zephyr.conf
+++ b/conf/distro/zephyr.conf
@@ -11,3 +11,4 @@ TCLIBCAPPEND = ""
 TEST_TARGET = "QemuTargetZephyr"
 TEST_SUITES = "zephyr"
 
+TOOLCHAIN_TARGET_TASK += " newlib"
diff --git a/recipes-core/newlib/newlib/assert-fiprintf.patch 
b/recipes-core/newlib/newlib/assert-fiprintf.patch
new file mode 100644
index 000..dd83c1a
--- /dev/null
+++ b/recipes-core/newlib/newlib/assert-fiprintf.patch
@@ -0,0 +1,23 @@
+
+Fix unresolved external "fiprintf".
+When newlib is configured with:
+
+  --enable-newlib-nano-formatted-io
+
+"fiprintf" should be an alias of "fprintf". However the alias does 
+not seem to work properly, as we encounter unresolved external
+error if we uses "assert" in code. So we patch the code directly.
+
+Signed-off-by: Juro Bystricky 
+
+--- a/newlib/libc/stdlib/assert.c  2016-11-08 08:04:45.669248139 -0800
 b/newlib/libc/stdlib/assert.c  2016-11-08 08:05:47.357554034 -0800
+@@ -56,7 +56,7 @@
+   const char *func _AND
+   const char *failedexpr)
+ {
+-  fiprintf(stderr,
++  fprintf(stderr,
+  "assertion \"%s\" failed: file \"%s\", line %d%s%s\n",
+  failedexpr, file, line,
+  func ? ", function: " : "", func ? func : "");
diff --git a/recipes-core/newlib/newlib/gettimeofday-header-fix.patch 
b/recipes-core/newlib/newlib/gettimeofday-header-fix.patch
new file mode 100644
index 000..d1f9bf4
--- /dev/null
+++ b/recipes-core/newlib/newlib/gettimeofday-header-fix.patch
@@ -0,0 +1,20 @@
+
+newlib-2.4.0 regression.
+Export the prototype of gettimeofday
+
+Signed-off-by: Juro Bystricky 
+
+--- a/newlib/libc/include/sys/time.h   2016-03-29 14:33:42.0 -0700
 b/newlib/libc/include/sys/time.h   2016-10-12 09:48:03.873642589 -0700
+@@ -429,9 +429,10 @@
+ int _EXFUN(getitimer, (int __which, struct itimerval *__value));
+ int _EXFUN(setitimer, (int __which, const struct itimerval *__restrict 
__value,
+   struct itimerval *__restrict __ovalue));
++#endif
++
+ int _EXFUN(gettimeofday, (struct timeval *__restrict __p,
+ void *__restrict __tz));
+-#endif
+ 
+ #if __GNU_VISIBLE
+ int _EXFUN(futimesat, (int, const char *, const struct timeval [2]));
diff --git a/recipes-core/newlib/newlib/iamcu-commit-5d3ad3b.patch 
b/recipes-core/newlib/newlib/iamcu-commit-5d3ad3b.patch
new file mode 100644
index 000..f44aa07
--- /dev/null
+++ b/recipes-core/newlib/newlib/iamcu-commit-5d3ad3b.patch
@@ -0,0 +1,399 @@
+From 5d3ad3b123b7c121d7a6eac27fb13016171e27bc Mon Sep 17 00:00:00 2001
+From: Igor Venevtsev 
+Date: Thu, 31 Mar 2016 12:12:00 +0300
+Subject: Add Intel MCU target
+
+Intel MCU System V ABI are incompartible with i386 System V ABI:
+o Minimum instruction set is Intel Pentium ISA minus x87 instructions
+o No x87 or vector registers
+o First three args are passed in %eax, %edx and %ecx
+o Full specification available here:
+  https://github.com/hjl-tools/x86-psABI/wiki/iamcu-psABI-0.7.pdf
+
+newlib/
+* configure.host: Add new ix86-*-elfiamcu target
+
+newlib/libc/include/
+* setjmp.h: Change _JBLEN for Intel MCU target
+
+newlib/libc/machine/i386/
+* memchr.S:  (memchr)  Target-specific size-optimized version
+* memcmp.S:  (memcmp)  Likewise
+* memcpy.S:  (memcpy)  Likewise
+* memmove.S: (memmove) Likewise
+* memset.S:  (memset)  Likewise
+* setjmp.S:  (setjmp)  Likewise
+* strchr.S:  (strchr)  Likewise
+* strlen.S:  (strlen)  Likewise
+
+newlib/libc/stdlib/
+* srtold.c:  (__flt_rounds) Disable for Intel MCU
+
+diff --git a/newlib/configure.host b/newli

[yocto] [meta-zephyr][PATCH 0/4] Support for Zephyr qemu_nios2 board

2017-01-23 Thread Juro Bystricky
This set of patches implements the support for Zephyr qemu_nios2.
It implements the full toolchain (binutils, GCC, newlib) and also
QEMU for Altera Nios2. The Nios2 support is fairly minimalistic,
no tunes to support HW multiply, HW divide etc. as they are not required
by Zephyr.

Upstream QEMU does not support Nios2, so a patch was needed to provide
the Nios2 emulation (CPU, intc, timer, ...)

As with all other supported Zephyr boards, the BOARD=qemu_nios2 required
the creation of a corresponding MACHINE=qemu-nios2

Usage is described in the (updated) README.txt file.


Juro Bystricky (4):
  qemu-nios2: New MACHINE
  qemuzephyrrunner.py: support for qemu-nios2
  zephyr-kernel-test.inc: exclude tests not suitable for Nios2
  README.txt: Updated for qemu-nios2

 README.txt |   32 +-
 conf/machine/include/tune-nios2.inc|   19 +
 conf/machine/qemu-nios2.conf   |   11 +
 lib/oeqa/utils/qemuzephyrrunner.py |6 +
 .../qemu/files/nios2-add-support.patch | 9239 
 recipes-devtools/qemu/qemu_2.7.%.bbappend  |   12 +
 .../zephyr-kernel/zephyr-kernel-test.inc   |3 +
 7 files changed, 9309 insertions(+), 13 deletions(-)
 create mode 100644 conf/machine/include/tune-nios2.inc
 create mode 100644 conf/machine/qemu-nios2.conf
 create mode 100644 recipes-devtools/qemu/files/nios2-add-support.patch
 create mode 100644 recipes-devtools/qemu/qemu_2.7.%.bbappend

-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-zephyr][PATCH 3/4] zephyr-kernel-test.inc: exclude tests not suitable for Nios2

2017-01-23 Thread Juro Bystricky
Signed-off-by: Juro Bystricky 
---
 recipes-kernel/zephyr-kernel/zephyr-kernel-test.inc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/recipes-kernel/zephyr-kernel/zephyr-kernel-test.inc 
b/recipes-kernel/zephyr-kernel/zephyr-kernel-test.inc
index ecc183c..2e92ca2 100644
--- a/recipes-kernel/zephyr-kernel/zephyr-kernel-test.inc
+++ b/recipes-kernel/zephyr-kernel/zephyr-kernel-test.inc
@@ -12,6 +12,9 @@ ZEPHYRTESTS_remove_arm += "test_critical"
 #Remove ARM specific tests
 ZEPHYRTESTS_remove_x86 += "test_context test_arm_irq_vector_table"
 
+#Remove tests not intended for Nios2
+ZEPHYRTESTS_remove_nios2 += "test_context test_arm_irq_vector_table 
test_mem_safe"
+
 # List of all available tests
 ZEPHYRTESTS = " \
 test_arm_irq_vector_table  \
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-zephyr][PATCH 2/4] qemuzephyrrunner.py: support for qemu-nios2

2017-01-23 Thread Juro Bystricky
Signed-off-by: Juro Bystricky 
---
 lib/oeqa/utils/qemuzephyrrunner.py | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/lib/oeqa/utils/qemuzephyrrunner.py 
b/lib/oeqa/utils/qemuzephyrrunner.py
index 441e0d6..2011434 100644
--- a/lib/oeqa/utils/qemuzephyrrunner.py
+++ b/lib/oeqa/utils/qemuzephyrrunner.py
@@ -74,6 +74,12 @@ class QemuZephyrRunner(QemuRunner):
 elif 'x86' in self.machine:
 qemu_binary = 'qemu-system-i386'
 qemu_machine_args = '-machine type=pc-0.14'
+elif 'nios2' in self.machine:
+qemu_binary = 'qemu-system-nios2'
+qemu_machine_args = '-machine altera_10m50_zephyr'
+else:
+bb.error("Unsupported QEMU: %s" % self.machine)
+return False
 
 self.origchldhandler = signal.getsignal(signal.SIGCHLD)
 signal.signal(signal.SIGCHLD, self.handleSIGCHLD)
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-zephyr][PATCH 4/4] README.txt: Updated for qemu-nios2

2017-01-23 Thread Juro Bystricky
Also replaced all "qemux86" with "qemu-x86"

Signed-off-by: Juro Bystricky 
---
 README.txt | 32 +++-
 1 file changed, 19 insertions(+), 13 deletions(-)

diff --git a/README.txt b/README.txt
index cb9a36a..230ad41 100644
--- a/README.txt
+++ b/README.txt
@@ -3,6 +3,8 @@ Building Zephyr Images via bitbake recipes
 
 Prerequisites:
 
+Yocto distro "morty"
+
 Modify local conf by adding:
 DISTRO="zephyr"
 
@@ -11,29 +13,27 @@ Add "meta-zephyr" to BBLAYERS
 
 Building and Running Zephyr tests
 =
-Presently only toolchains for ARM and x86 are supported.
+Presently only toolchains for ARM, x86, IAMCU and Nios2 are supported.
 (For ARM we use CortexM3 toolchain)
 
-Default Zephyr BOARD is selected as follows:
-
-BOARD_arm ?= "qemu_cortex_m3"
-BOARD_x86 ?= "qemu_x86"
-
 You can build and test an individual existing Zephyr test.
 This is done by appending the actual test name to the "zephyr-kernel-test",
 for example:
 
-$ MACHINE=qemux86 bitbake zephyr-kernel-test-test_sleep
-$ MACHINE=qemux86 bitbake zephyr-kernel-test-test_sleep -ctestimage
+$ MACHINE=qemu-x86 bitbake zephyr-kernel-test-test_sleep
+$ MACHINE=qemu-x86 bitbake zephyr-kernel-test-test_sleep -ctestimage
 
-You can also build and run all Zephyr existing tests (as slisted in the file
+You can also build and run all Zephyr existing tests (as listed in the file
 zephyr-kernel-test.inc). For example:
-$ MACHINE=qemux86 bitbake zephyr-kernel-test-all
-$ MACHINE=qemux86 bitbake zephyr-kernel-test-all -ctestimage
+$ MACHINE=qemu-x86 bitbake zephyr-kernel-test-all
+$ MACHINE=qemu-x86 bitbake zephyr-kernel-test-all -ctestimage
 or 
 $ MACHINE=qemu-cortex-m3 bitbake zephyr-kernel-test-all
 $ MACHINE=qemu-cortex-m3 bitbake zephyr-kernel-test-all -ctestimage
-
+or 
+$ MACHINE=qemu-nios2 bitbake zephyr-kernel-test-all
+$ MACHINE=qemu-nios2 bitbake zephyr-kernel-test-all -ctestimage
+
 
 
 Building and Running Zephyr Samples
@@ -41,7 +41,7 @@ Building and Running Zephyr Samples
 You can also build Zephyr samples. There is a sample recipe that builds
 Zephyr "philosophers" sample:
 
-$ MACHINE=qemux86 bitbake zephyr-philosophers
+$ MACHINE=qemu-x86 bitbake zephyr-philosophers
 
 You can run the created "philosophers" image in qemu (at this point
 the various paths have to be entered manually):
@@ -57,3 +57,9 @@ The same sample, for ARM image:
-kernel ./tmp/deploy/images/qemu-cortex-m3/philosophers.elf \
-cpu cortex-m3 -machine lm3s6965evb -nographic -vga none
 
+The same sample, for Nios2 image:
+$ MACHINE=qemu-nios2 bitbake zephyr-philosophers
+$ ./tmp/sysroots/x86_64-linux/usr/bin/qemu-system-nios2  \
+   -kernel ./tmp/deploy/images/qemu-nios2/philosophers.elf \
+   -cpu nios2 -machine altera_10m50_zephyr -nographic
+
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-mingw][PATCH] pthreads-win32: fix dependencies

2017-01-26 Thread Juro Bystricky
This commit fixes the build error:

make[1]: x86_64-pokysdk-mingw32-gcc: Command not found

The build error appeared after oe-core switched to Recipe
Specific Sysroots.

[YOCTO#10971]

Signed-off-by: Juro Bystricky 
---
 recipes-devtools/pthreads-win32/pthreads-win32_2.9.1.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/recipes-devtools/pthreads-win32/pthreads-win32_2.9.1.bb 
b/recipes-devtools/pthreads-win32/pthreads-win32_2.9.1.bb
index 68291b9..e4a0f80 100644
--- a/recipes-devtools/pthreads-win32/pthreads-win32_2.9.1.bb
+++ b/recipes-devtools/pthreads-win32/pthreads-win32_2.9.1.bb
@@ -21,7 +21,7 @@ SRC_URI[sha256sum] = 
"e6aca7aea8de33d9c8580bcb3a0ea3ec0a7ace4ba3f4e263ac7c7b66bc
 S = "${WORKDIR}/pthreads-w32-${PVdash}-release"
 
 INHIBIT_DEFAULT_DEPS = "1"
-DEPENDS = "virtual/${SDK_PREFIX}gcc-initial libgcc virtual/libc"
+DEPENDS = "virtual/${SDK_PREFIX}gcc libgcc virtual/libc"
 
 do_configure_prepend() {
 ## First reset all permissions because all are executable
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-zephyr][morty][PATCH 2/7] zephyr-philosophers: use common naming conventions

2017-02-04 Thread Juro Bystricky
Derive the name of the resulting image based on PN.

Signed-off-by: Juro Bystricky 
---
 recipes-kernel/zephyr-kernel/zephyr-philosophers.bb | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/recipes-kernel/zephyr-kernel/zephyr-philosophers.bb 
b/recipes-kernel/zephyr-kernel/zephyr-philosophers.bb
index babc453..425bebb 100644
--- a/recipes-kernel/zephyr-kernel/zephyr-philosophers.bb
+++ b/recipes-kernel/zephyr-kernel/zephyr-philosophers.bb
@@ -11,9 +11,8 @@ do_compile () {
 }
 
 do_deploy () {
-install -D samples/philosophers/outdir/${BOARD}/zephyr.elf 
${DEPLOYDIR}/philosophers.elf
-install -D samples/philosophers/outdir/${BOARD}/zephyr.bin 
${DEPLOYDIR}/philosophers.bin
-export DEPLOY_DIR_IMAGE=${DEPLOYDIR}/philosophers.elf
+install -D samples/philosophers/outdir/${BOARD}/zephyr.elf 
${DEPLOYDIR}/${PN}.elf
+install -D samples/philosophers/outdir/${BOARD}/zephyr.bin 
${DEPLOYDIR}/${PN}.bin
 }
 
 addtask deploy after do_compile
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-zephyr][morty][PATCH 0/7] consolidated pull for Morty

2017-02-04 Thread Juro Bystricky
The attached series of patches containes various improvements for
meta-zephyr. These are intended for a new meta-zephyr branch "morty".


Juro Bystricky (7):
  zephyr-kernel-common.inc: also build qemus if needed
  zephyr-philosophers: use common naming conventions
  zephyr-getchar: minor cleanup
  zephyr-kernel-test-all: implement clean
  zephyrtest.bbclass: refactor
  qemu-*.conf: support for qemuboot
  zephyr-qemuboot.bbclass

 classes/zephyr-qemuboot.bbclass| 39 ++
 classes/zephyrtest.bbclass | 10 +++---
 conf/machine/qemu-cortex-m3.conf   |  8 +++--
 conf/machine/qemu-nios2.conf   |  7 ++--
 conf/machine/qemu-x86.conf |  6 +++-
 .../zephyr-kernel/zephyr-kernel-common.inc |  7 +++-
 .../zephyr-kernel/zephyr-kernel-test-all.bb|  1 +
 recipes-kernel/zephyr-kernel/zephyr-kernel.inc |  3 ++
 .../zephyr-kernel/zephyr-philosophers.bb   |  5 ++-
 .../zephyr-getchar/zephyr-getchar_git.bb   |  3 +-
 10 files changed, 72 insertions(+), 17 deletions(-)
 create mode 100644 classes/zephyr-qemuboot.bbclass

-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-zephyr][morty][PATCH 3/7] zephyr-getchar: minor cleanup

2017-02-04 Thread Juro Bystricky
Signed-off-by: Juro Bystricky 
---
 recipes-zephyr/zephyr-getchar/zephyr-getchar_git.bb | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/recipes-zephyr/zephyr-getchar/zephyr-getchar_git.bb 
b/recipes-zephyr/zephyr-getchar/zephyr-getchar_git.bb
index 3a34b22..f721033 100644
--- a/recipes-zephyr/zephyr-getchar/zephyr-getchar_git.bb
+++ b/recipes-zephyr/zephyr-getchar/zephyr-getchar_git.bb
@@ -12,7 +12,7 @@ S = "${WORKDIR}/git/zephyr_getchar"
 ZEPHYR_SRC_DIR = "${S}"
 ZEPHYR_BASE="${STAGING_DIR_TARGET}/usr/src/zephyr"
 
-DEPENDS += " zephyr-kernel-src"
+DEPENDS += "zephyr-kernel-src"
 
 do_compile () {
 cd ${ZEPHYR_SRC_DIR}
@@ -21,7 +21,6 @@ do_compile () {
 
 do_deploy () {
 install -D ${S}/outdir/${BOARD}/zephyr.elf ${DEPLOYDIR}/${PN}.elf
-export DEPLOY_DIR_IMAGE=${DEPLOYDIR}/${PN}.elf
 }
 
 addtask deploy after do_compile
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-zephyr][morty][PATCH 1/7] zephyr-kernel-common.inc: also build qemus if needed

2017-02-04 Thread Juro Bystricky
Also build qemus if a recipe is built for a MACHINE=qemuXXX.
Allow inheriting classes based on recipe context.

Signed-off-by: Juro Bystricky 
---
 recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc 
b/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
index cb3c76b..078ea72 100644
--- a/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
+++ b/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
@@ -1,6 +1,7 @@
 # Common settings for all Zephyr recipes
 
-inherit zephyr
+ZEPHYR_INHERIT_CLASSES += "zephyr"
+inherit ${ZEPHYR_INHERIT_CLASSES}
 
 # There shouldn't be a manifest for zephyr kernels since there is no root
 # filesystem.
@@ -16,6 +17,8 @@ INHIBIT_DEFAULT_DEPS = "1"
 DEPENDS += "gcc-cross-${TARGET_ARCH} libgcc ${TOOLCHAIN_TARGET_TASK}"
 CROSS_COMPILE = "${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}"
 
+DEPENDS_append_qemuall = " qemu-native qemu-helper-native"
+
 do_configure[noexec] = "1"
 
 # The makefiles are explicit about the flags they want, so don't unset
@@ -35,3 +38,4 @@ OE_TERMINAL_EXPORTS += "ZEPHYR_SRC_DIR"
 OE_TERMINAL_EXPORTS += "ZEPHYR_BASE"
 OE_TERMINAL_EXPORTS += "ZEPHYR_SYSROOT"
 OE_TERMINAL_EXPORTS += "ZEPHYR_GCC_VARIANT"
+
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-zephyr][morty][PATCH 6/7] qemu-*.conf: support for qemuboot

2017-02-04 Thread Juro Bystricky
Add support to run qemus using runqemu.
All qemu machines will inherit the bbclass "zephyr-qemuboot",
which is responsible to set up everything that is needed
in order to use "runqemu".

Signed-off-by: Juro Bystricky 
---
 conf/machine/qemu-cortex-m3.conf | 8 ++--
 conf/machine/qemu-nios2.conf | 7 +--
 conf/machine/qemu-x86.conf   | 6 +-
 3 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/conf/machine/qemu-cortex-m3.conf b/conf/machine/qemu-cortex-m3.conf
index aeb9a69..6a6d45e 100644
--- a/conf/machine/qemu-cortex-m3.conf
+++ b/conf/machine/qemu-cortex-m3.conf
@@ -5,7 +5,11 @@
 require conf/machine/include/qemu.inc
 require conf/machine/include/tune-cortexm3.inc
 
-# For runqemu (TBD)
+ZEPHYR_INHERIT_CLASSES += "zephyr-qemuboot"
+
+# For runqemu
 QB_SYSTEM_NAME = "qemu-system-arm"
 QB_MACHINE = "-machine lm3s6965evb"
-QB_OPT_APPEND = "-nographic -vga none -cpu=cortex-m3"
+QB_OPT_APPEND = "-nographic -vga none"
+QB_CPU = "-cpu cortex-m3"
+
diff --git a/conf/machine/qemu-nios2.conf b/conf/machine/qemu-nios2.conf
index d74017f..abc9574 100644
--- a/conf/machine/qemu-nios2.conf
+++ b/conf/machine/qemu-nios2.conf
@@ -5,7 +5,10 @@
 require conf/machine/include/qemu.inc
 require conf/machine/include/tune-nios2.inc
 
-# For runqemu (TBD)
+ZEPHYR_INHERIT_CLASSES += "zephyr-qemuboot"
+
+# For runqemu
 QB_SYSTEM_NAME = "qemu-system-nios2"
 QB_MACHINE = "-machine altera_10m50_zephyr"
-QB_OPT_APPEND = "-nographic -cpu=nios2"
+QB_OPT_APPEND = "-nographic"
+QB_CPU = "-cpu nios2"
diff --git a/conf/machine/qemu-x86.conf b/conf/machine/qemu-x86.conf
index 0d595a1..9a46809 100644
--- a/conf/machine/qemu-x86.conf
+++ b/conf/machine/qemu-x86.conf
@@ -5,7 +5,11 @@
 require conf/machine/include/qemu.inc
 require conf/machine/include/tune-i586.inc
 
-# For runqemu (TBD)
+ZEPHYR_INHERIT_CLASSES += "zephyr-qemuboot"
+
+# For runqemu
 QB_SYSTEM_NAME = "qemu-system-i386"
 QB_MACHINE = "-machine pc-0.14"
 QB_OPT_APPEND = "-nographic -display none -clock dynticks -no-acpi -balloon 
none"
+QB_CPU_x86 = "-cpu qemu32"
+QB_CPU_KVM_x86 = "-cpu kvm32"
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-zephyr][morty][PATCH 5/7] zephyrtest.bbclass: refactor

2017-02-04 Thread Juro Bystricky
Only keep code/variables related to individual test/package names.
Moved ZEPHYR_TEST_SRCDIR into zephyr-kernel.inc as it is
zephyr kernel version specific.
Moved ZEPHYR_MAKE_OUTPUT into zephyr-kernel-common.inc as it is
as it is not zephyr test specific but applicable to all
zephyr images.
Additional minor cleanup.

Signed-off-by: Juro Bystricky 
---
 classes/zephyrtest.bbclass| 10 --
 recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc |  1 +
 recipes-kernel/zephyr-kernel/zephyr-kernel.inc|  3 +++
 3 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/classes/zephyrtest.bbclass b/classes/zephyrtest.bbclass
index e396bf7..aa9ee3c 100644
--- a/classes/zephyrtest.bbclass
+++ b/classes/zephyrtest.bbclass
@@ -1,6 +1,5 @@
 
 python zephyrtest_virtclass_handler () {
-cls = e.data.getVar("BBEXTENDCURR", True)
 variant = e.data.getVar("BBEXTENDVARIANT", True)
 
 # ipk doesn't like underscores in pacakges names. So just use dashes
@@ -11,13 +10,12 @@ python zephyrtest_virtclass_handler () {
 pn_underscores = e.data.getVar("PN", True) + "-" + variant
 
 e.data.setVar("PN", pn)
-e.data.setVar("ZEPHYR_IMAGENAME", variant_dashes + ".elf")
+e.data.setVar("ZEPHYR_IMAGENAME", pn + ".elf")
 
-# Most tests for Zephyr 1.6 are in the "legacy" folder
-e.data.setVar("ZEPHYR_IMAGE_SRCDIR", "tests/legacy/kernel/" + variant)
-e.data.setVar("ZEPHYR_MAKE_OUTPUT", "zephyr.elf")
+testsrc = e.data.getVar("ZEPHYR_TEST_SRCDIR", True)
+e.data.setVar("ZEPHYR_IMAGE_SRCDIR", testsrc + variant)
 
-# Allow to build using both foo-some_test form as well ass foo-some-test
+# Allow to build using both foo-some_test form as well as foo-some-test
 e.data.setVar("PROVIDES", e.data.getVar("PROVIDES", True) + pn_underscores)
 }
 
diff --git a/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc 
b/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
index 078ea72..f5106c1 100644
--- a/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
+++ b/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
@@ -10,6 +10,7 @@ IMAGE_NO_MANIFEST = "1"
 ZEPHYR_GCC_VARIANT="yocto"
 ZEPHYR_SYSROOT="${STAGING_DIR_TARGET}"
 
+ZEPHYR_MAKE_OUTPUT = "zephyr.elf"
 ZEPHYR_MAKE_ARGS = " V=1 BOARD=${BOARD} CROSS_COMPILE=${CROSS_COMPILE} 
ZEPHYR_GCC_VARIANT=${ZEPHYR_GCC_VARIANT} ZEPHYR_BASE=${ZEPHYR_BASE} 
ZEPHYR_SYSROOT=${ZEPHYR_SYSROOT}"
 
 # We always need a toolchain to cross-compile.
diff --git a/recipes-kernel/zephyr-kernel/zephyr-kernel.inc 
b/recipes-kernel/zephyr-kernel/zephyr-kernel.inc
index 71c7a29..59b0713 100644
--- a/recipes-kernel/zephyr-kernel/zephyr-kernel.inc
+++ b/recipes-kernel/zephyr-kernel/zephyr-kernel.inc
@@ -8,6 +8,9 @@ SRC_URI += "file://Makefile.toolchain.yocto"
 
 PV = "1.6.0"
 
+# Most tests for Zephyr 1.6 are in the "legacy" folder
+ZEPHYR_TEST_SRCDIR = "tests/legacy/kernel/"
+
 S = "${WORKDIR}/git"
 
 do_compile_prepend() {
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-zephyr][morty][PATCH 4/7] zephyr-kernel-test-all: implement clean

2017-02-04 Thread Juro Bystricky
support for:
$ bitbake zephyr-kernel-test-all -c clean

Signed-off-by: Juro Bystricky 
---
 recipes-kernel/zephyr-kernel/zephyr-kernel-test-all.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/recipes-kernel/zephyr-kernel/zephyr-kernel-test-all.bb 
b/recipes-kernel/zephyr-kernel/zephyr-kernel-test-all.bb
index 45f962e..c45124a 100644
--- a/recipes-kernel/zephyr-kernel/zephyr-kernel-test-all.bb
+++ b/recipes-kernel/zephyr-kernel/zephyr-kernel-test-all.bb
@@ -16,3 +16,4 @@ do_testimage[depends] = '${@" ".join(["zephyr-kernel-test-" + 
x + ":do_testimage
 
 do_build[depends] = '${@" ".join(["zephyr-kernel-test-" + x + ":do_build" for 
x in d.getVar("ZEPHYRTESTS", True).split()])}'
 
+do_clean[depends] = '${@" ".join(["zephyr-kernel-test-" + x + ":do_clean" for 
x in d.getVar("ZEPHYRTESTS", True).split()])}'
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-zephyr][morty][PATCH 7/7] zephyr-qemuboot.bbclass

2017-02-04 Thread Juro Bystricky
A bbclass used to generate qemuboot.conf and various symbolic
links needed to properly run "runqemu".

Signed-off-by: Juro Bystricky 
---
 classes/zephyr-qemuboot.bbclass | 39 +++
 1 file changed, 39 insertions(+)
 create mode 100644 classes/zephyr-qemuboot.bbclass

diff --git a/classes/zephyr-qemuboot.bbclass b/classes/zephyr-qemuboot.bbclass
new file mode 100644
index 000..2f9c4f1
--- /dev/null
+++ b/classes/zephyr-qemuboot.bbclass
@@ -0,0 +1,39 @@
+inherit qemuboot
+
+KERNEL_IMAGETYPE = "${PN}.elf"
+QB_DEFAULT_FSTYPE = "elf"
+QB_NETWORK_DEVICE = "none"
+QB_NET = "none"
+
+IMAGE_LINK_NAME = "${PN}-image-${MACHINE}"
+
+# Create a link with "-image-" in the name just to keep runqemu happy
+QEMU_IMAGE_LINK = "${DEPLOY_DIR_IMAGE}/${PN}-image-${MACHINE}.elf"
+
+# qemuboot writes into IMGDEPLOYDIR, force to write to DEPLOY_DIR_IMAGE
+IMGDEPLOYDIR = "${DEPLOY_DIR_IMAGE}"
+
+CLEANFUNCS += "bootconf_clean"
+
+python bootconf_clean() {
+import glob
+files = glob.glob(d.getVar('IMGDEPLOYDIR', True)+'/'+ d.getVar('PN', True) 
+ '*.qemuboot.conf')
+for f in files:
+os.remove(f)
+
+qemuimage_link = d.getVar('QEMU_IMAGE_LINK', True)
+if os.path.lexists(qemuimage_link):
+os.remove(qemuimage_link)
+}
+
+python do_bootconf_write() {
+bb.build.exec_func("write_qemuboot_conf", d)
+
+qemuimage = "%s/%s.elf" % (d.getVar('DEPLOY_DIR_IMAGE', True), 
d.getVar('PN', True))
+qemuimage_link = d.getVar('QEMU_IMAGE_LINK', True)
+if os.path.lexists(qemuimage_link):
+os.remove(qemuimage_link)
+os.symlink(os.path.basename(qemuimage), qemuimage_link)
+}
+
+addtask do_bootconf_write before do_build after do_deploy
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-zephyr][morty][PATCH] testimage: performace improvements

2017-02-04 Thread Juro Bystricky
Refactored processing of QEMU logs.
The original code read QEMU logs every 30 seconds, which
resulted in each test taking at least 30 seconds to finish.
In reality, most tests take only a few seconds.
Although the tests run in parallel, on systems with only a few
CPUs this can make a very noticable difference.

Signed-off-by: Juro Bystricky 
---
 lib/oeqa/controllers/zephyrtargetconrol.py  | 66 -
 lib/oeqa/controllers/zephyrtargetcontrol.py | 66 +
 lib/oeqa/runtime/zephyr.py  | 29 +++--
 lib/oeqa/utils/qemuzephyrrunner.py  | 52 +++
 4 files changed, 118 insertions(+), 95 deletions(-)
 delete mode 100644 lib/oeqa/controllers/zephyrtargetconrol.py
 create mode 100644 lib/oeqa/controllers/zephyrtargetcontrol.py

diff --git a/lib/oeqa/controllers/zephyrtargetconrol.py 
b/lib/oeqa/controllers/zephyrtargetconrol.py
deleted file mode 100644
index 94bf183..000
--- a/lib/oeqa/controllers/zephyrtargetconrol.py
+++ /dev/null
@@ -1,66 +0,0 @@
-# Copyright (C) 2013-2016 Intel Corporation
-#
-# Released under the MIT license (see COPYING.MIT)
-
-# This module is used by testimage.bbclass for setting up and controlling a 
target machine.
-
-import os
-import shutil
-import bb
-import logging
-from oeqa.targetcontrol import QemuTarget
-from oeqa.utils.dump import TargetDumper
-from oeqa.utils.qemuzephyrrunner import QemuZephyrRunner
-
-class QemuTargetZephyr(QemuTarget):
-
-def __init__(self, d):
-
-super(QemuTarget, self).__init__(d)
-self.qemulog = os.path.join(self.testdir, "qemu_boot_log.%s" % 
self.datetime)
-dump_target_cmds = d.getVar("testimage_dump_target", True)
-dump_host_cmds = d.getVar("testimage_dump_host", True)
-dump_dir = d.getVar("TESTIMAGE_DUMP_DIR", True)
-
-self.kernel = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), 
d.getVar("ZEPHYR_IMAGENAME", True))
-self.rootfs = ""
-
-# Log QemuRunner log output to a file
-import oe.path
-from oeqa.utils.qemuzephyrrunner import QemuZephyrRunner
-bb.utils.mkdirhier(self.testdir)
-self.qemurunnerlog = os.path.join(self.testdir, 'qemurunner_log.%s' % 
self.datetime)
-logger = logging.getLogger('BitBake.QemuRunner')
-loggerhandler = logging.FileHandler(self.qemurunnerlog)
-loggerhandler.setFormatter(logging.Formatter("%(levelname)s: 
%(message)s"))
-logger.addHandler(loggerhandler)
-oe.path.symlink(os.path.basename(self.qemurunnerlog), 
os.path.join(self.testdir, 'qemurunner_log'), force=True)
-self.runner = QemuZephyrRunner(machine=d.getVar("MACHINE", True),
-rootfs=self.rootfs,
-tmpdir = d.getVar("TMPDIR", True),
-deploy_dir_image = d.getVar("DEPLOY_DIR_IMAGE", True),
-display = d.getVar("BB_ORIGENV", 
False).getVar("DISPLAY", True),
-logfile = self.qemulog,
-kernel = self.kernel,
-boottime = int(d.getVar("TEST_QEMUBOOT_TIMEOUT", 
True)))
-
-self.target_dumper = TargetDumper(dump_target_cmds, dump_dir, 
self.runner)
-
-def deploy(self):
-try:
-bb.utils.mkdirhier(self.testdir)
-if self.rootfs:
-shutil.copyfile(self.origrootfs, self.rootfs)
-except Exception as e:
-bb.fatal("Error copying rootfs: %s" % e)
-
-qemuloglink = os.path.join(self.testdir, "qemu_boot_log")
-if os.path.islink(qemuloglink):
-os.unlink(qemuloglink)
-os.symlink(self.qemulog, qemuloglink)
-
-bb.note("Qemu log file: %s" % self.qemulog)
-super(QemuTarget, self).deploy()
-
-def wait_for_serial(self, func_timeout, data_timeout):
-return self.runner.wait_for_serial(func_timeout, data_timeout)
diff --git a/lib/oeqa/controllers/zephyrtargetcontrol.py 
b/lib/oeqa/controllers/zephyrtargetcontrol.py
new file mode 100644
index 000..8400bd1
--- /dev/null
+++ b/lib/oeqa/controllers/zephyrtargetcontrol.py
@@ -0,0 +1,66 @@
+# Copyright (C) 2013-2017 Intel Corporation
+#
+# Released under the MIT license (see COPYING.MIT)
+
+# This module is used by testimage.bbclass for setting up and controlling a 
target machine.
+
+import os
+import shutil
+import bb
+import logging
+from oeqa.targetcontrol import QemuTarget
+from oeqa.utils.dump import TargetDumper
+from oeqa.utils.qemuzephyrrunner import QemuZephyrRunner
+
+class QemuTargetZephyr(QemuTarget):
+
+def __init__(self, d):
+
+super(QemuTarget, self).__init__(d)
+self.qemulog = os.path.join(self.testdir, "qemu_boot_log.%s" % 
self.datetime)
+dump_target_cmds

[yocto] [meta-zephyr][morty][PATCH] arduino-101: Support for flashing via USB

2017-02-12 Thread Juro Bystricky
Implement a class allowing flashing Arduino-101 using dfu-util.
User needs to have dfu-utils installed on the host machine.
All tree cores supported (x86, ARM, ARC)

Sample usage:
$ MACHINE=arduino-101 bitbake xxx
$ MACHINE=arduino-101 bitbake xxx -c flash_usb

Signed-off-by: Juro Bystricky 
---
 classes/zephyr-flash-dfu.bbclass  | 34 ++
 conf/machine/arduino-101-sss.conf |  1 +
 conf/machine/arduino-101.conf |  1 +
 3 files changed, 36 insertions(+)
 create mode 100644 classes/zephyr-flash-dfu.bbclass

diff --git a/classes/zephyr-flash-dfu.bbclass b/classes/zephyr-flash-dfu.bbclass
new file mode 100644
index 000..2d82281
--- /dev/null
+++ b/classes/zephyr-flash-dfu.bbclass
@@ -0,0 +1,34 @@
+
+python do_flash_usb() {
+import subprocess
+return_code = subprocess.call("which dfu-util", shell=True)
+if return_code != 0:
+bb.error("ERROR: dfu_util binary not in PATH")
+sys.exit(1)
+
+board = d.getVar('BOARD',True)
+bb.warn("Attempting to flash board: %s" % board)
+
+if board == 'arduino_101_sss':
+iface = 'sensor_core'
+elif board == 'arduino_101':
+iface = 'x86_app'
+elif board == 'arduino_101_ble':
+iface = 'ble_core'
+else:
+bb.error(" Unsupported board %s" % board)
+sys.exit(2)
+
+image = "%s/%s.elf" % (d.getVar('DEPLOY_DIR_IMAGE', True), d.getVar('PN', 
True))
+statement = 'dfu-util -v -a ' + iface + ' -d 8087:0aba -D ' + 
image.replace('elf','bin')
+bb.note("command: %s" % statement)
+return_code = subprocess.call(statement, shell=True)
+if return_code != 0:
+bb.error("Error flashig the device [%d], reset needed?" % return_code)
+else:
+bb.warn("Success (return code %d)" % return_code)
+}
+
+addtask do_flash_usb
+
+do_flash_usb[nostamp] = "1"
diff --git a/conf/machine/arduino-101-sss.conf 
b/conf/machine/arduino-101-sss.conf
index cab5a3f..14b9861 100644
--- a/conf/machine/arduino-101-sss.conf
+++ b/conf/machine/arduino-101-sss.conf
@@ -16,3 +16,4 @@ PREFERRED_VERSION_binutils-cross-${TARGET_ARCH} = 
"2.26+gitarc"
 PREFERRED_VERSION_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = 
"2.26+gitarc"
 
 TARGET_LINK_HASH_STYLE = ""
+ZEPHYR_INHERIT_CLASSES += "zephyr-flash-dfu"
diff --git a/conf/machine/arduino-101.conf b/conf/machine/arduino-101.conf
index 543a41e..b38c320 100644
--- a/conf/machine/arduino-101.conf
+++ b/conf/machine/arduino-101.conf
@@ -8,3 +8,4 @@ require conf/machine/include/tune-iamcu.inc
 TUNE_PKGARCH_arduino-101 = "iamcu"
 
 TARGET_LINK_HASH_STYLE = ""
+ZEPHYR_INHERIT_CLASSES += "zephyr-flash-dfu"
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [pseudo] openat.c: fix flags in wrap_openat

2017-05-23 Thread Juro Bystricky
Due to a silly typo we use incorrect open flags.

Signed-off-by: Juro Bystricky 
---
 ports/darwin/guts/open.c  | 2 +-
 ports/linux/guts/openat.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/ports/darwin/guts/open.c b/ports/darwin/guts/open.c
index f34b0d3..307bcc9 100644
--- a/ports/darwin/guts/open.c
+++ b/ports/darwin/guts/open.c
@@ -12,7 +12,7 @@
 
/* mask out mode bits appropriately */
mode = mode & ~pseudo_umask;
-#ifdef PSEUDO_FORCE_ASYNCH
+#ifdef PSEUDO_FORCE_ASYNC
 flags &= ~O_SYNC;
 #endif
 
diff --git a/ports/linux/guts/openat.c b/ports/linux/guts/openat.c
index eb7c0b5..5b26e08 100644
--- a/ports/linux/guts/openat.c
+++ b/ports/linux/guts/openat.c
@@ -20,7 +20,7 @@
}
 #endif
 
-#ifdef PSEUDO_FORCE_ASYNCH
+#ifdef PSEUDO_FORCE_ASYNC
 /* Yes, I'm aware that every Linux system I've seen has
  * DSYNC and RSYNC being the same value as SYNC.
  */
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto