Skip to content

Instantly share code, notes, and snippets.

@wizonesolutions
Created July 2, 2019 11:17
Show Gist options
  • Save wizonesolutions/5cd9f323b332938efc6adda3b7700517 to your computer and use it in GitHub Desktop.
Save wizonesolutions/5cd9f323b332938efc6adda3b7700517 to your computer and use it in GitHub Desktop.
dkms.conf for backport-iwlwifi

To use this, first ensure you can build the kernel modules as detailed on https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi/core_release

git checkout release/core46 # or whatever release you're using; this documentation will assume core46.

A make command, a sed command, and another make command. DON'T INSTALL YET (we'll do that with DKMS).

Now, make sure your cloned repo is located at /usr/src/iwlwifi-release-core46. Then:

sudo dkms add -m iwlwifi -v release-core46
sudo dkms build -m iwlwifi -v release-core46
sudo dkms install -m iwlwifi -v release-core46

Note that after the build command, DKMS will generate a MOK signing key so that your module will work with Secure Boot. A screen will come up and ask you to enter a password. It can be anything, just remember it.

Then, on boot, click "Enroll key," "Continue," (view the key if you want), enter the key password, and then "Reboot." The module should now load successfully after reboot. And, in theory, they should get rebuilt and reinstalled whenever the kernel gets updated! I'll know soon whether this actually works or not...

# See https://www.one-tab.com/page/9cT2lgXRTsOq-JH0TrA_ww for links I referred to while making this.
PACKAGE_NAME="iwlwifi"
PACKAGE_VERSION="release-core46"
CLEAN="echo 'Refusing to clean, as it breaks the build.'"
MAKE[0]="'make' defconfig-iwlwifi-public && sed -i 's/CPTCFG_IWLMVM_VENDOR_CMDS=y/# CPTCFG_IWLMVM_VENDOR_CMDS is not set/' ../source/.config && make -j4"
BUILT_MODULE_NAME[0]="compat"
BUILT_MODULE_LOCATION[0]="compat"
DEST_MODULE_LOCATION[0]="/updates"
BUILT_MODULE_NAME[1]="iwlwifi"
BUILT_MODULE_LOCATION[1]="drivers/net/wireless/intel/iwlwifi"
DEST_MODULE_LOCATION[1]="/updates"
BUILT_MODULE_NAME[2]="iwlmvm"
BUILT_MODULE_LOCATION[2]="drivers/net/wireless/intel/iwlwifi/mvm"
DEST_MODULE_LOCATION[2]="/updates"
BUILT_MODULE_NAME[3]="iwlxvt"
BUILT_MODULE_LOCATION[3]="drivers/net/wireless/intel/iwlwifi/xvt"
DEST_MODULE_LOCATION[3]="/updates"
BUILT_MODULE_NAME[4]="mac80211"
BUILT_MODULE_LOCATION[4]="net/mac80211"
DEST_MODULE_LOCATION[4]="/updates"
BUILT_MODULE_NAME[5]="cfg80211"
BUILT_MODULE_LOCATION[5]="net/wireless"
DEST_MODULE_LOCATION[5]="/updates"
AUTOINSTALL="yes"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment