add xz compression for kernel modules
parent
e38fcc8608
commit
7fffc9f11f
|
|
@ -984,6 +984,7 @@ filter_kernel_modules_by_path () (
|
||||||
if ! [[ $hostonly ]]; then
|
if ! [[ $hostonly ]]; then
|
||||||
_filtercmd='find "$srcmods/kernel/$1" "$srcmods/extra"'
|
_filtercmd='find "$srcmods/kernel/$1" "$srcmods/extra"'
|
||||||
_filtercmd+=' "$srcmods/weak-updates" -name "*.ko" -o -name "*.ko.gz"'
|
_filtercmd+=' "$srcmods/weak-updates" -name "*.ko" -o -name "*.ko.gz"'
|
||||||
|
_filtercmd+=' -o -name "*.ko.xz"'
|
||||||
_filtercmd+=' 2>/dev/null'
|
_filtercmd+=' 2>/dev/null'
|
||||||
else
|
else
|
||||||
_filtercmd='cut -d " " -f 1 </proc/modules|xargs modinfo -F filename '
|
_filtercmd='cut -d " " -f 1 </proc/modules|xargs modinfo -F filename '
|
||||||
|
|
@ -996,13 +997,17 @@ filter_kernel_modules_by_path () (
|
||||||
$2 $initdir/$$.ko && echo "$_modname"
|
$2 $initdir/$$.ko && echo "$_modname"
|
||||||
rm -f $initdir/$$.ko
|
rm -f $initdir/$$.ko
|
||||||
;;
|
;;
|
||||||
|
*.ko.xz) xz -dc "$_modname" > $initdir/$$.ko
|
||||||
|
$2 $initdir/$$.ko && echo "$_modname"
|
||||||
|
rm -f $initdir/$$.ko
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
)
|
)
|
||||||
find_kernel_modules_by_path () (
|
find_kernel_modules_by_path () (
|
||||||
if ! [[ $hostonly ]]; then
|
if ! [[ $hostonly ]]; then
|
||||||
find "$srcmods/kernel/$1" "$srcmods/extra" "$srcmods/weak-updates" \
|
find "$srcmods/kernel/$1" "$srcmods/extra" "$srcmods/weak-updates" \
|
||||||
-name "*.ko" -o -name "*.ko.gz" 2>/dev/null
|
-name "*.ko" -o -name "*.ko.gz" -o -name "*.ko.xz" 2>/dev/null
|
||||||
else
|
else
|
||||||
cut -d " " -f 1 </proc/modules \
|
cut -d " " -f 1 </proc/modules \
|
||||||
| xargs modinfo -F filename -k $kernel 2>/dev/null
|
| xargs modinfo -F filename -k $kernel 2>/dev/null
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@ installkernel() {
|
||||||
case "$_fname" in
|
case "$_fname" in
|
||||||
*.ko) _fcont="$(< $_fname)" ;;
|
*.ko) _fcont="$(< $_fname)" ;;
|
||||||
*.ko.gz) _fcont="$(gzip -dc $_fname)" ;;
|
*.ko.gz) _fcont="$(gzip -dc $_fname)" ;;
|
||||||
|
*.ko.xz) _fcont="$(xz -dc $_fname)" ;;
|
||||||
esac
|
esac
|
||||||
[[ $_fcont =~ $_net_drivers
|
[[ $_fcont =~ $_net_drivers
|
||||||
&& ! $_fcont =~ iw_handler_get_spy ]] \
|
&& ! $_fcont =~ iw_handler_get_spy ]] \
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ installkernel() {
|
||||||
while read _f; do case "$_f" in
|
while read _f; do case "$_f" in
|
||||||
*.ko) [[ $(< $_f) =~ $_blockfuncs ]] && echo "$_f" ;;
|
*.ko) [[ $(< $_f) =~ $_blockfuncs ]] && echo "$_f" ;;
|
||||||
*.ko.gz) [[ $(gzip -dc <$_f) =~ $_blockfuncs ]] && echo "$_f" ;;
|
*.ko.gz) [[ $(gzip -dc <$_f) =~ $_blockfuncs ]] && echo "$_f" ;;
|
||||||
|
*.ko.xz) [[ $(xz -dc <$_f) =~ $_blockfuncs ]] && echo "$_f" ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ installkernel() {
|
||||||
while read _f; do case "$_f" in
|
while read _f; do case "$_f" in
|
||||||
*.ko) [[ $(< $_f) =~ $_mpfuncs ]] && echo "$_f" ;;
|
*.ko) [[ $(< $_f) =~ $_mpfuncs ]] && echo "$_f" ;;
|
||||||
*.ko.gz) [[ $(gzip -dc <$_f) =~ $_mpfuncs ]] && echo "$_f" ;;
|
*.ko.gz) [[ $(gzip -dc <$_f) =~ $_mpfuncs ]] && echo "$_f" ;;
|
||||||
|
*.ko.xz) [[ $(xz -dc <$_f) =~ $_mpfuncs ]] && echo "$_f" ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@ installkernel() {
|
||||||
while read _f; do case "$_f" in
|
while read _f; do case "$_f" in
|
||||||
*.ko) [[ $(< $_f) =~ $_iscsifuncs ]] && echo "$_f" ;;
|
*.ko) [[ $(< $_f) =~ $_iscsifuncs ]] && echo "$_f" ;;
|
||||||
*.ko.gz) [[ $(gzip -dc <$_f) =~ $_iscsifuncs ]] && echo "$_f" ;;
|
*.ko.gz) [[ $(gzip -dc <$_f) =~ $_iscsifuncs ]] && echo "$_f" ;;
|
||||||
|
*.ko.xz) [[ $(xz -dc <$_f) =~ $_iscsifuncs ]] && echo "$_f" ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue