summaryrefslogtreecommitdiffstats
path: root/update_kernel
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-03-30 18:48:04 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-03-30 18:48:04 +0000
commit3910b615c062dd747729090de60c219ce6151e5c (patch)
treebae751da5b242507a1a8cb5341ad46751dd585ef /update_kernel
parentef6d727ae835e9828010002ac829b1e7aeddd54b (diff)
downloaddrakx-3910b615c062dd747729090de60c219ce6151e5c.tar
drakx-3910b615c062dd747729090de60c219ce6151e5c.tar.gz
drakx-3910b615c062dd747729090de60c219ce6151e5c.tar.bz2
drakx-3910b615c062dd747729090de60c219ce6151e5c.tar.xz
drakx-3910b615c062dd747729090de60c219ce6151e5c.zip
- remove all.kernels/cardmgr (allow more simple glob in all.kernels, and is not needed)
- define all.kernels/.main containing the name of the ``main'' kernel - (create_modules): don't bother with missing modules for non-``main'' kernel
Diffstat (limited to 'update_kernel')
-rwxr-xr-xupdate_kernel31
1 files changed, 22 insertions, 9 deletions
diff --git a/update_kernel b/update_kernel
index b0b687ec8..242452a8e 100755
--- a/update_kernel
+++ b/update_kernel
@@ -32,8 +32,7 @@ function create_modules() {
/sbin/depmod -F $kernel_path/boot/System.map* -e *.o | perl -pe 's/\\\n//' \
| perl -ne 's/\.o//g; s/[ \t]+/ /g; print if /: /' > modules.dep
perl -pi -e 's/((plip|ppa|imm): parport)/$1 parport_pc/' modules.dep
- ls *.o | packdrake -b9s modules.cz 400000
- mv modules.cz "../modules.cz$kern"
+ ls *.o | packdrake -b9s "../modules.cz-$kern" 400000
create_marfile network_modules.mar $NETWORK_MODULES $GENERIC_MODULES
create_marfile cdrom_modules.mar $CDROM_MODULES $GENERIC_MODULES
create_marfile hd_modules.mar $HD_MODULES $GENERIC_MODULES
@@ -43,6 +42,15 @@ function create_modules() {
rm -f $ALL_MODULES $PCMCIA_COREMODULES $NOT_USEFULL_IN_STAGE1 # leave in the directory non-install1 used modules
}
+[ -e $ALL_KERNELS/.main ] && main=$(cat $ALL_KERNELS/.main)
+[ -n "$main" -a -e $ALL_KERNELS/$main ] || {
+ pushd . >/dev/null
+ cd $ALL_KERNELS
+ main=$(echo 2.* | sed 's/.* //')
+ echo "Choosing $main"
+ echo $main > .main
+ popd >/dev/null
+}
ARCH=`uname -m | sed -e 's/i.86/i386/' -e 's/sparc.*/sparc/'`
@@ -87,22 +95,27 @@ fi
GIBASEDIR=`pwd`
rm -rf all.modules ; mkdir all.modules
-rm -rf $ALL_KERNELS/cardmgr
for i in $ALL_KERNELS/*; do
- [ -d $ALL_KERNELS/cardmgr ] || mkdir $ALL_KERNELS/cardmgr
kern=`basename $i`
[ -e $i/cardmgr ] && (
cd $i/cardmgr
echo "int main(int argc, char **argv) { cardmgr_main(argc, argv); }" > main.c
- gcc -o cardmgr *.o main.c
- cp cardmgr $GIBASEDIR/$ALL_KERNELS/cardmgr/cardmgr$kern
+ gcc -o cardmgr-$kern *.o main.c
+ )
+ (
+ mkdir all.modules/$kern
+ cd all.modules/$kern
+ if [ "$kern" = "$main" ]; then
+ create_modules ../../$i $kern
+ else
+ echo "$kern ($main)"
+ create_modules ../../$i $kern 2>/dev/null
+ fi
)
- ( mkdir all.modules/$kern ; cd all.modules/$kern
- create_modules ../../$i $kern ; cd ../.. )
done
-# v=kernel-2.2.17-BOOT3.tar.bz2
+# v=kernel-2.4.2-BOOT2.tar.bz2
# scp kenobi:~chmou/work/kernel/archive/$v /tmp
# cd ~/gi/kernel ; rm -rf * ; tar xfI /tmp/$v
# cd ~/gi ; ./update_kernel ; rm -f network.rdz ; ./make_boot_img network.rdz network ; scp vmlinuz network.rdz kenobi:/tftpboot ; cp -f ~/gi/modules/modules.cz /export/Mandrake/mdkinst/lib/modules.cz