CVS: moonbase/kernel/linux-beta BUILD, 1.5, 1.6 CONFIGURE, 1.3, 1.4 PRE_BUILD, 1.3, 1.4

nestu at lunar-linux.org nestu at lunar-linux.org
Wed Oct 15 01:26:18 GMT 2003


Update of /var/cvs/lunar/moonbase/kernel/linux-beta
In directory dbguin.lunar-linux.org:/tmp/cvs-serv5426

Modified Files:
	BUILD CONFIGURE PRE_BUILD 
Log Message:
adapting to new kernel versioning system, as well as lilo and grub entries


Index: BUILD
===================================================================
RCS file: /var/cvs/lunar/moonbase/kernel/linux-beta/BUILD,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- BUILD	27 Aug 2003 21:08:53 -0000	1.5
+++ BUILD	15 Oct 2003 01:26:15 -0000	1.6
@@ -1,51 +1,64 @@
-cd  /usr/src/linux-$VERSION
+cd  /usr/src/linux
 
 while  
-  case  $CONFIG_KERNEL in
-      y|Y)  if [ "$CONFIG_METHOD" == "xconfig" ]
-          then
-	      if [ "$DISPLAY" ]
-	      then
-	          make xconfig
-	      else
-	          message xconfig could find display falling back to menuconfig
-		  make menuconfig
-	      fi
-	  else
-	      make  $CONFIG_METHOD
-	  fi
+    case  $CONFIG_KERNEL in
+	y|Y)  
+	    if [ "$CONFIG_METHOD" == "xconfig" ]; then
+		if [ "$DISPLAY" ]; then
+	    	    make xconfig
+	        else
+	    	    message xconfig could find display falling back to menuconfig
+		    make menuconfig
+	        fi
+	    else
+		make  $CONFIG_METHOD
+	    fi
+
+            if  query  "Repeat $CONFIG_METHOD?  "  n ; then  
+		CONFIG_KERNEL=y
+            else  
+		CONFIG_KERNEL=n
+            fi
+	    
+	    ;;
+
+	*)  
+	    false  ;;
+	    
+    esac
 
-          if  query  "Repeat $CONFIG_METHOD?  "  n
-          then  CONFIG_KERNEL=y
-          else  CONFIG_KERNEL=n
-          fi     ;;
-      *)  false  ;;
-  esac
 do
-  true
+    true
 done
 
 
-backup_modules()  {
-
-  if    [  -d  /lib/modules/$VERSION      ];  then
-    rm   -rf   /lib/modules/$VERSION.old
-    mv         /lib/modules/$VERSION      \
-               /lib/modules/$VERSION.old
-  fi
+backup_mods_krnl()  
+{
+    if    [  -d  /lib/modules/$VERSION-beta      ];  then
+	rm  -rf  /lib/modules/$VERSION-beta.old
+	mv       /lib/modules/$VERSION-beta      \
+    		 /lib/modules/$VERSION-beta.old
+    fi
 
+    if    [  -f  /boot/beta-$VERSION   ];  then
+	mv -f /boot/beta-$VERSION.old /boot/beta-$VERSION.old_2
+        cp -p /boot/beta-$VERSION /boot/beta-$VERSION.old
+    fi
 }
 
 
 (
 
-  yes  n  |  make  oldconfig
-  cp  .config  $CONFIG_CACHE
-  make  bzImage          &&
-  make  modules          &&
-  prepare_install        &&
-  backup_modules         &&
-  make  modules_install  &&
-  cp    arch/i386/boot/bzImage   /boot/vmlinubz-$VERSION
+    yes  n  |  make  oldconfig
+    cp  .config  $CONFIG_CACHE/.config.beta
+    make  dep              &&
+    make  bzImage          &&
+    make  modules          &&
+    prepare_install        &&
+    backup_mods_krnl       &&
+    make  modules_install  &&
+    cp arch/i386/boot/bzImage /boot/beta-$VERSION &&
+    # link the modules so depmod can find them!
+    ln -f -s /lib/modules/$VERSION-beta /lib/modules/$VERSION
 
 ) > $C_FIFO 2>&1

Index: CONFIGURE
===================================================================
RCS file: /var/cvs/lunar/moonbase/kernel/linux-beta/CONFIGURE,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CONFIGURE	11 Jul 2003 21:46:50 -0000	1.3
+++ CONFIGURE	15 Oct 2003 01:26:15 -0000	1.4
@@ -1,92 +1,60 @@
-if ! module_installed module-init-tools 
-then
-	message "${MESSAGE_COLOR}This kernel needs ${MODULE_COLOR}module-init-tools${DEFAULT_COLOR}${MESSAGE_COLOR}, which conflicts with ${MODULE_COLOR}modutils${DEFAULT_COLOR}${MESSAGE_COLOR} (needed for 2.4 kernels)."
-	if query "Install module-init-tools" y
-	then
-		message "${MESSAGE_COLOR}Proceeding to install module-init-tools${DEFAULT_COLOR}"
-		lin module-init-tools || exit 1;
-	else
-		message "${PROBLEM_COLOR}Warning:${DEFAULT_COLOR}${MESSAGE_COLOR} You cannot load modules with a 2.5 kernel"
-	fi
-fi
-
-
 if  !  grep  -q  "BOOT_LOADER"  $MODULE_CONFIG;  then
-#  message  "The Linux Kernel requires a boot loader"
-message  "Choose either GRUB or LILO"
-# BOOT_LOADER=lilo
+    #  message  "The Linux Kernel requires a boot loader"
+    message  "Choose either GRUB or LILO"
+    # BOOT_LOADER=lilo
 
-if  query  "Use  LILO?"  y
-  then  BOOT_LOADER=lilo
-  else  BOOT_LOADER=grub
-fi
+    if  query  "Use  LILO?"  y ; then  
+	BOOT_LOADER=lilo
+    else  
+	BOOT_LOADER=grub
+    fi
 
-  echo  "BOOT_LOADER=$BOOT_LOADER"  >>  $MODULE_CONFIG
+    echo  "BOOT_LOADER=$BOOT_LOADER"  >>  $MODULE_CONFIG
 fi
 
 CONFIG_GRUB="n"
 CONFIG_LILO="n"
 
-if    grep  -q  "BOOT_LOADER=grub"  $MODULE_CONFIG  &&
-      query  "Configure grub?"  n
-then  CONFIG_GRUB=y
+if  grep  -q  "BOOT_LOADER=grub"  $MODULE_CONFIG  && query  "Configure grub?"  n ; then  
+    CONFIG_GRUB=y
 fi
 
-if    grep  -q  "BOOT_LOADER=lilo"  $MODULE_CONFIG  &&
-      query  "Configure lilo?"  n
-then  CONFIG_LILO=y
+if  grep  -q  "BOOT_LOADER=lilo"  $MODULE_CONFIG  && query  "Configure lilo?"  n ; then  
+    CONFIG_LILO=y
 fi
 
 
-if  !  grep  -q  "CONFIG_METHOD="  $MODULE_CONFIG
-then
-  if    query  "Do you prefer make menuconfig over make config"  y
-  then  CONFIG_METHOD="menuconfig"
-  else  CONFIG_METHOD="config"
-  fi
-  echo  "CONFIG_METHOD=$CONFIG_METHOD"  >>  $MODULE_CONFIG
+if  !  grep  -q  "CONFIG_METHOD="  $MODULE_CONFIG ; then
+    
+    if  query  "Do you prefer make menuconfig over make config"  y ; then  
+	CONFIG_METHOD="menuconfig"
+    else  
+	CONFIG_METHOD="config"
+    fi
+    
+    echo  "CONFIG_METHOD=$CONFIG_METHOD"  >>  $MODULE_CONFIG
 fi
 
 
-message "Do you wish to give an alternative .config file?"
-while [ true ] 
-do
-	read -p "Write its location, or just press enter for default .config : " configfilelocation
-	
-	if [ "$configfilelocation" != "" ]; then
-		if [ -f $configfilelocation ]; then  
-			cp $configfilelocation ${BUILD_DIRECTORY}/linux-$VERSION/.config 
-			message "Using user's .config" &&
-			break;
-		else #the file doesn't exist
-			message "$configfilelocation doesn't exist. Please try again"
-		fi
-	else # user only just pressed enter, so just carry on
-		message "no selection made."
-		break;
-	fi
-done
-# put a line in between as a separator
-message "" 
-
 
-if  [  !  -f  $CONFIG_CACHE/.config  ];  then
-  message  "Preparing to make menuconfig."
-  CONFIG_KERNEL="y"
+if  [  !  -f  $CONFIG_CACHE/.config.beta  ] && [ ! -f $CONFIG_CACHE/.config ]; then
+    message  "Preparing to make menuconfig."
+    CONFIG_KERNEL="y"
 else
-  message  "Reconfiguration is optional."
-  if    query  "Configure linux kernel?"  n
-  then  CONFIG_KERNEL=y
-  else  CONFIG_KERNEL=n
-  fi
+    message  "Reconfiguration is optional."
+    
+    if  query  "Configure linux kernel?"  n ; then  
+	CONFIG_KERNEL=y
+    else  
+	CONFIG_KERNEL=n
+    fi
 fi
 
-TEMP=`grep  -v  "CONFIG_KERNEL="          $MODULE_CONFIG  |
-      grep  -v  "CONFIG_LILO="                           |
+TEMP=`grep  -v  "CONFIG_KERNEL=" $MODULE_CONFIG  |
+      grep  -v  "CONFIG_LILO="                   |
       grep  -v  "CONFIG_GRUB="`
 
 echo  "$TEMP"                         >   $MODULE_CONFIG
 echo  "CONFIG_KERNEL=$CONFIG_KERNEL"  >>  $MODULE_CONFIG
 echo  "CONFIG_LILO=$CONFIG_LILO"      >>  $MODULE_CONFIG
 echo  "CONFIG_GRUB=$CONFIG_GRUB"      >>  $MODULE_CONFIG
-

Index: PRE_BUILD
===================================================================
RCS file: /var/cvs/lunar/moonbase/kernel/linux-beta/PRE_BUILD,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- PRE_BUILD	28 Sep 2003 17:20:46 -0000	1.3
+++ PRE_BUILD	15 Oct 2003 01:26:15 -0000	1.4
@@ -1,13 +1,16 @@
-message "${WARNING_COLOR}Preserving current /usr/src/linux!${NORMAL_COLOR}"
+cd       /usr/src
+rm  -rf  linux
 
-cd ${BUILD_DIRECTORY}
+unpack  $SOURCE
 
-unpack ${SOURCE}
+ln  -sf     linux-$VERSION  linux
 
-if [ -f ${CONFIG_CACHE}/.config ] ; then
-  cp ${CONFIG_CACHE}/.config /usr/src/linux-${VERSION}
+if  [  -f   $CONFIG_CACHE/.config.beta  ];  then
+  cp        $CONFIG_CACHE/.config.beta  /usr/src/linux
+elif  [  -f   $CONFIG_CACHE/.config  ];  then
+  cp        $CONFIG_CACHE/.config  /usr/src/linux
 fi
 
-chown -R root:root /usr/src/linux-${VERSION}
-cd /usr/src/linux-${VERSION}
-
+chown -R root.root /usr/src/linux
+cd /usr/src/linux
+sedit 's/EXTRAVERSION =/EXTRAVERSION = -beta/g' Makefile




More information about the Lunar-commits mailing list