[yocto] busybox udhcpd service file

2015-09-30 Thread Lukas Böhm

Hello,

I want to use the busybox udhcpd server in conjunction with systemd. As there is 
no service file included in the recipe (v1.22.1) and no udhcpd.conf I made a 
bbappend to add this. Unfortunatelly the service file is not added to the final 
image but the conf-file.

My busybox_%.bbappend looks as follows:

FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += " \
file://udhcpd.conf \
file://udhcpd.service \
"
SYSTEMD_PACKAGES += " \
${PN}-udhcpd \
"
SYSTEMD_SERVICE_${PN}-udhcpd = "udhcpd.service"
FILES_${PN}-udhcpd += "${systemd_unitdir}/system/udhcpd.service 
${sysconfdir}/udhcpd.conf"


do_install_append () {
  install -d ${D}${systemd_unitdir}/system
  install -d ${D}${sysconfdir}
  install -m 0644 ${WORKDIR}/udhcpd.conf ${D}${sysconfdir}
  install -m 0644 ${WORKDIR}/udhcpd.service 
${D}${systemd_unitdir}/system/udhcpd.service

}
-
The strange thing is, that the service file is installed to 
${WORKDIR}/image/lib/systemd/system but not to the final image.


Any hints how to make it will be highly appreciated.
Thanks

Lukas Böhm

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


[yocto] How can i invoke a "particular recipe(.bb)" while building "image recipe(.bb)" without modifying the "image recipe(.bb)" . i only wanted to change "particular recipe(.bb)"

2015-09-30 Thread Vivek Per
hi,
   i want to create a "x" recipe that should automatically get invoke when
"image" recipe( that produces image) is built. How can i modify the "x"
recipe that should be invoked while building image recipe.

I don't want to do any modifications to the image recipe, i only wanted to
do changes in "x" recipe.
Can any one help on this . thanks in advance

Thanks and regards
vivek
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] How can i invoke a "particular recipe(.bb)" while building "image recipe(.bb)" without modifying the "image recipe(.bb)" . i only wanted to change "particular recipe(.bb)"

2015-09-30 Thread Khem Raj
On Wed, Sep 30, 2015 at 2:05 AM, Vivek Per  wrote:
> hi,
>i want to create a "x" recipe that should automatically get invoke when
> "image" recipe( that produces image) is built. How can i modify the "x"
> recipe that should be invoked while building image recipe.
>
> I don't want to do any modifications to the image recipe, i only wanted to
> do changes in "x" recipe.
> Can any one help on this . thanks in advance

add one of output package its producing ( ipk)  to IMAGE_INSTALL
inside the image recipe.

>
> Thanks and regards
> vivek
>
> --
> ___
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] How can i invoke a "particular recipe(.bb)" while building "image recipe(.bb)" without modifying the "image recipe(.bb)" . i only wanted to change "particular recipe(.bb)"

2015-09-30 Thread Vivek Per
Hi , thanks you for replying,
but i don't want to make changes to "image" recipe. i only wanted to make
changes to "x" recipe that should be invoked when i do bitbake .
what variable i can put in "x" recipe so that it invokes when is do


Thanks and Regards
Vivek

On Wed, Sep 30, 2015 at 3:43 PM, Khem Raj  wrote:

> On Wed, Sep 30, 2015 at 2:05 AM, Vivek Per  wrote:
> > hi,
> >i want to create a "x" recipe that should automatically get invoke
> when
> > "image" recipe( that produces image) is built. How can i modify the "x"
> > recipe that should be invoked while building image recipe.
> >
> > I don't want to do any modifications to the image recipe, i only wanted
> to
> > do changes in "x" recipe.
> > Can any one help on this . thanks in advance
>
> add one of output package its producing ( ipk)  to IMAGE_INSTALL
> inside the image recipe.
>
> >
> > Thanks and regards
> > vivek
> >
> > --
> > ___
> > yocto mailing list
> > yocto@yoctoproject.org
> > https://lists.yoctoproject.org/listinfo/yocto
> >
>
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] How can i invoke a "particular recipe(.bb)" while building "image recipe(.bb)" without modifying the "image recipe(.bb)" . i only wanted to change "particular recipe(.bb)"

2015-09-30 Thread YUKATHARSANI JEYACHANDRA
Hi,

1) Create packagegroup-debug-extra"x recipe name".bb file inside the 
meta-x/recipes-core/packagegroups layer.
Inside the recipe, add the x recipe name like below:-

inherit packagegroup

PACKAGES = "\
packagegroup-debug-extra"x recipename" \
"

RDEPENDS_packagegroup-extra"x recipename = "x recipe name"

2) Add IMAGE_INSTALL_append = "x recipe name" in build/conf/local.conf file.

Please try this and let me know if it works.

Thanks and Regards,
Yukatharsani J.


From: yocto-boun...@yoctoproject.org  on behalf 
of Khem Raj 
Sent: Wednesday, September 30, 2015 3:43 PM
To: Vivek Per
Cc: yocto@yoctoproject.org
Subject: Re: [yocto] How can i invoke a "particular recipe(.bb)" while building 
"image recipe(.bb)" without modifying the "image recipe(.bb)" . i only wanted 
to change "particular recipe(.bb)"

On Wed, Sep 30, 2015 at 2:05 AM, Vivek Per  wrote:
> hi,
>i want to create a "x" recipe that should automatically get invoke when
> "image" recipe( that produces image) is built. How can i modify the "x"
> recipe that should be invoked while building image recipe.
>
> I don't want to do any modifications to the image recipe, i only wanted to
> do changes in "x" recipe.
> Can any one help on this . thanks in advance

add one of output package its producing ( ipk)  to IMAGE_INSTALL
inside the image recipe.

>
> Thanks and regards
> vivek
>
> --
> ___
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
--
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] How to create and install a library in yocto -- Hello Library

2015-09-30 Thread Jussi Kukkonen
On 30 September 2015 at 04:28, Simon Castillo  wrote:

> Hello to all,
>
> I have searching for a way to include a library-only in yocto.  I found
> couple links with suggestions but I was unsuccessful in the to package it
> in the final image.  Reading the yocto documentation, I see a paragraph
> mentioning about static libraries but there is no examples.
>
>  I will try to be precise with the hopes to find help to tackle this issue.
>
> NOTE:   Couple steps like creating a LICENSE file, crate the layer and
> update the local.conf file are omitted
>
> ===
> The problem:
> - Creating a library that it is desired to be part of the final image (for
> example core-image-base, core-image-sato). No application, only a library
> ==
> Test scenario:
>
> Let's say that we desire to create a simple library called simple lib.
>
> The source code is as follows (taken from this link [
> http://www.adp-gmbh.ch/cpp/gcc/create_lib.html], copied here just for
> convenience)
>
> calc_mean.c
> //#include 
>
> double mean(double a, double b) {
>   return (a+b) / 2;
> }
>
> calc_mean.h
> double mean(double, double);
>
> Now we want to create a recipe that can compile, create a library and can
> be included in the final image (let's assume core-image-base)
>
> 
> RECIPE
> Recipe name => simplelib_0.1.0.bb
> ===
>
> DESCRIPTION = "Simple Library on yocto"
> LICENSE = "GPLv2"
> LIC_FILES_CHKSUM = "file://LICENSE;md5=c0b0999e102092552f1dfe93fb9b0068"
>
> PR = "r0"
> SRC_URI = "file://simplelib.zip"
>
> S = "${WORKDIR}/simplelib/"
>
> do_compile(){
> ${CC} -c calc_mean.c -o calc_mean.o
> ${AR} rcs libmean.a calc_mean.o
> }
>
> do_install{
> install -d ${D}${libdir}
> install -m 0644 libmean.a ${D}${libdir}
> }
> =
> Test results for RECIPE:
>
> $ bitbake simplelib
>
> RUNS without any problem.  The files generated are shown below
>
> ├── configure.sstate
> ├── deploy-ipks
> │   └── cortexa8hf-vfp-neon
> │   ├── simplelib-dbg_0.1.0-r0_cortexa8hf-vfp-neon.ipk
> │   ├── simplelib-dev_0.1.0-r0_cortexa8hf-vfp-neon.ipk
> │   └── simplelib-staticdev_0.1.0-r0_cortexa8hf-vfp-neon.ipk
> ├── image
> │   └── usr
> │   └── lib
> │   └── libmean.a
> ├── license-destdir
> │   └── simplelib
> │   ├── generic_GPLv2
> │   └── LICENSE
> ├── package
> │   └── usr
> │   └── lib
> │   └── libmean.a
> ├── packages-split
> │   ├── simplelib
> │   ├── simplelib-dbg
> │   ├── simplelib-dev
> │   ├── simplelib-doc
> │   ├── simplelib-locale
> │   └── simplelib-staticdev
> │   └── usr
> │   └── lib
> │   └── libmean.a
>
├── pkgdata
> │   ├── runtime
> │   │   ├── simplelib
> │   │   ├── simplelib-dbg
> │   │   ├── simplelib-dbg.packaged
> │   │   ├── simplelib-dev
> │   │   ├── simplelib-dev.packaged
> │   │   ├── simplelib-doc
> │   │   ├── simplelib-locale
> │   │   ├── simplelib-staticdev
> │   │   └── simplelib-staticdev.packaged
> │   ├── runtime-reverse
> │   │   ├── simplelib-dbg -> ../runtime/simplelib-dbg
> │   │   ├── simplelib-dev -> ../runtime/simplelib-dev
> │   │   └── simplelib-staticdev -> ../runtime/simplelib-staticdev
> │   ├── runtime-rprovides
> │   ├── shlibs2
> │   └── simplelib
> ├── pseudo
> │   ├── files.db
> │   ├── logs.db
> │   ├── pseudo.lock
> │   ├── pseudo.log
> │   ├── pseudo.pid
> │   └── pseudo.socket
> ├── simplelib
> │   ├── calc_mean.c
> │   ├── calc_mean.h
> │   ├── calc_mean.o
> │   ├── libmean.a
> │   └── LICENSE
> ├── sysroot-destdir
> │   ├── sysroot-providers
> │   │   └── simplelib
> │   └── usr
> │   └── lib
> │   └── libmean.a
>
> ===
> Test result to include library in the image
>
> $ bitbake core-image-base
>
> FAILS,
>
>  * opkg_install_cmd: Cannot install package simplelib.
>
> ERROR: Function failed: do_rootfs
>
> ==
> TRY ONE,
>
> Change the recipe and add RDEPENDS_${PN}-dev = ""  as suggested by
> https://lists.yoctoproject.org/pipermail/yocto/2014-September/021676.html
>
> FAILS, same error
>  * opkg_install_cmd: Cannot install package simplelib.
>

This really should help: your problem is probably that the actual simplelib
package is not created (because there are no files to put into it), but the
-dev package still RDEPENDS on it by default. The log file might give you
more details though.  "grep RDEPENDS pkgdata/runtime/*" in work directory
should show what the RDEPENDS are.

How are you adding the library to your image? You should be adding the
package "simplelib-staticdev" to it (assuming you really only want a static
.a).



> =
> TRY TWO
>
> Modify recipe adding below lines (based on
> http://stackoverflow.com/questions/28792597/how-to-add-a-new-library-using-yocto
> )
>
> PACKAGES = "${PN} ${PN}-dev ${PN}-dbg ${PN}-staticdev"
>
> FILES_${PN} = " \
> ${libdir}/simplelib/ \
> "

FAILS, same error
>  * opkg_install_cmd: 

[yocto] Safely cleaning 'downloads'

2015-09-30 Thread Gary Thomas

Over time, I tend to build in the same build tree many, many
times.  This leads to some really big trees as many things are
duplicated, especially in the 'downloads' directory.

I use local mirrors and hence my 'downloads' directory is
_mostly_ populated with symbolic links.  However, there are
also expanded SCM packages, e.g. git2/xxx

How can I safely clean up the 'downloads' directory?  I already
copy any created tarballs (I use BB_GENERATE_MIRROR_TARBALLS="1"
to preclude unneeded downloads) to my mirror, but I'd like to
periodically clean out the whole directory (without disturbing
my builds of course).  I've found out the hard way that just
emptying seems to be unsafe, at least for some recipes like
the [RaspberryPi] Linux kernel recipe which once built seems
to expect the expanded git2/xxx tree to remain.

Just trying to find ways to recover my lost GB...

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] How can i invoke a "particular recipe(.bb)" while building "image recipe(.bb)" without modifying the "image recipe(.bb)" . i only wanted to change "particular recipe(.bb)"

2015-09-30 Thread Gary Thomas

On 2015-09-30 05:08, Vivek Per wrote:

Hi , thanks you for replying,
but i don't want to make changes to "image" recipe. i only wanted to make changes to 
"x" recipe that should be invoked when i do bitbake .
what variable i can put in "x" recipe so that it invokes when is do 


You can't - what you are asking for is "image" to depend on "x" (i.e. include 
it) and the
only way to do that is relative to "image", not "x".

You can do this non-invasively, e.g. in local.conf:
  IMAGE_INSTALL_append_pn-image = " x"


On Wed, Sep 30, 2015 at 3:43 PM, Khem Raj mailto:raj.k...@gmail.com>> wrote:

On Wed, Sep 30, 2015 at 2:05 AM, Vivek Per mailto:pervi...@gmail.com>> wrote:
> hi,
>i want to create a "x" recipe that should automatically get invoke when
> "image" recipe( that produces image) is built. How can i modify the "x"
> recipe that should be invoked while building image recipe.
>
> I don't want to do any modifications to the image recipe, i only wanted to
> do changes in "x" recipe.
> Can any one help on this . thanks in advance

add one of output package its producing ( ipk)  to IMAGE_INSTALL
inside the image recipe.

>
> Thanks and regards
> vivek
>
> --
> ___
> yocto mailing list
>yocto@yoctoproject.org 
>https://lists.yoctoproject.org/listinfo/yocto
>






--

Gary Thomas |  Consulting for the
MLB Associates  |Embedded world

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


[yocto] [error-report-web][PATCH] parser: Add Unicode support to the error log

2015-09-30 Thread mariano . lopez
From: Mariano Lopez 

If the server receives a error log with Unicode
character in it, it will throw and internal server
error, this is caused because the server doesn't
try to convert everything to ASCII

This patch changes the log encoding to UTF-8 so
it will allow Unicode characters.

[YOCTO #8225]

Signed-off-by: Mariano Lopez 
---
 Post/parser.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Post/parser.py b/Post/parser.py
index d33a968..599afde 100644
--- a/Post/parser.py
+++ b/Post/parser.py
@@ -85,7 +85,7 @@ class Parser:
 recipe = package
 recipe_version = "unknown"
 
-f = BuildFailure(TASK = str(fail['task']), RECIPE = recipe, 
RECIPE_VERSION = recipe_version, ERROR_DETAILS = str(fail['log']), BUILD = b)
+f = BuildFailure(TASK = str(fail['task']), RECIPE = recipe, 
RECIPE_VERSION = recipe_version, ERROR_DETAILS = fail['log'].encode('utf-8'), 
BUILD = b)
 
 f.save()
 
-- 
1.9.1

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


Re: [yocto] [error-report-web][PATCH] parser: Add Unicode support to the error log

2015-09-30 Thread Michael Wood

On 30/09/15 14:54, mariano.lo...@linux.intel.com wrote:

From: Mariano Lopez 

If the server receives a error log with Unicode
character in it, it will throw and internal server
error, this is caused because the server doesn't
try to convert everything to ASCII

This patch changes the log encoding to UTF-8 so
it will allow Unicode characters.

[YOCTO #8225]

Signed-off-by: Mariano Lopez 
---
  Post/parser.py | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Post/parser.py b/Post/parser.py
index d33a968..599afde 100644
--- a/Post/parser.py
+++ b/Post/parser.py
@@ -85,7 +85,7 @@ class Parser:
  recipe = package
  recipe_version = "unknown"
  
-f = BuildFailure(TASK = str(fail['task']), RECIPE = recipe, RECIPE_VERSION = recipe_version, ERROR_DETAILS = str(fail['log']), BUILD = b)

+f = BuildFailure(TASK = str(fail['task']), RECIPE = recipe, 
RECIPE_VERSION = recipe_version, ERROR_DETAILS = fail['log'].encode('utf-8'), 
BUILD = b)
  
  f.save()
  


Thanks for the patch. Now committed.

Michael



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


Re: [yocto] How to create and install a library in yocto -- Hello Library

2015-09-30 Thread Simon Castillo
Hi Jussie,

Thanks for your help and hints.  I was able to find a solution.

For those interested, the recipe is shown below:

 
 
 RECIPE
 
 Recipe name => simplelib_0.1.1.bb
 
 ===
 DESCRIPTION = "Simple Library on yocto"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM =
 "file://LICENSE;md5=c0b0999e102092552f1dfe93fb9b0068"
 
PR = "r0"
 
 SRC_URI = "file://simplelib.zip"
 S = "${WORKDIR}/simplelib/"
 
 PACKAGES = "${PN} ${PN}-dev ${PN}-dbg ${PN}-staticdev"

RDEPENDS_${PN}-staticdev = ""
RDEPENDS_${PN}-dev = ""
RDEPENDS_${PN}-dbg = ""
 
 do_compile(){
 
 ${CC} -c calc_mean.c -o calc_mean.o
 
 ${AR} rcs libmean.a calc_mean.o
 
 }
 
 
 
 do_install{
 
 install -d ${D}${libdir}
 
 install -m 0644 libmean.a ${D}${libdir}
 
 }
 
 =

At local.conf add the library as

IMAGE_INSTALL_append = "simplelib-staticdev"

=

Again, thanks to Jussie for the help.

Regards!


On Wed, 9/30/15, Jussi Kukkonen  wrote:

 Subject: Re: [yocto] How to create and install a library in yocto -- Hello 
Library
 To: "Simon Castillo" 
 Cc: "Yocto Project" 
 Date: Wednesday, September 30, 2015, 5:08 AM
 
 
 
 On 30
 September 2015 at 04:28, Simon Castillo 
 wrote:
 Hello
 to all,
 
 
 
 I have searching for a way to include a library-only in
 yocto.  I found couple links with suggestions but I was
 unsuccessful in the to package it in the final image. 
 Reading the yocto documentation, I see a paragraph
 mentioning about static libraries but there is no
 examples.
 
 
 
  I will try to be precise with the hopes to find help to
 tackle this issue.
 
 
 
 NOTE:   Couple steps like creating a LICENSE file, crate
 the layer and update the local.conf file are omitted
 
 
 
 ===
 
 The problem:
 
 - Creating a library that it is desired to be part of the
 final image (for example core-image-base, core-image-sato).
 No application, only a library
 
 ==
 
 Test scenario:
 
 
 
 Let's say that we desire to create a simple library
 called simple lib.
 
 
 
 The source code is as follows (taken from this link 
[http://www.adp-gmbh.ch/cpp/gcc/create_lib.html],
 copied here just for convenience)
 
 
 
 calc_mean.c
 
 //#include 
 
 
 
 double mean(double a, double b) {
 
   return (a+b) / 2;
 
 }
 
 
 
 calc_mean.h
 
 double mean(double, double);
 
 
 
 Now we want to create a recipe that can compile, create a
 library and can be included in the final image (let's
 assume core-image-base)
 
 
 
 
 
 RECIPE
 
 Recipe name => simplelib_0.1.0.bb
 
 ===
 
 
 
 DESCRIPTION = "Simple Library on yocto"
 
 LICENSE = "GPLv2"
 
 LIC_FILES_CHKSUM =
 "file://LICENSE;md5=c0b0999e102092552f1dfe93fb9b0068"
 
 
 
 PR = "r0"
 
 SRC_URI = "file://simplelib.zip"
 
 
 
 S = "${WORKDIR}/simplelib/"
 
 
 
 do_compile(){
 
         ${CC} -c calc_mean.c -o calc_mean.o
 
         ${AR} rcs libmean.a calc_mean.o
 
 }
 
 
 
 do_install{
 
         install -d ${D}${libdir}
 
         install -m 0644 libmean.a ${D}${libdir}
 
 }
 
 =
 
 Test results for RECIPE:
 
 
 
 $ bitbake simplelib
 
 
 
 RUNS without any problem.  The files generated are shown
 below
 
 
 
 ├── configure.sstate
 
 ├── deploy-ipks
 
 │   └── cortexa8hf-vfp-neon
 
 │       ├──
 simplelib-dbg_0.1.0-r0_cortexa8hf-vfp-neon.ipk
 
 │       ├──
 simplelib-dev_0.1.0-r0_cortexa8hf-vfp-neon.ipk
 
 │       └──
 simplelib-staticdev_0.1.0-r0_cortexa8hf-vfp-neon.ipk
 
 ├── image
 
 │   └── usr
 
 │       └── lib
 
 │           └── libmean.a
 
 ├── license-destdir
 
 │   └── simplelib
 
 │       ├── generic_GPLv2
 
 │       └── LICENSE
 
 ├── package
 
 │   └── usr
 
 │       └── lib
 
 │           └── libmean.a
 
 ├── packages-split
 
 │   ├── simplelib
 
 │   ├── simplelib-dbg
 
 │   ├── simplelib-dev
 
 │   ├── simplelib-doc
 
 │   ├── simplelib-locale
 
 │   └── simplelib-staticdev
 
 │       └── usr
 
 │           └── lib
 
 │               └── libmean.a
 
 ├──
 pkgdata
 
 │   ├── runtime
 
 │   │   ├── simplelib
 
 │   │   ├── simplelib-dbg
 
 │   │   ├── simplelib-dbg.packaged
 
 │   │   ├── simplelib-dev
 
 │   │   ├── simplelib-dev.packaged
 
 │   │   ├── simplelib-doc
 
 │   │   ├── simplelib-locale
 
 │   │   ├── simplelib-staticdev
 
 │   │   └── simplelib-staticdev.packaged
 
 │   ├── runtime-reverse
 
 │   │   ├── simplelib-dbg ->
 ../runtime/simplelib-dbg
 
 │   │   ├── simplelib-dev ->
 ../runtime/simplelib-dev
 
 │   │   └── simplelib-staticdev ->
 ../runtime/simplelib-staticdev
 
 │   ├── runtime-rprovides
 
 │   ├── shlibs2
 
 │   └── simplelib
 
 ├── pseudo
 
 │   ├── files.db
 
 │   ├── logs.db
 
 │   ├── pseudo.lock
 
 │   ├── pseudo.log
 
 │   ├── pseudo.pid
 
 │   └── pseudo.socket
 
 ├── simplelib
 
 │   ├── calc_mean.c
 
 │   ├── calc_mean.h
 
 │   ├── calc_mean.o
 
 │   ├── libmean.a
 
 │   └── LICENSE
 
 ├── sys

[yocto] Run-time discovery of machine for image compatibility check

2015-09-30 Thread Eystein Måløy Stenberg
Hi,

Before starting a bitbake build, we input the MACHINE variable in
local.conf (e.g. MACHINE ?= beaglebone).

Is there a way to detect this variable at run-time? I.e. if I have built
the image, written it to a device, and I'm now logged in to it.

The reason I want this is that I'm working on a project to deploy image
updates (remotely), and I only want to write the image if the device is
compatible with the image file. So I need to know both the
hardware/board type and what the image target is (assuming this is the
MACHINE variable alone). Then I will only write the image if they are
the same.

Also, do you think using the MACHINE variable is the right approach for
this problem? Maybe someone has had a similar problem?

I'm new to Yocto, sorry if I'm asking something obvious (but I could not
find an answer in the docs).

Thanks!

--

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


Re: [yocto] Run-time discovery of machine for image compatibility check

2015-09-30 Thread Daniel.
Hi in my case I have a machine for each board and I choose the right
device-tree at "machine".conf. So MACHINE can be determined by the device
tree Im running.

Other option would be echoing the machine to /etc/issue of the image. I do
this with DISTRO_VERSION. You can use  ROOTFS_POSTPROCESS_COMMAND to
achieve this.

Regards
Em 30/09/2015 18:32, "Eystein Måløy Stenberg"  escreveu:

> Hi,
>
> Before starting a bitbake build, we input the MACHINE variable in
> local.conf (e.g. MACHINE ?= beaglebone).
>
> Is there a way to detect this variable at run-time? I.e. if I have built
> the image, written it to a device, and I'm now logged in to it.
>
> The reason I want this is that I'm working on a project to deploy image
> updates (remotely), and I only want to write the image if the device is
> compatible with the image file. So I need to know both the
> hardware/board type and what the image target is (assuming this is the
> MACHINE variable alone). Then I will only write the image if they are
> the same.
>
> Also, do you think using the MACHINE variable is the right approach for
> this problem? Maybe someone has had a similar problem?
>
> I'm new to Yocto, sorry if I'm asking something obvious (but I could not
> find an answer in the docs).
>
> Thanks!
>
> --
>
> Eystein
> --
> ___
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Run-time discovery of machine for image compatibility check

2015-09-30 Thread Khem Raj

> On Sep 30, 2015, at 2:31 PM, Eystein Måløy Stenberg  wrote:
> 
> Hi,
> 
> Before starting a bitbake build, we input the MACHINE variable in
> local.conf (e.g. MACHINE ?= beaglebone).
> 
> Is there a way to detect this variable at run-time? I.e. if I have built
> the image, written it to a device, and I'm now logged in to it.

There is no standard bill of materials that you will find on images. Everyone 
produces it
per own needs. The reason is that we do not have a one OTA mechanism 
recommended or preferred
in OpenEmbedded or maintained by yocto project. May be this could be a thing to 
consider come future
right now, there were other big fish to fry around workflow. OTA firmware 
upgrade, could be big thing for next release
or there after.

I don’t have a better answer for you at the moment. You have to work with 
device firmware manufacturer
and see if they have put some image info into the image in some form.

> 
> The reason I want this is that I'm working on a project to deploy image
> updates (remotely), and I only want to write the image if the device is
> compatible with the image file. So I need to know both the
> hardware/board type and what the image target is (assuming this is the
> MACHINE variable alone). Then I will only write the image if they are
> the same.
> 
> Also, do you think using the MACHINE variable is the right approach for
> this problem? Maybe someone has had a similar problem?
> 
> I'm new to Yocto, sorry if I'm asking something obvious (but I could not
> find an answer in the docs).
> 
> Thanks!
> 
> --
> 
> Eystein
> --
> ___
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto



signature.asc
Description: Message signed with OpenPGP using GPGMail
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto