summaryrefslogtreecommitdiffstats
path: root/make_boot_img
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-11-22 14:15:24 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-11-22 14:15:24 +0000
commitc879294087d1f55b5992ff194bae9d0ded78c31a (patch)
treee54ee940894d61a91f93ee69fc66b3e0d08e58ed /make_boot_img
parent0a60319a0b805bf9c7dfe191ab2bd64fb0fa60e6 (diff)
downloaddrakx-backup-do-not-use-c879294087d1f55b5992ff194bae9d0ded78c31a.tar
drakx-backup-do-not-use-c879294087d1f55b5992ff194bae9d0ded78c31a.tar.gz
drakx-backup-do-not-use-c879294087d1f55b5992ff194bae9d0ded78c31a.tar.bz2
drakx-backup-do-not-use-c879294087d1f55b5992ff194bae9d0ded78c31a.tar.xz
drakx-backup-do-not-use-c879294087d1f55b5992ff194bae9d0ded78c31a.zip
- no more kernel/all.modules, things are in kernel/all.kernels
- cleanup what we keep in kernel/all.kernels: only vmlinuz, modules.dep, *.mar, all_modules.tar, modules.cz - replace all_modules.list + modules with all_modules.tar - kernel/all.modules/modules.cz-VERSION are now in kernel/all.kernels/VERSION/modules.cz - allow having a normal in isolinux, but don't use it for floppy images (for this, add kernel/all.kernels/.main-BOOT) - add many modules kernel/list_modules.pm in unused categories since we don't take all modules from kernel, only those listed (needed to have a not too big modules.cz for normal kernel) - complete rewrite of update_kernel (now written in perl)
Diffstat (limited to 'make_boot_img')
-rwxr-xr-xmake_boot_img28
1 files changed, 13 insertions, 15 deletions
diff --git a/make_boot_img b/make_boot_img
index d5c1db2af..a6dd190d0 100755
--- a/make_boot_img
+++ b/make_boot_img
@@ -8,7 +8,6 @@ my ($arch) = $Config{archname} =~ /(.*?)-/;
# move stuff to new "kernel" directory
-d 'kernel' or die "directory kernel is missing\n";
rename 'all.kernels', 'kernel/all.kernels';
-rename 'all.modules', 'kernel/all.modules';
my $default_append = "ramdisk_size=128000";
# full acpi support for x86_64, enough acpi support for x86 ht, no acpi for others
@@ -37,8 +36,9 @@ _ "$sudo mkdir -p $tmp_mnt $tmp_mnt_initrd";
mkdir "images";
my $main = chomp_(cat_('kernel/all.kernels/.main'));
+my $main_BOOT = chomp_(cat_('kernel/all.kernels/.main-BOOT'));
my @kernels = grep { /^2/ } all('kernel/all.kernels');
-
+my @kernels_BOOT = grep { /BOOT/ } @kernels;
my @all_images = (
if_($arch =~ /i.86|x86_64/, 'cdrom.img', 'cdrom-changedisk.img', 'pcmcia.img', 'isolinux', 'boot.iso', 'hd_grub.img', 'network.img', 'network_drivers.img'),
@@ -76,14 +76,14 @@ foreach my $img (@images) {
} elsif ($img =~ /bootcdrom.iso/) {
boot_iso($img, 1);
} elsif ($img =~ /drivers/) {
- drivers($type, $I, "$img-$_") foreach @kernels;
- rename("$img-$main", $img);
+ drivers($type, $I, "$img-$_") foreach @kernels_BOOT;
+ rename("$img-$main_BOOT", $img);
} elsif ($extension eq 'rdz') {
initrd($tmp_mnt_initrd, $type, $I, "$img-$_") foreach @kernels;
} elsif ($extension eq 'img') {
print STDERR "calling boot_img_$arch for $img\n";
- $::{"boot_img_$arch"}->($tmp_mnt, $type, $I, "$img-$_", glob("kernel/all.kernels/$_/boot/vmlinu*")) foreach @kernels;
- rename("$img-$main", $img);
+ $::{"boot_img_$arch"}->($tmp_mnt, $type, $I, "$img-$_", "kernel/all.kernels/$_/vmlinuz") foreach @kernels_BOOT;
+ rename("$img-$main_BOOT", $img);
} else {
die "unknown image $img";
}
@@ -163,13 +163,13 @@ sub initrd {
if (member($type, qw(pcmcia all network)) && $arch !~ /ppc|ia64|x86_64/) {
_ "$sudo cp -a /etc/pcmcia $mnt/etc";
_ "cp $mnt/etc/pcmcia/config /tmp/pcmcia_config_tmp";
- _ "tools/patch_pcmcia_config.pl /tmp/pcmcia_config_tmp kernel/all.modules/$main/modules.dep";
+ _ "tools/patch_pcmcia_config.pl /tmp/pcmcia_config_tmp kernel/all.kernels/$main/modules.dep";
_ "sudo mv /tmp/pcmcia_config_tmp $mnt/etc/pcmcia/config";
}
my ($ext) = $img =~ /rdz-(.*)/ or die "bad initrd name ($img)";
- my $modz = "kernel/all.modules$I/$ext";
+ my $modz = "kernel/all.kernels$I/$ext";
if ($type eq 'all') {
- __ "cd $modz ; $sudo cp -f `cat ${type}_modules.list` $mnt/modules";
+ __ "$sudo tar xC $mnt/modules -f $modz/${type}_modules.tar";
} else {
_ "$sudo cp -f $modz/${type}_modules.mar $mnt/modules/modules$I.mar";
}
@@ -254,7 +254,7 @@ F3 boot.msg
my $s = int((-s $rdz) / 1024);
my ($ext) = $img =~ /\.img-(.*)/ or die "bad initrd name ($img)";
- my $dir = "kernel/all.modules/$ext";
+ my $dir = "kernel/all.kernels/$ext";
my $pcitable = cat_('/usr/share/ldetect-lst/pcitable');
my @l = sort { $a <=> $b } map {
my ($name) = /(\S+)\.k?o$/ or die "bad file in .mar";
@@ -679,8 +679,7 @@ sub isolinux {
each_index {
mkdir "isolinux/alt$::i", 0777;
- my ($kernel) = glob("kernel/all.kernels/$_/boot/vmlinu*");
- _ "cp $kernel isolinux/alt$::i/vmlinuz";
+ _ "cp kernel/all.kernels/$_/vmlinuz isolinux/alt$::i";
initrd($tmp_mnt_initrd, 'all', '', "images/all.rdz-$_");
_ "mv images/all.rdz-$_ isolinux/alt$::i/all.rdz";
} @kernels;
@@ -720,8 +719,7 @@ F3 boot.msg
sub isolinux_move {
my ($main) = @_;
- my ($kernel) = glob("kernel/all.kernels/$main/boot/vmlinu*");
- _ "cp $kernel move/isolinux/vmlinuz";
+ _ "cp kernel/all.kernels/$main/vmlinuz move/isolinux";
initrd($tmp_mnt_initrd, 'all', '', "move/isolinux/all.rdz-$main", '-with-busybox');
rename "move/isolinux/all.rdz-$main", "move/isolinux/all.rdz";
@@ -814,7 +812,7 @@ sub drivers {
_ "$sudo mount -t ext2 $img $tmp_mnt -o loop";
my ($ext) = $img =~ /img-(.*)/ or die "bad image name ($img)";
- _ "$sudo cp -f kernel/all.modules$I/$ext/${type}_modules.mar $tmp_mnt/modules$I.mar";
+ _ "$sudo cp -f kernel/all.kernels$I/$ext/${type}_modules.mar $tmp_mnt/modules$I.mar";
_ "sync";
_ "df $tmp_mnt";