-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improper archirecture detection #196
Comments
I have also tried adding |
Interesting! Can you provide a patch to fix the detection? Thanks. |
If I knew how to fix it, this would be a pull request, not an issue ;)
|
Got curious, checked out which
|
have you tried passing Example:
|
Yes, as mentioned above.
|
I now have some new information. I have been talking with some kernel maintainers, and the issue does in fact lie within DKMS.
There are two main takeaways here:
To start you off, the current arch detection code is here: Lines 271 to 276 in 1194db8
|
exactly. kernel do some thing about arch like following: SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \
-e s/sun4u/sparc64/ \
-e s/arm.*/arm/ -e s/sa110/arm/ \
-e s/s390x/s390/ \
-e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
-e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ \
-e s/riscv.*/riscv/ -e s/loongarch.*/loongarch/)
ARCH ?= $(SUBARCH)
ifeq ($(ARCH),x86_64)
SRCARCH := x86
endif |
I'm trying to build some modules on my Allwinner Nezha D1 running Arch Linux for RISC-V, and I get this error every time I try:
Makefile:702: arch/riscv64/Makefile: No such file or directory
Looking at the build command, it's using
ARCH=riscv64
which makes it look forarch/riscv64
in the kernel source. I'm assuming it gets this fromuname
which lists the architecture asriscv64
.The kernel's name for RISC-V, both 32 and 64 bit, is riscv, so it should be looking in
arch/riscv
instead.Considering that on x86_64 DKMS knows to look in
arch/x86
instead ofarch/x86_64
, I'm assuming we already have this logic in place, just not for RISC-V yet.The text was updated successfully, but these errors were encountered: