The 4MLinux packages are called addons. You can find them in the /var/4MLinux directory. They are just simple tar.xz archives (no additional scripts, no additional files at all). Lets's say that you are going to compile the Linux kernel 4.9.56. When your compilation is over, you must manually prepare an addon that contains all modules. Such addons can be found on the 4MLinux installation CD (in the "drivers" folder) and online,e.g.:
https://sourceforge.net/projects/lin.../23.0/drivers/ Your addon must be named in the same way ("addon_modules-all-4.9.56-smp.tar.xz"). Now execute the script:
Code:
modules.run 4.9.56-smp
And my modules.run script is:
Code:
#!/bin/ash
#
#
if [ ! -e addon_modules-all-$1.tar.xz ]; then
echo "addon_modules-all-$1.tar.xz not found!"
exit
fi
rm -fr /tmp/modules
mkdir /tmp/modules
tar -xvf addon_modules-all-$1.tar.xz -C /tmp/modules
cd /var/4MLinux
for i in $(ls | grep -v vb | grep modules); do
clear
echo "Processing $i"
rm -fr /$i
mkdir /$i
tar -xf /var/4MLinux/$i -C /$i
cd /$i
mv lib/modules/* lib/modules/$1
find * | grep ko > list.txt
rm $(cat list.txt) 2>/dev/null
for j in $(cat list.txt); do
cp /tmp/modules/$j $j 2>/dev/null
done
tar -cvJf addon.tar.xz lib
done
This script enters the /var/4MLinux directory. It seeks for "old" addons with kernel modules, and lists their contents to files. Next, it uses these files and addon_modules-all-4.9.56-smp.tar.xz to prepare new addons with the new kernel version. You will find your new addons in some folders created the / directory.
The above will work provided that there are no big configuration differences between the new kernel and the old one.
.