Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Building Kernel modules that work with official distributions

Featured Replies

We are trying to compile a modified kernel module for this version of Armbian downloaded in October

image.png.18ecd8aced246c80601e603f74265abd.png

 

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!

 

 

  • Author

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?

 

 

 

 

 

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.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.