Date   

Re: Python function caching question

Richard Purdie
 

On Sun, 2020-11-22 at 19:16 -0700, Michael Callahan wrote:
I am having trouble with sstate caching of my os-release.bbappend and
am stuck. The simple example file looks like something below, where
I
am setting a variable from a computed python function. What's the
magic
to make the find_version(d) always run but do_compile to only run if
VERSION changes? I basically want something like
`find_version[nostamp]="1"` but that seems to only work for tasks.

def find_version(d):
import subprocess
cmd = "git describe --long"
return subprocess.check_output(cmd).rstrip().decode('utf-8')

VERSION = "${@find_version(d)}"
# do_compile uses $VERSION
If you set BB_DONT_CACHE = "1" in the recipe, it will force the recipe
to reparse each time. That should cause it to rerun find_version and
then change hash when the value changes. Its how SRCREV = "${AUTOREV}"
works behind the scenes.

Cheers,

Richard


Re: Python function caching question

Michael Callahan <coder.callahan@...>
 

I do not want do_compile to run again, it rebuilds the whole image.
What is the best way to always run find_version?

On Sun, Nov 22, 2020 at 7:53 PM Khem Raj <raj.khem@...> wrote:

On Sun, Nov 22, 2020 at 6:17 PM Michael Callahan
<coder.callahan@...> wrote:

I am having trouble with sstate caching of my os-release.bbappend and
am stuck. The simple example file looks like something below, where I
am setting a variable from a computed python function. What's the magic
to make the find_version(d) always run but do_compile to only run if
VERSION changes? I basically want something like
`find_version[nostamp]="1"` but that seems to only work for tasks.

def find_version(d):
import subprocess
cmd = "git describe --long"
return subprocess.check_output(cmd).rstrip().decode('utf-8')

VERSION = "${@find_version(d)}"
# do_compile uses $VERSION
perhaps mark the task which is using this variable as nostamp.



Re: OE/YP equivalent to 'mtree'?

Randy MacLeod
 

On 2020-11-23 2:26 p.m., Robert P. J. Day wrote:
  colleague wants to know if there is something available
in an OE/YP layer equivalent to mtree:
  https://linux.die.net/man/8/mtree
i'm looking at a few possibilities right now but nothing
seems really equivalent. thoughts?
It don't see anything in the layer index:
https://layers.openembedded.org/layerindex/branch/master/recipes/?q=mtree

but the source has a configure file:
(Ubuntu: apt-get source mtree-netbsd)
so they should write a recipe and send it to meta-oe.

../Randy

rday

--
# Randy MacLeod
# Wind River Linux


Re: Disable systemd-timesyncd.service in image

Konrad Weihmann <kweihmann@...>
 

The service is deployed with standard systemd package, which doesn't have that set as far as I see it (no SYSTEMD_AUTO_ENABLE_${PN} in the latest recipe revision)

I think, after browsing through the code of systemd - this "autostart" behavior comes from [1].
So I would say you can disable it with a drop-in file at
/etc/systemd/system/systemd-timesyncd.service.d/disable.conf
[Install]
WantedBy=

which also would be charming in a way that it isn't that invasive in the build system

[1] https://github.com/systemd/systemd/blob/5b639090d0b4a49d77ba58bebe180b2a6f8da322/units/systemd-timesyncd.service.in#L55

haven't tested it though, but you might wanna give that a shot, if Aaron's approach doesn't work.

On 23.11.20 21:21, Joel A Cohen wrote:
I think you need to set SYSTEMD_AUTO_ENABLE = “disable” (actually any value other than “enable”) in your bbappend.
(It looks like SYSTEMD_AUTO_ENABLE_${PN} is intended to work too, but I can’t verify it at the moment and reading over systemd.bbclass I’m not sure if it works or not)
—Aaron
On Mon, Nov 23, 2020 at 11:51 AM Damien LEFEVRE <lefevre.da@... <mailto:lefevre.da@...>> wrote:
Hi,
I would like to have systemd-timesyncd.service as part of an image
but have it disabled by default.
Right now it is enabled by default which causes some issues.
I've tried systemd_%.bbappend
do_install_append() {
    rm "$D/etc/systemd/system/dbus-org.freedesktop.timesync1.service"
    rm
"$D/etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service"
}
but those symlinks are not part of the package.
I've tried this to remove the link during the package deployment
during do_rootfs
pkg_postinst_${PN}_append() {
    #!/bin/sh -e
    rm "$D/etc/systemd/system/dbus-org.freedesktop.timesync1.service"
    rm
"$D/etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service"
}
But at this stage the links still don't exist.
Which package is actually responsible for enabling the default
services / creating the symlinks? How can we turn some of them off
while keeping them in the image?
Thanks,
-Damien


Re: Disable systemd-timesyncd.service in image

Joel A Cohen
 

I think you need to set SYSTEMD_AUTO_ENABLE = “disable” (actually any value other than “enable”) in your bbappend.

(It looks like SYSTEMD_AUTO_ENABLE_${PN} is intended to work too, but I can’t verify it at the moment and reading over systemd.bbclass I’m not sure if it works or not)

—Aaron

On Mon, Nov 23, 2020 at 11:51 AM Damien LEFEVRE <lefevre.da@...> wrote:
Hi,

I would like to have systemd-timesyncd.service as part of an image but have it disabled by default.

Right now it is enabled by default which causes some issues.

I've tried systemd_%.bbappend

do_install_append() { 
    rm "$D/etc/systemd/system/dbus-org.freedesktop.timesync1.service"
    rm "$D/etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service"
}

but those symlinks are not part of the package.

I've tried this to remove the link during the package deployment during do_rootfs
pkg_postinst_${PN}_append() {
    #!/bin/sh -e
    rm "$D/etc/systemd/system/dbus-org.freedesktop.timesync1.service"
    rm "$D/etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service"
}

But at this stage the links still don't exist.

Which package is actually responsible for enabling the default services / creating the symlinks? How can we turn some of them off while keeping them in the image?

Thanks,
-Damien




Disable systemd-timesyncd.service in image

Damien LEFEVRE
 

Hi,

I would like to have systemd-timesyncd.service as part of an image but have it disabled by default.

Right now it is enabled by default which causes some issues.

I've tried systemd_%.bbappend

do_install_append() { 
    rm "$D/etc/systemd/system/dbus-org.freedesktop.timesync1.service"
    rm "$D/etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service"
}

but those symlinks are not part of the package.

I've tried this to remove the link during the package deployment during do_rootfs
pkg_postinst_${PN}_append() {
    #!/bin/sh -e
    rm "$D/etc/systemd/system/dbus-org.freedesktop.timesync1.service"
    rm "$D/etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service"
}

But at this stage the links still don't exist.

Which package is actually responsible for enabling the default services / creating the symlinks? How can we turn some of them off while keeping them in the image?

Thanks,
-Damien


OE/YP equivalent to 'mtree'?

Robert P. J. Day
 

colleague wants to know if there is something available
in an OE/YP layer equivalent to mtree:

https://linux.die.net/man/8/mtree

i'm looking at a few possibilities right now but nothing
seems really equivalent. thoughts?

rday


Re: strange meta-security bbappend file with two percent signs

Armin Kuster
 

On 11/21/20 1:56 PM, Robert P. J. Day wrote:
while the bitbake user manual insists:

"The use of the ” % ” character is limited in that it only works
directly in front of the .bbappend portion of the append file’s name.
You cannot use the wildcard character in any other location of the
name."

i just ran across this in the meta-security layer:

recipes-kernel/linux/linux-%_5.%.bbappend

what is one supposed to make of that?
please send a patch to make to correct the situation.

-armin



rday



Re: Hardware video decode on RPi3

Rudolf J Streif
 

Thanks, Khem.

On 11/22/20 11:15 PM, Khem Raj wrote:
On Thu, Nov 19, 2020 at 7:38 PM Rudolf J Streif
<rudolf.streif@...> wrote:
I am trying to play back mp4 video (venerable Big Buck Bunny at this
time) on RPi3.

I added gstreamer1.0, gstreamer1.0-omx and the plugins to the image.

libgstomx.so is installed in usr/lib/gstreamer-1.0 on target.

However, gst-inspect-1.0 | grep omx does not return any results.

Consequently,

gst-launch-1.0 filesrc
location="/home/root/kiosk/kiosk/videos/bunny.mp4" ! qtdemux ! h264parse
! omxh264dec ! kmssink
WARNING: erroneous pipeline: no element "omxh264dec"

I guess I am missing something somewhere but I don't know what.
are you using userland for graphics or vc4 ?
Yes, I am. I actually discovered what the problem was: I built my system for 64-bit but Broadcom's proprietary libraries are 32-bit. I switched the system to 32-bit and now gst-inspect shows omx support.

Unfortunately, decoding is still not working. This works:

gst-launch-1.0  -v videotestsrc ! omxh264enc ! h264parse ! avdec_h264 ! autovideosink

However, this does not:

gst-launch-1.0  -v videotestsrc ! omxh264enc ! h264parse ! omxh264dec ! autovideosink

I also tried with kmssink with the same results.

I am using EGLFS backend. It appears to me that there is something off with the omxh264dec decoder plugin passing the decoded buffers on to the output sink. Unfortunately, I have not been able to figure out what that could be.

Ultimately, this would go into a Qt application. I have never had any issues with EGLFS and Qt hence I would be reluctant to switch the backend to Wayland/Weston or X11. But of course I also don't know if omxh264dec would work with either one of those backends.

Thanks,
Rudi


--
Rudolf J Streif
CEO/CTO ibeeto
+1.855.442.3386 x700


Re: Packagegroup Understanding

Charlie Davies
 

Ok - I understand now.

Thanks for the explanation.

Charlie


Re: Packagegroup Understanding

Nicolas Dechesne
 

On Mon, Nov 23, 2020 at 11:51 AM Charlie Davies
<charles.davies@...> wrote:

Hi All,

I am seeing some behaviour when creating my own packagegroups which I do not quite understand.

Using the example from the mega-manual:

DESCRIPTION = "My Custom Package Groups"

inherit packagegroup

PACKAGES = "\
packagegroup-custom-apps \
packagegroup-custom-tools \
"

RDEPENDS_packagegroup-custom-apps = "\
dropbear \
portmap \
psplash"

RDEPENDS_packagegroup-custom-tools = "\
oprofile \
oprofileui-server \
lttng-control \
lttng-viewer"

If I then include packagegroup-custom-apps in my image I am also seeing the packages in packagegroup-custom-tools being built (but not included in the image) while building my image.

Is this behaviour correct? I would not expect the packages in packagegroup-custom-tools to be built if the packagegroup-custom-tools is not included in the image.
This is correct. When at least one (binary) package is needed from a
recipe, then the recipe is built, and all the resulting packages are
built.
So when you include packagegroup-custom-apps in your image, you
request the whole packagegroup recipe to be built, which in turn will
build all binary packages (hence all packagegroups and their
dependencies).


Many Thanks,

Charlie




Packagegroup Understanding

Charlie Davies
 

Hi All,

I am seeing some behaviour when creating my own packagegroups which I do not quite understand.

Using the example from the mega-manual:

DESCRIPTION = "My Custom Package Groups"
 
      inherit packagegroup
 
      PACKAGES = "\
          packagegroup-custom-apps \
          packagegroup-custom-tools \
          "
 
      RDEPENDS_packagegroup-custom-apps = "\
          dropbear \
          portmap \
          psplash"
 
      RDEPENDS_packagegroup-custom-tools = "\
          oprofile \
          oprofileui-server \
          lttng-control \
          lttng-viewer"

If I then include packagegroup-custom-apps in my image I am also seeing the packages in packagegroup-custom-tools being built (but not included in the image) while building my image.

Is this behaviour correct? I would not expect the packages in packagegroup-custom-tools to be built if the packagegroup-custom-tools is not included in the image.

Many Thanks,

Charlie


Problem with recipe that depends on a binary that is generated during its build

Matteo Iervasi
 

Hi!

I'm trying to integrate the Icinga (https://github.com/Icinga/icinga2) in our Yocto project. As there are no ready recipes for it, I'm trying to write my own, starting from the one used for Nagios which is the original project Icinga forked from.
Icinga uses CMake for the compile process. Problem is that the compilation relies on two binaries, mkclass and mkunity, that get built by the process itself and obviously the compilation stops because those commands cannot be found.

Searching the web I found only this hint in the Technical FAQ https://wiki.yoctoproject.org/wiki/Technical_FAQ#I_have_some_software_which_needs_to_build_a_binary_that_it_then_runs_as_part_of_its_own_build_process.2C_how_do_I_make_this_work.3F, but the problem is still there.

How can I get around this?


Best regards
Matteo Iervasi


Re: U-Boot sama5d3 xplained issue

Federico Pellegrin
 


Hi,
I think it would be interesting information to know "how" you change the value inside "u-boot-at91/sama5d3_xplained_nandflash_config".

As every time you rebuild it may be redownloaded, you should do this via a patch to append to the recipe.

Are you doing this? Or just changing it locally?

If you give some more info probably we can better help!

Cheers,
Federico


Il giorno lun 23 nov 2020 alle ore 08:06 Khem Raj <raj.khem@...> ha scritto:
perhaps asking it on https://github.com/linux4sam/u-boot-at91 via
github issues might be helpful too.

On Sat, Nov 21, 2020 at 4:26 AM David Novak <david.novak@...> wrote:
>
> I'm working on this project with Pratham. Let me provide a few more details.
>
> We've defined
>
> UBOOT_MACHINE ?= "sama5d3_xplained_nandflash_config"
>
> Inside
>
> u-boot-at91/sama5d3_xplained_nandflash_config
>
> we change CONFIG_BOOTDELAY, but it has no effect on the newly built image. The boot delay remains the same as it was before we changed it.
>
> Based on the UBOOT_MACHINE, can we be certain we are changing the correct file?
>
> How do we get the build process to include our changes?
>
> Thanks,
> David
>
>
>
> On 11/19/2020 5:37 PM, Prathamesh Ovalekar wrote:
>
> Hello everyone,
>
> System: sama5d3_xplained board
>
> I have a question regarding the configuration and build of u-boot.
> We have a build that was implemented earlier. I am trying to make some changes to it.
>
> Change 1: Change the auto boot delay to 1 second.
> Change 2: Add an auto boot command to set a gpio.
>
> I am aware of the environment variables:  CONFIG_BOOTDELAY and CONFIG_BOOTCOMMAND (needed for the changes above.)
> I tried modifying the  " configs/sama5d3_xplained_nandflash_defconfig "
>
> Question 1: Do I need to create an *.config file using the make menuconfig?
>
> Question 2: How do I create the u-boot.bin . Does this  depend on the Linux build?
>                     I know that there is an environment variable: CONFIG_BOOTARGS that needs to be populated.
>
> --
> Pratham Ovalekar
>
>
>
>
>
>
>




Re: Hardware video decode on RPi3

Khem Raj
 

On Thu, Nov 19, 2020 at 7:38 PM Rudolf J Streif
<rudolf.streif@...> wrote:

I am trying to play back mp4 video (venerable Big Buck Bunny at this
time) on RPi3.

I added gstreamer1.0, gstreamer1.0-omx and the plugins to the image.

libgstomx.so is installed in usr/lib/gstreamer-1.0 on target.

However, gst-inspect-1.0 | grep omx does not return any results.

Consequently,

gst-launch-1.0 filesrc
location="/home/root/kiosk/kiosk/videos/bunny.mp4" ! qtdemux ! h264parse
! omxh264dec ! kmssink
WARNING: erroneous pipeline: no element "omxh264dec"

I guess I am missing something somewhere but I don't know what.
are you using userland for graphics or vc4 ?

Thanks,
Rudi




Re: U-Boot sama5d3 xplained issue

Khem Raj
 

perhaps asking it on https://github.com/linux4sam/u-boot-at91 via
github issues might be helpful too.

On Sat, Nov 21, 2020 at 4:26 AM David Novak <david.novak@...> wrote:

I'm working on this project with Pratham. Let me provide a few more details.

We've defined

UBOOT_MACHINE ?= "sama5d3_xplained_nandflash_config"

Inside

u-boot-at91/sama5d3_xplained_nandflash_config

we change CONFIG_BOOTDELAY, but it has no effect on the newly built image. The boot delay remains the same as it was before we changed it.

Based on the UBOOT_MACHINE, can we be certain we are changing the correct file?

How do we get the build process to include our changes?

Thanks,
David



On 11/19/2020 5:37 PM, Prathamesh Ovalekar wrote:

Hello everyone,

System: sama5d3_xplained board

I have a question regarding the configuration and build of u-boot.
We have a build that was implemented earlier. I am trying to make some changes to it.

Change 1: Change the auto boot delay to 1 second.
Change 2: Add an auto boot command to set a gpio.

I am aware of the environment variables: CONFIG_BOOTDELAY and CONFIG_BOOTCOMMAND (needed for the changes above.)
I tried modifying the " configs/sama5d3_xplained_nandflash_defconfig "

Question 1: Do I need to create an *.config file using the make menuconfig?

Question 2: How do I create the u-boot.bin . Does this depend on the Linux build?
I know that there is an environment variable: CONFIG_BOOTARGS that needs to be populated.

--
Pratham Ovalekar







Re: Python function caching question

Khem Raj
 

On Sun, Nov 22, 2020 at 6:17 PM Michael Callahan
<coder.callahan@...> wrote:

I am having trouble with sstate caching of my os-release.bbappend and
am stuck. The simple example file looks like something below, where I
am setting a variable from a computed python function. What's the magic
to make the find_version(d) always run but do_compile to only run if
VERSION changes? I basically want something like
`find_version[nostamp]="1"` but that seems to only work for tasks.

def find_version(d):
import subprocess
cmd = "git describe --long"
return subprocess.check_output(cmd).rstrip().decode('utf-8')

VERSION = "${@find_version(d)}"
# do_compile uses $VERSION
perhaps mark the task which is using this variable as nostamp.



Python function caching question

Michael Callahan <coder.callahan@...>
 

I am having trouble with sstate caching of my os-release.bbappend and
am stuck. The simple example file looks like something below, where I
am setting a variable from a computed python function. What's the magic
to make the find_version(d) always run but do_compile to only run if
VERSION changes? I basically want something like
`find_version[nostamp]="1"` but that seems to only work for tasks.

def find_version(d):
import subprocess
cmd = "git describe --long"
return subprocess.check_output(cmd).rstrip().decode('utf-8')

VERSION = "${@find_version(d)}"
# do_compile uses $VERSION


Re: Best convention for FILES variable

Chuck Wolber
 

On Sat, Nov 21, 2020 at 7:48 AM Robert P. J. Day <rpjday@...> wrote:

%< SNIP %<
 
  pedantically speaking, since you're using "+=", you don't need those
leading spaces.

Indeed you are correct. I believe I mistakenly conflated that particular aspect of "_append" with "+=".

Thank you for pointing this out.

..Ch:W..

--
"Perfection must be reached by degrees; she requires the slow hand of time." - Voltaire


strange meta-security bbappend file with two percent signs

Robert P. J. Day
 

while the bitbake user manual insists:

"The use of the ” % ” character is limited in that it only works
directly in front of the .bbappend portion of the append file’s name.
You cannot use the wildcard character in any other location of the
name."

i just ran across this in the meta-security layer:

recipes-kernel/linux/linux-%_5.%.bbappend

what is one supposed to make of that?

rday

6261 - 6280 of 57773