diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-01-20 19:12:24 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-01-20 19:12:24 +0000 |
commit | c376b09d3e692f40f1e98d9d1cf2df81ba74eddb (patch) | |
tree | 7513813a56d5f63e178141f994251fe0632f36ac | |
parent | 50f121e7372566753e3af73bada2c85bc57d0eb7 (diff) | |
download | drakx-c376b09d3e692f40f1e98d9d1cf2df81ba74eddb.tar drakx-c376b09d3e692f40f1e98d9d1cf2df81ba74eddb.tar.gz drakx-c376b09d3e692f40f1e98d9d1cf2df81ba74eddb.tar.bz2 drakx-c376b09d3e692f40f1e98d9d1cf2df81ba74eddb.tar.xz drakx-c376b09d3e692f40f1e98d9d1cf2df81ba74eddb.zip |
(extract_installed_rpm,recompress_modules) recompress gz modules as XZ
(make_modules_per_image) adapt
-rw-r--r-- | images/NEWS | 1 | ||||
-rwxr-xr-x | images/update_kernel | 3 | ||||
-rw-r--r-- | kernel/modules.pl | 10 |
3 files changed, 12 insertions, 2 deletions
diff --git a/images/NEWS b/images/NEWS index 3d4b7636d..9e2252706 100644 --- a/images/NEWS +++ b/images/NEWS @@ -1,5 +1,6 @@ - smaller stage1: o compress initrd with XZ instead of gzip + o recompress gz modules as XZ Version 1.61 - 19 January 2012 by Thierry Vignaud diff --git a/images/update_kernel b/images/update_kernel index 37084b39f..867041cb9 100755 --- a/images/update_kernel +++ b/images/update_kernel @@ -65,7 +65,7 @@ sub extract_installed_rpm { sys('cp', "$installed_dir/boot/vmlinuz-$kern_ver", "$local_dir/vmlinuz"); sys("cp $installed_dir/lib/modules/$kern_ver/modules.* $local_dir"); - open(my $F, "find $installed_dir/lib/modules/$kern_ver -name '*.ko.gz' |"); + open(my $F, "find $installed_dir/lib/modules/$kern_ver -name '*.ko.?z' |"); my $file; while ($file = <$F>) { chomp($file); system('cp', $file, "$local_dir/modules/" . basename($file)) == 0 @@ -74,6 +74,7 @@ sub extract_installed_rpm { sys('perl', '../kernel/modules.pl', 'remove_unneeded_modules', $kern_ver); sys('perl', '../kernel/modules.pl', 'get_firmwares', $kern_ver); + sys('perl', '../kernel/modules.pl', 'recompress_modules', $kern_ver); sys('perl', '../kernel/modules.pl', 'make_modules_per_image', $kern_ver); rm_rf("$local_dir/modules"); diff --git a/kernel/modules.pl b/kernel/modules.pl index a47b272f9..a939f7605 100644 --- a/kernel/modules.pl +++ b/kernel/modules.pl @@ -65,12 +65,20 @@ sub remove_unneeded_modules { } } +sub recompress_modules { + my ($kern_ver) = @_; + + my $dir = "all.kernels/$kern_ver/modules"; + + system("cd $dir ; xzme *.ko.gz") == 0 or die "xzme failed\n"; +} + sub make_modules_per_image { my ($kern_ver) = @_; my $dir = "all.kernels/$kern_ver/modules"; - system("cd $dir ; tar cf ../all_modules.tar *.ko.gz") == 0 or die "tar failed\n"; + system("cd $dir ; tar cf ../all_modules.tar *.ko.*") == 0 or die "tar failed\n"; } sub get_main_modules() { |