CVS: moonbase/kernel/linux-grsec BUILD, 1.4, 1.5 CONFIGURE, 1.3,
1.4 DETAILS, 1.9, 1.10 POST_INSTALL, 1.7, 1.8 PRE_BUILD, 1.4,
1.5 CONFLICTS, 1.1, NONE
Niki Gulbrand
niki at lunar-linux.org
Wed Dec 3 10:47:13 GMT 2003
Update of /var/cvs/lunar/moonbase/kernel/linux-grsec
In directory dbguin.lunar-linux.org:/tmp/cvs-serv25178
Modified Files:
BUILD CONFIGURE DETAILS POST_INSTALL PRE_BUILD
Removed Files:
CONFLICTS
Log Message:
Module bumped to kernel version 2.4.23, and patchset to r3.1.1, and the
kernel module has been converted to the elaine new kernel module framework.
Tested, and produces runnable kernel ;-)
Index: BUILD
===================================================================
RCS file: /var/cvs/lunar/moonbase/kernel/linux-grsec/BUILD,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- BUILD 27 Aug 2003 20:54:21 -0000 1.4
+++ BUILD 3 Dec 2003 10:47:11 -0000 1.5
@@ -1,81 +1,58 @@
cd /usr/src/linux
-#set the arch once
-XARCH="x`arch`"
-
-#Select the prefered linux config method and lets things fall back
while
- case $CONFIG_KERNEL in
- y|Y) case $CONFIG_METHOD in
- xconfig )
- if [ $DISPLAY ]
- then
- make xconfig || make menuconfig || make config
- else
- make menuconfig || make config
- fi ;;
- menuconfig ) make menuconfig || make config ;;
- config ) make config ;;
- esac
- if query "Repeat $CONFIG_METHOD?" n
- then CONFIG_KERNEL=y
- else CONFIG_KERNEL=n
- fi ;;
- *) false ;;
+ case $CONFIG_KERNEL in
+ y|Y)
+
+ case $CONFIG_METHOD in
+ xconfig )
+ if [ "$DISPLAY" ]; then
+ make xconfig || make menuconfig || make config
+ else
+ make menuconfig || make config
+ fi ;;
+
+ menuconfig )
+ make menuconfig || make config ;;
+
+ config )
+ make config ;;
+ esac
+
+ if query "Repeat $CONFIG_METHOD? " n ; then
+ CONFIG_KERNEL=y
+ else
+ CONFIG_KERNEL=n
+ fi
+ ;;
+
+ *)
+ false ;;
esac
do
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
-}
+done
(
yes n | make oldconfig
- cp .config $CONFIG_CACHE
- make dep &&
+ cp .config $CONFIG_CACHE/.config.grsec
+ rm -f arch/i386/boot/bzImage
- case $XARCH in
- xi386 | xi486 | xi586 | xi686 ) make bzImage;;
- xalpha ) make boot;;
- xppc ) make vmlinux;;
- xsparc ) echo "Sorry no Lunar port yet want to try its easy :-P the penguin team will help.";;
- xarm ) echo "Sorry no Lunar port yet want to try its easy :-P the penguin team will help.";;
- xm68k ) echo "Sorry no Lunar port yet want to try its easy :-P the penguin team will help.";;
- xmips ) echo "Sorry no Lunar port yet want to try its easy :-P the penguin team will help.";;
- *) echo "Opps. You, yea you, yap at hardkrash for forgetting to put in your arch in this module. :-P";;
- esac &&
-
- if grep -q "CONFIG_MODULES=y" .config
- then
- make modules
- fi &&
-
- prepare_install &&
-
- if grep -q "CONFIG_MODULES=y" .config
- then
- backup_modules &&
- make modules_install
- fi &&
-
- case $XARCH in
- xi386 | xi486 | xi586 | xi686 )
- cp arch/i386/boot/bzImage /boot/vmlinubz-$VERSION;;
-
- xalpha )
- cp arch/alpha/boot/vmlinux.gz /boot/vmlinux-$VERSION.gz;;
+ # Because parallel make seems not to work, a hack
- xppc ) echo "Oh crud they forgot to tell me what should I do for ppc.";;
- xarm ) echo "Oh crud they forgot to tell me what should I do for arm.";;
- xm68k ) echo "Oh crud they forgot to tell me what should I do for m68k.";;
- xmips ) echo "Oh crud they forgot to tell me what should I do for mips.";;
- * ) echo "Oh crud they forgot to tell me what to do for you. ;~-(";;
- esac
+ 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}-grsec-$PVERSION &&
+ prepare_install &&
+ make modules_install &&
+
+ cp arch/i386/boot/bzImage /boot/${VERSION}-grsec-${PVERSION} &&
+ # link the modules so depmod can find them!
+ ln -f -s /lib/modules/$VERSION-grsec-$PVERSION /lib/modules/$VERSION
+
) > $C_FIFO 2>&1
Index: CONFIGURE
===================================================================
RCS file: /var/cvs/lunar/moonbase/kernel/linux-grsec/CONFIGURE,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CONFIGURE 8 Mar 2003 20:51:47 -0000 1.3
+++ CONFIGURE 3 Dec 2003 10:47:11 -0000 1.4
@@ -1,136 +1,58 @@
-XARCH="x`arch`"
-
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
-case $XARCH in
- xi386|xi486|xi586|xi686)
- message "The Linux Kernel requires a boot loader"
- message "Choose either GRUB or LILO"
- if query "To use lilo choose yes, to use grub choose no" y
- then BOOT_LOADER=lilo
- else BOOT_LOADER=grub
- fi;;
-
- xalpha) BOOT_LOADER=aboot;;
- xppc) BOOT_LOADER=yaboot;;
- xsparc) echo ";~( I am not setup for Sparcs. Can you electrify me?.";;
- xarm) echo ";~( I am not setup for arms. Can you give me limbs?";;
- xm68k) echo ";~( I am not setup for 68k. Can you configure me?";;
- xmips) echo ";~( I am not setup for mips. Can you configure me?";;
- esac
-
- echo "BOOT_LOADER=$BOOT_LOADER" >> $MODULE_CONFIG
-
-fi
-
-CONFIG_CRYPTOAPI="y"
-if ! grep -q "CONFIG_CRYPTOAPI=" $MODULE_CONFIG &&
- query "Add Crypto-api patch ?" y
-then CONFIG_CRYPTOAPI="y"
-else if grep -q "CONFIG_CRYPTOAPI=n" $MODULE_CONFIG
- then CONFIG_CRYPTOAPI="n"
- fi
-fi
+ if query "Use LILO?" y
+ then BOOT_LOADER=lilo
+ else BOOT_LOADER=grub
+ fi
-CONFIG_CPUFREQ="y"
-if ! grep -q "CONFIG_CPUFREQ=" $MODULE_CONFIG &&
- query "Add CPUFreq patch ?" y
-then CONFIG_CPUFREQ="y"
-else if grep -q "CONFIG_CPUFREQ=n" $MODULE_CONFIG
- then CONFIG_CPUFREQ="n"
- fi
+ echo "BOOT_LOADER=$BOOT_LOADER" >> $MODULE_CONFIG
fi
-
CONFIG_GRUB="n"
CONFIG_LILO="n"
-CONFIG_ABOOT="n"
-CONFIG_YABOOT="n"
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; then
- if query "Automaticaly configure and run lilo?" n;
- then
- CONFIG_LILO=y
- fi
-
- if query "Hand edit /etc/lilo.conf?" n;
- then
- EDIT_LILO=y
- else
- EDIT_LILO=n
- fi
-fi
-
-if grep -q "BOOT_LOADER=aboot" $MODULE_CONFIG &&
- query "Configure aboot?" n
-then CONFIG_ABOOT=y
+ then CONFIG_GRUB=y
fi
-if grep -q "BOOT_LOADER=yaboot" $MODULE_CONFIG &&
- query "Configure yaboot?" n
-then CONFIG_YABOOT=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
- CONFIG_HELP="Answer \Z1one\Zn question at a time. (Are you SURE?)"
- MENUCONFIG_HELP="Menu driven ncurses interface, falls back to config."
- XCONFIG_HELP="Graphical interface with X windows, falls back to menuconfig."
-
- OPTIONS=( "config" "text based" "off" "$CONFIG_HELP"
- "menuconfig" "ncurses menu interface" "off" "$MENUCONFIG_HELP"
- "xconfig" "X graphical interface" "off" "$XCONFIG_HELP" )
-
- while [ -z "$CONFIG_METHOD" ] ; do
- CONFIG_METHOD=`dialog --title "Select how to configure your kernel" \
- --backtitle "Lunar Linux Kernel Configuration" \
- --ok-label "Ok" \
- --no-cancel \
- --stdout \
- --item-help \
- --colors \
- --radiolist \
- "Select your kernel configuration method" \
- 0 0 0 \
- "${OPTIONS[@]}"`
- done
-
+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
-
-
-if [ ! -f $CONFIG_CACHE/.config ]; then
- message "Preparing to make $CONFIG_METHOD"
+
+
+
+if [ ! -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
+ then CONFIG_KERNEL=y
+ else
+ CONFIG_KERNEL=n
fi
fi
-TEMP=`grep -v "CONFIG_KERNEL=" $MODULE_CONFIG |
- grep -v "CONFIG_LILO=" |
- grep -v "CONFIG_GRUB=" |
- grep -v "CONFIG_ABOOT=" |
- grep -v "CONFIG_YABOOT=" |
- grep -v "CONFIG_CRYPTOAPI=" |
- grep -v "CONFIG_CPUFREQ=" |
- grep -v "EDIT_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
-echo "CONFIG_ABOOT=$CONFIG_ABOOT" >> $MODULE_CONFIG
-echo "CONFIG_YABOOT=$CONFIG_YABOOT" >> $MODULE_CONFIG
-echo "CONFIG_CRYPTOAPI=$CONFIG_CRYPTOAPI" >> $MODULE_CONFIG
-echo "CONFIG_CPUFREQ=$CONFIG_CPUFREQ" >> $MODULE_CONFIG
-echo "EDIT_LILO=$EDIT_LILO" >> $MODULE_CONFIG
+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: DETAILS
===================================================================
RCS file: /var/cvs/lunar/moonbase/kernel/linux-grsec/DETAILS,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- DETAILS 17 Aug 2003 20:42:28 -0000 1.9
+++ DETAILS 3 Dec 2003 10:47:11 -0000 1.10
@@ -1,16 +1,17 @@
MODULE=linux-grsec
- VERSION=2.4.20
+ VERSION=2.4.23
+ PVERSION=r3.1.1
SOURCE=linux-$VERSION.tar.bz2
- SOURCE2=linux-grsec-2.4.20-lunar-patchset-rc3.2.tar.bz2
+ SOURCE2=linux-$VERSION-grsec-patch-set-$PVERSION.tar.bz2
SOURCE_DIRECTORY=$BUILD_DIRECTORY/linux-$VERSION
SOURCE_URL[0]=$KERNEL_URL/pub/linux/kernel/v2.4/$SOURCE
SOURCE_URL[1]=http://www.kernel.org/pub/linux/kernel/v2.4/$SOURCE
SOURCE2_URL[0]=$PATCH_URL/$SOURCE2
- SOURCE_VFY=md5:c439d5c93d7fc9a1480a90842465bb97
- SOURCE2_VFY=md5:3311ff33e193bcfbbbdcae97b9c84c78
+ SOURCE_VFY=md5:642af5ab5e1fc63685fde85e9ae601e4
+ SOURCE2_VFY=md5:5883fd74afd35d2905c930e0838899b9
WEBSITE=http://www.kernel.org
ENTERED=20030227
- UPDATED=20030817
+ UPDATED=20031203
KEEP_SOURCE="on"
SHORT="The Linux kernel, the core of the GNU/Linux OS, with the lunar patch set"
cat << EOF
@@ -18,10 +19,6 @@
the main patches and with these additional patches:
grsecurity
- gcc 3.1 machine types to the kernel
- cryptoapi (International kernel patch www.kerneli.org)
- cpufreq
-
Features are enabled or disabled by the standard kernel configuration tools,
i.e. "make menuconfig" or "make config" or "make xconfig".
Index: POST_INSTALL
===================================================================
RCS file: /var/cvs/lunar/moonbase/kernel/linux-grsec/POST_INSTALL,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- POST_INSTALL 3 Dec 2003 03:46:50 -0000 1.7
+++ POST_INSTALL 3 Dec 2003 10:47:11 -0000 1.8
@@ -1,161 +1,7 @@
-lilo_image_entry() {
-
- cat << EOF
-
-image = /boot/vmlinubz-$VERSION
- label = linux-$VERSION
- read-only
-
-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 $EDIT_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|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
-
-}
-
-update_aboot() {
- case $CONFIG_ABOOT in
-
- y|Y) if [ -n "$EDITOR" ]; then
- $EDITOR /etc/aboot.conf; else
- nano /etc/aboot.conf
- fi
- ;;
- esac
-}
case $BOOT_LOADER in
- lilo) [ $CONFIG_LILO = y ] && update_lilo ;;
- grub) [ $CONFIG_GRUB = y ] && update_grub ;;
- aboot) [ $CONFIG_ABOOT = y ] && update_aboot ;;
+ lilo) update_lilo ${VERSION}-grsec-${PVERSION} grsec-$VERSION ;;
+ grub) update_grub ${VERSION}-grsec-${PVERSION} grsec-$VERSION ;;
esac
@@ -167,10 +13,8 @@
if module_installed NVIDIA_kernel; then lin NVIDIA_kernel; fi
if module_installed NVIDIA; then lin NVIDIA; fi
if module_installed alsa-driver; then lin alsa-driver; fi
-if module_installed iptables; then lin iptables; fi
-if module_installed pcmcia-cs; then lin pcmcia-cs; fi
+if module_installed cryptoapi; then lin cryptoapi; fi
+if module_installed pcmcia-cs; then lin -r -c pcmcia-cs; fi
if module_installed mwavem; then lin mwavem; fi
if module_installed cipe; then lin cipe; fi
if module_installed snare-core; then lin snare-core; fi
-if module_installed ltmodem; then lin ltmodem; fi
-if module_installed bluez-kernel; then lin bluez-kernel; fi
Index: PRE_BUILD
===================================================================
RCS file: /var/cvs/lunar/moonbase/kernel/linux-grsec/PRE_BUILD,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- PRE_BUILD 8 Mar 2003 20:51:47 -0000 1.4
+++ PRE_BUILD 3 Dec 2003 10:47:11 -0000 1.5
@@ -1,44 +1,43 @@
+# 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
-rm -f linux
+rm -rf linux-$VERSION linux
unpack $SOURCE
ln -s linux-$VERSION linux
if [ -f $CONFIG_CACHE/.config ]; then
- cp $CONFIG_CACHE/.config /usr/src/linux
+ cp $CONFIG_CACHE/.config.grsec /usr/src/linux/.config
fi
cd /usr/src/linux
mkdir patches
bzcat $SOURCE_CACHE/$SOURCE2 | tar -xf - -C patches
-if [ "`arch`" == "alpha" ]; then
- patch_it patches/alpha/00_alpha-cia.patch 1
-fi
-
for pat in patches/main/*
do
- patch_it $pat 1
+ patch_it $pat 1
done
-if [ "$CONFIG_CRYPTOAPI" == "y" ]; then
- for pat in patches/crypto-api/*
- do
- patch_it $pat 1
- done
-fi
+for pat in patches/fix/*
+do
+ patch_it $pat 1
+done
-if [ "$CONFIG_CPUFREQ" == "y" ]; then
- for pat in patches/cpufreq/*
- do
- patch_it $pat 1
- done
-fi
+for pat in patches/grsecurity/*
+do
+ patch_it $pat 1
+done
rm -rf patches
chown -R root:root /usr/src/linux-$VERSION
true
-
--- CONFLICTS DELETED ---
More information about the Lunar-commits
mailing list