Re: [yocto] Query configuration

2015-11-19 Thread Paul Eggleton
Hi Gary,

On Thursday 19 November 2015 10:01:36 Gary Thomas wrote:
> On 2015-11-19 09:42, Gary Thomas wrote:
> > I have a recipe that needs to make sure a global setting is
> > in place (used by a different recipe).  How can I test for
> > this variable/setting in my recipe and issue a warning/error
> > if it is not?
> > 
> > Thanks for any ideas
> 
> Never mind - it occurred to me to see if some other recipe had
> such checks and I found some and was able to add this to my recipe:
> 
> # Make sure SPI will is enabled
> python do_check_variables() {
>  ENABLE_SPI_BUS = d.getVar('ENABLE_SPI_BUS', True)
>  if ENABLE_SPI_BUS != '1':
> bb.fatal("PiFace module can't work without SPI support - Add
> ENABLE_SPI_BUS='1' to local.conf") }
> addtask check_variables before do_fetch
> 
> Not sure if this is the best way but it suffices.

Another thing you could do would be to do a similar thing except use anonymous 
python and raise SkipRecipe instead of bb.fatal().

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Query configuration

2015-11-19 Thread Gary Thomas

On 2015-11-19 09:42, Gary Thomas wrote:

I have a recipe that needs to make sure a global setting is
in place (used by a different recipe).  How can I test for
this variable/setting in my recipe and issue a warning/error
if it is not?

Thanks for any ideas



Never mind - it occurred to me to see if some other recipe had
such checks and I found some and was able to add this to my recipe:

# Make sure SPI will is enabled
python do_check_variables() {
ENABLE_SPI_BUS = d.getVar('ENABLE_SPI_BUS', True)
if ENABLE_SPI_BUS != '1':
   bb.fatal("PiFace module can't work without SPI support - Add 
ENABLE_SPI_BUS='1' to local.conf")
}
addtask check_variables before do_fetch

Not sure if this is the best way but it suffices.

--

Gary Thomas |  Consulting for the
MLB Associates  |Embedded world

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


[yocto] [meta-raspberrypi][PATCH] rpi-config: SPI bus support

2015-11-19 Thread Gary Thomas
With the newer kernels that use device tree, the SPI bus is only
enabled by a device tree setting.  This is now supported by adding
  ENABLE_SPI_BUS = "1"
in local.conf

Signed-off-by: Gary Thomas 
---
 README  | 5 +
 recipes-bsp/bootfiles/rpi-config_git.bb | 6 ++
 2 files changed, 11 insertions(+)

diff --git a/README b/README
index e16dee9..bef13a3 100644
--- a/README
+++ b/README
@@ -189,6 +189,11 @@ kernels.
 NOTE: KERNEL_DEVICETREE is default enabled for kernel >= 3.18 and always 
disabled for
   older kernel versions.
 
+2.M. Optional - enable SPI bus
+==
+When using device tree kernels, set this variable to enable the SPI bus
+ENABLE_SPI_BUS = "1"
+
 3. Extra apps
 =
 
diff --git a/recipes-bsp/bootfiles/rpi-config_git.bb 
b/recipes-bsp/bootfiles/rpi-config_git.bb
index 45b9f1d..aa11b25 100644
--- a/recipes-bsp/bootfiles/rpi-config_git.bb
+++ b/recipes-bsp/bootfiles/rpi-config_git.bb
@@ -66,6 +66,12 @@ do_deploy() {
 echo "# Enable offline compositing" 
>>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
 echo "dispmanx_offline=1" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
 fi
+
+# SPI bus support
+if [ -n "${ENABLE_SPI_BUS}" ]; then
+echo "# Enable SPI bus" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+echo "dtparam=spi=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+fi
 }
 
 addtask deploy before do_package after do_install
-- 
1.9.1

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


[yocto] Query configuration

2015-11-19 Thread Gary Thomas

I have a recipe that needs to make sure a global setting is
in place (used by a different recipe).  How can I test for
this variable/setting in my recipe and issue a warning/error
if it is not?

Thanks for any ideas

--

Gary Thomas |  Consulting for the
MLB Associates  |Embedded world

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


Re: [yocto] After update to yocto 2.0 from 1.8 can not install app to /usr/sbin in SDK

2015-11-19 Thread Krzeminski, Marcin (Nokia - PL/Wroclaw)
It does make sense now. Cmake updated.

Thanks,
Marcin Krzeminski

From: EXT Burton, Ross [mailto:ross.bur...@intel.com]
Sent: Thursday, November 19, 2015 12:21 PM
To: Krzeminski, Marcin (Nokia - PL/Wroclaw) 
Cc: yocto@yoctoproject.org
Subject: Re: [yocto] After update to yocto 2.0 from 1.8 can not install app to 
/usr/sbin in SDK


On 19 November 2015 at 10:59, Krzeminski, Marcin (Nokia - PL/Wroclaw) 
mailto:marcin.krzemin...@nokia.com>> wrote:
Does this behavior is somehow expected?

Yes.  sbindir is set to bindir for the SDK, so that all binaries installed are 
trivially available to the user.   Instead of hard-coding ${prefix}/sbin use 
${sbindir} everywhere and your binary will end up in the SDK's usr/bin/.

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


Re: [yocto] After update to yocto 2.0 from 1.8 can not install app to /usr/sbin in SDK

2015-11-19 Thread Burton, Ross
On 19 November 2015 at 10:59, Krzeminski, Marcin (Nokia - PL/Wroclaw) <
marcin.krzemin...@nokia.com> wrote:

> Does this behavior is somehow expected?
>

Yes.  sbindir is set to bindir for the SDK, so that all binaries installed
are trivially available to the user.   Instead of hard-coding
${prefix}/sbin use ${sbindir} everywhere and your binary will end up in the
SDK's usr/bin/.

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


[yocto] After update to yocto 2.0 from 1.8 can not install app to /usr/sbin in SDK

2015-11-19 Thread Krzeminski, Marcin (Nokia - PL/Wroclaw)
Hello,

After migration to poky 2.0 there is a problem with SDK creation for custom 
cmake app.
Cmake install line is:

install(TARGETS flashcreator DESTINATION sbin)

Here is a recipe (without SRC URI):

SECTION = "libs"
LICENSE = "CLOSED"
PR = "r1"

S = "${WORKDIR}/git"

DEPENDS = "libxml2"
RDEPENDS_${PN} = "libxml2"

inherit cmake
BBCLASSEXTEND = "native nativesdk"

In yocto 2.0 it is not possible to create SDK with this app:

ERROR: QA Issue: nativesdk-net-bootcreator: Files/directories were installed 
but not shipped in any package:
  /opt
  /opt/poky
  /opt/poky/2.0
  /opt/poky/2.0/sysroots
  /opt/poky/2.0/sysroots/i686-pokysdk-linux
  /opt/poky/2.0/sysroots/i686-pokysdk-linux/usr
  /opt/poky/2.0/sysroots/i686-pokysdk-linux/usr/sbin
  /opt/poky/2.0/sysroots/i686-pokysdk-linux/usr/sbin/netbootcreator
  /opt/poky/2.0/sysroots/i686-pokysdk-linux/usr/sbin/.debug
  /opt/poky/2.0/sysroots/i686-pokysdk-linux/usr/sbin/.debug/netbootcreator
Please set FILES such that these items are packaged. Alternatively if they are 
unneeded, avoid installing them or delete them within do_install.
nativesdk-net-bootcreator: 10 installed and not shipped files. 
[installed-vs-shipped]

>From bitbake conf file it seem that /usr/sbin directory is under FILES filter.
Adding FILES_${PN} += "${sbin}/*} did not helped.
If I change cmake to install in /usr/bin all is working fine.
Does this behavior is somehow expected?

Regards,
Marcin Krzeminski


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


[yocto] lighttpd + mod_cgi

2015-11-19 Thread Norbert Belfin
Hello,

we wanted to use lighttpd with mod-cgi (for php). First thing what
happens was, that the module crashed. After a look in log.do_compile we 
found the reason.
grep output:

lighttpd-1.4.36/src/mod_cgi.c:230:50: warning: implicit declaration of function 
'chunkqueue_written' [-Wimplicit-function-declaration]

The function chunkqueue_written() was removed in lighttpd version
1.4.36. The call is added by the patch
0001-mod_cgi-buffers-data-without-bound.patch which orinally was written
for version 1.4.35, in which chunkqueue_written() existed.

So our first try was to build lighttpd without this patch. mod_cgi
didn't crash, but the php-webpage is not working (with module fast-cgi
ist works perfect). It seems that no correct is sent.
Hm, okay, maybe the patch fixed more than memory problems while streaming?
Now we built an package from the lighttpd version 1.3.35, for what the
patch was written. The problems with the webpage still exists.
Has anyone used lighttpd with mod-cgi and php on yocto poky (jethro or
fido) succesfully? A workaround could be to use fast-cgi, but we want to
save RAM and boot time.

Greetings an thanks for your help

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


Re: [yocto] aclocal warnings

2015-11-19 Thread Martin Townsend
Hi,

It's just a warning which I can suppress with export LANG=C, autotools is
working fine with the SDK after a bit of tweaking in the ac and am files.

Cheers,
Martin.


On Thu, Nov 19, 2015 at 7:03 AM, Khem Raj  wrote:

> On Wed, Nov 18, 2015 at 1:23 AM, Martin Townsend
>  wrote:
> > Hi,
> >
> > I've created an autotools project to test out my SDK I've generated.  The
> > SDK was generated from a Yocto build system based the Fido branch.
> > After souring the environment setup file in the SDK, running aclocal I
> get
> > the following warnings
> > perl: warning: Setting locale failed.
> > perl: warning: Please check that your locale settings:
> > LANGUAGE = "en_GB:en",
> > LC_ALL = (unset),
> > LANG = "en_GB.UTF-8"
> > are supported and installed on your system.
> > perl: warning: Falling back to the standard locale ("C").
> > perl: warning: Setting locale failed.
> > perl: warning: Please check that your locale settings:
> > LANGUAGE = "en_GB:en",
> > LC_ALL = (unset),
> > LANG = "en_GB.UTF-8"
> > are supported and installed on your system.
> > perl: warning: Falling back to the standard locale ("C").
> >
> > If I take the same project and build for the host aclocal works fine.
> >
> > Does anyone know what I can do to fix this in the SDK? even a hint as to
> > where to look would be appreciated.
>
> its using perl from SDK it seems and we dont have all locales
> installed in SDK. Do you see any problems due to this ?
> or is it just a warning
>
> >
> > Many Thanks,
> > Martin.
> >
> > --
> > ___
> > yocto mailing list
> > yocto@yoctoproject.org
> > https://lists.yoctoproject.org/listinfo/yocto
> >
>
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto