From: Prarit Bhargava prarit@redhat.com
redhat/Makefile.cross: Fix ppc64le cross build targets
I keep forgetting to push this. The cross targets are currently available only for ppc64, not ppc64le.
Fix the ppc64le cross build targets.
Signed-off-by: Prarit Bhargava prarit@redhat.com
diff --git a/redhat/Makefile.cross b/redhat/Makefile.cross index blahblah..blahblah 100644 --- a/redhat/Makefile.cross +++ b/redhat/Makefile.cross @@ -6,13 +6,13 @@ CROSS_PACKAGE_LIST = \
ifeq ($(ARCH),arm64) CROSS_PACKAGE_LIST += binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu -else ifeq ($(ARCH),powerpc) -CROSS_PACKAGE_LIST += binutils-powerpc64-linux-gnu gcc-powerpc64-linux-gnu +else ifeq ($(ARCH),ppc64le) +CROSS_PACKAGE_LIST += binutils-ppc64le-linux-gnu gcc-ppc64le-linux-gnu else ifeq ($(ARCH),s390) CROSS_PACKAGE_LIST += binutils-s390x-linux-gnu gcc-s390x-linux-gnu else CROSS_PACKAGE_LIST += binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu -CROSS_PACKAGE_LIST += binutils-powerpc64-linux-gnu gcc-powerpc64-linux-gnu +CROSS_PACKAGE_LIST += binutils-ppc64le-linux-gnu gcc-ppc64le-linux-gnu CROSS_PACKAGE_LIST += binutils-s390x-linux-gnu gcc-s390x-linux-gnu endif
@@ -25,47 +25,47 @@ dist-cross-download: $(REDHAT)/scripts/cross-compile/download_cross.sh $(CROSS_PACKAGE_LIST)
dist-cross-aarch64-rpms: dist-cross-download dist-sources - $(REDHAT)/scripts/cross_compile/x86_rngd.sh + $(REDHAT)/scripts/cross-compile/x86_rngd.sh $(CROSS_RPMFLAGS) --target aarch64 --with cross -ba $(RPM)/SOURCES/$(SPECFILE) $(REDHAT)/scripts/cross-compile/generate-cross-report.sh "aarch64"
-dist-cross-ppc64-rpms: dist-cross-download dist-sources - $(REDHAT)/scripts/cross_compile/x86_rngd.sh - $(CROSS_RPMFLAGS) --target ppc64 --with cross -ba $(RPM)/SOURCES/$(SPECFILE) +dist-cross-ppc64le-rpms: dist-cross-download dist-sources + $(REDHAT)/scripts/cross-compile/x86_rngd.sh + $(CROSS_RPMFLAGS) --target ppc64le --with cross -ba $(RPM)/SOURCES/$(SPECFILE) $(REDHAT)/scripts/cross-compile/generate-cross-report.sh "ppc64"
dist-cross-s390x-rpms: dist-cross-download dist-sources - $(REDHAT)/scripts/cross_compile/x86_rngd.sh + $(REDHAT)/scripts/cross-compile/x86_rngd.sh $(CROSS_RPMFLAGS) --target s390x --with cross -ba $(RPM)/SOURCES/$(SPECFILE) $(REDHAT)/scripts/cross-compile/generate-cross-report.sh "s390x"
dist-cross-all-rpms: dist-cross-download dist-sources - $(REDHAT)/scripts/cross_compile/x86_rngd.sh + $(REDHAT)/scripts/cross-compile/x86_rngd.sh $(CROSS_RPMFLAGS) --target aarch64 --with cross -ba $(RPM)/SOURCES/$(SPECFILE) - $(CROSS_RPMFLAGS) --target ppc64 --with cross -ba $(RPM)/SOURCES/$(SPECFILE) + $(CROSS_RPMFLAGS) --target ppc64le --with cross -ba $(RPM)/SOURCES/$(SPECFILE) $(CROSS_RPMFLAGS) --target s390x --with cross -ba $(RPM)/SOURCES/$(SPECFILE) $(CROSS_RPMFLAGS) -ba $(RPM)/SOURCES/$(SPECFILE) $(REDHAT)/scripts/cross-compile/generate-cross-report.sh "aarch64 ppc64 s390x x86_64"
dist-cross-aarch64-build: dist-cross-download dist-sources - $(REDHAT)/scripts/cross_compile/x86_rngd.sh + $(REDHAT)/scripts/cross-compile/x86_rngd.sh $(CROSS_RPMFLAGS) --target aarch64 --with cross --without debuginfo -bc $(RPM)/SOURCES/$(SPECFILE) $(REDHAT)/scripts/cross-compile/generate-cross-report.sh "aarch64"
-dist-cross-ppc64-build: dist-cross-download dist-sources - $(REDHAT)/scripts/cross_compile/x86_rngd.sh - $(CROSS_RPMFLAGS) --target ppc64 --with cross --without debuginfo -bc $(RPM)/SOURCES/$(SPECFILE) - $(REDHAT)/scripts/cross-compile/generate-cross-report.sh "ppc64" +dist-cross-ppc64le-build: dist-cross-download dist-sources + $(REDHAT)/scripts/cross-compile/x86_rngd.sh + $(CROSS_RPMFLAGS) --target ppc64le --with cross --without debuginfo -bc $(RPM)/SOURCES/$(SPECFILE) + $(REDHAT)/scripts/cross-compile/generate-cross-report.sh "ppc64le"
dist-cross-s390x-build: dist-cross-download dist-sources - $(REDHAT)/scripts/cross_compile/x86_rngd.sh + $(REDHAT)/scripts/cross-compile/x86_rngd.sh $(CROSS_RPMFLAGS) --target s390x --with cross --without debuginfo -bc $(RPM)/SOURCES/$(SPECFILE) $(REDHAT)/scripts/cross-compile/generate-cross-report.sh "s390x"
dist-cross-all-builds: dist-cross-download dist-sources - $(REDHAT)/scripts/cross_compile/x86_rngd.sh + $(REDHAT)/scripts/cross-compile/x86_rngd.sh $(CROSS_RPMFLAGS) --target aarch64 --with cross --without debuginfo -bc $(RPM)/SOURCES/$(SPECFILE) - $(CROSS_RPMFLAGS) --target ppc64 --with cross --without debuginfo -bc $(RPM)/SOURCES/$(SPECFILE) + $(CROSS_RPMFLAGS) --target ppc64le --with cross --without debuginfo -bc $(RPM)/SOURCES/$(SPECFILE) $(CROSS_RPMFLAGS) --target s390x --with cross --without debuginfo -bc $(RPM)/SOURCES/$(SPECFILE) $(CROSS_RPMFLAGS) --without debuginfo -bc $(RPM)/SOURCES/$(SPECFILE) - $(REDHAT)/scripts/cross-compile/generate-cross-report.sh "aarch64 ppc64 s390x x86_64" + $(REDHAT)/scripts/cross-compile/generate-cross-report.sh "aarch64 ppc64le s390x x86_64"
-- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2613
From: Prarit Bhargava on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2613#note_1497632...
I've fixed this in a new push.
From: Prarit Bhargava on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2613#note_1497634...
Even with these fixes I get a strange depmod error that is unrelated to the fixing of the Makefile:
``` + depmod -b . -aeF ./System.map 6.5.0-0.rc2.17.test.fc38.ppc64le + '[' -s depmod.out ']' + echo 'Depmod failure' Depmod failure + cat depmod.out depmod: WARNING: /root/rpmbuild/BUILDROOT/kernel-6.5.0-0.rc2.17.test.fc38.ppc6 4le/./lib/modules/6.5.0-0.rc2.17.test.fc38.ppc64le/kernel/drivers/ptp/ptp_dfl_ tod.ko needs unknown symbol __dfl_driver_register depmod: WARNING: /root/rpmbuild/BUILDROOT/kernel-6.5.0-0.rc2.17.test.fc38.ppc6 4le/./lib/modules/6.5.0-0.rc2.17.test.fc38.ppc64le/kernel/drivers/ptp/ptp_dfl_ tod.ko needs unknown symbol dfl_driver_unregister + exit 1 error: Bad exit status from /var/tmp/rpm-tmp.97Xt7z (%build)
```
The other arches seem to build correctly. I'm digging into this and will submit another MR to resolve it.
From: Jan Stancek on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2613#note_1497795...
I think arch (the kernel one) here was correct as `powerpc`.
From: Patrick Talbert on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2613#note_1498226...
That is odd. `fpga` is one of the `driverdirs` for `filter-ppc64le.sh.fedora` and `ptp_dfl_tod` is in the `singlemods` list so they should both be in the same place; there are not any overrides.
Is cross-compiling using the right filter file?
From: Thorsten Leemhuis on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2613#note_1498752...
Jumping in here to do some advertisement for an issue I recently filed that up to now didn't get a single reply:
These `needs unknown symbol` problems seem to happen often enough to be somewhat annoying to some of us afaics. That's why I started to wonder if we could partly automate moving modules into a sesperate package that depend on something that is moved there.
That made me find existing code in another code-path used in the spec file that afaics walks the list of modules and moves those over that depend on something that is moved over. But it's kinda broken. See https://gitlab.com/cki-project/kernel-ark/-/issues/121 for details; maybe once we get this to work in that code path and could used it for the filter case as well. Of course carefully (e.g. it should still fail if said code would have to move lot's of modules)
From: Prarit Bhargava on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2613#note_1498763...
From my quick testing, it seems like ARCH isn't even set here? I'll dig into it but I thought the arch list was "aarch64 ppc64le s390x x86_64", which would imply the above should be 'ppc64le'.
I have a funny feeling that this code 'just works' in spite of it being out of date wrt to the rest of the Makefile work. This may explode into a complete reworking of the download script.
From: Prarit Bhargava on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2613#note_1498764...
It's obviously been a while since anyone has run 'make dist-cross-download' ;)
kernel@lists.fedoraproject.org