简体   繁体   中英

How to make DKMS pass the right ARCH to 'make'?

I'm trying to use DKMS to build a module. My problem is that I cannot seem to make DKMS pass the right ARCH to 'make'. It keeps using the architecture of the my OS's kernel which is armv7l. But there's no map
/usr/src/linux/arch/armv7l
It needs to look inside
/usr/src/linux/arch/arm

I have tried passing -a arm, -k 4.4.21-v7+/arm as arguments to 'dkms build', but it doesn't pass that down to 'make'. Adding BUILD_EXCLUSIVE_ARCH="arm" to /usr/src/rtl8812AU-4.3.14/dkms.conf also makes no difference.

sudo dkms build -m ${DRV_NAME} -v ${DRV_VERSION} -k 4.4.21-v7+/arm

Kernel preparation unnecessary for this kernel. Skipping...

Building module:
cleaning build area....
'make'....(bad exit status: 2)
Error! Bad return status for module build on kernel: 4.4.21-v7+ (arm)
Consult /var/lib/dkms/rtl8812AU/4.3.14/build/make.log for more information.

cat /var/lib/dkms/rtl8812AU/4.3.14/build/make.log

DKMS make.log for rtl8812AU-4.3.14 for kernel 4.4.21-v7+ (arm)
Thu Sep 29 16:36:07 UTC 2016
make ARCH=armv7l CROSS_COMPILE= -C /lib/modules/4.4.21-v7+/build M=/var/lib/dkms/rtl8812AU/4.3.14/build modules
make[1]: Entering directory '/usr/src/linux'
Makefile:606: arch/armv7l/Makefile: No such file or directory
make[1]: No rule to make target 'arch/armv7l/Makefile'. Stop.
make[1]: Leaving directory '/usr/src/linux'
Makefile:1576: recipe for target 'modules' failed
make: [modules] Error 2

How to solve this?
Thank you already

I solved this problem on a Raspberry Pi 2 with Ubuntu Mate (16.04) by symlinking the arm directory:

sudo ln -s arm armv7l

Dirty hack, but it works :)

You can pass arch by -a, --arch like this:

dkms install rtl8188fu/1.0 -j 4-a arm

Read more on man page by running man dkms or find it here:

http://manpages.ubuntu.com/manpages/bionic/man8/dkms.8.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM