Cannot use released kernel module for compile Openwrt

Question1:
Why can't I install build/distribution specific feed even my own build is same version as releases? Anyway to overcome this?

Upgrading kmod-mt7601u on root from 4.19.86+4.19.85-1-3 to 4.19.86+5.4-rc8-1-1...
Downloading http://downloads.openwrt.org/snapshots/targets/brcm2708/bcm2708/packages/kmod-mt7601u_4.19.86%2b5.4-rc8-1-1_arm_arm1176jzf-s_vfp.ipk

Collected errors:
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-mt7601u:
 * 	kernel (= 4.19.86-1-45ed73a630a4bec3328fc33ca1c2e1c2) * 
 * opkg_install_cmd: Cannot install package kmod-mt7601u.

Question2:
Anyone know why my compiled kernel module is 0 byte?

Because you're supposed to build those too.

2 Likes

I did, and it is installed

1 Like

so you want to install ... correction... upgrade... your compiled ( snapshot ) kernel-module with the one in the official opkg repo then... why?

opkg list-installed | grep '^kernel'

Just to understand how this work and found out released kmod does not always install in my own build even the kernel version is exact. Just want to know why some of the kernel modules will install, some not ? Can help to kill my curoisity?

prove it :ok_hand:

Both kernel version and compilation parameters must be exactly the same.

2 Likes

One is say, 4.14.96 which I compiled. At Luci, does a opkg update, isn't it Openwrt will find 4.14.96 kernel module and software ?

show us your kernel+vermagic... and the kernel+vermagic for the official repo... this is no guarantee... but unless you provide proof these match... this discussion is comparing apples with wood.

if you ever verify they match the next step... is to verify your git checkout hash...

prove these match and then your question becomes valid... if they don't match you have your answer... like @eduperez says;

  • they must match exactly...

( as can be found in many posts here... )

you need to compile and use your own modules...

2 Likes

I dont know why you asked me to prove kernel+vermagic when I said kernel version is exact. I missed the fact that there is vermagic which you should have guess this. :grinning:

you need to compile and use your own modules...

:+1: :+1:

Both kernel version and compilation parameters must be exactly the same.

This is the answer I need which I missed the "compilation parameter". Thank

vermagic is that 45ed73a630a4bec3328fc33ca1c2e1c2
and is a hash calculated from

  • all compilation options related to kernel, and
  • names of all kernel modules enabled in the kernel compilation .config (either =y or =m)

In practice, any change to the config makes the modules officially incompatible.

  • It is possible to compile individual modules later for a firmware if you have also compiled the static SDK and use that SDK for the kmod compilation (like eduperez does not mwlwifi driver kmods here in the forum)
  • It is practically impossible to compile a new kernel or full firmware and then try to use older kmods with opkg. The vermagic will differ
5 Likes

@hnyman Thank you for your explanation

Had a similar question -> thx for the answer -> will put this in the wiki's manual on build system usage