CVS: moonbase/kernel/linux-stable BUILD, 1.7, 1.8 POST_INSTALL, 1.7,
1.8 PRE_BUILD, 1.10, 1.11
elaine at lunar-linux.org
elaine at lunar-linux.org
Thu Oct 9 15:47:40 GMT 2003
Update of /var/cvs/lunar/moonbase/kernel/linux-stable
In directory dbguin.lunar-linux.org:/tmp/cvs-serv22802
Modified Files:
BUILD POST_INSTALL PRE_BUILD
Log Message:
linux-stable with backups of kernel files and module dirs improved boot
config edits
Index: BUILD
===================================================================
RCS file: /var/cvs/lunar/moonbase/kernel/linux-stable/BUILD,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- BUILD 1 Sep 2003 15:42:53 -0000 1.7
+++ BUILD 9 Oct 2003 15:47:38 -0000 1.8
@@ -26,35 +26,25 @@
done
-backup_mods_krnl() {
-
- if [ -d /lib/modules/$VERSION-stable ]; then
- rm -rf /lib/modules/$VERSION-stable.old
- mv /lib/modules/$VERSION-stable \
- /lib/modules/$VERSION-stable.old
- fi
-
- if [ -f /boot/stable_bz-$VERSION ]; then
- mv -f /boot/stable_bz-$VERSION.old /boot/stable_bz-$VERSION.old_2
- cp -p /boot/stable_bz-$VERSION /boot/stable_bz-$VERSION.old
- fi
-
-}
-
-
(
yes n | make oldconfig
cp .config $CONFIG_CACHE
rm -f arch/i386/boot/bzImage
- make dep &&
- make clean &&
- make bzImage &&
- make modules &&
- prepare_install &&
- backup_mods_krnl &&
- make modules_install &&
- cp arch/i386/boot/bzImage /boot/stable_bz-$VERSION &&
+
+ # Because parallel make seems not to work, a hack
+
+ optimize_make &&
+ KMAKES=${MAKES:=1} &&
+ make -j${KMAKES} dep &&
+ make -j${KMAKES} clean &&
+ make -j${KMAKES} bzImage &&
+ make -j${KMAKES} modules &&
+ backup_mods_krnl ${VERSION}-stable &&
+ prepare_install &&
+ make modules_install &&
+
+ cp arch/i386/boot/bzImage /boot/${VERSION}-stable &&
# link the modules so depmod can find them!
ln -f -s /lib/modules/$VERSION-stable /lib/modules/$VERSION
Index: POST_INSTALL
===================================================================
RCS file: /var/cvs/lunar/moonbase/kernel/linux-stable/POST_INSTALL,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- POST_INSTALL 3 Oct 2003 04:26:28 -0000 1.7
+++ POST_INSTALL 9 Oct 2003 15:47:38 -0000 1.8
@@ -1,191 +1,8 @@
-lilo_image_entry() {
-
- cat << EOF
-
-image = /boot/stable_bz-$VERSION
- label = stable-$VERSION
- read-only
-
-
-EOF
-}
-
-lilo_old_image_entry() {
-
- cat << EOF
-
-image = /boot/stable_bz-$VERSION.old
- label = old-stable-$VERSION
- read-only
-
-
-EOF
-}
-
-grub_image_entry() {
-
-. $DEPENDS_CONFIG/grub
-
- cat << EOF
-
-title stable-$VERSION
-kernel $GRUB_BOOT/stable_bz-$VERSION
-root $GRUB_ROOT
-
-EOF
-
-}
-
-grub_old_image_entry() {
-
-. $DEPENDS_CONFIG/grub
-
- cat << EOF
-
-title old-stable-$VERSION
-kernel $GRUB_BOOT/stable_bz-$VERSION.old
-root $GRUB_ROOT
-
-EOF
-
-}
-
-
-
-update_lilo() {
-
- if ! ( grep -q "stable-$VERSION" /etc/lilo.conf &&
- grep -q "stable-$VERSION.old" /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
- if ! grep -q "stable-$VERSION" /etc/lilo.conf; then
- echo -e "`lilo_image_entry`" >> /etc/lilo.conf.new
- fi
- if ! grep -q "stable-$VERSION.old" /etc/lilo.conf; then
- echo -e "`lilo_old_image_entry`" >> /etc/lilo.conf.new
- fi
- 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 "stable-$VERSION" /boot/grub/menu.lst &&
- grep -q "stable-$VERSION.old" /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
- if ! grep -q "stable-$VERSION" /boot/grub/menu.lst; then
- echo -e "`grub_image_entry`" >> /boot/grub/menu.lst.new
- fi
- if ! grep -q "stable-$VERSION.old" /boot/grub/menu.lst; then
- echo -e "`grub_old_image_entry`" >> /boot/grub/menu.lst.new
- fi
- 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|Y]"
- 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
-
-}
case $BOOT_LOADER in
- lilo) update_lilo ;;
- grub) update_grub ;;
+ lilo) update_lilo ${VERSION}-stable stbl-2.4.22 ;;
+ grub) update_grub ${VERSION}-stable stbl-2.4.22 ;;
esac
Index: PRE_BUILD
===================================================================
RCS file: /var/cvs/lunar/moonbase/kernel/linux-stable/PRE_BUILD,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- PRE_BUILD 1 Sep 2003 15:42:53 -0000 1.10
+++ PRE_BUILD 9 Oct 2003 15:47:38 -0000 1.11
@@ -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-$VERSION linux
More information about the Lunar-commits
mailing list