CVS: moonbase/kernel/linux-beta BUILD, 1.7, 1.8 DETAILS, 1.14, 1.15 POST_INSTALL, 1.4, 1.5 PRE_BUILD, 1.5, 1.6

Jaime Buffery nestu at lunar-linux.org
Tue Nov 25 13:59:43 GMT 2003


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

Modified Files:
	BUILD DETAILS POST_INSTALL PRE_BUILD 
Log Message:
Bumped version from 2.6.0test9 to 2.6.0test10. 
Now lilo and grub are handled by core functions, and not by the module itself (new naming for the boot images aswell). 
Grub always-asking bug has been fixed.


Index: BUILD
===================================================================
RCS file: /var/cvs/lunar/moonbase/kernel/linux-beta/BUILD,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- BUILD	15 Oct 2003 17:43:10 -0000	1.7
+++ BUILD	25 Nov 2003 13:59:41 -0000	1.8
@@ -19,9 +19,9 @@
 		    make config ;;		
 	    esac
 
-            if  query  "Repeat $CONFIG_METHOD?  "  n ; then  
+	    if  query  "Repeat $CONFIG_METHOD?  "  n ; then  
 		CONFIG_KERNEL=y
-            else  
+	    else  
 		CONFIG_KERNEL=n
             fi
 	    
@@ -35,33 +35,23 @@
 done
 
 
-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/.config.beta
-    make  dep              &&
-    make  bzImage          &&
-    make  modules          &&
-    prepare_install        &&
-    backup_mods_krnl       &&
-    make  modules_install  &&
-    cp arch/i386/boot/bzImage /boot/beta-$VERSION &&
+    rm -f arch/i386/boot/bzImage
+
+   # Because parallel make seems not to work, a hack   
+
+    optimize_make                      &&
+    KMAKES=${MAKES:=1}                 &&
+    make  -j${KMAKES} bzImage          &&
+    make  -j${KMAKES} modules          &&
+    backup_mods_krnl ${VERSION}-beta   &&
+    prepare_install                    &&
+    make  modules_install #             &&
+
+    cp arch/i386/boot/bzImage /boot/${VERSION}-beta &&
     # link the modules so depmod can find them!
-    ln -f -s /lib/modules/$VERSION-beta /lib/modules/$VERSION
+    ln -f -s /lib/modules/${VERSION}-beta /lib/modules/$VERSION
 
 ) > $C_FIFO 2>&1

Index: DETAILS
===================================================================
RCS file: /var/cvs/lunar/moonbase/kernel/linux-beta/DETAILS,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- DETAILS	26 Oct 2003 16:35:23 -0000	1.14
+++ DETAILS	25 Nov 2003 13:59:41 -0000	1.15
@@ -1,10 +1,10 @@
           MODULE=linux-beta
              PKG=linux
-         VERSION=2.6.0-test9
+         VERSION=2.6.0-test10
           SOURCE=$PKG-$VERSION.tar.bz2
    SOURCE_URL[0]=$KERNEL_URL/pub/linux/kernel/v2.6/$SOURCE
    SOURCE_URL[1]=http://www.kernel.org/pub/linux/kernel/v2.6/$SOURCE
-      SOURCE_VFY=md5:52eef08a43aa28689213b8ab5674f73b
+      SOURCE_VFY=md5:61828549d38189bdece85f5107a507ca
         WEB_SITE=http://www.kernel.org
          ENTERED=20030410
          UPDATED=20031026

Index: POST_INSTALL
===================================================================
RCS file: /var/cvs/lunar/moonbase/kernel/linux-beta/POST_INSTALL,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- POST_INSTALL	19 Nov 2003 21:17:07 -0000	1.4
+++ POST_INSTALL	25 Nov 2003 13:59:41 -0000	1.5
@@ -1,152 +1,9 @@
-lilo_image_entry()  {
-
-  cat  <<  EOF
-
-image			=	/boot/vmlinubz-$VERSION
-	label		=	linux-$VERSION
-	read-only
-	restricted
-
-EOF
-
-}
-
-
-grub_image_entry()  {
-
-. $DEPENDS_CONFIG/grub
-
-  cat  <<  EOF
-
-title   linux-$VERSION
-kernel  $GRUB_BOOT/vmlinubz-$VERSION
-root    $GRUB_ROOT
-
-EOF
-
-}
-
-
-update_lilo()  {
-  if  !  grep  -q  "$VERSION"  /etc/lilo.conf;  then
-
-    IFS_OLD=$IFS
-    export  IFS="
-"
-
-    rm  -rf  /etc/lilo.conf.new
-    cp  /etc/lilo.conf  /etc/lilo.conf.old
-
-    (( IMAGE_COUNT=0  ))
-
-    for  LINE  in  `cat /etc/lilo.conf`;  do
-
-      if   echo  $LINE  |  grep  -q  "image"  ||
-           echo  $LINE  |  grep  -q  "other"  ;  then
-        if  (( IMAGE_COUNT  == 0  ));  then
-          echo  -e  "`lilo_image_entry`"  >>  /etc/lilo.conf.new
-        fi
-        ((  IMAGE_COUNT++  ))
-      fi
-
-      if  ((  IMAGE_COUNT == 14  ));  then
-        break
-      fi
-    
-      echo  $LINE  >>  /etc/lilo.conf.new
-
-    done
-
-    if  ((  IMAGE_COUNT ==  0  ));  then
-      echo  -e  "`lilo_image_entry`"  >>  /etc/lilo.conf.new
-    fi
-
-    cp  /etc/lilo.conf.new  /etc/lilo.conf
-
-    export  IFS=$IFS_OLD
-
-  fi
-
-  case  $CONFIG_LILO in
-    y|Y|j|J)  ${EDITOR:-nano}  /etc/lilo.conf  ;;
-  esac
-
-  /sbin/lilo
-
-}
-
-
-update_grub()  {
-  if  !  grep  -q  "$VERSION"  /boot/grub/menu.lst;  then
-
-    IFS_OLD=$IFS
-    export  IFS="
-"
-
-    rm  -rf  /boot/grub/menu.lst.new
-    cp  /boot/grub/menu.lst  /boot/grub/menu.lst.old
-
-    (( IMAGE_COUNT=0  ))
-
-    for  LINE  in  `cat /boot/grub/menu.lst`;  do
-
-      if   echo  $LINE  |  grep  -q  "title";  then
-        if  (( IMAGE_COUNT  == 0  ));  then
-          echo  -e  "`grub_image_entry`"  >>  /boot/grub/menu.lst.new
-        fi
-        ((  IMAGE_COUNT++  ))
-      fi
-
-      if  ((  IMAGE_COUNT == 14  ));  then
-        break
-      fi
-    
-      echo  $LINE  >>  /boot/grub/menu.lst.new
-
-    done
-
-    if  ((  IMAGE_COUNT ==  0  ));  then
-      echo  -e  "`grub_image_entry`"  >>  /boot/grub/menu.lst.new
-    fi
-
-    cp  /boot/grub/menu.lst.new  /boot/grub/menu.lst
-
-    export  IFS=$IFS_OLD
-
-  fi
-
-  case  $CONFIG_GRUB in
-
-    y|Y)  if [ -n "$EDITOR" ];             then
-            $EDITOR  /boot/grub/menu.lst;  else
-            nano     /boot/grub/menu.lst
-          fi
-          ;;
-  esac
-
-  message "Install GRUB into MBR of first drive? [y|N]"
-  read GRUB_FIRST_DRIVE
-  case $GRUB_FIRST_DRIVE in
-    y|Y) GRUB_BOOT_DEVICE="(hd0)" ;; 
-    *  ) 
-         message "Otherwise please specify in GRUB notation the desired drive/partition"
-         message "Using parenthesis and NO spaces!"
-         message "Samples: (hd1)    2nd drive MBR"
-         message "         (hd1,0)  2nd drive with 1st partition"
-         message "         (hd0,2)  1st drive with 3rd partition"
-         echo -n "GRUB_BOOT_DEVICE=(hd#,#):  "
-         read GRUB_BOOT_DEVICE
-  esac
-
-  /usr/sbin/grub-install "$GRUB_BOOT_DEVICE"
-  sleep 4
-
-}
-
+# Done to shorten the boot label for lilo
+LABEL=`echo ${VERSION} | sed 's/-//g' | sed 's/test/t/g'`
 
 case  $BOOT_LOADER  in
-  lilo)  update_lilo  ;;
-  grub)  update_grub  ;;
+  lilo)  update_lilo   ${VERSION}-beta  b-${LABEL} ;;
+  grub)  update_grub   ${VERSION}-beta  b-${LABEL} ;;
 esac
 
 

Index: PRE_BUILD
===================================================================
RCS file: /var/cvs/lunar/moonbase/kernel/linux-beta/PRE_BUILD,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- PRE_BUILD	22 Oct 2003 01:49:55 -0000	1.5
+++ PRE_BUILD	25 Nov 2003 13:59:41 -0000	1.6
@@ -1,3 +1,12 @@
+# Bail if we're not running a core with kernel fuctions
+
+if [ ! -e $FUNCTIONS/kernel.lunar ] ; then
+  message "   ${PROBLEM_COLOR}Bailing out, ${DEFAULT_COLOR}Lunar (or theedge) code version too old"
+  message "   ${PROBLEM_COLOR}Update core ${MODULE_COLOR}(lin lunar or lin theedge)${DEFAULT_COLOR} to install this kernel"
+  kill $PPID
+  exit;
+fi
+
 cd       /usr/src
 rm  -rf  linux
 
@@ -6,11 +15,14 @@
 ln  -sf     linux-$VERSION  linux
 
 if  [  -f   $CONFIG_CACHE/.config.beta  ];  then
-  cp        $CONFIG_CACHE/.config.beta  /usr/src/linux
+  cp        $CONFIG_CACHE/.config.beta  /usr/src/linux/.config &&
 elif  [  -f   $CONFIG_CACHE/.config  ];  then
-  cp        $CONFIG_CACHE/.config  /usr/src/linux
+  cp        $CONFIG_CACHE/.config  /usr/src/linux  &&
 fi
 
 chown -R root.root /usr/src/linux
 cd /usr/src/linux
-sedit 's/EXTRAVERSION = */EXTRAVERSION = -beta/g' Makefile
+
+EXTRAVERSION=`grep -m 1 "EXTRAVERSION =" Makefile`
+sed -i "s/$EXTRAVERSION/$EXTRAVERSION-beta/g" Makefile
+#sedit 's/EXTRAVERSION = /EXTRAVERSION = -beta/g' Makefile




More information about the Lunar-commits mailing list