Some Linux distributions like to compress their modules.
Add support to detect this in a modutils / modprobe agnostic
way.
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
[refactor to just a single script]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
INSTALL_MOD_DIR=$(KMODDIR) $(KMODPATH_ARG) \
modules_install
@./scripts/blacklist.sh $(KLIB)/ $(KLIB)/$(KMODDIR)
+ @./scripts/compress_modules.sh $(KLIB)/$(KMODDIR)
@/sbin/depmod -ae
@echo
@echo Your backported driver modules should be installed now.
@echo Try loading them with modprobe.
@echo
# FIXME:
-# compress modules
# check depmod
# install/load/unload/... scripts?
# compat firmware class udev stuff
--- /dev/null
+#!/bin/bash
+
+set -e
+
+function mod_filename()
+{
+ which modinfo > /dev/null 2>&1
+ if [[ $? -eq 0 ]]; then
+ MOD_QUERY="modinfo -F filename"
+ else
+ MOD_QUERY="modprobe -l"
+ fi
+ mod_path="$($MOD_QUERY $1 | tail -1)"
+ echo $(basename "$mod_path")
+}
+
+test "$(mod_filename mac80211)" = "mac80211.ko.gz" &&
+ for driver in $(find "$1" -type f -name *.ko); do
+ gzip -9 $driver
+ done