Date   

Re: clarify instructions for package feed installation

Alexander Kanavin <alexander.kanavin@...>
 

On 03/15/2018 10:10 PM, Peter A. Bigot wrote:
Following the instructions in the 2.4.2 mega-manual section 4.21.4 I set
in local.conf:
    PACKAGE_FEED_URIS = "http://192.168.65.22/oe/rpi3-sumo"
    PACKAGE_FEED_BASE_PATHS = "rpm"
    PACKAGE_FEED_ARCHS = "noarch cortexa7hf_neon_vfpv4 raspberrypi3"
and run this command:
    bitbake package-index
This produces a repodata directory in the deploy/rpm directory, sibling
to the arch directories.
drwxr-xr-x 2 pab pab 516096 Mar 15 12:26 cortexa7hf_neon_vfpv4
drwxr-xr-x 2 pab pab  24576 Mar 15 12:55 noarch
drwxr-xr-x 2 pab pab 262144 Mar 15 12:26 raspberrypi3
drwxr-xr-x 2 pab pab   4096 Mar 15 15:02 repodata
However, the repo file generated by the PACKAGE_FEED variables causes
dnf on the target to fetch repodata from inside each arch directory:
192.168.65.117 - - [15/Mar/2018:14:03:18 -0500] "GET /oe/rpi3-sumo/rpm/noarch/repodata/repomd.xml HTTP/1.1" 404 481 "-" "dnf/2.7.5"
192.168.65.117 - - [15/Mar/2018:14:05:51 -0500] "GET /oe/rpi3-sumo/rpm/raspberrypi3/repodata/repomd.xml HTTP/1.1" 404 487 "-" "dnf/2.7.5"
192.168.65.117 - - [15/Mar/2018:14:05:51 -0500] "GET /oe/rpi3-sumo/rpm/cortexa7hf_neon_vfpv4/repodata/repomd.xml HTTP/1.1" 404 496 "-" "dnf/2.7.5"
This doesn't work.  I end up having to change the repo file to eliminate
the architectures.
Is this a problem specific to RPM, or am I doing something wrong?
I think the documentation is misleading here. 'bitbake package-index' generates a single index for all of the architectures in the deploy/rpm directory, so if you need individual feeds for specific architectures, you need to generate them yourself with a custom recipe. Or if you're okay with having a single index, just drop the PACKAGE_FEED_ARCHS setting.

CC Scott, so we can add a note for RPM feeds in the docs here.


Alex


Re: OpenCV with python3

Peter Balazovic <balazovic.peter@...>
 

That I was thinking to have “python3-opencv” but it's failing to build

I found opencv_3.1.bbappend with my sources where I see

PACKAGECONFIG_remove_imx = "eigen python3"

I guess that might causing a problem to build opencv for python3... I'll remove and check again to build.
 
BTW what's the benefit of using CORE_IMAGE_EXTRA_INSTALL over IMAGE_INSTALL_append ?


On Fri, Mar 16, 2018 at 6:29 AM, Tim Orling <ticotimo@...> wrote:
Ditto for Robert’s comment. Please look at the bitbake manual and understand what the syntax means [1].

Also,  “python-foo” means the python2 version. The default PACKAGECONFIG [2] for opencv builds for python3. You need “python3-opencv”.

Finally, I would encourage you to use CORE_IMAGE_EXTRA_INSTALL [3] rather than IMAGE_INSTALL in the local.conf context.


On Thu, Mar 15, 2018 at 5:57 AM Robert P. J. Day <rpjday@...> wrote:
On Thu, 15 Mar 2018, Peter Balazovic wrote:

> Hello all,
> I have python module of OpenCV for python 2.7 on my Yocto image adding via local.conf
>
> IMAGE_INSTALL_append += “ python-opencv”

  i know i've harped on this before, but can people please stop
combining the constructs "_append" and "+=" in the same expression?

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


Re: OpenCV with python3

Tim Orling
 

Ditto for Robert’s comment. Please look at the bitbake manual and understand what the syntax means [1].

Also,  “python-foo” means the python2 version. The default PACKAGECONFIG [2] for opencv builds for python3. You need “python3-opencv”.

Finally, I would encourage you to use CORE_IMAGE_EXTRA_INSTALL [3] rather than IMAGE_INSTALL in the local.conf context.


On Thu, Mar 15, 2018 at 5:57 AM Robert P. J. Day <rpjday@...> wrote:
On Thu, 15 Mar 2018, Peter Balazovic wrote:

> Hello all,
> I have python module of OpenCV for python 2.7 on my Yocto image adding via local.conf
>
> IMAGE_INSTALL_append += “ python-opencv”

  i know i've harped on this before, but can people please stop
combining the constructs "_append" and "+=" in the same expression?

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


Issue with gcc6

sarayu@...
 

Hi ,

 

I was trying to setup yocto on my debian VM and pulled the latest yocto fido and tried to compile the core_image_sato.

I am getting the below error in the base build.

 

/home/sarayu/code/yocto-sample/poky/build/tmp/work/x86_64-linux/elfutils-native/0.161-r0/elfutils-0.161/libebl/eblinitreg.c:50:26: error: nonnull argument 'ebl' compared to NULL [-Werror=nonnull-compare]

|    return ebl == NULL ? 0 : ebl->frame_nregs;

|           ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~

| cc1: all warnings being treated as errors

| Makefile:529: recipe for target 'eblinitreg.o' failed

| make[2]: *** [eblinitreg.o] Error 1

 

 

Can you please let me know if a patch or fix is already available for the same.

Thanks in advance for your help.

 

Thanks and Regards

Sarayu


Re: How to get mysqy/mariadb to start on powerup.

Greg Wilson-Lindberg
 

> From: Khem Raj <raj.khem@...>

> Sent: Thursday, March 15, 2018 1:54 PM
> To: Greg Wilson-Lindberg
> Cc: yocto@...
> Subject: Re: [yocto] How to get mysqy/mariadb to start on powerup.
>  
> > On Thu, Mar 15, 2018 at 1:38 PM, Greg Wilson-Lindberg
> <GWilson@...> wrote:
> > I'm building an RPi3 system that is going to use mysql/mariadb. I've got
> > everything installed, but mysqld is not starting. install_db.service does
> > run on startup, but the mysqld.service file never gets triggered.
> >
> >
> > Is there something that I'm missing to get it to run? I've search online,
> > but can't find anything that pertains to yocto.
> >
>
> poke on the system with systemctl/journalctl to see whats going on

journalctl -u mysqld.service says no entries
systemctl status mysqld.service shows:
   Loaded: loaded (/lib/systemd/system/mysqld.service; disabled; vendor preset: enabled)
   Active: inactive (dead)

I've rebooted the system a couple of times to see if install_db needed to be run before mysql would run, no luck.


Re: How to get mysqy/mariadb to start on powerup.

Khem Raj
 

On Thu, Mar 15, 2018 at 1:38 PM, Greg Wilson-Lindberg
<GWilson@sakuraus.com> wrote:
I'm building an RPi3 system that is going to use mysql/mariadb. I've got
everything installed, but mysqld is not starting. install_db.service does
run on startup, but the mysqld.service file never gets triggered.


Is there something that I'm missing to get it to run? I've search online,
but can't find anything that pertains to yocto.
poke on the system with systemctl/journalctl to see whats going on


Re: scipy recipe

Peter Balazovic <balazovic.peter@...>
 

is somehow to be fixed and available (recipe)?


Sent from Mailspring, the best free email app for work

On Mar 15 2018, at 9:35 pm, Randy MacLeod <randy.macleod@...> wrote:

On 2018-03-15 01:56 PM, Peter Balazovic wrote:
Hello all,

I wonder if there is scipy recipe available?

Not yet:

https://layers.openembedded.org/layerindex/branch/master/recipes/?q=scipy

It appears to be blocked by:
https://github.com/scipy/scipy/issues/8226
but apparently that's a bitbake issue, not a spip one.
Care to take a look?


Thanks.




--
# Randy MacLeod. WR Linux
# Wind River an Intel Company
Open Tracking


How to get mysqy/mariadb to start on powerup.

Greg Wilson-Lindberg
 

I'm building an RPi3 system that is going to use mysql/mariadb. I've got everything installed, but mysqld is not starting. install_db.service does run on startup, but the mysqld.service file never gets triggered.


Is there something that I'm missing to get it to run? I've search online, but can't find anything that pertains to yocto.


Regards,

Greg Wilson-Lindberg


Re: scipy recipe

Randy MacLeod
 

On 2018-03-15 01:56 PM, Peter Balazovic wrote:
Hello all,
I wonder if there is scipy recipe available?
Not yet:

https://layers.openembedded.org/layerindex/branch/master/recipes/?q=scipy

It appears to be blocked by:
https://github.com/scipy/scipy/issues/8226
but apparently that's a bitbake issue, not a spip one.
Care to take a look?

Thanks.

--
# Randy MacLeod. WR Linux
# Wind River an Intel Company


package manager contamination in state?

Peter A. Bigot
 

While attempting to diagnose a package index problem visible on current
poky head I changed local.conf from:

PACKAGE_CLASSES ?= "package_rpm"

to

PACKAGE_CLASSES ?= "package_deb"

then removed tmp and buildhistory.  Rebuilding the image produced:

ERROR: pabigot-image-cmdline-sdk-1.0-r0 do_rootfs: Unable to install packages. Command '/mnt/devel/yocto/build-rpi3-sumo/tmp/work/raspberrypi3-poky-linux-gnueabi/pabigot-image-cmdline-sdk/1.0-r0/recipe-sysroot-native/usr/bin/apt-get install --force-yes --allow-unauthenticated git packagegroup-core-full-cmdline packagegroup-core-standalone-sdk-target kernel-modules apt dpkg packagegroup-core-boot oe-build-info psplash-raspberrypi bluez5 bluez5-dev run-postinsts nodejs bluez5-noinst-tools connman vim packagegroup-core-sdk bluez5-testtools packagegroup-core-ssh-openssh packagegroup-base connman-client minicom linux-firmware' returned 100:
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 packagegroup-core-full-cmdline : Depends: packagegroup-core-full-cmdline-initscripts but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Reverting to package_rpm and doing a clean build worked fine, so it
appears something in the state that's dependent on the package manager
is not getting rebuilt.  Based on the complaint the following additional
configuration settings in local.conf might be relevant:

# Section 4.24 Selecting an Initialization Manager
DISTRO_FEATURES_append = " systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
VIRTUAL-RUNTIME_initscripts = ""

FYI only, I have no reason to switch between packaging systems like this
normally.

Peter


clarify instructions for package feed installation

Peter A. Bigot
 

Following the instructions in the 2.4.2 mega-manual section 4.21.4 I set
in local.conf:

    PACKAGE_FEED_URIS = "http://192.168.65.22/oe/rpi3-sumo"
    PACKAGE_FEED_BASE_PATHS = "rpm"
    PACKAGE_FEED_ARCHS = "noarch cortexa7hf_neon_vfpv4 raspberrypi3"

and run this command:

    bitbake package-index

This produces a repodata directory in the deploy/rpm directory, sibling
to the arch directories.

drwxr-xr-x 2 pab pab 516096 Mar 15 12:26 cortexa7hf_neon_vfpv4
drwxr-xr-x 2 pab pab  24576 Mar 15 12:55 noarch
drwxr-xr-x 2 pab pab 262144 Mar 15 12:26 raspberrypi3
drwxr-xr-x 2 pab pab   4096 Mar 15 15:02 repodata

However, the repo file generated by the PACKAGE_FEED variables causes
dnf on the target to fetch repodata from inside each arch directory:

192.168.65.117 - - [15/Mar/2018:14:03:18 -0500] "GET /oe/rpi3-sumo/rpm/noarch/repodata/repomd.xml HTTP/1.1" 404 481 "-" "dnf/2.7.5"
192.168.65.117 - - [15/Mar/2018:14:05:51 -0500] "GET /oe/rpi3-sumo/rpm/raspberrypi3/repodata/repomd.xml HTTP/1.1" 404 487 "-" "dnf/2.7.5"
192.168.65.117 - - [15/Mar/2018:14:05:51 -0500] "GET /oe/rpi3-sumo/rpm/cortexa7hf_neon_vfpv4/repodata/repomd.xml HTTP/1.1" 404 496 "-" "dnf/2.7.5"

This doesn't work.  I end up having to change the repo file to eliminate
the architectures.

Is this a problem specific to RPM, or am I doing something wrong?

Thanks.

Peter


scipy recipe

Peter Balazovic <balazovic.peter@...>
 

Hello all,

I wonder if there is scipy recipe available?

Thanks.


Re: Does PACKAGECONFIG only apply to autotools recipes

Martin Jansa
 

It's applied in PACKAGECONFIG_CONFARGS variable and various bbclasses (and also various recipes) use this variable where needed, see git grep:

meta/classes/base.bbclass:        appendVar('PACKAGECONFIG_CONFARGS', extraconf)

meta/classes/autotools.bbclass:EXTRA_OECONF_append = " ${PACKAGECONFIG_CONFARGS}"
meta/classes/cmake.bbclass:EXTRA_OECMAKE_append = " ${PACKAGECONFIG_CONFARGS}"
meta/classes/meson.bbclass:EXTRA_OEMESON += "${PACKAGECONFIG_CONFARGS}"
meta/classes/waf.bbclass:EXTRA_OECONF_append = " ${PACKAGECONFIG_CONFARGS}"

meta/recipes-graphics/glew/glew_2.1.0.bb:EXTRA_OEMAKE = "${PACKAGECONFIG_CONFARGS} \

It used to be included in EXTRA_OECONF by default, before:

On Thu, Mar 15, 2018 at 6:22 PM, Alan Martinovic <alan.martinovic@...> wrote:
Hi,
is it true that that PACKAGECONFIG is only used
 for recipes that inherit autoconf?

Was trying to understand what they do in a recipe:
    https://git.yoctoproject.org/cgit.cgi/poky/plain/meta/recipes-connectivity/bluez5/bluez5.inc
and didn't really get what this was about until found
the autoconf reference mentioned in a book.

So "features" as referenced in the mega manual:
    https://www.yoctoproject.org/docs/2.4/mega-manual/mega-manual.html#var-PACKAGECONFIG
are the flags that will end up being passed to ./configure?

However later in the recipe it's used to populate other variables

    NOINST_TOOLS = " \
        ${@bb.utils.contains('PACKAGECONFIG', 'readline',
'${NOINST_TOOLS_READLINE}', '', d)} \
        ${@bb.utils.contains('PACKAGECONFIG', 'testing',
'${NOINST_TOOLS_TESTING}', '', d)} \
        ${@bb.utils.contains('PACKAGECONFIG', 'tools',
'${NOINST_TOOLS_BT}', '', d)} \
    "

Is the original assumption true (that it's an autoconf only thing)?
Is there a way to test that by grepping the code (didn't found
autoconf references when greping for PACKAGECONFIG in
bitbake -e bluez5)?

Be Well :)
--
_______________________________________________
yocto mailing list
yocto@...
https://lists.yoctoproject.org/listinfo/yocto


Does PACKAGECONFIG only apply to autotools recipes

Alan
 

Hi,
is it true that that PACKAGECONFIG is only used
for recipes that inherit autoconf?

Was trying to understand what they do in a recipe:
https://git.yoctoproject.org/cgit.cgi/poky/plain/meta/recipes-connectivity/bluez5/bluez5.inc
and didn't really get what this was about until found
the autoconf reference mentioned in a book.

So "features" as referenced in the mega manual:
https://www.yoctoproject.org/docs/2.4/mega-manual/mega-manual.html#var-PACKAGECONFIG
are the flags that will end up being passed to ./configure?

However later in the recipe it's used to populate other variables

NOINST_TOOLS = " \
${@bb.utils.contains('PACKAGECONFIG', 'readline',
'${NOINST_TOOLS_READLINE}', '', d)} \
${@bb.utils.contains('PACKAGECONFIG', 'testing',
'${NOINST_TOOLS_TESTING}', '', d)} \
${@bb.utils.contains('PACKAGECONFIG', 'tools',
'${NOINST_TOOLS_BT}', '', d)} \
"

Is the original assumption true (that it's an autoconf only thing)?
Is there a way to test that by grepping the code (didn't found
autoconf references when greping for PACKAGECONFIG in
bitbake -e bluez5)?

Be Well :)


Re: trouble getting systemd oneshot to run

Greg Wilson-Lindberg
 

Well, first, thanks to all for the help.


The recommendation for systemctl is what finally led me to my mistake. I was blindly figuring that  systemd would figure out that my file named can_start.sh was a shell script, without putting #!/bin/sh at the beginning of it. dumb.


At any rate, I've got it running now, on to the next problem.


Thanks again for the community and all of your help,

Greg


From: Jeremy Thien <jeremyt@...>
Sent: Thursday, March 15, 2018 6:44:17 AM
To: Khem Raj
Cc: Greg Wilson-Lindberg; yocto@...
Subject: Re: [yocto] trouble getting systemd oneshot to run
 
Agreed. I would expect the service file to be in /lib/systemd/system/canstart.service and a symbolic link in /etc/systemd/system/network.target.wants/canstart.service.

If those are both present, then the problem is in the service file. If the symbolic link is missing, try "systemctl enable canstart.service" to see if there is any useful information. "systemctl start canstart.service" and "systemctl status canstart.service" may also help.

In my particular service file, I wanted to start after networking is up so I followed this post. In the Install section, I have "WantedBy=multi-user.target". In the Unit section, I have "After=network-online.target" and "Wants=network-online.target". 

On Wed, Mar 14, 2018 at 10:28 PM Khem Raj <raj.khem@...> wrote:
On Wed, Mar 14, 2018 at 3:20 PM Greg Wilson-Lindberg <GWilson@...> wrote:

I changed it to look like:


PACKAGES += "${PN}-service"
FILES_${PN} = "${datadir}/*"
FILES_${PN}-service = "${systemd_system_unitdir}/canstart.service"
do_install () {
    if test -e ${WORKDIR}/can_start.sh &&
       test -e ${WORKDIR}/canstart.service; then
        install -d ${D}${datadir}/canstart
        install -m 0755 ${WORKDIR}/can_start.sh ${D}${datadir}/canstart
        install -d ${D}${systemd_system_unitdir}
        install -m 0644 ${WORKDIR}/canstart.service ${D}${systemd_system_unitdir}
        sed -i -e 's|@SCRIPTDIR@|${datadir}/canstart|g' ${D}${systemd_system_unitdir}/canstart.service
    fi
}

SYSTEMD_PACKAGES = "${PN}-service"
SYSTEMD_SERVICE_${PN}-service = "canstart.service"
SYSTEMD_AUTO_ENABLE_${PN}-service = "enable"

Still got the same results, my task is not running at startup.
To make sure that there wasn't some problem in running the script, I changed the ExecStart to echo to a file in /tmp. Nothing there. The .service file is not being executed.
I've obviously got something totally messed up, but I'm darned if I understand what it is.


You can check with systemctl status and other commands on the service on running system and might find more details 


From: Jeremy Thien <jeremyt@...>
Sent: Wednesday, March 14, 2018 1:08 PM
To: Greg Wilson-Lindberg
Cc: yocto@...
Subject: Re: [yocto] trouble getting systemd oneshot to run
 
I am no expert, but I have a similar recipe. It might be over complicated, but I put the script in one package and the service in another something like:

PACKAGES += "${PN}-service"
FILES_${PN} = "${datadir}/canstart/canstart.sh "
FILES_${PN}-service = "${systemd_unitdir}/system/canstart.service "
SYSTEMD_PACKAGES = ${PN}-service"
SYSTEMD_SERVICE_${PN}-service = canstart.service"
SYSTEMD_AUTO_ENABLE_${PN}-service = "enable"

Of course, this requires image to install both canstart and canstart-service.

Hope this helps,
Jeremy Thien

On Wed, Mar 14, 2018 at 3:21 PM Greg Wilson-Lindberg <GWilson@...> wrote:

I'm building yocto for a raspberry pi3 from Qt's b2qt version.


I'm running into two problems, I've got all of the files copying to the correct locations but the .service is not running at startup. I used connman-conf.bb as the template for my .bb file:


SUMMARY="recipe to create CAN bus startup service"

LICENSE = "CLOSED"
LIC_FILES_CHKSUM = ""

inherit systemd

SRC_URI = "file://can_start.sh \
           file://canstart.service \
"

S = "${WORKDIR}"

PACKAGE_ARCH = "${MACHINE_ARCH}"

FILES_${PN} = "${datadir}/*"

do_install () {
    if test -e ${WORKDIR}/can_start.sh &&
       test -e ${WORKDIR}/canstart.service; then
        install -d ${D}${datadir}/canstart
        install -m 0755 ${WORKDIR}/can_start.sh ${D}${datadir}/canstart
        install -d ${D}${systemd_system_unitdir}
        install -m 0644 ${WORKDIR}/canstart.service ${D}${systemd_system_unitdir}
        sed -i -e 's|@SCRIPTDIR@|${datadir}/canstart|g' ${D}${systemd_system_unitdir}/canstart.service
    fi
}

SYSTEMD_SERVICE_${PN} = "canstart.service"

Service file:
[Unit]
Description=Startup CAN bus interface

[Service]
Type=oneshot
ExecStart=@SCRIPTDIR@/can_start.sh

[Install]
WantedBy=network.target

From looking at the connman-conf sample I'm setting everything up correctly and the service should default to running on startup but it is not.

The second 'problem' is really just perplexing, if I dump the variables S contains a path to a directory in my root not 
"${WORKDIR}".

Any and all help with this would be greatly appreciated.


Regards,

Greg Wilson-Lindberg

--
_______________________________________________
yocto mailing list
yocto@...
https://lists.yoctoproject.org/listinfo/yocto
--
Jeremy Thien
Director of Engineering | Adtec Digital
--
_______________________________________________
yocto mailing list
yocto@...
https://lists.yoctoproject.org/listinfo/yocto
--
Jeremy Thien
Director of Engineering | Adtec Digital
jeremy.thien@... | mobile: +1 (904) 910-1749


Re: [PATCH] ref-manual: Document the task feature of BUILDHISTORY_FEATURES

Peter Kjellerstedt
 

Ping?

//Peter

-----Original Message-----
From: yocto-bounces@yoctoproject.org [mailto:yocto-
bounces@yoctoproject.org] On Behalf Of Peter Kjellerstedt
Sent: den 29 januari 2018 19:58
To: yocto@yoctoproject.org; Scott Rifenbark <srifenbark@gmail.com>
Subject: [yocto] [PATCH] ref-manual: Document the task feature of
BUILDHISTORY_FEATURES

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
documentation/ref-manual/ref-variables.xml | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/documentation/ref-manual/ref-variables.xml b/documentation/ref-manual/ref-variables.xml
index 521eaeaed2..70e5e3428b 100644
--- a/documentation/ref-manual/ref-variables.xml
+++ b/documentation/ref-manual/ref-variables.xml
@@ -1927,8 +1927,8 @@
</para>

<para>
- You can specify three features in the form of a
- space-separated list:
+ You can specify features in the form of a space-separated
+ list:
<itemizedlist>
<listitem><para><emphasis>image:</emphasis>
Analysis of the contents of images, which
@@ -1942,12 +1942,17 @@
Analysis of the contents of the software
development kit (SDK).
</para></listitem>
+ <listitem><para><emphasis>task:</emphasis>
+ Save output file signatures for sstate tasks. This
+ saves a file per task listing the SHA-256 checksums
+ for each file staged, i.e., the output of the task.
+ </para></listitem>
</itemizedlist>
</para>

<para>
By default, the <filename>buildhistory</filename> class
- enables all three features:
+ enables the following features:
<literallayout class='monospaced'>
BUILDHISTORY_FEATURES ?= "image package sdk"
</literallayout>
--
2.12.0

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


Can SRC_URI look in the same place for two different machines?

Giordon Stark <kratsg@...>
 

Hi,

So for my device trees, I'm finding some files are duplicated. In particular some of my dtsi files are going to be the same amongst a few boards we're using, so I would like to have each machine name distinct so that 

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

files/${MACHINE}/${MACHINE}.dts

is picked up, while still having

files/common/*.dtsi picked up as well. As an example of my SRC_URI appends:

SRC_URI_append_gfex-prototype1b = " \
    file://skeleton.dtsi  \
    file://pl.dtsi        \
    file://zynq-7000.dtsi \
    file://system.dts     \
"

SRC_URI_append_gfex-prototype2  = " \
    file://skeleton.dtsi   \
    file://pl.dtsi         \
    file://zynq-7000.dtsi  \
    file://system.dts      \
"

I suspect I do something with OVERRIDES in the conf/machine/${MACHINE}.conf file but not sure...

Thanks,

Giordon
--
Giordon Stark


Re: trouble getting systemd oneshot to run

Jeremy Thien <jeremyt@...>
 

Agreed. I would expect the service file to be in /lib/systemd/system/canstart.service and a symbolic link in /etc/systemd/system/network.target.wants/canstart.service.

If those are both present, then the problem is in the service file. If the symbolic link is missing, try "systemctl enable canstart.service" to see if there is any useful information. "systemctl start canstart.service" and "systemctl status canstart.service" may also help.

In my particular service file, I wanted to start after networking is up so I followed this post. In the Install section, I have "WantedBy=multi-user.target". In the Unit section, I have "After=network-online.target" and "Wants=network-online.target". 

On Wed, Mar 14, 2018 at 10:28 PM Khem Raj <raj.khem@...> wrote:
On Wed, Mar 14, 2018 at 3:20 PM Greg Wilson-Lindberg <GWilson@...> wrote:

I changed it to look like:

PACKAGES += "${PN}-service"
FILES_${PN} = "${datadir}/*"
FILES_${PN}-service = "${systemd_system_unitdir}/canstart.service"
do_install () {
    if test -e ${WORKDIR}/can_start.sh &&
       test -e ${WORKDIR}/canstart.service; then
        install -d ${D}${datadir}/canstart
        install -m 0755 ${WORKDIR}/can_start.sh ${D}${datadir}/canstart
        install -d ${D}${systemd_system_unitdir}
        install -m 0644 ${WORKDIR}/canstart.service ${D}${systemd_system_unitdir}
        sed -i -e 's|@SCRIPTDIR@|${datadir}/canstart|g' ${D}${systemd_system_unitdir}/canstart.service
    fi
}

SYSTEMD_PACKAGES = "${PN}-service"
SYSTEMD_SERVICE_${PN}-service = "canstart.service"
SYSTEMD_AUTO_ENABLE_${PN}-service = "enable"

Still got the same results, my task is not running at startup.
To make sure that there wasn't some problem in running the script, I changed the ExecStart to echo to a file in /tmp. Nothing there. The .service file is not being executed.
I've obviously got something totally messed up, but I'm darned if I understand what it is.


You can check with systemctl status and other commands on the service on running system and might find more details 


From: Jeremy Thien <jeremyt@...>
Sent: Wednesday, March 14, 2018 1:08 PM
To: Greg Wilson-Lindberg
Cc: yocto@...
Subject: Re: [yocto] trouble getting systemd oneshot to run
 
I am no expert, but I have a similar recipe. It might be over complicated, but I put the script in one package and the service in another something like:

PACKAGES += "${PN}-service"
FILES_${PN} = "${datadir}/canstart/canstart.sh "
FILES_${PN}-service = "${systemd_unitdir}/system/canstart.service "
SYSTEMD_PACKAGES = ${PN}-service"
SYSTEMD_SERVICE_${PN}-service = canstart.service"
SYSTEMD_AUTO_ENABLE_${PN}-service = "enable"

Of course, this requires image to install both canstart and canstart-service.

Hope this helps,
Jeremy Thien

On Wed, Mar 14, 2018 at 3:21 PM Greg Wilson-Lindberg <GWilson@...> wrote:

I'm building yocto for a raspberry pi3 from Qt's b2qt version.


I'm running into two problems, I've got all of the files copying to the correct locations but the .service is not running at startup. I used connman-conf.bb as the template for my .bb file:


SUMMARY="recipe to create CAN bus startup service"

LICENSE = "CLOSED"
LIC_FILES_CHKSUM = ""

inherit systemd

SRC_URI = "file://can_start.sh \
           file://canstart.service \
"

S = "${WORKDIR}"

PACKAGE_ARCH = "${MACHINE_ARCH}"

FILES_${PN} = "${datadir}/*"

do_install () {
    if test -e ${WORKDIR}/can_start.sh &&
       test -e ${WORKDIR}/canstart.service; then
        install -d ${D}${datadir}/canstart
        install -m 0755 ${WORKDIR}/can_start.sh ${D}${datadir}/canstart
        install -d ${D}${systemd_system_unitdir}
        install -m 0644 ${WORKDIR}/canstart.service ${D}${systemd_system_unitdir}
        sed -i -e 's|@SCRIPTDIR@|${datadir}/canstart|g' ${D}${systemd_system_unitdir}/canstart.service
    fi
}

SYSTEMD_SERVICE_${PN} = "canstart.service"

Service file:
[Unit]
Description=Startup CAN bus interface

[Service]
Type=oneshot
ExecStart=@SCRIPTDIR@/can_start.sh

[Install]
WantedBy=network.target

From looking at the connman-conf sample I'm setting everything up correctly and the service should default to running on startup but it is not.

The second 'problem' is really just perplexing, if I dump the variables S contains a path to a directory in my root not 
"${WORKDIR}".

Any and all help with this would be greatly appreciated.


Regards,

Greg Wilson-Lindberg

--
_______________________________________________
yocto mailing list
yocto@...
https://lists.yoctoproject.org/listinfo/yocto
--
Jeremy Thien
Director of Engineering | Adtec Digital
--
_______________________________________________
yocto mailing list
yocto@...
https://lists.yoctoproject.org/listinfo/yocto
--
Jeremy Thien
Director of Engineering | Adtec Digital
jeremy.thien@... | mobile: +1 (904) 910-1749


Kernel module depedency (header+symbols)

Guy Morand <guy@...>
 

Hallo Yocto developpers,

I have been struggling a little to write recipe with kernel modules depedency. It seems that this is not well documented and picked up some solution across the mailing list and by reading the source. That is why I'm wondering if my approach is correct or hopefully will help someone else who tries to achieve the same thing...

First I have a modules that provides an header file with exported symbols:
---[base-module.h]---
extern int base_module_something(void);
---[/base-module.h]---

Where the function is exported in the c file:
---[base-module.c]---
int base_module_something(void)
{
/* something */
return 0;
}
EXPORT_SYMBOL(base_module_something);
---[/base-module.c]---

Now it seems that I have to prepend my recipe name with "kernel-module-" (cf.later) and add the header file installation:
---[kernel-module-base-module.bb]---
do_install_append() {
install -m 0664 ${S}/base-module.h ${D}/${includedir}/${PN}
}
---[/kernel-module-base-module.bb]---

In the second module, I added an argument to find the path to the base module header file:
---[Kbuild second module]---
ccflags-y += -I$(BASE_MODULE_PATH)
---[/Kbuild second module]---

In the recipe of the second module, I give the dependency to my base-module and pass the variable to find the header file:
---[second-module.bb]---
DEPENDS = "kernel-module-base-module"

do_compile_prepend() {
export BASE_MODULE_PATH=${STAGING_INCDIR}/kernel-module-base-module/"
}
---[/second-module.bb]---

The reason to have the first module prepended with "kernel-module" is that the bbclass looks for Module.symvers file for depedency with that name and adapt the KBUILD_EXTRA_SYMBOLS consequently:
https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/classes/module.bbclass#n12

Despite this solution works for me, I was wondering if this is the right approach and if there is a more "yocto way"?

Best regards,

Guy


Re: OpenCV with python3

Robert P. J. Day
 

On Thu, 15 Mar 2018, Peter Balazovic wrote:

Hello all,
I have python module of OpenCV for python 2.7 on my Yocto image adding via local.conf

IMAGE_INSTALL_append += “ python-opencv”
i know i've harped on this before, but can people please stop
combining the constructs "_append" and "+=" in the same expression?

rday

15681 - 15700 of 55944