mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

146 lines
4.6 KiB

# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
#
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# Please add additional copyright information _after_ the line containing
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
#
# ROCK Linux: rock-src/package/base/linux24/linux24.conf
# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. A copy of the GNU General Public
# License can be found at Documentation/COPYING.
#
# Many people helped and are helping developing ROCK Linux. Please
# have a look at http://www.rocklinux.org/ and the Documentation/TEAM
# file for details.
#
# --- ROCK-COPYRIGHT-NOTE-END ---
# include the function to patch and configure the kernel
. $base/package/base/linux24/lx_config.sh
main_lx() {
lx_config
# we need to rerun the oldconfig since the used .config
# might not match the one used in the last oldconfig run
# (e.g. the nomods is run last - and normally the module
# one is used)
yes '' | eval $MAKE oldconfig > /dev/null
if [[ $treever = 24* ]] ; then
echo "Creating dependencies ..."
eval $MAKE -j 1 dep
fi
echo "Cleanup kernel ..."
eval $MAKE -j 1 clean > /dev/null
echo "Building the kernel ..."
[ "$pkg" = "$ROCKCFG_DEFAULT_KERNEL" ] && default=1
case "$lx_cpu" in
i386)
eval $MAKE bzImage
cp -vf arch/i386/boot/bzImage $root/boot/vmlinuz_${lx_kernelrelease}
[ "$default" ] && \
cp -vf arch/i386/boot/bzImage $root/boot/vmlinuz
;;
x86_64)
eval $MAKE bzImage
cp -vf arch/x86_64/boot/bzImage $root/boot/vmlinuz_${lx_kernelrelease}
[ "$default" ] && \
cp -vf arch/x86_64/boot/bzImage $root/boot/vmlinuz
;;
alpha)
eval $MAKE vmlinux
gzip < vmlinux > $root/boot/vmlinux_${lx_kernelrelease}.gz
[ "$default" ] && \
cp -vf $root/boot/vmlinux_$ver-rock.gz $root/boot/vmlinux.gz
;;
mips)
eval $MAKE vmlinux
$BUILDCC arch/mips/boot/elf2ecoff.c -o elf2ecoff
./elf2ecoff vmlinux vmlinux.ecoff
cp -vf vmlinux.ecoff $root/boot/vmlinux_${lx_kernelrelease}.ecoff
[ "$default" ] && \
cp -vf vmlinux.ecoff $root/boot/
;;
ppc)
eval $MAKE vmlinux
cp -vf vmlinux $root/boot/vmlinux_${lx_kernelrelease}
[ "$default" ] && \
cp -vf vmlinux $root/boot/vmlinux
eval $MAKE zImage
# copy some specially pre-processed files with version
echo "before $IFS"
IFS=$' \t\n' # correcly set IFS - it get mangled somewhere ...
echo "after $IFS"
for x in $(cd arch/ppc/boot/images/ ; ls zImage.*) ; do
cp -v arch/ppc/boot/images/$x \
$root/boot/${x/zImage/zImage-$ver}
done
;;
sparc)
eval $MAKE vmlinux
cp -vf vmlinux $root/boot/vmlinux_$ver-rock
[ "$default" ] && \
cp -vf vmlinux $root/boot/vmlinux
# build a sun4 kernel ...
#echo "CONFIG_SUN4=y" >> .config
#yes '' | eval $MAKE oldconfig > /dev/null
#eval $MAKE vmlinux
#cp -vf vmlinux $root/boot/vmlinux4_$ver-rock
[ "$default" ] && \
# cp -vf vmlinux $root/boot/vmlinux4
#echo "# CONFIG_SUN4 is not set" >> .config
yes '' | eval $MAKE oldconfig > /dev/null
;;
*)
eval $MAKE vmlinux
cp -vf vmlinux $root/boot/vmlinux_${lx_kernelrelease}
[ "$default" ] && \
cp -vf vmlinux $root/boot/vmlinux
;;
esac
cp -vf .config $root/boot/kconfig_${lx_kernelrelease}
cp -vf System.map $root/boot/System.map_${lx_kernelrelease}
[ "$default" ] && cp -vf System.map $root/boot/System.map
echo "Building the modules ..."
eval $MAKE modules
echo "Installing the modules ..."
if [ $stagelevel -le 1 ] ; then
eval $MAKE modules_install \
INSTALL_MOD_PATH=$root DEPMOD=/bin/true
else
eval $MAKE modules_install DEPMOD=/bin/true
echo "Running 'depmod -a -q -F /boot/System.map ${lx_kernelrelease}' .."
depmod -a -q -F /boot/System.map_${lx_kernelrelease} ${lx_kernelrelease}
for x in /lib/modules/${lx_kernelrelease}/modules.*
do [ -f $x ] && add_flist $x; done
fi
# fix /lib/modules/${ver}/build symlink
rm -f $root/lib/modules/${lx_kernelrelease}/build
ln -sf ../../../usr/src/linux-${lx_kernelrelease} \
$root/lib/modules/${lx_kernelrelease}/build
if [ "$default" ] ; then
cp $base/package/base/linux24/mkinitrd.sh $root/sbin/mkinitrd
chmod +x $root/sbin/mkinitrd
if [ -z "$root" ]; then
mkinitrd empty ${lx_kernelrelease}
rm -f /boot/initrd.img
ln -s initrd-${lx_kernelrelease}.img /boot/initrd.img
fi
fi
}
custmain="main_lx"
autopatch=0