summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-ximages/update_kernel23
1 files changed, 2 insertions, 21 deletions
diff --git a/images/update_kernel b/images/update_kernel
index 9d9e98612..b39342c33 100755
--- a/images/update_kernel
+++ b/images/update_kernel
@@ -1,21 +1,17 @@
#!/usr/bin/perl
-# this script takes kernels rpms from RPMS/ and create various files in all_kernels/
-# for each rpms in RPMS, it does:
-# RPMS/kernel-VER-*.rpm ->
+# this script takes kernels rpms from RPMS/ or /lib/modules/<VER>
+# and create various files in all_kernels/:
# all.kernels/VER/all_modules.tar (used for all.rdz)
# all.kernels/VER/modules.dep
# all.kernels/VER/modules.alias
# all.kernels/VER/vmlinuz
-#
-# if RPMS is empty, this script tries to find kernels in $kernel_repository
use lib '../kernel';
use MDK::Common;
use list_modules;
(my $karch = arch()) =~ s/^i.86$/i586/;
-my $kernel_repository = chomp_(cat_('.repository'));
my $rpm = 'rpm --nosignature';
@@ -30,8 +26,6 @@ my $main = chomp_(cat_('RPMS/.main'));
if (@ARGV) {
install_kernel($ARGV[0]);
-} elsif (! -d 'RPMS' && $kernel_repository) {
- get_kernels_from_repository();
}
if (glob("RPMS/*.rpm")) {
@@ -50,19 +44,6 @@ sub rpm2version {
`$rpm -qpl $kernel_rpm` =~ m!/boot/vmlinuz-(.*)! && $1 or die "can't find vmlinuz in $kernel_rpm\n";
}
-sub get_kernels_from_repository() {
- sub look_for {
- my ($name, $repository) = @_;
- my $rpm_wildcard = 'kernel-' . ($name ? "$name-" : arch() =~ /i.86/ ? 'legacy-' : '') . '2.6*.rpm';
- my @l = glob("$repository/$rpm_wildcard") or die "no $name kernel found in $repository matching $rpm_wildcard\n";
- @l;
- }
- my @kernels;
- push @kernels, look_for('', $kernel_repository);
-
- install_kernel($_) foreach @kernels;
-}
-
sub install_kernel {
my ($kernel_rpm) = @_;
my $basename = basename($kernel_rpm);