From fab55218350f8d20a5a54bddaf8533f9f86fc6a5 Mon Sep 17 00:00:00 2001
From: Pascal Rigaux <pixel@mandriva.com>
Date: Thu, 4 Jul 2002 21:54:33 +0000
Subject: adapt to the move all.modules -> kernel/all.modules  and  all.kernels
 -> kernel/all.kernels

---
 .cvsignore             |  3 ---
 make_boot_img          | 42 +++++++++++++++++++++++-------------------
 perl-install/Makefile  |  4 ++--
 rescue/make_rescue_img |  8 +++++---
 4 files changed, 30 insertions(+), 27 deletions(-)

diff --git a/.cvsignore b/.cvsignore
index 9eb313d3a..2a8035f11 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1,8 +1,5 @@
-pictures
 docs
 images
 unused
-all.modules
-all.kernels
 drakxtools.tar.bz2
 isolinux
diff --git a/make_boot_img b/make_boot_img
index 5a8004817..9a0b71c8a 100755
--- a/make_boot_img
+++ b/make_boot_img
@@ -6,10 +6,14 @@ use Config;
 use MDK::Common;
 Config->import;
 my ($arch) = $Config{archname} =~ /(.*)-/;
-my $corporate = $ENV{CORPORATE} && " corporate"; #- use this for building a corporate version.
 
 ($img, $type) = @ARGV;
 
+# 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';
+
 $default_append = "ramdisk_size=32000 root=/dev/ram3";
 $default_vga = "vga=788";
 
@@ -50,12 +54,12 @@ $install = $ {{
 }}{$type} or die;
 
 mkdir "images";
-chomp($main = `cat all.kernels/.main`);
+chomp($main = `cat kernel/all.kernels/.main`);
 
 if ($img =~ /blank|other|pcmcia/) {
     @kernels = $main;
 } else {
-    @kernels = map { m|all.kernels/(.*)| } glob('all.kernels/*');
+    @kernels = map { m|kernel/all.kernels/(.*)| } glob('kernel/all.kernels/*');
     $img =~ /usb/ and @kernels = grep { $_ !~ /2\.2\.14/ } @kernels;  #- 2.2.14 is too old, usb support was not working properly
 }
 
@@ -63,7 +67,7 @@ foreach (@kernels) {
     if ($img =~ /rdz$/) {
 	initrd($mnt, "$img-$_");
     } else {
-	$::{"boot_img_$arch"}->($mnt, "$img-$_", glob("all.kernels/$_/boot/vmlinu*"));
+	$::{"boot_img_$arch"}->($mnt, "$img-$_", glob("kernel/all.kernels/$_/boot/vmlinu*"));
 	rename("$img-$main", "$img");
     }
 }
@@ -72,7 +76,7 @@ if ($arch =~ /i.86/ && $img =~ /all/) {
 }
 
 if (my ($tftpboot) = grep { -e $_ } qw(/tftpboot /var/lib/tftpboot)) {
-    system("/bin/cp -f all.kernels/$main/boot/vmlinu* $tftpboot/vmlinuz 2>/dev/null");
+    system("/bin/cp -f kernel/all.kernels/$main/boot/vmlinu* $tftpboot/vmlinuz 2>/dev/null");
     system("/bin/cp -f images/network.rdz-$main $tftpboot/network.rdz 2>/dev/null");
 }
 
@@ -104,11 +108,11 @@ sub initrd {
     if (member($type, qw(pcmcia all network)) && $arch !~ /ppc/ && $arch !~ /ia64/) {
 	 _ "$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 all.modules/$main/modules.dep";
+	 _ "tools/patch_pcmcia_config.pl /tmp/pcmcia_config_tmp kernel/all.modules/$main/modules.dep";
 	 _ "sudo mv /tmp/pcmcia_config_tmp $mnt/etc/pcmcia/config";
     }
     my ($ext) = $img =~ /rdz-(.*)/ or die "bad initrd name ($img)";
-    $modz = "all.modules$I/$ext";
+    $modz = "kernel/all.modules$I/$ext";
     _ "$sudo cp -f $modz/${ltype}_modules.mar $mnt/modules/modules$I.mar" if $type !~ /blank/;
     _ "$sudo cp -f $modz/modules.dep $mnt/modules/";
     _ "$sudo umount $mnt";
@@ -290,44 +294,44 @@ image[sun4c,sun4d,sun4m]=/$boot/vmlinux
   label=linux
   alias=install
   initrd=/$boot/live.rdz
-  append=\"ramdisk_size=32000$corporate root=/dev/ram3\"
+  append=\"ramdisk_size=32000 root=/dev/ram3\"
 image[sun4c,sun4d,sun4m]=/$boot/vmlinux
   label=text
   initrd=/$boot/live.rdz
-  append=\"ramdisk_size=32000 text$corporate root=/dev/ram3\"
+  append=\"ramdisk_size=32000 text root=/dev/ram3\"
 image[sun4c,sun4d,sun4m]=/$boot/vmlinux
   label=expert
   initrd=/$boot/live.rdz
-  append=\"ramdisk_size=32000 expert$corporate root=/dev/ram3\"
+  append=\"ramdisk_size=32000 expert root=/dev/ram3\"
 image[sun4c,sun4d,sun4m]=/$boot/vmlinux
   label=ks
   initrd=/$boot/live.rdz
-  append=\"ramdisk_size=32000 ks$corporate root=/dev/ram3\"
+  append=\"ramdisk_size=32000 ks root=/dev/ram3\"
 image[sun4c,sun4d,sun4m]=/$boot/vmlinux
   label=rescue
   initrd=/$boot/live.rdz
-  append=\"ramdisk_size=32000 rescue rw root=/dev/ram3$corporate\"
+  append=\"ramdisk_size=32000 rescue rw root=/dev/ram3\"
 image[sun4u]=/$boot/vmlinux64
   label=linux
   alias=install
   initrd=/$boot/live64.rdz
-  append=\"ramdisk_size=32000$corporate root=/dev/ram3\"
+  append=\"ramdisk_size=32000 root=/dev/ram3\"
 image[sun4u]=/$boot/vmlinux64
   label=text
   initrd=/$boot/live64.rdz
-  append=\"ramdisk_size=32000 text$corporate root=/dev/ram3\"
+  append=\"ramdisk_size=32000 text root=/dev/ram3\"
 image[sun4u]=/$boot/vmlinux64
   label=expert
   initrd=/$boot/live64.rdz
-  append=\"ramdisk_size=32000 expert$corporate root=/dev/ram3\"
+  append=\"ramdisk_size=32000 expert root=/dev/ram3\"
 image[sun4u]=/$boot/vmlinux64
   label=ks
   initrd=/$boot/live64.rdz
-  append=\"ramdisk_size=32000 ks$corporate root=/dev/ram3\"
+  append=\"ramdisk_size=32000 ks root=/dev/ram3\"
 image[sun4u]=/$boot/vmlinux64
   label=rescue
   initrd=/$boot/live64.rdz
-  append=\"ramdisk_size=32000 rescue rw root=/dev/ram3$corporate\"
+  append=\"ramdisk_size=32000 rescue rw root=/dev/ram3\"
 ");
 
 	output("$dir/$boot/README", "
@@ -375,7 +379,7 @@ message=/boot.msg
 image=/vmlinux$I.gz
   label=linux
   initrd=/$type.rdz
-  append=\"ramdisk_size=32000 $ltype$corporate root=/dev/ram3\"
+  append=\"ramdisk_size=32000 $ltype root=/dev/ram3\"
 ");
 	_ "genromfs -d $dir -f /dev/ram -A 2048,/.. -a 512 -V \'DrakX boot disk\'";
 	_ "$sudo mount -t romfs /dev/ram $mnt";
@@ -478,7 +482,7 @@ sub isolinux {
     my $i = 0;
     foreach (@kernels) {
 	mkdir "isolinux/alt$i", 0777;
-	my ($kernel) = glob("all.kernels/$_/boot/vmlinu*");
+	my ($kernel) = glob("kernel/all.kernels/$_/boot/vmlinu*");
 	_ "cp $kernel isolinux/alt$i/vmlinuz";
 	_ "cp images/all.rdz-$_ isolinux/alt$i/all.rdz";
 	$i++;
diff --git a/perl-install/Makefile b/perl-install/Makefile
index 2ef7a7044..e82ff7c24 100644
--- a/perl-install/Makefile
+++ b/perl-install/Makefile
@@ -162,7 +162,7 @@ endif
 
 	clean-rpmsrate $(ROOTDEST)/Mandrake/base/rpmsrate $(ROOTDEST)/Mandrake/RPMS
 
-	for i in ../all.modules/modules.cz*; do cp -f $$i $(DEST)/lib/; done
+	for i in ../kernel/modules.description ../kernel/all.modules/modules.cz*; do cp -f $$i $(DEST)/lib/; done
 
 	$(MAKE) -C share/po install NAME=libDrakX LOCALEDIR=$(DEST)/usr/share/locale_special
 
@@ -171,7 +171,7 @@ endif
 
 ifeq (i386,$(ARCH))
 	cp -a /etc/pcmcia $(DEST)/etc
-	../tools/patch_pcmcia_config.pl $(DEST)/etc/pcmcia/config ../all.modules/`cat ../all.kernels/.main`/modules.dep
+	../tools/patch_pcmcia_config.pl $(DEST)/etc/pcmcia/config ../kernel/all.modules/`cat ../kernel/all.kernels/.main`/modules.dep
 endif
 
 	find $(DEST) -name CVS | xargs rm -rf
diff --git a/rescue/make_rescue_img b/rescue/make_rescue_img
index 87ea8f870..1e44e379d 100755
--- a/rescue/make_rescue_img
+++ b/rescue/make_rescue_img
@@ -88,10 +88,12 @@ foreach (cat_("aliases")) {
     symlink $dest, "$tmp$f";
 }
 
-chomp($main = `cat ../all.kernels/.main`);
+-e "../kernel/all.modules" or die "use ./update_kernel in gi/kernel first\n";
 
-_ "cp ../all.modules/modules.cz-$main $tmp/modules/modules.cz";
-_ "cp ../all.modules/$main/modules.dep $tmp/modules";
+chomp($main = `cat ../kernel/all.kernels/.main`);
+
+_ "cp ../kernel/all.modules/modules.cz-$main $tmp/modules/modules.cz";
+_ "cp ../kernel/all.modules/$main/modules.dep $tmp/modules";
 
 installown("drvinst", "/usr/bin");
 installown("guessmounts", "/usr/bin");
-- 
cgit v1.2.1