[Livecd-commit] trunk/create_livecd.sh
svnusers at osadl.org
svnusers at osadl.org
Tue Jul 17 21:42:58 CEST 2007
Repository: /var/svn-osadl-projects/livecd/
Revision: 11
Author: tb10alj
Log message:
- Add the -C option (tell the script which kernel configuration to use)
- Add an export for CONCURRENCY_LEVEL (used by make-kpkg as -j option for make)
Updated trunk/create_livecd.sh
Modified: trunk/create_livecd.sh
===================================================================
--- trunk/create_livecd.sh 2007-07-16 14:41:11 UTC (rev 10)
+++ trunk/create_livecd.sh 2007-07-17 19:42:57 UTC (rev 11)
@@ -70,6 +70,7 @@
echo " This option also requires:"
echo " -u U nionFS Source"
echo " -c C loop Source"
+ echo " -C Kernel C onfiguration file (optional)"
echo " -m only create M aster-Directory"
echo " -p custom tool / P rogram directory"
echo " -g G raphics directory which contains the themes dir / isolinux dir / KDE background / index.html"
@@ -84,7 +85,9 @@
MKISOFS=`which mkisofs`
MAKE_KPKG=`which make-kpkg`
-while getopts "ht:s:k:mu:c:p:g:d:ov:" Option
+KERNEL_CONFIG="kernel-configs/config-knoppix"
+
+while getopts "ht:s:k:mu:c:p:g:d:ov:C:" Option
do
case $Option in
h ) print_help; exit 0;;
@@ -93,6 +96,7 @@
k ) KERNEL_SOURCE=$OPTARG;;
u ) UNIONFS_SOURCE=$OPTARG;;
c ) CLOOP_SOURCE=$OPTARG;;
+ C ) KERNEL_CONFIG=$OPTARG;;
m ) ONLY_MASTER=1;;
p ) CUSTOM_PROGRAM_DIRECTORY=$OPTARG;;
g ) GRAPHICS_DIRECTORY=$OPTARG;;
@@ -244,14 +248,16 @@
exit_failed
fi
- if [ ! -f kernel-configs/config-knoppix ]
+ if [ ! -f $KERNEL_CONFIG ]
then
echo "No kernel config found"
echo "Please create ./kernel_configs/config-knoppix"
+ echo "or specifiy an alternate .config with the -C option"
exit_failed
fi
+
NUM_CPUS=`grep ^processor /proc/cpuinfo | wc -l`
- CONCURRENCY_LEVEL=`expr $NUM_CPUS \* 2`
+ export CONCURRENCY_LEVEL=`expr $NUM_CPUS \* 2`
fi
COMEFROM=`pwd`
@@ -422,15 +428,20 @@
if [ "$KERNEL_SOURCE" ]
then
cd $COMEFROM
- # Get kernel version and run make-kpkg
+
+ # Clean up the kernel source
cd $KERNEL_SOURCE
make distclean
$MAKE_KPKG clean
+
# Copy the config file to the kernel source directory
- cp $COMEFROM/kernel-configs/config-knoppix $KERNEL_SOURCE/.config
+ cd $COMEFROM
+ cp $KERNEL_CONFIG $KERNEL_SOURCE/.config
+ # Get kernel version and run make-kpkg
+ cd $KERNEL_SOURCE
KERNELVERSION=`make kernelversion`
- $MAKE_KPKG --arch i386 --subarch i386 --cross-compile - kernel-image kernel-headers
+ $MAKE_KPKG --arch i386 --cross-compile - kernel-image kernel-headers
handle_return_value "Error building kernel"
# uninstall the KNOPPIX kernel
More information about the Livecd-commit
mailing list