Re: [yocto] Files copied to /usr/local during installation get removed misteriously

2023-11-15 Thread Javier Casas Marín
you are right, it is defined in layers/meta-ked/classes/userfs.bbclass I didn't 
consider that it could be something added by a custom layer but it is, as you 
said. I'll have a loot at it.

Thanks for the clarification

Javi

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#61699): https://lists.yoctoproject.org/g/yocto/message/61699
Mute This Topic: https://lists.yoctoproject.org/mt/102502363/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [yocto] Files copied to /usr/local during installation get removed misteriously

2023-11-15 Thread Javier Casas Marín
It is in run.do_userfs. I saw that the files where removed while 
do_image_userfs task was running so I looked at the image logs in temp 
directory and found it there

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#61697): https://lists.yoctoproject.org/g/yocto/message/61697
Mute This Topic: https://lists.yoctoproject.org/mt/102502363/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [yocto] Files copied to /usr/local during installation get removed misteriously

2023-11-15 Thread Javier Casas Marín
Just in case someone has the same problem, it is the do_userfs function the one 
that deletes /usr/local directories and files after copying them to 
${image_userfs}:

cp -r 
/build/tmp/work/kontron_mx8mm-ked-linux/image-ked-qt/1.0-r0/rootfs${image_userfs_dir}/*
 ${image_userfs}
rm -rf 
/build/tmp/work/kontron_mx8mm-ked-linux/image-ked-qt/1.0-r0/rootfs${image_userfs_dir}/*

I have changed the installation folder to /opt that seems more appropiate

Thanks

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#61695): https://lists.yoctoproject.org/g/yocto/message/61695
Mute This Topic: https://lists.yoctoproject.org/mt/102502363/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [yocto] Files copied to /usr/local during installation get removed misteriously

2023-11-13 Thread Javier Casas Marín
Any help on this?

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#61672): https://lists.yoctoproject.org/g/yocto/message/61672
Mute This Topic: https://lists.yoctoproject.org/mt/102502363/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[yocto] Files copied to /usr/local during installation get removed misteriously

2023-11-09 Thread Javier Casas Marín
Hi,
I have a recipe that creates some directories in /usr/local and copies there 
some files using do_install:append

> 
> inherit qmake5
> OE_QMAKE_PATH_HEADERS = "${OE_QMAKE_PATH_QT_HEADERS}"
> DEPENDS += "qtbase qtdeclarative qtmultimedia libgpiod"
> 

> 
> RDEPENDS:${PN} += "qtxmlpatterns qtdeclarative-qmlplugins qtbase-plugins
> ttf-dejavu-sans qtquickcontrols qtquickcontrols2 qtfreevirtualkeyboard
> libgpiod valgrind
> 
> do_install:append () {
> install -d ${D}${bindir}
> install -d ${D}/usr/local/test
> install -m 0775 qt_test ${D}${bindir}
> install -m 0775 ${S}/test.db ${D}/usr/local/test
> cp -r ${WORKDIR}/Resources ${D}/usr/local/test/resources
> cp -r ${WORKDIR}/LocalFiles ${D}/usr/local/test/LocalFiles
> }
> FILES:${PN} += "${bindir}/qt_test"
> FILES:${PN} += "/opt/*"
> FILES:${PN} += "/usr/local/test/*"
> 
> 
> 

When I build the image, I see the folders appear in /usr/local as expected 
while creating the rootfs but at some point they are removed and, by the time 
the rootfs creation finishes, they are gone.
If I take the ipk package and install it on the embedded device the folders and 
files are created correctly so I guess that the recipe is fine but there is 
some task during the rootfs creation that deletes all the files in /usr/local 
(my folders are not the only ones that are deleted).

Who could be doing that or how can I debug it to find the culprit?

Kind regards,
Javi

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#61649): https://lists.yoctoproject.org/g/yocto/message/61649
Mute This Topic: https://lists.yoctoproject.org/mt/102502363/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [yocto] Missing -lgpiod during linking an application that uses libgpiod

2023-11-04 Thread Javier Casas Marín
I solved the issue. It turned out to be not a yocto but a Qt problem. The 
Makefile used to build the application is autogenerated by qmake so you have to 
include LIBS += -lgpiod in order to add the library in the linking stage.

I was looking in the wrong place!

Sorry for the noise

javi

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#61613): https://lists.yoctoproject.org/g/yocto/message/61613
Mute This Topic: https://lists.yoctoproject.org/mt/102383036/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[yocto] Missing -lgpiod during linking an application that uses libgpiod

2023-11-04 Thread Javier Casas Marín
Hi,

I’m building a Qt application to controls a few GPIOs so, in my recipe, I add 
libgpiod to the DEPENDS variable, but even then the –lgpiod is missing in the 
linking stage and the build fails with several ‘undefined reference’ errors to 
the gpiod functions:

| 
/build/tmp/work/cortexa53-crypto-imx-ked-linux/testapp/0.1-r0/recipe-sysroot-native/usr/bin/aarch64-ked-linux/../../libexec/aarch64-ked-linux/gcc/aarch64-ked-linux/11.4.0/ld:
 /usr/src/debug/ testapp /0.1-r0/build/../m4/inou.c:48: undefined reference to 
`gpiod_chip_get_line'

| /build/tmp/work/cortexa53-crypto-imx-ked-linux/ testapp 
/0.1-r0/recipe-sysroot-native/usr/bin/aarch64-ked-linux/../../libexec/aarch64-ked-linux/gcc/aarch64-ked-linux/11.4.0/ld:
 /usr/src/debug/ testapp /0.1-r0/build/../m4/inou.c:55: undefined reference to 
`gpiod_line_request_output'

| /build/tmp/work/cortexa53-crypto-imx-ked-linux/ testapp 
/0.1-r0/recipe-sysroot-native/usr/bin/aarch64-ked-linux/../../libexec/aarch64-ked-linux/gcc/aarch64-ked-linux/11.4.0/ld:
 /usr/src/debug/ testapp /0.1-r0/build/../m4/inou.c:61: undefined reference to 
`gpiod_line_set_value'

| /build/tmp/work/cortexa53-crypto-imx-ked-linux/ testapp 
/0.1-r0/recipe-sysroot-native/usr/bin/aarch64-ked-linux/../../libexec/aarch64-ked-linux/gcc/aarch64-ked-linux/11.4.0/ld:
 /usr/src/debug/ testapp /0.1-r0/build/../m4/inou.c:67: undefined reference to 
`gpiod_line_release'

| /build/tmp/work/cortexa53-crypto-imx-ked-linux/ testapp 
/0.1-r0/recipe-sysroot-native/usr/bin/aarch64-ked-linux/../../libexec/aarch64-ked-linux/gcc/aarch64-ked-linux/11.4.0/ld:
 /usr/src/debug/ testapp /0.1-r0/build/../m4/inou.c:69: undefined reference to 
`gpiod_chip_close'

This is my recipe:

SUMMARY = "GPIO QT TEST APPLICATION"

DESCRIPTION = "GPIO user interface build with QT"

LICENSE = "GPLv2"

LIC_FILES_CHKSUM = " 
file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6
 ( 
file://$%7bCOREBASE%7d/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6
 ) "

SRC_URI = ""

DEPENDS += "qtbase qtdeclarative qtmultimedia qtwebengine *libgpiod* "

RDEPENDS:${PN} += "qtxmlpatterns qtdeclarative-qmlplugins qtbase-plugins 
ttf-dejavu-sans qtquickcontrols qtquickcontrols2 qtfreevirtualkeyboard "

S = "${WORKDIR}"

do_install:append () {

install -d ${D}${bindir}

install -m 0775 qt_testgpio ${D}${bindir}

}

FILES:${PN} += "${bindir}/qt_testgpio"

FILES:${PN} += "/opt/*"

inherit qmake5

What am I missing? Shouldn’t the inclusion of libpgiod library to the DEPENDS 
variable result in the addition of –lgpiod to the link command? I tried to add 
LDFLAGS:append = “ –lgpiod” but it didn’t solve the problem.

Any help will be appreciated.

Kind regards,

Javi

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#61612): https://lists.yoctoproject.org/g/yocto/message/61612
Mute This Topic: https://lists.yoctoproject.org/mt/102383036/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-