wok annotate linux/stuff/check_modules.sh @ rev 21996

linux: add ath10k wireless driver
author Richard Dunbar <mojo@slitaz.org>
date Wed Oct 16 21:56:55 2019 -0400 (2019-10-16)
parents 4371e2f99088
children
rev   line source
jozee@3509 1 #!/bin/sh
jozee@3509 2 # Echo any module in kernel .config that's not added to one of linux-* pkgs
pankso@15855 3 # (c) 2009-2014 SliTaz - GNU General Public License.
jozee@3509 4 #
slaxemulator@8681 5
slaxemulator@8681 6 WOK=$(cd `dirname $0` && pwd | sed 's/wok.*/wok/')
pankso@15855 7 VERSION=$(grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g')
pankso@12285 8 BASEVER="${VERSION:0:3}"
pankso@12285 9 src="$WOK/linux/source/linux-$VERSION"
pankso@5640 10
pankso@5640 11 cd $src
pascal@14028 12 tmp=$WOK/${PACKAGE:-linux}/tmp
pascal@14028 13 mkdir -p $tmp 2>/dev/null
pascal@14028 14 rm -f $tmp/*
pankso@5640 15
pankso@5666 16 echo -e "\nChecking for modules selected in .config but not in linux-* pkgs"
pankso@5666 17 echo "======================================================================"
pankso@5666 18
pankso@5640 19 # create a packaged modules list
pascal@14028 20 cat $WOK/linux/stuff/modules.list >> $tmp/pkgs-modules-"$VERSION".list
pankso@5640 21
pankso@12285 22 for i in $(cd $WOK; grep -l '^WANTED="linux"' */receipt | sed 's|/receipt||g')
pankso@5640 23 do
pankso@12285 24 tazpath="taz/$i-*"
slaxemulator@9640 25 if [ ! $(grep -l 'linux-libre' $WOK/$i/receipt) ]; then
pascal@13930 26 for j in $(cat $WOK/$i/$tazpath/files.list | grep ".ko..z")
slaxemulator@9639 27 do
pascal@14028 28 basename $j >> $tmp/pkgs-modules-"$VERSION".list
slaxemulator@9639 29 done
slaxemulator@9639 30 fi
pankso@5640 31 done
pankso@5640 32 # get the original list in .config
pankso@15855 33 for i in $(find $install -iname "*.ko.?z")
pankso@5640 34 do
pascal@13930 35 basename $i
pascal@14028 36 done > $tmp/original-"$VERSION".list
pankso@5640 37 # compare original .config and pkged modules
pascal@14028 38 for i in $(cat $tmp/original-$VERSION.list)
slaxemulator@9639 39 do
pascal@14028 40 if ! grep -qs "$i" $tmp/pkgs-modules-"$VERSION".list ; then
pankso@15855 41 modpath=`find $install -iname "$i"`
pankso@5666 42 echo "Orphan module: $i"
pascal@14028 43 echo "$i : $modpath" >> $tmp/unpackaged-modules-"$VERSION".list
jozee@3509 44 fi
pankso@5640 45 done
pascal@14028 46 if [ -f $tmp/unpackaged-modules-"$VERSION".list ]; then
pankso@5640 47 echo "======================================================================"
gokhlayeh@8302 48 echo -e "Check linux/tmp/unpackaged-modules-$VERSION.list for mod path\n"
pankso@5640 49 else
pankso@5640 50 echo -e "\nAll modules are packaged\n"
pankso@5666 51 echo "======================================================================"
pankso@5666 52 echo ""
pascal@14028 53 rm -rf $tmp
pankso@5640 54 fi