bcoggs Posted January 18 Share Posted January 18 Armbianmonitor: https://paste.armbian.com/uhubovufeq We are trying to compile a modified kernel module for this version of Armbian downloaded in October When running it reports: $cat /etc/armbian-release # PLEASE DO NOT EDIT THIS FILE BOARD=orangepizero BOARD_NAME="Orange Pi Zero" BOARDFAMILY=sun8i BUILD_REPOSITORY_URL=https://github.com/armbian/build BUILD_REPOSITORY_COMMIT=ba704f4740 LINUXFAMILY=sunxi ARCH=arm IMAGE_TYPE=stable BOARD_TYPE=csc INITRD_ARCH=arm KERNEL_IMAGE_TYPE=zImage FORCE_BOOTSCRIPT_UPDATE= VENDOR=Armbian BOOTSCRIPT_FORCE_UPDATE="no" BOOTSCRIPT_DST="boot.cmd" VERSION=23.8.3 REVISION=23.8.3 BRANCH=current uname -a Linux orangepizero 6.1.53-current-sunxi #3 SMP Wed Sep 13 07:43:05 UTC 2023 armv7l GNU/Linux cat /boot/config-6.1.53-current-sunxi | grep -i MODULE_FORCE # CONFIG_MODULE_FORCE_LOAD is not set We assume that if CONFIG_MODULE_FORCE_LOAD is not set that modprobe --force will not work and we will have to compile with the exact headers. Note that we've also tried compiling on the target but : sudo apt-get install linux-headers-$(uname -r) Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable to locate package linux-headers-6.1.53-current-sunxi E: Couldn't find any package by glob 'linux-headers-6.1.53-current-sunxi' E: Couldn't find any package by regex 'linux-headers-6.1.53-current-sunxi' For cross-compiling, what branch/tag do we checkout from https://github.com/armbian/build that will result in the correct headers? Alternately how do we modify the .ko from a near-similar build to overcome CONFIG_MODULE_FORCE_LOAD not set? Thank you in advance! 0 Quote Link to comment Share on other sites More sharing options...
Igor Posted January 18 Share Posted January 18 4 hours ago, bcoggs said: Note that we've also tried compiling on the target but : sudo apt-get install linux-headers-$(uname -r) sudo armbian-config -> software -> headers install 0 Quote Link to comment Share on other sites More sharing options...
bcoggs Posted January 19 Author Share Posted January 19 Attempting to follow documentation on how to build kernel modules here fails https://docs.armbian.com/User-Guide_Advanced-Features/#how-to-build-a-wireless-driver armbian-config -> install kernel headers exit cd /usr/src/linux-headers-$(uname -r) make scripts cd git clone https://github.com/pvaret/rtl8192cu-fixes.git cd rtl8192cu-fixes make ARCH=arm make ARCH=arm CROSS_COMPILE= -C /lib/modules/6.1.53-current-sunxi/build M=/home/bartrack/tmp/rtl8192cu-fixes modules make[1]: Entering directory '/usr/lib/modules/6.1.53-current-sunxi/build' make[1]: *** No rule to make target 'modules'. Stop. make[1]: Leaving directory '/usr/lib/modules/6.1.53-current-sunxi/build' make: *** [Makefile:595: modules] Error 2 ls /usr/lib/modules/6.1.53-current-sunxi/build ./ ../ The problem appears to be that /usr/lib/modules/6.1.53-current-sunxi/build is empty. Where do I get the needed contents? 0 Quote Link to comment Share on other sites More sharing options...
Igor Posted January 19 Share Posted January 19 1 hour ago, bcoggs said: The problem appears to be that ... those sources are not compatible with modern Linux anymore. This documentation was written 4-5 years ago, so this example worked with kernel v4, perhaps v5. Mechanism wise, things works. https://paste.armbian.com/axeveqolex.bash 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.