* [master/kirkstone][PATCH 1/2] treewide: replace leftover git://git.ti.com @ 2022-12-16 13:01 Matthias Schiffer 2022-12-16 13:01 ` [master/kirkstone][PATCH 2/2] ti-sgx-ddk-um: use udev for userspace initialization Matthias Schiffer 2022-12-19 20:41 ` [meta-ti] [master/kirkstone][PATCH 1/2] treewide: replace leftover git://git.ti.com Denys Dmytriyenko 0 siblings, 2 replies; 11+ messages in thread From: Matthias Schiffer @ 2022-12-16 13:01 UTC (permalink / raw) To: meta-ti; +Cc: Matthias Schiffer These URIs have been updated in dunfell, but two instances were forgotten in kirkstone/master. Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> --- .../recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb | 2 +- meta-ti-extras/recipes-bsp/pru/pru-icss_git.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb b/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb index d0edf1fe..bd88d14d 100644 --- a/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb +++ b/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb @@ -14,7 +14,7 @@ PR = "r37" BRANCH = "ti-img-sgx/dunfell/${PV}" -SRC_URI = "git://git.ti.com/graphics/omap5-sgx-ddk-um-linux.git;protocol=git;branch=${BRANCH}" +SRC_URI = "git://git.ti.com/git/graphics/omap5-sgx-ddk-um-linux.git;protocol=https;branch=${BRANCH}" SRCREV = "742cf38aba13e1ba1a910cf1f036a1a212c263b6" TARGET_PRODUCT:omap-a15 = "jacinto6evm" diff --git a/meta-ti-extras/recipes-bsp/pru/pru-icss_git.bb b/meta-ti-extras/recipes-bsp/pru/pru-icss_git.bb index cb2f8cc2..8a2cfdc6 100644 --- a/meta-ti-extras/recipes-bsp/pru/pru-icss_git.bb +++ b/meta-ti-extras/recipes-bsp/pru/pru-icss_git.bb @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://PRU-Package-v6.1-Manifest.html;md5=1e37797ebe9254922f inherit update-alternatives BRANCH = "master" -SRC_URI = "git://git.ti.com/pru-software-support-package/pru-software-support-package.git;protocol=git;branch=${BRANCH}" +SRC_URI = "git://git.ti.com/git/pru-software-support-package/pru-software-support-package.git;protocol=https;branch=${BRANCH}" SRCREV = "ae1decf0b494b2904e6157e1379691ffc468f0cf" PV = "6.1.0" -- 2.34.1 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [master/kirkstone][PATCH 2/2] ti-sgx-ddk-um: use udev for userspace initialization 2022-12-16 13:01 [master/kirkstone][PATCH 1/2] treewide: replace leftover git://git.ti.com Matthias Schiffer @ 2022-12-16 13:01 ` Matthias Schiffer 2022-12-19 21:00 ` [meta-ti] " Denys Dmytriyenko 2022-12-19 20:41 ` [meta-ti] [master/kirkstone][PATCH 1/2] treewide: replace leftover git://git.ti.com Denys Dmytriyenko 1 sibling, 1 reply; 11+ messages in thread From: Matthias Schiffer @ 2022-12-16 13:01 UTC (permalink / raw) To: meta-ti; +Cc: Matthias Schiffer The ti-sgx-ddk driver requires an additional userspace initialization step after the kernel module has probed the device. Without this initialization, no EGL context can be created and Weston etc. will fail to start. The driver package contains an init script, but this does not work on systemd-based systems. Introduce an enabled-by-default PACKAGECONFIG that installs a udev rule instead to run the init command automatically when the driver is loaded, solving the issue without depending on a specific init system. udev reports several events when the pvrsrvkm module is loaded: - add event for the kernel module - add events for two DRM devices - bind event for the GPU platform device The DRM devices aren't nice to match on, and the kernel module add is too early to run `pvrsrvctl --start`, so we trigger on the platform device bind. Tested with Weston 9.0.0 on the AM65x-based TQ-Systems MBa65xx. Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> --- .../libgles/ti-sgx-ddk-um/pvrsrvkm.rules | 1 + .../libgles/ti-sgx-ddk-um_1.17.4948957.bb | 23 ++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um/pvrsrvkm.rules diff --git a/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um/pvrsrvkm.rules b/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um/pvrsrvkm.rules new file mode 100644 index 00000000..e49fd9b8 --- /dev/null +++ b/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um/pvrsrvkm.rules @@ -0,0 +1 @@ +SUBSYSTEM=="platform", ACTION=="bind", ENV{DRIVER}=="pvrsrvkm", RUN+="/usr/bin/pvrsrvctl --start --no-module" diff --git a/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb b/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb index bd88d14d..2a8a0466 100644 --- a/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb +++ b/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb @@ -14,7 +14,10 @@ PR = "r37" BRANCH = "ti-img-sgx/dunfell/${PV}" -SRC_URI = "git://git.ti.com/git/graphics/omap5-sgx-ddk-um-linux.git;protocol=https;branch=${BRANCH}" +SRC_URI = " \ + git://git.ti.com/git/graphics/omap5-sgx-ddk-um-linux.git;protocol=https;branch=${BRANCH} \ + file://pvrsrvkm.rules \ +" SRCREV = "742cf38aba13e1ba1a910cf1f036a1a212c263b6" TARGET_PRODUCT:omap-a15 = "jacinto6evm" @@ -27,6 +30,9 @@ INITSCRIPT_PARAMS = "defaults 8" inherit update-rc.d +PACKAGECONFIG ??= "udev" +PACKAGECONFIG[udev] = ",,,udev" + PROVIDES += "virtual/egl virtual/libgles1 virtual/libgles2 virtual/libgbm" DEPENDS += "libdrm udev wayland wayland-protocols libffi expat" @@ -56,6 +62,20 @@ do_install () { oe_runmake install DESTDIR=${D} TARGET_PRODUCT=${TARGET_PRODUCT} ln -sf libGLESv2.so.2 ${D}${libdir}/libGLESv2.so.1 + local without_sysvinit=${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'false', 'true', d)} + local with_udev=${@bb.utils.contains('PACKAGECONFIG', 'udev', 'true', 'false', d)} + + # Delete initscript if it is not needed or would conflict with the udev rules + if $without_sysvinit || $with_udev; then + rm -rf ${D}${sysconfdir}/init.d + rmdir --ignore-fail-on-non-empty ${D}${sysconfdir} + fi + + if $with_udev; then + install -m644 -D ${WORKDIR}/pvrsrvkm.rules \ + ${D}${nonarch_base_libdir}/udev/rules.d/80-pvrsrvkm.rules + fi + chown -R root:root ${D} } @@ -63,6 +83,7 @@ FILES:${PN} = "${bindir}/*" FILES:${PN} += " ${libdir}/*" FILES:${PN} += "${includedir}/*" FILES:${PN} += "${sysconfdir}/*" +FILES:${PN} += "${nonarch_base_libdir}/udev/rules.d" INSANE_SKIP:${PN} += "dev-so ldflags useless-rpaths" INSANE_SKIP:${PN} += "already-stripped dev-deps" -- 2.34.1 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [meta-ti] [master/kirkstone][PATCH 2/2] ti-sgx-ddk-um: use udev for userspace initialization 2022-12-16 13:01 ` [master/kirkstone][PATCH 2/2] ti-sgx-ddk-um: use udev for userspace initialization Matthias Schiffer @ 2022-12-19 21:00 ` Denys Dmytriyenko 2022-12-20 9:10 ` Matthias Schiffer 0 siblings, 1 reply; 11+ messages in thread From: Denys Dmytriyenko @ 2022-12-19 21:00 UTC (permalink / raw) To: Matthias Schiffer; +Cc: meta-ti On Fri, Dec 16, 2022 at 02:01:39PM +0100, Matthias Schiffer wrote: > The ti-sgx-ddk driver requires an additional userspace initialization > step after the kernel module has probed the device. Without this > initialization, no EGL context can be created and Weston etc. will fail to > start. > > The driver package contains an init script, but this does not work on > systemd-based systems. Why? Please provide more details. Do you use systemd-compat-units? > Introduce an enabled-by-default PACKAGECONFIG that > installs a udev rule instead to run the init command automatically when > the driver is loaded, solving the issue without depending on a specific > init system. > > udev reports several events when the pvrsrvkm module is loaded: > > - add event for the kernel module > - add events for two DRM devices > - bind event for the GPU platform device > > The DRM devices aren't nice to match on, and the kernel module add is > too early to run `pvrsrvctl --start`, so we trigger on the platform > device bind. > > Tested with Weston 9.0.0 on the AM65x-based TQ-Systems MBa65xx. > > Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> > --- > .../libgles/ti-sgx-ddk-um/pvrsrvkm.rules | 1 + > .../libgles/ti-sgx-ddk-um_1.17.4948957.bb | 23 ++++++++++++++++++- > 2 files changed, 23 insertions(+), 1 deletion(-) > create mode 100644 meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um/pvrsrvkm.rules > > diff --git a/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um/pvrsrvkm.rules b/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um/pvrsrvkm.rules > new file mode 100644 > index 00000000..e49fd9b8 > --- /dev/null > +++ b/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um/pvrsrvkm.rules > @@ -0,0 +1 @@ > +SUBSYSTEM=="platform", ACTION=="bind", ENV{DRIVER}=="pvrsrvkm", RUN+="/usr/bin/pvrsrvctl --start --no-module" > diff --git a/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb b/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb > index bd88d14d..2a8a0466 100644 > --- a/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb > +++ b/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb > @@ -14,7 +14,10 @@ PR = "r37" > > BRANCH = "ti-img-sgx/dunfell/${PV}" > > -SRC_URI = "git://git.ti.com/git/graphics/omap5-sgx-ddk-um-linux.git;protocol=https;branch=${BRANCH}" > +SRC_URI = " \ > + git://git.ti.com/git/graphics/omap5-sgx-ddk-um-linux.git;protocol=https;branch=${BRANCH} \ > + file://pvrsrvkm.rules \ > +" > SRCREV = "742cf38aba13e1ba1a910cf1f036a1a212c263b6" > > TARGET_PRODUCT:omap-a15 = "jacinto6evm" > @@ -27,6 +30,9 @@ INITSCRIPT_PARAMS = "defaults 8" > > inherit update-rc.d > > +PACKAGECONFIG ??= "udev" > +PACKAGECONFIG[udev] = ",,,udev" > + > PROVIDES += "virtual/egl virtual/libgles1 virtual/libgles2 virtual/libgbm" > > DEPENDS += "libdrm udev wayland wayland-protocols libffi expat" > @@ -56,6 +62,20 @@ do_install () { > oe_runmake install DESTDIR=${D} TARGET_PRODUCT=${TARGET_PRODUCT} > ln -sf libGLESv2.so.2 ${D}${libdir}/libGLESv2.so.1 > > + local without_sysvinit=${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'false', 'true', d)} > + local with_udev=${@bb.utils.contains('PACKAGECONFIG', 'udev', 'true', 'false', d)} While "local" is supported by dash and ash and is not a strictly bashism, it's still not part of the POSIX spec and should be avoided in the recipes: https://www.shellcheck.net/wiki/SC3043 > + # Delete initscript if it is not needed or would conflict with the udev rules > + if $without_sysvinit || $with_udev; then > + rm -rf ${D}${sysconfdir}/init.d > + rmdir --ignore-fail-on-non-empty ${D}${sysconfdir} > + fi > + > + if $with_udev; then > + install -m644 -D ${WORKDIR}/pvrsrvkm.rules \ > + ${D}${nonarch_base_libdir}/udev/rules.d/80-pvrsrvkm.rules > + fi What happens when you use systemd with sysvinit PACKAGECONFIG that relies on initscripts in init.d? > chown -R root:root ${D} > } > > @@ -63,6 +83,7 @@ FILES:${PN} = "${bindir}/*" > FILES:${PN} += " ${libdir}/*" > FILES:${PN} += "${includedir}/*" > FILES:${PN} += "${sysconfdir}/*" > +FILES:${PN} += "${nonarch_base_libdir}/udev/rules.d" > > INSANE_SKIP:${PN} += "dev-so ldflags useless-rpaths" > INSANE_SKIP:${PN} += "already-stripped dev-deps" > -- > 2.34.1 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [meta-ti] [master/kirkstone][PATCH 2/2] ti-sgx-ddk-um: use udev for userspace initialization 2022-12-19 21:00 ` [meta-ti] " Denys Dmytriyenko @ 2022-12-20 9:10 ` Matthias Schiffer 2023-02-23 1:38 ` Denys Dmytriyenko 0 siblings, 1 reply; 11+ messages in thread From: Matthias Schiffer @ 2022-12-20 9:10 UTC (permalink / raw) To: Denys Dmytriyenko; +Cc: meta-ti On Mon, 2022-12-19 at 16:00 -0500, Denys Dmytriyenko wrote: > On Fri, Dec 16, 2022 at 02:01:39PM +0100, Matthias Schiffer wrote: > > The ti-sgx-ddk driver requires an additional userspace initialization > > step after the kernel module has probed the device. Without this > > initialization, no EGL context can be created and Weston etc. will fail to > > start. > > > > The driver package contains an init script, but this does not work on > > systemd-based systems. > > Why? Please provide more details. Do you use systemd-compat-units? Ah, we are not using systemd-compat-units. So this commit message should be more specific and mention that this is about pure systemd systems without SysVinit compat. Given that /etc/init.d is empty except for "rc.pvr" in a simple Poky- based setup with ti-sgx-ddk-um when "sysvinit" is not in DISTRO_FEATURES, I understand that it is a good practice for packages not to rely on systemd-compat-units. > > > > Introduce an enabled-by-default PACKAGECONFIG that > > installs a udev rule instead to run the init command automatically when > > the driver is loaded, solving the issue without depending on a specific > > init system. > > > > udev reports several events when the pvrsrvkm module is loaded: > > > > - add event for the kernel module > > - add events for two DRM devices > > - bind event for the GPU platform device > > > > The DRM devices aren't nice to match on, and the kernel module add is > > too early to run `pvrsrvctl --start`, so we trigger on the platform > > device bind. > > > > Tested with Weston 9.0.0 on the AM65x-based TQ-Systems MBa65xx. > > > > Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> > > --- > > .../libgles/ti-sgx-ddk-um/pvrsrvkm.rules | 1 + > > .../libgles/ti-sgx-ddk-um_1.17.4948957.bb | 23 ++++++++++++++++++- > > 2 files changed, 23 insertions(+), 1 deletion(-) > > create mode 100644 meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um/pvrsrvkm.rules > > > > diff --git a/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um/pvrsrvkm.rules b/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um/pvrsrvkm.rules > > new file mode 100644 > > index 00000000..e49fd9b8 > > --- /dev/null > > +++ b/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um/pvrsrvkm.rules > > @@ -0,0 +1 @@ > > +SUBSYSTEM=="platform", ACTION=="bind", ENV{DRIVER}=="pvrsrvkm", RUN+="/usr/bin/pvrsrvctl --start --no-module" > > diff --git a/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb b/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb > > index bd88d14d..2a8a0466 100644 > > --- a/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb > > +++ b/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb > > @@ -14,7 +14,10 @@ PR = "r37" > > > > BRANCH = "ti-img-sgx/dunfell/${PV}" > > > > -SRC_URI = "git://git.ti.com/git/graphics/omap5-sgx-ddk-um-linux.git;protocol=https;branch=${BRANCH}" > > +SRC_URI = " \ > > + git://git.ti.com/git/graphics/omap5-sgx-ddk-um-linux.git;protocol=https;branch=${BRANCH} \ > > + file://pvrsrvkm.rules \ > > +" > > SRCREV = "742cf38aba13e1ba1a910cf1f036a1a212c263b6" > > > > TARGET_PRODUCT:omap-a15 = "jacinto6evm" > > @@ -27,6 +30,9 @@ INITSCRIPT_PARAMS = "defaults 8" > > > > inherit update-rc.d > > > > +PACKAGECONFIG ??= "udev" > > +PACKAGECONFIG[udev] = ",,,udev" > > + > > PROVIDES += "virtual/egl virtual/libgles1 virtual/libgles2 virtual/libgbm" > > > > DEPENDS += "libdrm udev wayland wayland-protocols libffi expat" > > @@ -56,6 +62,20 @@ do_install () { > > oe_runmake install DESTDIR=${D} TARGET_PRODUCT=${TARGET_PRODUCT} > > ln -sf libGLESv2.so.2 ${D}${libdir}/libGLESv2.so.1 > > > > + local without_sysvinit=${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'false', 'true', d)} > > + local with_udev=${@bb.utils.contains('PACKAGECONFIG', 'udev', 'true', 'false', d)} > > While "local" is supported by dash and ash and is not a strictly bashism, it's > still not part of the POSIX spec and should be avoided in the recipes: > https://www.shellcheck.net/wiki/SC3043 Makes sense. I was thrown off by seeing "local" used in a few recipes in Poky, but keeping this POSIX-compatible seems like a good idea. > > > > + # Delete initscript if it is not needed or would conflict with the udev rules > > + if $without_sysvinit || $with_udev; then > > + rm -rf ${D}${sysconfdir}/init.d > > + rmdir --ignore-fail-on-non-empty ${D}${sysconfdir} > > + fi > > + > > + if $with_udev; then > > + install -m644 -D ${WORKDIR}/pvrsrvkm.rules \ > > + ${D}${nonarch_base_libdir}/udev/rules.d/80-pvrsrvkm.rules > > + fi > > What happens when you use systemd with sysvinit PACKAGECONFIG that relies on > initscripts in init.d? If the "udev" PACKAGECONFIG of ti-sgx-ddk-um is set, no initscript is installed regardless of DISTRO_FEATURES, to avoid running pvrsrvctl twice on such systems. This configuration should work with any init system, as long as some udev implementation (systemd udev or eudev) is running (which should be ensured by the RRDEPENDS added by PACKAGECONFIG[udev]). udev will automatically load the kernel module based on modaliases, and then the rule will run pvrsrvctl. To allow building a system without udev, the "udev" PACKAGECONFIG can be disabled. If "sysvinit" is in DISTRO_FEATURES, "rc.pvr" will be installed and everything works like it always has. Setups without the "udev" PACKAGECONFIG *and* without "sysvinit" DISTRO_FEATURES will not work out-of-the-box. I decided to set the "udev" PACKAGECONFIG by default, as I consider it the most elegant solution, and it is also required by default by Xorg and Weston. Regards, Matthias > > > > chown -R root:root ${D} > > } > > > > @@ -63,6 +83,7 @@ FILES:${PN} = "${bindir}/*" > > FILES:${PN} += " ${libdir}/*" > > FILES:${PN} += "${includedir}/*" > > FILES:${PN} += "${sysconfdir}/*" > > +FILES:${PN} += "${nonarch_base_libdir}/udev/rules.d" > > > > INSANE_SKIP:${PN} += "dev-so ldflags useless-rpaths" > > INSANE_SKIP:${PN} += "already-stripped dev-deps" > > -- > > 2.34.1 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [meta-ti] [master/kirkstone][PATCH 2/2] ti-sgx-ddk-um: use udev for userspace initialization 2022-12-20 9:10 ` Matthias Schiffer @ 2023-02-23 1:38 ` Denys Dmytriyenko 2023-02-23 9:20 ` Matthias Schiffer 0 siblings, 1 reply; 11+ messages in thread From: Denys Dmytriyenko @ 2023-02-23 1:38 UTC (permalink / raw) To: Matthias Schiffer; +Cc: meta-ti So, testing the latest patch series, I started getting breakage on all SGX platforms: WARNING: tisdk-default-image-1.0-r0 do_rootfs: ti-sgx-ddk-um.postinst returned 1, marking as unpacked only, configuration required on target. ERROR: tisdk-default-image-1.0-r0 do_rootfs: Postinstall scriptlets of ['ti-sgx-ddk-um'] have failed. If the intention is to defer them to first boot, then please place them into pkg_postinst_ontarget:${PN} (). Deferring to first boot via 'exit 1' is no longer supported. Details of the failure are in /OE/arago-kirkstone/build/arago-tmp-default-glibc/work/am335x_evm-oe-linux-gnueabi/tisdk-default-image/1.0-r0/temp/log.do_rootfs. ERROR: Logfile of failure stored in: /OE/arago-kirkstone/build/arago-tmp-default-glibc/work/am335x_evm-oe-linux-gnueabi/tisdk-default-image/1.0-r0/temp/log.do_rootfs.156835 ERROR: Task (/OE/arago-kirkstone/sources/meta-arago/meta-arago-distro/recipes-core/images/tisdk-default-image.bb:do_rootfs) failed with exit code '1' WARNING: tisdk-default-image-1.0-r0 do_rootfs: ti-sgx-ddk-um.postinst returned 1, marking as unpacked only, configuration required on target. ERROR: tisdk-default-image-1.0-r0 do_rootfs: Postinstall scriptlets of ['ti-sgx-ddk-um'] have failed. If the intention is to defer them to first boot, then please place them into pkg_postinst_ontarget:${PN} (). Deferring to first boot via 'exit 1' is no longer supported. Details of the failure are in /OE/arago-kirkstone/build/arago-tmp-default-glibc/work/am57xx_evm-oe-linux-gnueabi/tisdk-default-image/1.0-r0/temp/log.do_rootfs. ERROR: Logfile of failure stored in: /OE/arago-kirkstone/build/arago-tmp-default-glibc/work/am57xx_evm-oe-linux-gnueabi/tisdk-default-image/1.0-r0/temp/log.do_rootfs.164346 ERROR: Task (/OE/arago-kirkstone/sources/meta-arago/meta-arago-distro/recipes-core/images/tisdk-default-image.bb:do_rootfs) failed with exit code '1' WARNING: tisdk-default-image-1.0-r0 do_rootfs: ti-sgx-ddk-um.postinst returned 1, marking as unpacked only, configuration required on target. ERROR: tisdk-default-image-1.0-r0 do_rootfs: Postinstall scriptlets of ['ti-sgx-ddk-um'] have failed. If the intention is to defer them to first boot, then please place them into pkg_postinst_ontarget:${PN} (). Deferring to first boot via 'exit 1' is no longer supported. Details of the failure are in /OE/arago-kirkstone/build/arago-tmp-default-glibc/work/am65xx_evm-oe-linux/tisdk-default-image/1.0-r0/temp/log.do_rootfs. ERROR: Logfile of failure stored in: /OE/arago-kirkstone/build/arago-tmp-default-glibc/work/am65xx_evm-oe-linux/tisdk-default-image/1.0-r0/temp/log.do_rootfs.159785 ERROR: Task (/OE/arago-kirkstone/sources/meta-arago/meta-arago-distro/recipes-core/images/tisdk-default-image.bb:do_rootfs) failed with exit code '1' Reverting this commit helps with the build: https://git.yoctoproject.org/meta-ti/commit/?h=kirkstone&id=f50f55102f926ba58ea22339a98e4239370af6c6 So far I didn't have time to dig deeper, though it's not obvious right away... -- Denys On Tue, Dec 20, 2022 at 10:10:41AM +0100, Matthias Schiffer wrote: > On Mon, 2022-12-19 at 16:00 -0500, Denys Dmytriyenko wrote: > > On Fri, Dec 16, 2022 at 02:01:39PM +0100, Matthias Schiffer wrote: > > > The ti-sgx-ddk driver requires an additional userspace initialization > > > step after the kernel module has probed the device. Without this > > > initialization, no EGL context can be created and Weston etc. will fail to > > > start. > > > > > > The driver package contains an init script, but this does not work on > > > systemd-based systems. > > > > Why? Please provide more details. Do you use systemd-compat-units? > > Ah, we are not using systemd-compat-units. So this commit message > should be more specific and mention that this is about pure systemd > systems without SysVinit compat. > > Given that /etc/init.d is empty except for "rc.pvr" in a simple Poky- > based setup with ti-sgx-ddk-um when "sysvinit" is not in > DISTRO_FEATURES, I understand that it is a good practice for packages > not to rely on systemd-compat-units. > > > > > > > > Introduce an enabled-by-default PACKAGECONFIG that > > > installs a udev rule instead to run the init command automatically when > > > the driver is loaded, solving the issue without depending on a specific > > > init system. > > > > > > udev reports several events when the pvrsrvkm module is loaded: > > > > > > - add event for the kernel module > > > - add events for two DRM devices > > > - bind event for the GPU platform device > > > > > > The DRM devices aren't nice to match on, and the kernel module add is > > > too early to run `pvrsrvctl --start`, so we trigger on the platform > > > device bind. > > > > > > Tested with Weston 9.0.0 on the AM65x-based TQ-Systems MBa65xx. > > > > > > Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> > > > --- > > > .../libgles/ti-sgx-ddk-um/pvrsrvkm.rules | 1 + > > > .../libgles/ti-sgx-ddk-um_1.17.4948957.bb | 23 ++++++++++++++++++- > > > 2 files changed, 23 insertions(+), 1 deletion(-) > > > create mode 100644 meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um/pvrsrvkm.rules > > > > > > diff --git a/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um/pvrsrvkm.rules b/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um/pvrsrvkm.rules > > > new file mode 100644 > > > index 00000000..e49fd9b8 > > > --- /dev/null > > > +++ b/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um/pvrsrvkm.rules > > > @@ -0,0 +1 @@ > > > +SUBSYSTEM=="platform", ACTION=="bind", ENV{DRIVER}=="pvrsrvkm", RUN+="/usr/bin/pvrsrvctl --start --no-module" > > > diff --git a/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb b/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb > > > index bd88d14d..2a8a0466 100644 > > > --- a/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb > > > +++ b/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb > > > @@ -14,7 +14,10 @@ PR = "r37" > > > > > > BRANCH = "ti-img-sgx/dunfell/${PV}" > > > > > > -SRC_URI = "git://git.ti.com/git/graphics/omap5-sgx-ddk-um-linux.git;protocol=https;branch=${BRANCH}" > > > +SRC_URI = " \ > > > + git://git.ti.com/git/graphics/omap5-sgx-ddk-um-linux.git;protocol=https;branch=${BRANCH} \ > > > + file://pvrsrvkm.rules \ > > > +" > > > SRCREV = "742cf38aba13e1ba1a910cf1f036a1a212c263b6" > > > > > > TARGET_PRODUCT:omap-a15 = "jacinto6evm" > > > @@ -27,6 +30,9 @@ INITSCRIPT_PARAMS = "defaults 8" > > > > > > inherit update-rc.d > > > > > > +PACKAGECONFIG ??= "udev" > > > +PACKAGECONFIG[udev] = ",,,udev" > > > + > > > PROVIDES += "virtual/egl virtual/libgles1 virtual/libgles2 virtual/libgbm" > > > > > > DEPENDS += "libdrm udev wayland wayland-protocols libffi expat" > > > @@ -56,6 +62,20 @@ do_install () { > > > oe_runmake install DESTDIR=${D} TARGET_PRODUCT=${TARGET_PRODUCT} > > > ln -sf libGLESv2.so.2 ${D}${libdir}/libGLESv2.so.1 > > > > > > + local without_sysvinit=${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'false', 'true', d)} > > > + local with_udev=${@bb.utils.contains('PACKAGECONFIG', 'udev', 'true', 'false', d)} > > > > While "local" is supported by dash and ash and is not a strictly bashism, it's > > still not part of the POSIX spec and should be avoided in the recipes: > > https://www.shellcheck.net/wiki/SC3043 > > Makes sense. I was thrown off by seeing "local" used in a few recipes > in Poky, but keeping this POSIX-compatible seems like a good idea. > > > > > > > > + # Delete initscript if it is not needed or would conflict with the udev rules > > > + if $without_sysvinit || $with_udev; then > > > + rm -rf ${D}${sysconfdir}/init.d > > > + rmdir --ignore-fail-on-non-empty ${D}${sysconfdir} > > > + fi > > > + > > > + if $with_udev; then > > > + install -m644 -D ${WORKDIR}/pvrsrvkm.rules \ > > > + ${D}${nonarch_base_libdir}/udev/rules.d/80-pvrsrvkm.rules > > > + fi > > > > What happens when you use systemd with sysvinit PACKAGECONFIG that relies on > > initscripts in init.d? > > If the "udev" PACKAGECONFIG of ti-sgx-ddk-um is set, no initscript is > installed regardless of DISTRO_FEATURES, to avoid running pvrsrvctl > twice on such systems. > > This configuration should work with any init system, as long as some > udev implementation (systemd udev or eudev) is running (which should be > ensured by the RRDEPENDS added by PACKAGECONFIG[udev]). udev will > automatically load the kernel module based on modaliases, and then the > rule will run pvrsrvctl. > > To allow building a system without udev, the "udev" PACKAGECONFIG can > be disabled. If "sysvinit" is in DISTRO_FEATURES, "rc.pvr" will be > installed and everything works like it always has. > > Setups without the "udev" PACKAGECONFIG *and* without "sysvinit" > DISTRO_FEATURES will not work out-of-the-box. > > I decided to set the "udev" PACKAGECONFIG by default, as I consider it > the most elegant solution, and it is also required by default by Xorg > and Weston. > > > Regards, > Matthias > > > > > > > > > chown -R root:root ${D} > > > } > > > > > > @@ -63,6 +83,7 @@ FILES:${PN} = "${bindir}/*" > > > FILES:${PN} += " ${libdir}/*" > > > FILES:${PN} += "${includedir}/*" > > > FILES:${PN} += "${sysconfdir}/*" > > > +FILES:${PN} += "${nonarch_base_libdir}/udev/rules.d" > > > > > > INSANE_SKIP:${PN} += "dev-so ldflags useless-rpaths" > > > INSANE_SKIP:${PN} += "already-stripped dev-deps" > > > -- > > > 2.34.1 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [meta-ti] [master/kirkstone][PATCH 2/2] ti-sgx-ddk-um: use udev for userspace initialization 2023-02-23 1:38 ` Denys Dmytriyenko @ 2023-02-23 9:20 ` Matthias Schiffer 2023-03-01 1:26 ` Denys Dmytriyenko 0 siblings, 1 reply; 11+ messages in thread From: Matthias Schiffer @ 2023-02-23 9:20 UTC (permalink / raw) To: Denys Dmytriyenko; +Cc: meta-ti On Wed, 2023-02-22 at 20:38 -0500, Denys Dmytriyenko wrote: > So, testing the latest patch series, I started getting breakage on all SGX > platforms: > > WARNING: tisdk-default-image-1.0-r0 do_rootfs: ti-sgx-ddk-um.postinst returned 1, marking as unpacked only, configuration required on target. > ERROR: tisdk-default-image-1.0-r0 do_rootfs: Postinstall scriptlets of ['ti-sgx-ddk-um'] have failed. If the intention is to defer them to first boot, > then please place them into pkg_postinst_ontarget:${PN} (). > Deferring to first boot via 'exit 1' is no longer supported. > Details of the failure are in /OE/arago-kirkstone/build/arago-tmp-default-glibc/work/am335x_evm-oe-linux-gnueabi/tisdk-default-image/1.0-r0/temp/log.do_rootfs. > ERROR: Logfile of failure stored in: /OE/arago-kirkstone/build/arago-tmp-default-glibc/work/am335x_evm-oe-linux-gnueabi/tisdk-default-image/1.0-r0/temp/log.do_rootfs.156835 > ERROR: Task (/OE/arago-kirkstone/sources/meta-arago/meta-arago-distro/recipes-core/images/tisdk-default-image.bb:do_rootfs) failed with exit code '1' > > > WARNING: tisdk-default-image-1.0-r0 do_rootfs: ti-sgx-ddk-um.postinst returned 1, marking as unpacked only, configuration required on target. > ERROR: tisdk-default-image-1.0-r0 do_rootfs: Postinstall scriptlets of ['ti-sgx-ddk-um'] have failed. If the intention is to defer them to first boot, > then please place them into pkg_postinst_ontarget:${PN} (). > Deferring to first boot via 'exit 1' is no longer supported. > Details of the failure are in /OE/arago-kirkstone/build/arago-tmp-default-glibc/work/am57xx_evm-oe-linux-gnueabi/tisdk-default-image/1.0-r0/temp/log.do_rootfs. > ERROR: Logfile of failure stored in: /OE/arago-kirkstone/build/arago-tmp-default-glibc/work/am57xx_evm-oe-linux-gnueabi/tisdk-default-image/1.0-r0/temp/log.do_rootfs.164346 > ERROR: Task (/OE/arago-kirkstone/sources/meta-arago/meta-arago-distro/recipes-core/images/tisdk-default-image.bb:do_rootfs) failed with exit code '1' > > > WARNING: tisdk-default-image-1.0-r0 do_rootfs: ti-sgx-ddk-um.postinst returned 1, marking as unpacked only, configuration required on target. > ERROR: tisdk-default-image-1.0-r0 do_rootfs: Postinstall scriptlets of ['ti-sgx-ddk-um'] have failed. If the intention is to defer them to first boot, > then please place them into pkg_postinst_ontarget:${PN} (). > Deferring to first boot via 'exit 1' is no longer supported. > Details of the failure are in /OE/arago-kirkstone/build/arago-tmp-default-glibc/work/am65xx_evm-oe-linux/tisdk-default-image/1.0-r0/temp/log.do_rootfs. > ERROR: Logfile of failure stored in: /OE/arago-kirkstone/build/arago-tmp-default-glibc/work/am65xx_evm-oe-linux/tisdk-default-image/1.0-r0/temp/log.do_rootfs.159785 > ERROR: Task (/OE/arago-kirkstone/sources/meta-arago/meta-arago-distro/recipes-core/images/tisdk-default-image.bb:do_rootfs) failed with exit code '1' > > > Reverting this commit helps with the build: > https://git.yoctoproject.org/meta-ti/commit/?h=kirkstone&id=f50f55102f926ba58ea22339a98e4239370af6c6 > > > So far I didn't have time to dig deeper, though it's not obvious right away... > Hi Denys, I assume that the failing postinst script must come from update- rc.d.bbclass, but without knowing what command in the script is failing it's difficult to say anything for certain. Would it be possible for you to make a ti-sgx-ddk-um RPM or similar from the failing build available for us to have a look at? What DISTRO_FEATURES is your build using? sysvinit, no systemd? Best regards, Matthias ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [meta-ti] [master/kirkstone][PATCH 2/2] ti-sgx-ddk-um: use udev for userspace initialization 2023-02-23 9:20 ` Matthias Schiffer @ 2023-03-01 1:26 ` Denys Dmytriyenko 2023-03-01 9:01 ` Matthias Schiffer 0 siblings, 1 reply; 11+ messages in thread From: Denys Dmytriyenko @ 2023-03-01 1:26 UTC (permalink / raw) To: Matthias Schiffer; +Cc: meta-ti On Thu, Feb 23, 2023 at 10:20:12AM +0100, Matthias Schiffer wrote: > On Wed, 2023-02-22 at 20:38 -0500, Denys Dmytriyenko wrote: > > So, testing the latest patch series, I started getting breakage on all SGX > > platforms: > > > > WARNING: tisdk-default-image-1.0-r0 do_rootfs: ti-sgx-ddk-um.postinst returned 1, marking as unpacked only, configuration required on target. > > ERROR: tisdk-default-image-1.0-r0 do_rootfs: Postinstall scriptlets of ['ti-sgx-ddk-um'] have failed. If the intention is to defer them to first boot, > > then please place them into pkg_postinst_ontarget:${PN} (). > > Deferring to first boot via 'exit 1' is no longer supported. > > Details of the failure are in /OE/arago-kirkstone/build/arago-tmp-default-glibc/work/am335x_evm-oe-linux-gnueabi/tisdk-default-image/1.0-r0/temp/log.do_rootfs. > > ERROR: Logfile of failure stored in: /OE/arago-kirkstone/build/arago-tmp-default-glibc/work/am335x_evm-oe-linux-gnueabi/tisdk-default-image/1.0-r0/temp/log.do_rootfs.156835 > > ERROR: Task (/OE/arago-kirkstone/sources/meta-arago/meta-arago-distro/recipes-core/images/tisdk-default-image.bb:do_rootfs) failed with exit code '1' > > > > > > WARNING: tisdk-default-image-1.0-r0 do_rootfs: ti-sgx-ddk-um.postinst returned 1, marking as unpacked only, configuration required on target. > > ERROR: tisdk-default-image-1.0-r0 do_rootfs: Postinstall scriptlets of ['ti-sgx-ddk-um'] have failed. If the intention is to defer them to first boot, > > then please place them into pkg_postinst_ontarget:${PN} (). > > Deferring to first boot via 'exit 1' is no longer supported. > > Details of the failure are in /OE/arago-kirkstone/build/arago-tmp-default-glibc/work/am57xx_evm-oe-linux-gnueabi/tisdk-default-image/1.0-r0/temp/log.do_rootfs. > > ERROR: Logfile of failure stored in: /OE/arago-kirkstone/build/arago-tmp-default-glibc/work/am57xx_evm-oe-linux-gnueabi/tisdk-default-image/1.0-r0/temp/log.do_rootfs.164346 > > ERROR: Task (/OE/arago-kirkstone/sources/meta-arago/meta-arago-distro/recipes-core/images/tisdk-default-image.bb:do_rootfs) failed with exit code '1' > > > > > > WARNING: tisdk-default-image-1.0-r0 do_rootfs: ti-sgx-ddk-um.postinst returned 1, marking as unpacked only, configuration required on target. > > ERROR: tisdk-default-image-1.0-r0 do_rootfs: Postinstall scriptlets of ['ti-sgx-ddk-um'] have failed. If the intention is to defer them to first boot, > > then please place them into pkg_postinst_ontarget:${PN} (). > > Deferring to first boot via 'exit 1' is no longer supported. > > Details of the failure are in /OE/arago-kirkstone/build/arago-tmp-default-glibc/work/am65xx_evm-oe-linux/tisdk-default-image/1.0-r0/temp/log.do_rootfs. > > ERROR: Logfile of failure stored in: /OE/arago-kirkstone/build/arago-tmp-default-glibc/work/am65xx_evm-oe-linux/tisdk-default-image/1.0-r0/temp/log.do_rootfs.159785 > > ERROR: Task (/OE/arago-kirkstone/sources/meta-arago/meta-arago-distro/recipes-core/images/tisdk-default-image.bb:do_rootfs) failed with exit code '1' > > > > > > Reverting this commit helps with the build: > > https://git.yoctoproject.org/meta-ti/commit/?h=kirkstone&id=f50f55102f926ba58ea22339a98e4239370af6c6 > > > > > > So far I didn't have time to dig deeper, though it's not obvious right away... > > > > Hi Denys, > > I assume that the failing postinst script must come from update- > rc.d.bbclass, but without knowing what command in the script is failing > it's difficult to say anything for certain. Would it be possible for > you to make a ti-sgx-ddk-um RPM or similar from the failing build > available for us to have a look at? > > What DISTRO_FEATURES is your build using? sysvinit, no systemd? Matthias, This is default Arago distro with both systemd and sysvinit in the DISTRO_FEATURES, and it generates IPKs. I looked at the corresponding postinst scripts and didn't see anything obvious. Unfortunately, I didn't have time to debug that further and had to switch to graphics updates. Part of it was updating SGX UM recipe and forcing rebuild, so I haven't seen any breakage since then. I might try reshuffling my patch queue in order to reproduce it, if I have time, to see if it was due to stale sstate or something similar. -- Denys ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [meta-ti] [master/kirkstone][PATCH 2/2] ti-sgx-ddk-um: use udev for userspace initialization 2023-03-01 1:26 ` Denys Dmytriyenko @ 2023-03-01 9:01 ` Matthias Schiffer 2023-03-01 21:48 ` Andrew Davis 0 siblings, 1 reply; 11+ messages in thread From: Matthias Schiffer @ 2023-03-01 9:01 UTC (permalink / raw) To: Denys Dmytriyenko; +Cc: meta-ti On Tue, 2023-02-28 at 20:26 -0500, Denys Dmytriyenko wrote: > On Thu, Feb 23, 2023 at 10:20:12AM +0100, Matthias Schiffer wrote: > > On Wed, 2023-02-22 at 20:38 -0500, Denys Dmytriyenko wrote: > > > So, testing the latest patch series, I started getting breakage on all SGX > > > platforms: > > > > > > WARNING: tisdk-default-image-1.0-r0 do_rootfs: ti-sgx-ddk-um.postinst returned 1, marking as unpacked only, configuration required on target. > > > ERROR: tisdk-default-image-1.0-r0 do_rootfs: Postinstall scriptlets of ['ti-sgx-ddk-um'] have failed. If the intention is to defer them to first boot, > > > then please place them into pkg_postinst_ontarget:${PN} (). > > > Deferring to first boot via 'exit 1' is no longer supported. > > > Details of the failure are in /OE/arago-kirkstone/build/arago-tmp-default-glibc/work/am335x_evm-oe-linux-gnueabi/tisdk-default-image/1.0-r0/temp/log.do_rootfs. > > > ERROR: Logfile of failure stored in: /OE/arago-kirkstone/build/arago-tmp-default-glibc/work/am335x_evm-oe-linux-gnueabi/tisdk-default-image/1.0-r0/temp/log.do_rootfs.156835 > > > ERROR: Task (/OE/arago-kirkstone/sources/meta-arago/meta-arago-distro/recipes-core/images/tisdk-default-image.bb:do_rootfs) failed with exit code '1' > > > > > > > > > WARNING: tisdk-default-image-1.0-r0 do_rootfs: ti-sgx-ddk-um.postinst returned 1, marking as unpacked only, configuration required on target. > > > ERROR: tisdk-default-image-1.0-r0 do_rootfs: Postinstall scriptlets of ['ti-sgx-ddk-um'] have failed. If the intention is to defer them to first boot, > > > then please place them into pkg_postinst_ontarget:${PN} (). > > > Deferring to first boot via 'exit 1' is no longer supported. > > > Details of the failure are in /OE/arago-kirkstone/build/arago-tmp-default-glibc/work/am57xx_evm-oe-linux-gnueabi/tisdk-default-image/1.0-r0/temp/log.do_rootfs. > > > ERROR: Logfile of failure stored in: /OE/arago-kirkstone/build/arago-tmp-default-glibc/work/am57xx_evm-oe-linux-gnueabi/tisdk-default-image/1.0-r0/temp/log.do_rootfs.164346 > > > ERROR: Task (/OE/arago-kirkstone/sources/meta-arago/meta-arago-distro/recipes-core/images/tisdk-default-image.bb:do_rootfs) failed with exit code '1' > > > > > > > > > WARNING: tisdk-default-image-1.0-r0 do_rootfs: ti-sgx-ddk-um.postinst returned 1, marking as unpacked only, configuration required on target. > > > ERROR: tisdk-default-image-1.0-r0 do_rootfs: Postinstall scriptlets of ['ti-sgx-ddk-um'] have failed. If the intention is to defer them to first boot, > > > then please place them into pkg_postinst_ontarget:${PN} (). > > > Deferring to first boot via 'exit 1' is no longer supported. > > > Details of the failure are in /OE/arago-kirkstone/build/arago-tmp-default-glibc/work/am65xx_evm-oe-linux/tisdk-default-image/1.0-r0/temp/log.do_rootfs. > > > ERROR: Logfile of failure stored in: /OE/arago-kirkstone/build/arago-tmp-default-glibc/work/am65xx_evm-oe-linux/tisdk-default-image/1.0-r0/temp/log.do_rootfs.159785 > > > ERROR: Task (/OE/arago-kirkstone/sources/meta-arago/meta-arago-distro/recipes-core/images/tisdk-default-image.bb:do_rootfs) failed with exit code '1' > > > > > > > > > Reverting this commit helps with the build: > > > https://git.yoctoproject.org/meta-ti/commit/?h=kirkstone&id=f50f55102f926ba58ea22339a98e4239370af6c6 > > > > > > > > > So far I didn't have time to dig deeper, though it's not obvious right away... > > > > > > > Hi Denys, > > > > I assume that the failing postinst script must come from update- > > rc.d.bbclass, but without knowing what command in the script is failing > > it's difficult to say anything for certain. Would it be possible for > > you to make a ti-sgx-ddk-um RPM or similar from the failing build > > available for us to have a look at? > > > > What DISTRO_FEATURES is your build using? sysvinit, no systemd? > > Matthias, > > This is default Arago distro with both systemd and sysvinit in the > DISTRO_FEATURES, and it generates IPKs. I looked at the corresponding > postinst scripts and didn't see anything obvious. > > Unfortunately, I didn't have time to debug that further and had to > switch to graphics updates. Part of it was updating SGX UM recipe > and forcing rebuild, so I haven't seen any breakage since then. > > I might try reshuffling my patch queue in order to reproduce it, if I > have time, to see if it was due to stale sstate or something similar. > Hi Denys, I believe I have seen stale sstate issues with postinst scripts before. IIRC, something like adding "unset pkg_postinst_ontarget_${PN}" to a bbappend didn't trigger a rebuild, but I never got around to check whether the bug was caused by postinst(_ontarget), unset, or a combination of both. According to my Git log, this must have been on WRL LTS18 / Yocto Thud though, so what you're seeing might also be an entirely different issue... Best regards, Matthias ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [meta-ti] [master/kirkstone][PATCH 2/2] ti-sgx-ddk-um: use udev for userspace initialization 2023-03-01 9:01 ` Matthias Schiffer @ 2023-03-01 21:48 ` Andrew Davis 2023-03-02 9:47 ` Matthias Schiffer 0 siblings, 1 reply; 11+ messages in thread From: Andrew Davis @ 2023-03-01 21:48 UTC (permalink / raw) To: Matthias Schiffer, Denys Dmytriyenko; +Cc: meta-ti On 3/1/23 3:01 AM, Matthias Schiffer wrote: > On Tue, 2023-02-28 at 20:26 -0500, Denys Dmytriyenko wrote: >> On Thu, Feb 23, 2023 at 10:20:12AM +0100, Matthias Schiffer wrote: >>> On Wed, 2023-02-22 at 20:38 -0500, Denys Dmytriyenko wrote: >>>> So, testing the latest patch series, I started getting breakage on all SGX >>>> platforms: >>>> >>>> WARNING: tisdk-default-image-1.0-r0 do_rootfs: ti-sgx-ddk-um.postinst returned 1, marking as unpacked only, configuration required on target. >>>> ERROR: tisdk-default-image-1.0-r0 do_rootfs: Postinstall scriptlets of ['ti-sgx-ddk-um'] have failed. If the intention is to defer them to first boot, >>>> then please place them into pkg_postinst_ontarget:${PN} (). >>>> Deferring to first boot via 'exit 1' is no longer supported. >>>> Details of the failure are in /OE/arago-kirkstone/build/arago-tmp-default-glibc/work/am335x_evm-oe-linux-gnueabi/tisdk-default-image/1.0-r0/temp/log.do_rootfs. >>>> ERROR: Logfile of failure stored in: /OE/arago-kirkstone/build/arago-tmp-default-glibc/work/am335x_evm-oe-linux-gnueabi/tisdk-default-image/1.0-r0/temp/log.do_rootfs.156835 >>>> ERROR: Task (/OE/arago-kirkstone/sources/meta-arago/meta-arago-distro/recipes-core/images/tisdk-default-image.bb:do_rootfs) failed with exit code '1' >>>> >>>> >>>> WARNING: tisdk-default-image-1.0-r0 do_rootfs: ti-sgx-ddk-um.postinst returned 1, marking as unpacked only, configuration required on target. >>>> ERROR: tisdk-default-image-1.0-r0 do_rootfs: Postinstall scriptlets of ['ti-sgx-ddk-um'] have failed. If the intention is to defer them to first boot, >>>> then please place them into pkg_postinst_ontarget:${PN} (). >>>> Deferring to first boot via 'exit 1' is no longer supported. >>>> Details of the failure are in /OE/arago-kirkstone/build/arago-tmp-default-glibc/work/am57xx_evm-oe-linux-gnueabi/tisdk-default-image/1.0-r0/temp/log.do_rootfs. >>>> ERROR: Logfile of failure stored in: /OE/arago-kirkstone/build/arago-tmp-default-glibc/work/am57xx_evm-oe-linux-gnueabi/tisdk-default-image/1.0-r0/temp/log.do_rootfs.164346 >>>> ERROR: Task (/OE/arago-kirkstone/sources/meta-arago/meta-arago-distro/recipes-core/images/tisdk-default-image.bb:do_rootfs) failed with exit code '1' >>>> >>>> >>>> WARNING: tisdk-default-image-1.0-r0 do_rootfs: ti-sgx-ddk-um.postinst returned 1, marking as unpacked only, configuration required on target. >>>> ERROR: tisdk-default-image-1.0-r0 do_rootfs: Postinstall scriptlets of ['ti-sgx-ddk-um'] have failed. If the intention is to defer them to first boot, >>>> then please place them into pkg_postinst_ontarget:${PN} (). >>>> Deferring to first boot via 'exit 1' is no longer supported. >>>> Details of the failure are in /OE/arago-kirkstone/build/arago-tmp-default-glibc/work/am65xx_evm-oe-linux/tisdk-default-image/1.0-r0/temp/log.do_rootfs. >>>> ERROR: Logfile of failure stored in: /OE/arago-kirkstone/build/arago-tmp-default-glibc/work/am65xx_evm-oe-linux/tisdk-default-image/1.0-r0/temp/log.do_rootfs.159785 >>>> ERROR: Task (/OE/arago-kirkstone/sources/meta-arago/meta-arago-distro/recipes-core/images/tisdk-default-image.bb:do_rootfs) failed with exit code '1' >>>> >>>> >>>> Reverting this commit helps with the build: >>>> https://git.yoctoproject.org/meta-ti/commit/?h=kirkstone&id=f50f55102f926ba58ea22339a98e4239370af6c6 >>>> >>>> >>>> So far I didn't have time to dig deeper, though it's not obvious right away... >>>> >>> >>> Hi Denys, >>> >>> I assume that the failing postinst script must come from update- >>> rc.d.bbclass, but without knowing what command in the script is failing >>> it's difficult to say anything for certain. Would it be possible for >>> you to make a ti-sgx-ddk-um RPM or similar from the failing build >>> available for us to have a look at? >>> >>> What DISTRO_FEATURES is your build using? sysvinit, no systemd? >> >> Matthias, >> >> This is default Arago distro with both systemd and sysvinit in the >> DISTRO_FEATURES, and it generates IPKs. I looked at the corresponding >> postinst scripts and didn't see anything obvious. >> >> Unfortunately, I didn't have time to debug that further and had to >> switch to graphics updates. Part of it was updating SGX UM recipe >> and forcing rebuild, so I haven't seen any breakage since then. >> >> I might try reshuffling my patch queue in order to reproduce it, if I >> have time, to see if it was due to stale sstate or something similar. >> > > Hi Denys, > > I believe I have seen stale sstate issues with postinst scripts before. > > IIRC, something like adding "unset pkg_postinst_ontarget_${PN}" to a > bbappend didn't trigger a rebuild, but I never got around to check > whether the bug was caused by postinst(_ontarget), unset, or a > combination of both. According to my Git log, this must have been on > WRL LTS18 / Yocto Thud though, so what you're seeing might also be an > entirely different issue... > I'm getting the error with a clean sstate. Seem it is related to update-rc.d. We should *not* inherit this class unless we have something deployed to init.d/ but your patch removes those files in the default case and so update-rc.d fails. inherit ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'update-rc.d', '', d)} Seems to help, but only handles the case when sysvinit is not used, not the case when udev in PACKAGECONFIG causes the initscript to be removed. That might require some more complex check. Andrew ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [meta-ti] [master/kirkstone][PATCH 2/2] ti-sgx-ddk-um: use udev for userspace initialization 2023-03-01 21:48 ` Andrew Davis @ 2023-03-02 9:47 ` Matthias Schiffer 0 siblings, 0 replies; 11+ messages in thread From: Matthias Schiffer @ 2023-03-02 9:47 UTC (permalink / raw) To: Andrew Davis; +Cc: meta-ti, Denys Dmytriyenko On Wed, 2023-03-01 at 15:48 -0600, Andrew Davis wrote: > On 3/1/23 3:01 AM, Matthias Schiffer wrote: > > On Tue, 2023-02-28 at 20:26 -0500, Denys Dmytriyenko wrote: > > > On Thu, Feb 23, 2023 at 10:20:12AM +0100, Matthias Schiffer wrote: > > > > On Wed, 2023-02-22 at 20:38 -0500, Denys Dmytriyenko wrote: > > > > > So, testing the latest patch series, I started getting breakage on all SGX > > > > > platforms: > > > > > > > > > > WARNING: tisdk-default-image-1.0-r0 do_rootfs: ti-sgx-ddk-um.postinst returned 1, marking as unpacked only, configuration required on target. > > > > > ERROR: tisdk-default-image-1.0-r0 do_rootfs: Postinstall scriptlets of ['ti-sgx-ddk-um'] have failed. If the intention is to defer them to first boot, > > > > > then please place them into pkg_postinst_ontarget:${PN} (). > > > > > Deferring to first boot via 'exit 1' is no longer supported. > > > > > Details of the failure are in /OE/arago-kirkstone/build/arago-tmp-default-glibc/work/am335x_evm-oe-linux-gnueabi/tisdk-default-image/1.0-r0/temp/log.do_rootfs. > > > > > ERROR: Logfile of failure stored in: /OE/arago-kirkstone/build/arago-tmp-default-glibc/work/am335x_evm-oe-linux-gnueabi/tisdk-default-image/1.0-r0/temp/log.do_rootfs.156835 > > > > > ERROR: Task (/OE/arago-kirkstone/sources/meta-arago/meta-arago-distro/recipes-core/images/tisdk-default-image.bb:do_rootfs) failed with exit code '1' > > > > > > > > > > > > > > > WARNING: tisdk-default-image-1.0-r0 do_rootfs: ti-sgx-ddk-um.postinst returned 1, marking as unpacked only, configuration required on target. > > > > > ERROR: tisdk-default-image-1.0-r0 do_rootfs: Postinstall scriptlets of ['ti-sgx-ddk-um'] have failed. If the intention is to defer them to first boot, > > > > > then please place them into pkg_postinst_ontarget:${PN} (). > > > > > Deferring to first boot via 'exit 1' is no longer supported. > > > > > Details of the failure are in /OE/arago-kirkstone/build/arago-tmp-default-glibc/work/am57xx_evm-oe-linux-gnueabi/tisdk-default-image/1.0-r0/temp/log.do_rootfs. > > > > > ERROR: Logfile of failure stored in: /OE/arago-kirkstone/build/arago-tmp-default-glibc/work/am57xx_evm-oe-linux-gnueabi/tisdk-default-image/1.0-r0/temp/log.do_rootfs.164346 > > > > > ERROR: Task (/OE/arago-kirkstone/sources/meta-arago/meta-arago-distro/recipes-core/images/tisdk-default-image.bb:do_rootfs) failed with exit code '1' > > > > > > > > > > > > > > > WARNING: tisdk-default-image-1.0-r0 do_rootfs: ti-sgx-ddk-um.postinst returned 1, marking as unpacked only, configuration required on target. > > > > > ERROR: tisdk-default-image-1.0-r0 do_rootfs: Postinstall scriptlets of ['ti-sgx-ddk-um'] have failed. If the intention is to defer them to first boot, > > > > > then please place them into pkg_postinst_ontarget:${PN} (). > > > > > Deferring to first boot via 'exit 1' is no longer supported. > > > > > Details of the failure are in /OE/arago-kirkstone/build/arago-tmp-default-glibc/work/am65xx_evm-oe-linux/tisdk-default-image/1.0-r0/temp/log.do_rootfs. > > > > > ERROR: Logfile of failure stored in: /OE/arago-kirkstone/build/arago-tmp-default-glibc/work/am65xx_evm-oe-linux/tisdk-default-image/1.0-r0/temp/log.do_rootfs.159785 > > > > > ERROR: Task (/OE/arago-kirkstone/sources/meta-arago/meta-arago-distro/recipes-core/images/tisdk-default-image.bb:do_rootfs) failed with exit code '1' > > > > > > > > > > > > > > > Reverting this commit helps with the build: > > > > > https://git.yoctoproject.org/meta-ti/commit/?h=kirkstone&id=f50f55102f926ba58ea22339a98e4239370af6c6 > > > > > > > > > > > > > > > So far I didn't have time to dig deeper, though it's not obvious right away... > > > > > > > > > > > > > Hi Denys, > > > > > > > > I assume that the failing postinst script must come from update- > > > > rc.d.bbclass, but without knowing what command in the script is failing > > > > it's difficult to say anything for certain. Would it be possible for > > > > you to make a ti-sgx-ddk-um RPM or similar from the failing build > > > > available for us to have a look at? > > > > > > > > What DISTRO_FEATURES is your build using? sysvinit, no systemd? > > > > > > Matthias, > > > > > > This is default Arago distro with both systemd and sysvinit in the > > > DISTRO_FEATURES, and it generates IPKs. I looked at the corresponding > > > postinst scripts and didn't see anything obvious. > > > > > > Unfortunately, I didn't have time to debug that further and had to > > > switch to graphics updates. Part of it was updating SGX UM recipe > > > and forcing rebuild, so I haven't seen any breakage since then. > > > > > > I might try reshuffling my patch queue in order to reproduce it, if I > > > have time, to see if it was due to stale sstate or something similar. > > > > > > > Hi Denys, > > > > I believe I have seen stale sstate issues with postinst scripts before. > > > > IIRC, something like adding "unset pkg_postinst_ontarget_${PN}" to a > > bbappend didn't trigger a rebuild, but I never got around to check > > whether the bug was caused by postinst(_ontarget), unset, or a > > combination of both. According to my Git log, this must have been on > > WRL LTS18 / Yocto Thud though, so what you're seeing might also be an > > entirely different issue... > > > > I'm getting the error with a clean sstate. Seem it is related to > update-rc.d. We should *not* inherit this class unless we have > something deployed to init.d/ but your patch removes those files > in the default case and so update-rc.d fails. > > inherit ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'update-rc.d', '', d)} > > Seems to help, but only handles the case when sysvinit is not used, > not the case when udev in PACKAGECONFIG causes the initscript to be > removed. That might require some more complex check. > > Andrew Ugh. I thought I had specifically verified that inheriting the class is fine even when the script is removed. I'll try to look into this as soon as possible, but I might not be able to make time before next week. Best regards, Matthias ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [meta-ti] [master/kirkstone][PATCH 1/2] treewide: replace leftover git://git.ti.com 2022-12-16 13:01 [master/kirkstone][PATCH 1/2] treewide: replace leftover git://git.ti.com Matthias Schiffer 2022-12-16 13:01 ` [master/kirkstone][PATCH 2/2] ti-sgx-ddk-um: use udev for userspace initialization Matthias Schiffer @ 2022-12-19 20:41 ` Denys Dmytriyenko 1 sibling, 0 replies; 11+ messages in thread From: Denys Dmytriyenko @ 2022-12-19 20:41 UTC (permalink / raw) To: Matthias Schiffer; +Cc: meta-ti On Fri, Dec 16, 2022 at 02:01:38PM +0100, Matthias Schiffer wrote: > These URIs have been updated in dunfell, but two instances were > forgotten in kirkstone/master. Huh, good catch! These 2 were indeed missed when porting the change from dunfell to kirkstone... > Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> Reviewed-by: Denys Dmytriyenko <denys@konsulko.com> > --- > .../recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb | 2 +- > meta-ti-extras/recipes-bsp/pru/pru-icss_git.bb | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb b/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb > index d0edf1fe..bd88d14d 100644 > --- a/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb > +++ b/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb > @@ -14,7 +14,7 @@ PR = "r37" > > BRANCH = "ti-img-sgx/dunfell/${PV}" > > -SRC_URI = "git://git.ti.com/graphics/omap5-sgx-ddk-um-linux.git;protocol=git;branch=${BRANCH}" > +SRC_URI = "git://git.ti.com/git/graphics/omap5-sgx-ddk-um-linux.git;protocol=https;branch=${BRANCH}" > SRCREV = "742cf38aba13e1ba1a910cf1f036a1a212c263b6" > > TARGET_PRODUCT:omap-a15 = "jacinto6evm" > diff --git a/meta-ti-extras/recipes-bsp/pru/pru-icss_git.bb b/meta-ti-extras/recipes-bsp/pru/pru-icss_git.bb > index cb2f8cc2..8a2cfdc6 100644 > --- a/meta-ti-extras/recipes-bsp/pru/pru-icss_git.bb > +++ b/meta-ti-extras/recipes-bsp/pru/pru-icss_git.bb > @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://PRU-Package-v6.1-Manifest.html;md5=1e37797ebe9254922f > inherit update-alternatives > > BRANCH = "master" > -SRC_URI = "git://git.ti.com/pru-software-support-package/pru-software-support-package.git;protocol=git;branch=${BRANCH}" > +SRC_URI = "git://git.ti.com/git/pru-software-support-package/pru-software-support-package.git;protocol=https;branch=${BRANCH}" > SRCREV = "ae1decf0b494b2904e6157e1379691ffc468f0cf" > > PV = "6.1.0" > -- > 2.34.1 ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2023-03-02 9:47 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-12-16 13:01 [master/kirkstone][PATCH 1/2] treewide: replace leftover git://git.ti.com Matthias Schiffer 2022-12-16 13:01 ` [master/kirkstone][PATCH 2/2] ti-sgx-ddk-um: use udev for userspace initialization Matthias Schiffer 2022-12-19 21:00 ` [meta-ti] " Denys Dmytriyenko 2022-12-20 9:10 ` Matthias Schiffer 2023-02-23 1:38 ` Denys Dmytriyenko 2023-02-23 9:20 ` Matthias Schiffer 2023-03-01 1:26 ` Denys Dmytriyenko 2023-03-01 9:01 ` Matthias Schiffer 2023-03-01 21:48 ` Andrew Davis 2023-03-02 9:47 ` Matthias Schiffer 2022-12-19 20:41 ` [meta-ti] [master/kirkstone][PATCH 1/2] treewide: replace leftover git://git.ti.com Denys Dmytriyenko
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.