summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rwxr-xr-xkernel/check_mar.pl3
-rw-r--r--kernel/dependencies.pl3
-rwxr-xr-xkernel/update_kernel42
3 files changed, 35 insertions, 13 deletions
diff --git a/kernel/check_mar.pl b/kernel/check_mar.pl
index aedbfdfe7..80c0cc86c 100755
--- a/kernel/check_mar.pl
+++ b/kernel/check_mar.pl
@@ -8,7 +8,6 @@ my $mar = '../mdk-stage1/mar/mar';
my %sanity_check = (
hd => [
qw(sym53c8xx),
- if_(arch() !~ /x86_64/, 'initio'),
if_(arch() !~ /ppc|x86_64/, 'advansys'),
],
network => [
@@ -24,7 +23,7 @@ foreach (keys %sanity_check) {
my $marfile = "all.modules/$main_version/${_}_modules.mar";
-e $marfile or die "ERROR: missing $marfile\n";
- my @l = map { /(\S+)\.o/ } `$mar -l $marfile`;
+ my @l = map { /(\S+)\.k?o/ } `$mar -l $marfile`;
my @pbs = difference2($sanity_check{$_}, \@l);
@pbs and die "ERROR: sanity check should prove that " . join(" ", @pbs) . " be part of $marfile\n";
diff --git a/kernel/dependencies.pl b/kernel/dependencies.pl
index 10663b56b..e3be14212 100644
--- a/kernel/dependencies.pl
+++ b/kernel/dependencies.pl
@@ -3,10 +3,11 @@ use strict;
use MDK::Common;
use list_modules;
+my $version = shift @ARGV;
my $depfile = shift @ARGV;
load_dependencies($depfile);
print STDERR "Loaded dependencies from $depfile\n";
my @modules = uniq(map { dependencies_closure($_) } @ARGV);
-print join " ", map { "$_.o" } @modules;
+print join " ", map { $_ . ($version == 24 ? '.o' : '.ko') } @modules;
print "\n";
diff --git a/kernel/update_kernel b/kernel/update_kernel
index 5fad04dd6..6a5da3db4 100755
--- a/kernel/update_kernel
+++ b/kernel/update_kernel
@@ -23,32 +23,54 @@ function create_marfile() {
$GIBASEDIR/mdk-stage1/mar/mar -c $marfile $*
}
+function kern_version() {
+ if echo $1 | grep -q ^2.4; then
+ version=24
+ objects="*.o"
+ else
+ version=25
+ objects="*.ko"
+ fi
+}
+
function create_modules() {
kernel_path=$1
kern=$2
echo "Updating modules in '`pwd`' for kernel '$kern'"
- find $kernel_path/lib/modules/ -name "*.o" -exec cp -f {} . \;
- /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
+ kern_version $kern
+ find $kernel_path/lib/modules/ -name "$objects" -exec cp -f {} . \;
+ if [ $version -eq 24 ]; then
+ /sbin/depmod-24 -F $kernel_path/boot/System.map* -e *.o | perl -pe 's/\\\n//' \
+ | perl -ne 's/\.o//g; s/[ \t]+/ /g; print if /: /' > modules.dep
+ else
+ cp $kernel_path/lib/modules/*/modules.dep .
+ perl -ni -e 's|/\S+/([^/]+)\.k?o|$1|g; print if /: /' modules.dep
+ fi
perl -pi -e 's/((plip|ppa|imm): parport)/$1 parport_pc/' modules.dep
- /sbin/modinfo -f '%{filename} %{description}\n' *.o | perl -lne 'print "$1\t$2" if /(.*?)\.o "(.*)"/' > modules.description
+ /sbin/modinfo-$version -f '%{filename} %{description}\n' $objects | perl -lne 'print "$1\t$2" if /(.*?)\.k?o "(.*)"/' > modules.description
}
function create_modules_mar() {
- echo -n "stripping $kern: "
- $GIBASEDIR/kernel/strip_modules *.o 2>/dev/null
- echo "done"
+ kern_version $kern
+
+ if [ $version -eq 24 ]; then
+ echo -n "stripping $kern: "
+ $GIBASEDIR/kernel/strip_modules *.o 2>/dev/null
+ echo "done"
+ else
+ echo "don't strip on 2.6 since it breaks modules"
+ fi
if [ -z "$MOVE" ]; then
echo -n "packdrake $kern: "
- ls *.o | packdrake -b9s "modules.cz" 400000
+ ls $objects | packdrake -b9s "modules.cz" 400000
echo "done"
mv modules.cz ../modules.cz-$kern
fi
for i in network network_gigabit_usb network_gigabit network_usb cdrom hd hdcdrom_usb pcmcia all; do
eval "modules=\$${i}_modules_raw"
- modules_with_deps=`perl -I $GIBASEDIR/kernel $GIBASEDIR/kernel/dependencies.pl modules.dep $modules`
+ modules_with_deps=`perl -I $GIBASEDIR/kernel $GIBASEDIR/kernel/dependencies.pl $version modules.dep $modules`
if [ -n "$MOVE" ]; then modules_with_deps="change_loop.o gzloop.o isofs.o zlib_inflate.o supermount.o $modules_with_deps"; fi
eval "create_marfile ${i}_modules.mar $modules_with_deps"
done
@@ -80,7 +102,7 @@ if [ -n "$rpm" -a ! -e $ALL_KERNELS/$rpm ]; then
else
rpm2cpio $file | cpio -id
fi
- find -type f -name "*.o.gz" | xargs gunzip
+ find -type f -name "*.o.gz" -o -name "*.ko.gz" | xargs gunzip
cd ../..
for dir in /tftpboot /var/lib/tftpboot; do