Following up, I've not forgotten about this. I'm still investigating things.
--Mark On 4/15/21 2:47 AM, Mike Looijmans wrote: > Yes, I'm really sure this needs fixing. > > The PACAKAGE_ARCH is not about requirements that you'd need to fulfill to > build the module, it's about what kind of target you need to install the > resulting package on. > > I've ran into the same issue years ago when I tried sharing kernel modules > and > such on the 7-series, since they all have the same PS part, I figured that > they could all share the kernel and modules and anything else PS related. So > like Xilinx, I added an extra override somewhere between machine and CPU > arch, > and set the package arch to that. This appeared to work, but lead to very > subtle problems. Most noticably, switching machines would lead to losts of > setscene tasks re-running. Removing that inbetween "arch" solved it. > > I don't have the error message. The issue is very hard to reproduce, but once > it occurs the only fix is to remove the tmp directory and start over. To get > the error, the things you probably need to do is build for some machine A, > build for machine B, then modify the kernel for A, and then build B again. I > tried that sequence but failed to reproduce it. I've had it happen about > three > times in the past and it took me a while to figure out. > > I cannot think of a reason not to apply this patch. The PACKAGE_ARCH is > wrong, > regardless of whether it is causing this bug or not. PACKAGE_ARCH for kernel > modules must be the same as the kernel. One machine may be using a completely > different kernel version than the other, just to name one thing that could > easily go wrong. > > (I suspect that all the PACKAGE_ARCH=SOC_ARCH style assignments should be > removed or replaced with MACHINE too. But this mainly applies to the GPU > stuff > which I've managed to avoid so far and which is a dependency nightmare > already) > > Mike. > > > > > Met vriendelijke groet / kind regards, > > Mike Looijmans > System Expert > > > TOPIC Embedded Products B.V. > Materiaalweg 4, 5681 RJ Best > The Netherlands > > T: +31 (0) 499 33 69 69 > E: [email protected] > W: www.topic.nl > > Please consider the environment before printing this e-mail > On 14-04-2021 22:35, Mark Hatle wrote: >> Are you sure in this case? This is an external set of modules. In the past >> they were pretty independent of the kernel configurations. >> >> On 4/14/21 3:00 AM, Mike Looijmans wrote: >>> The kernel-module recipes set PACKAGE_ARCH = "${SOC_FAMILY_ARCH}" which is >>> broken >>> because kernel modules depend on the kernel which is MACHINE specific. The >>> assignment claims that you could use a kernel module built for some other >>> board >>> for any other zynqmp board, which is not true since their kernel versions >>> and >>> configuration will differ. >>> >>> Remove the assignment so that the kernel module becomes MACHINE_ARCH again. >>> >>> This solves issues with kernel modules that refuse to install during the >>> do_rootfs stage, and various setscene tasks running over and again when >>> switching between MACHINEs. >> >> Do you have an example of the error message(s)? I've not seen failures to >> install.. rebuilds, I have, but the hash equivalency takes care of that. >> >> --Mark >> >>> Signed-off-by: Mike Looijmans <[email protected]> >>> --- >>> meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali.bb | 2 -- >>> meta-xilinx-bsp/recipes-kernel/dp/kernel-module-dp_git.bb | 2 -- >>> meta-xilinx-bsp/recipes-kernel/hdmi/kernel-module-hdmi_git.bb | 2 -- >>> meta-xilinx-bsp/recipes-multimedia/vcu/kernel-module-vcu.bb | 2 -- >>> 4 files changed, 8 deletions(-) >>> >>> diff --git a/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali.bb >>> b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali.bb >>> index 747ec72..c4f7eff 100644 >>> --- a/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali.bb >>> +++ b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali.bb >>> @@ -40,8 +40,6 @@ COMPATIBLE_MACHINE = "^$" >>> COMPATIBLE_MACHINE_zynqmpeg = "zynqmpeg" >>> COMPATIBLE_MACHINE_zynqmpev = "zynqmpev" >>> >>> -PACKAGE_ARCH = "${SOC_VARIANT_ARCH}" >>> - >>> EXTRA_OEMAKE = 'KDIR="${STAGING_KERNEL_DIR}" \ >>> ARCH="${ARCH}" \ >>> BUILD=release \ >>> diff --git a/meta-xilinx-bsp/recipes-kernel/dp/kernel-module-dp_git.bb >>> b/meta-xilinx-bsp/recipes-kernel/dp/kernel-module-dp_git.bb >>> index e5356d8..9a83cc0 100755 >>> --- a/meta-xilinx-bsp/recipes-kernel/dp/kernel-module-dp_git.bb >>> +++ b/meta-xilinx-bsp/recipes-kernel/dp/kernel-module-dp_git.bb >>> @@ -22,5 +22,3 @@ EXTRA_OEMAKE += "O=${STAGING_KERNEL_BUILDDIR}" >>> COMPATIBLE_MACHINE = "^$" >>> COMPATIBLE_MACHINE_zynqmp = "zynqmp" >>> COMPATIBLE_MACHINE_versal = "versal" >>> - >>> -PACKAGE_ARCH = "${SOC_FAMILY_ARCH}" >>> diff --git a/meta-xilinx-bsp/recipes-kernel/hdmi/kernel-module-hdmi_git.bb >>> b/meta-xilinx-bsp/recipes-kernel/hdmi/kernel-module-hdmi_git.bb >>> index b26ecd9..4b21fd4 100644 >>> --- a/meta-xilinx-bsp/recipes-kernel/hdmi/kernel-module-hdmi_git.bb >>> +++ b/meta-xilinx-bsp/recipes-kernel/hdmi/kernel-module-hdmi_git.bb >>> @@ -22,5 +22,3 @@ EXTRA_OEMAKE += "O=${STAGING_KERNEL_BUILDDIR}" >>> COMPATIBLE_MACHINE = "^$" >>> COMPATIBLE_MACHINE_zynqmp = "zynqmp" >>> COMPATIBLE_MACHINE_versal = "versal" >>> - >>> -PACKAGE_ARCH = "${SOC_FAMILY_ARCH}" >>> diff --git a/meta-xilinx-bsp/recipes-multimedia/vcu/kernel-module-vcu.bb >>> b/meta-xilinx-bsp/recipes-multimedia/vcu/kernel-module-vcu.bb >>> index 817aa38..b3f88a8 100644 >>> --- a/meta-xilinx-bsp/recipes-multimedia/vcu/kernel-module-vcu.bb >>> +++ b/meta-xilinx-bsp/recipes-multimedia/vcu/kernel-module-vcu.bb >>> @@ -25,6 +25,4 @@ RDEPENDS_${PN} = "vcu-firmware" >>> COMPATIBLE_MACHINE = "^$" >>> COMPATIBLE_MACHINE_zynqmp = "zynqmp" >>> >>> -PACKAGE_ARCH = "${SOC_FAMILY_ARCH}" >>> - >>> KERNEL_MODULE_AUTOLOAD += "dmaproxy" >>> >>> >>> >>> >>> > > > > >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#4888): https://lists.yoctoproject.org/g/meta-xilinx/message/4888 Mute This Topic: https://lists.yoctoproject.org/mt/82086114/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/meta-xilinx/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
