Added a nice patch from John R. Graham <john_r_graham@mindspring.com> to allow all...
authorChris Gianelloni <wolf31o2@gentoo.org>
Wed, 7 Nov 2007 21:38:12 +0000 (21:38 +0000)
committerChris Gianelloni <wolf31o2@gentoo.org>
Wed, 7 Nov 2007 21:38:12 +0000 (21:38 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@557 67a159dc-881f-0410-a524-ba9dfbe2cb84

23 files changed:
ChangeLog
alpha/config.sh
gen_cmdline.sh
gen_determineargs.sh
gen_funcs.sh
gen_initramfs.sh
gen_initrd.sh
gen_package.sh
genkernel
genkernel.conf
ia64/config.sh
mips/config.sh
parisc/config.sh
parisc64/config.sh
ppc/config.sh
ppc64/config.sh
sparc/config.sh
sparc64/config.sh
um/config.sh
x86/config.sh
x86_64/config.sh
xen0/config.sh
xenU/config.sh

index 83e7fd0a054c5179166b3af811a913bb93e1106d..ca41420adec9f62108629b2e26e3bde7b79b3119 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,17 @@
 # Copyright 2006-2007 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+  07 Nov 2007; Chris Gianelloni <wolf31o2@gentoo.org> alpha/config.sh,
+  gen_cmdline.sh, gen_determineargs.sh, gen_funcs.sh, gen_initramfs.sh,
+  gen_initrd.sh, gen_package.sh, genkernel, genkernel.conf, ia64/config.sh,
+  mips/config.sh, parisc/config.sh, parisc64/config.sh, ppc/config.sh,
+  ppc64/config.sh, sparc/config.sh, sparc64/config.sh, um/config.sh,
+  x86/config.sh, x86_64/config.sh, xen0/config.sh, xenU/config.sh:
+  Added a nice patch from John R. Graham <john_r_graham@mindspring.com> to
+  allow all command line options to be configurable from within the
+  genkernel.conf file. This is for bug #182616. This is genkernel 3.4.9_pre8
+  for testing.
+
   07 Nov 2007; Chris Gianelloni <wolf31o2@gentoo.org>
   generic/initrd.scripts:
   Fixed the noload module code. Thanks to Mijail Fedorovich
index 65b05addf085d9306f23e5ced247e06918e83c86..9168d2931b4dee61223b59eb4f77b5f55ff0e620 100644 (file)
@@ -1,20 +1,27 @@
 #!/bin/bash
 
+#
+# Arch-specific options that normally shouldn't be changed.
+#
 KERNEL_MAKE_DIRECTIVE="boot"
 KERNEL_MAKE_DIRECTIVE_2=""
 KERNEL_BINARY="arch/alpha/boot/vmlinux.gz"
 
-[ -z "${MAKEOPTS}" ] && MAKEOPTS="-j2"
+COMPRESS_INITRD=yes
 
-KERNEL_MAKE=make
-UTILS_MAKE=make
+#
+# Arch-specific defaults that can be overridden in the config file or on the
+# command line.
+#
+DEFAULT_MAKEOPTS="-j2"
 
-KERNEL_CC=gcc
-KERNEL_AS=as
-KERNEL_LD=ld
+DEFAULT_KERNEL_MAKE=make
+DEFAULT_UTILS_MAKE=make
 
-UTILS_CC=gcc
-UTILS_AS=as
-UTILS_LD=ld
+DEFAULT_KERNEL_CC=gcc
+DEFAULT_KERNEL_AS=as
+DEFAULT_KERNEL_LD=ld
 
-COMPRESS_INITRD=yes
+DEFAULT_UTILS_CC=gcc
+DEFAULT_UTILS_AS=as
+DEFAULT_UTILS_LD=ld
index 86f3d33f534bbe3d7a5d3a6253b76e9de49d96ce..9e1d4570c7246bb51a71b9e4d2a37cce0c993f06 100755 (executable)
@@ -90,6 +90,7 @@ longusage() {
   echo "                               initrd"
   echo "       --luks                  Include LUKS support"
   echo "                               --> 'emerge cryptsetup-luks' with USE=-dynamic"
+  echo "    --no-busybox    Do not include busybox in the initrd or initramfs."
   echo "  Internals"
   echo "       --arch-override=<arch>  Force to arch instead of autodetect"
   echo "       --cachedir=<dir>        Override the default cache location"
@@ -192,8 +193,8 @@ parse_cmdline() {
                        print_info 2 "CMD_MOUNTBOOT: ${CMD_MOUNTBOOT}"
                        ;;
                --bootdir=*)
-                       BOOTDIR=`parse_opt "$*"`
-                       print_info 2 "BOOTDIR: ${BOOTDIR}"
+                       CMD_BOOTDIR=`parse_opt "$*"`
+                       print_info 2 "CMD_BOOTDIR: ${CMD_BOOTDIR}"
                        ;;
                --do-keymap-auto)
                        CMD_DOKEYMAPAUTO=1
@@ -235,8 +236,8 @@ parse_cmdline() {
                        print_info 2 "CMD_MDADM: $CMD_MDADM"
                        ;;
                --no-busybox)
-                       CMD_NO_BUSYBOX=1
-                       print_info 2 "CMD_NO_BUSYBOX: ${CMD_NO_BUSYBOX}"
+                       CMD_BUSYBOX=0
+                       print_info 2 "CMD_BUSYBOX: ${CMD_BUSYBOX}"
                        ;;
                --slowusb)
                        CMD_SLOWUSB=1
index 6d626584a3eb83398c72ea9f2aa9512c56706b91..316046210ff03992e94da911e6db1d92e976323d 100644 (file)
@@ -61,139 +61,64 @@ get_KV() {
                        KERN_24=1
                        KV=${VER}.${PAT}.${SUB}${EXV}
                fi
-
-       fi
-
-       if isTrue "${CMD_DISKLABEL}"
-       then
-               DISKLABEL=1
-       else
-               DISKLABEL=0
-       fi
-
-       if isTrue "${CMD_LUKS}"
-       then
-               LUKS=1
        fi
 }
 
 determine_real_args() {
-       if [ "${CMD_LOGFILE}" != '' ]
-       then
-               LOGFILE="${CMD_LOGFILE}"
-       fi
-
-       if [ "${CMD_MAKEOPTS}" != '' ]
-       then
-               MAKEOPTS="${CMD_MAKEOPTS}"
-       fi
-
-       if [ "${CMD_KERNELDIR}" != '' ]
-       then
-               KERNEL_DIR=${CMD_KERNELDIR}
-       else
-               KERNEL_DIR=${DEFAULT_KERNEL_SOURCE}
-       fi
-       
-       if [ "${CMD_NO_KERNEL_SOURCES}" != "1" ]
-       then
-               if [ ! -d ${KERNEL_DIR} ]
-               then
-                       gen_die "kernel source directory \"${KERNEL_DIR}\" was not found!"
-               fi
-       fi
-
-       if [ "${CMD_KERNCACHE}" != "" ]
-       then    
-               if [ "${KERNEL_DIR}" = '' -a "${CMD_NO_KERNEL_SOURCES}" != "1" ]
-               then
-                       gen_die 'No kernel source directory!'
-               fi
-               if [ ! -e "${KERNEL_DIR}" -a "${CMD_NO_KERNEL_SOURCES}" != "1" ]
-               then
-                       gen_die 'No kernel source directory!'
-               fi
-       else    
-               if [ "${KERNEL_DIR}" = '' ]
-               then
-                       gen_die 'Kernel Cache specified but no kernel tree to verify against!'
-               fi
-       fi
-       
-       if [ "${CMD_KERNNAME}" != "" ]
-       then
-               KNAME=${CMD_KERNNAME}
-       else
-               KNAME="genkernel"
-       fi
+       print_info 4 "Resolving config file, command line, and arch default settings."
+
+       #                          Config File          Command Line             Arch Default
+       #                          -----------          ------------             ------------
+       set_config_with_override 2 DEBUGFILE            CMD_DEBUGFILE
+       set_config_with_override 2 KERNEL_DIR           CMD_KERNEL_DIR           "${DEFAULT_KERNEL_SOURCE}"
+       set_config_with_override 1 NO_KERNEL_SOURCES    CMD_NO_KERNEL_SOURCES
+       set_config_with_override 2 KERNCACHE            CMD_KERNCACHE
+       set_config_with_override 2 KNAME                CMD_KNAME                "genkernel"
+
+       set_config_with_override 2 MAKEOPTS             CMD_MAKEOPTS             "$DEFAULT_MAKEOPTS"
+       set_config_with_override 2 KERNEL_MAKE          CMD_KERNEL_MAKE          "$DEFAULT_KERNEL_MAKE"
+       set_config_with_override 2 UTILS_MAKE           CMD_UTILS_MAKE           "$DEFAULT_UTILS_MAKE"
+       set_config_with_override 2 KERNEL_CC            CMD_KERNEL_CC            "$DEFAULT_KERNEL_CC"
+       set_config_with_override 2 KERNEL_LD            CMD_KERNEL_LD            "$DEFAULT_KERNEL_LD"
+       set_config_with_override 2 KERNEL_AS            CMD_KERNEL_AS            "$DEFAULT_KERNEL_AS"
+       set_config_with_override 2 UTILS_CC             CMD_UTILS_CC             "$DEFAULT_UTILS_CC"
+       set_config_with_override 2 UTILS_LD             CMD_UTILS_LD             "$DEFAULT_UTILS_LD"
+       set_config_with_override 2 UTILS_AS             CMD_UTILS_AS             "$DEFAULT_UTILS_AS"
+
+       set_config_with_override 2 KERNEL_CROSS_COMPILE CMD_KERNEL_CROSS_COMPILE
+       set_config_with_override 2 UTILS_CROSS_COMPILE  CMD_UTILS_CROSS_COMPILE
+       set_config_with_override 2 BOOTDIR              CMD_BOOTDIR              "/boot"
+
+       set_config_with_override 1 SPLASH               CMD_SPLASH
+       set_config_with_override 1 POSTCLEAR            CMD_POSTCLEAR
+       set_config_with_override 1 MRPROPER             CMD_MRPROPER
+       set_config_with_override 1 MENUCONFIG           CMD_MENUCONFIG
+       set_config_with_override 1 CLEAN                CMD_CLEAN
+
+       set_config_with_override 2 MINKERNPACKAGE       CMD_MINKERNPACKAGE
+       set_config_with_override 2 MODULESPACKAGE       CMD_MODULESPACKAGE
+       set_config_with_override 2 KERNCACHE            CMD_KERNCACHE
+       set_config_with_override 1 NOINITRDMODULES      CMD_NOINITRDMODULES
+       set_config_with_override 2 INITRAMFS_OVERLAY    CMD_INITRAMFS_OVERLAY
+       set_config_with_override 1 MOUNTBOOT            CMD_MOUNTBOOT
+       set_config_with_override 1 BUILD_STATIC         CMD_STATIC
+       set_config_with_override 1 BUILD_INITRAMFS      CMD_INITRAMFS
+       set_config_with_override 1 SAVE_CONFIG          CMD_SAVE_CONFIG
+       set_config_with_override 1 SYMLINK              CMD_SYMLINK
+       set_config_with_override 2 INSTALL_MOD_PATH     CMD_INSTALL_MOD_PATH
+       set_config_with_override 1 OLDCONFIG            CMD_OLDCONFIG
+       set_config_with_override 1 LVM                  CMD_LVM
+       set_config_with_override 1 EVMS                 CMD_EVMS
+       set_config_with_override 1 UNIONFS              CMD_UNIONFS
+       set_config_with_override 1 DMRAID               CMD_DMRAID
+       set_config_with_override 1 BUSYBOX              CMD_BUSYBOX              "yes"
+       set_config_with_override 1 DEVFS                CMD_UNDEFINED_CMD        "no"
        
-       if [ "${CMD_KERNEL_MAKE}" != '' ]
-       then
-               KERNEL_MAKE="${CMD_KERNEL_MAKE}"
-       fi
+       set_config_with_override 1 DISKLABEL            CMD_DISKLABEL
+       set_config_with_override 1 LUKS                 CMD_LUKS
 
-       if [ "${KERNEL_MAKE}" = '' ]
-       then
-               KERNEL_MAKE='make'
-       fi
-
-       if [ "${CMD_UTILS_MAKE}" != '' ]
-       then
-               UTILS_MAKE="${CMD_UTILS_MAKE}"
-       fi
-
-       if [ "${UTILS_MAKE}" = '' ]
-       then
-               UTILS_MAKE='make'
-       fi
-
-       if [ "${CMD_KERNEL_CC}" != '' ]
-       then
-               KERNEL_CC="${CMD_KERNEL_CC}"
-       fi
-
-       if [ "${CMD_KERNEL_LD}" != '' ]
-       then
-               KERNEL_LD="${CMD_KERNEL_LD}"
-       fi
-
-       if [ "${CMD_KERNEL_AS}" != '' ]
-       then
-               KERNEL_AS="${CMD_KERNEL_AS}"
-       fi
-       
-       if [ "${CMD_KERNEL_CROSS_COMPILE}" != '' ]
-       then
-               KERNEL_CROSS_COMPILE="${CMD_KERNEL_CROSS_COMPILE}"
-       fi
-
-       if [ "${CMD_UTILS_CC}" != '' ]
-       then
-               UTILS_CC="${CMD_UTILS_CC}"
-       fi
-
-       if [ "${CMD_UTILS_LD}" != '' ]
-       then
-               UTILS_LD="${CMD_UTILS_LD}"
-       fi
-
-       if [ "${CMD_UTILS_AS}" != '' ]
-       then
-               UTILS_AS="${CMD_UTILS_AS}"
-       fi
-       
-       if [ "${CMD_UTILS_CROSS_COMPILE}" != '' ]
-       then
-               UTILS_CROSS_COMPILE="${CMD_UTILS_CROSS_COMPILE}"
-       fi
-
-       if [ "${BOOTDIR}" != '' ]
-       then
                BOOTDIR=`arch_replace "${BOOTDIR}"`
                BOOTDIR=${BOOTDIR%/}    # Remove any trailing slash
-       else
-               BOOTDIR="/boot"
-       fi
 
        CACHE_DIR=`arch_replace "${CACHE_DIR}"`
        BUSYBOX_BINCACHE=`cache_replace "${BUSYBOX_BINCACHE}"`
@@ -216,200 +141,66 @@ determine_real_args() {
        UNIONFS_MODULES_BINCACHE=`arch_replace "${UNIONFS_MODULES_BINCACHE}"`
        BLKID_BINCACHE=`arch_replace "${BLKID_BINCACHE}"`
        
-       if [ "${CMD_SPLASH}" != '' ]
-       then
-               SPLASH=${CMD_SPLASH}
-       fi
 
-       if isTrue ${SPLASH}
-       then
-               SPLASH=1
-       else
-               SPLASH=0
-       fi
-
-       if isTrue ${COMPRESS_INITRD}
-       then
-               COMPRESS_INITRD=1
-       else
-               COMPRESS_INITRD=0
-       fi
-
-       if isTrue ${CMD_POSTCLEAR}
-       then
-               POSTCLEAR=1
-       else
-               POSTCLEAR=0
-       fi
-       
-       if [ "${CMD_MRPROPER}" != '' ]
-       then
-               MRPROPER="${CMD_MRPROPER}"
-       fi
-
-       if [ "${CMD_MENUCONFIG}" != '' ]
-       then
-               MENUCONFIG="${CMD_MENUCONFIG}"
-       fi
-
-       if [ "${CMD_CLEAN}" != '' ]
-       then
-               CLEAN="${CMD_CLEAN}"
-               if ! isTrue ${CLEAN}
-               then
-                       MRPROPER=0
-               fi
-       fi
-
-       if [ "${CMD_MINKERNPACKAGE}" != '' ]
-       then
-               MINKERNPACKAGE="${CMD_MINKERNPACKAGE}"
-               mkdir -p `dirname ${MINKERNPACKAGE}`
-       fi
-       
-       if [ "${CMD_MODULESPACKAGE}" != '' ]
-       then
-               MODULESPACKAGE="${CMD_MODULESPACKAGE}"
-               mkdir -p `dirname ${MODULESPACKAGE}`
-       fi
-
-       if [ "${CMD_KERNCACHE}" != '' ]
-       then
-               KERNCACHE="${CMD_KERNCACHE}"
-               mkdir -p `dirname ${KERNCACHE}`
-       fi
-       
-       if [ "${CMD_NOINITRDMODULES}" != '' ]
-       then
-               NOINITRDMODULES="${CMD_NOINITRDMODULES}"
-       fi
-       
-       if [ "${CMD_INITRAMFS_OVERLAY}" != '' ]
-       then
-               INITRAMFS_OVERLAY="${CMD_INITRAMFS_OVERLAY}"
-       fi
-
-       if [ "${CMD_MOUNTBOOT}" != '' ]
+       if [ "${CMD_BOOTLOADER}" != '' ]
        then
-               MOUNTBOOT="${CMD_MOUNTBOOT}"
-       fi
+               BOOTLOADER="${CMD_BOOTLOADER}"
 
-       if isTrue ${MOUNTBOOT}
+               if [ "${CMD_BOOTLOADER}" != "${CMD_BOOTLOADER/:/}" ]
        then
-               MOUNTBOOT=1
-       else
-               MOUNTBOOT=0
+                       BOOTFS=`echo "${CMD_BOOTLOADER}" | cut -f2- -d:`
+                       BOOTLOADER=`echo "${CMD_BOOTLOADER}" | cut -f1 -d:`
        fi
-
-       if [ "${CMD_STATIC}" != '' ]
-       then
-               BUILD_STATIC=${CMD_STATIC}
        fi
 
-       if isTrue ${BUILD_STATIC}
+       if [ "${NO_KERNEL_SOURCES}" != "1" ]
        then
-               BUILD_STATIC=1
-       else
-               BUILD_STATIC=0
-       fi
-
-       if [ "${CMD_INITRAMFS}" != '' ]
+               if [ ! -d ${KERNEL_DIR} ]
        then
-               BUILD_INITRAMFS=${CMD_INITRAMFS}
+                       gen_die "kernel source directory \"${KERNEL_DIR}\" was not found!"
        fi
-
-       if isTrue ${BUILD_INITRAMFS}
-       then
-               BUILD_INITRAMFS=1
-       else
-               BUILD_INITRAMFS=0
        fi
 
-       if [ "${CMD_SAVE_CONFIG}" != '' ]
+       if [ -z "${KERNCACHE}" ]
        then
-               SAVE_CONFIG="${CMD_SAVE_CONFIG}"
-       fi
-
-       if isTrue "${SAVE_CONFIG}"
+               if [ "${KERNEL_DIR}" = '' -a "${NO_KERNEL_SOURCES}" != "1" ]
        then
-               SAVE_CONFIG=1
-       else
-               SAVE_CONFIG=0
+                       gen_die 'No kernel source directory!'
        fi
-  
-       if [ "${CMD_SYMLINK}" != '' ]
+               if [ ! -e "${KERNEL_DIR}" -a "${NO_KERNEL_SOURCES}" != "1" ]
        then
-               SYMLINK="${CMD_SYMLINK}"
+                       gen_die 'No kernel source directory!'
        fi
-
-       if isTrue "${SYMLINK}"
-       then
-               SYMLINK=1
        else
-               SYMLINK=0
-       fi
-       
-       if [ "${CMD_INSTALL_MOD_PATH}" != '' ]
-       then
-               INSTALL_MOD_PATH="${CMD_INSTALL_MOD_PATH}"
-       fi
-
-       if [ "${CMD_BOOTLOADER}" != '' ]
-       then
-               BOOTLOADER="${CMD_BOOTLOADER}"
-                
-               if [ "${CMD_BOOTLOADER}" != "${CMD_BOOTLOADER/:/}" ]
+               if [ "${KERNEL_DIR}" = '' ]
                then
-                       BOOTFS=`echo "${CMD_BOOTLOADER}" | cut -f2- -d:`
-                       BOOTLOADER=`echo "${CMD_BOOTLOADER}" | cut -f1 -d:`
-               fi
+                       gen_die 'Kernel Cache specified but no kernel tree to verify against!'
        fi
-
-       if [ "${CMD_OLDCONFIG}" != '' ]
-       then
-               OLDCONFIG="${CMD_OLDCONFIG}"
        fi
 
-       if isTrue "${OLDCONFIG}"
+       # Special case:  If --no-clean is specified on the command line, 
+       # imply --no-mrproper.
+       if [ "${CMD_CLEAN}" != '' ]
        then
-               OLDCONFIG=1
-       else
-               OLDCONFIG=0
-       fi
-
-       if isTrue "${CMD_LVM}"
+               if ! isTrue ${CLEAN}
        then
-               LVM=1
-       else
-               LVM=0
+                       MRPROPER=0
        fi
-
-       if isTrue "${CMD_EVMS}"
-       then
-               EVMS=1
-       else
-               EVMS=0
        fi
        
-       if isTrue "${CMD_UNIONFS}"
+       if [ -n "${MINKERNPACKAGE}" ]
        then
-               UNIONFS=1
-       else
-               UNIONFS=0
+               mkdir -p `dirname ${MINKERNPACKAGE}`
        fi
        
-       if isTrue "${CMD_NO_BUSYBOX}"
+       if [ -n "${MODULESPACKAGE}" ]
        then
-               BUSYBOX=0
-       else
-               BUSYBOX=1
+               mkdir -p `dirname ${MODULESPACKAGE}`
        fi
 
-       if isTrue "${CMD_DMRAID}"
+       if [ -n "${KERNCACHE}" ]
        then
-               DMRAID=1
-       else
-               DMRAID=0
+               mkdir -p `dirname ${KERNCACHE}`
        fi
        
        if isTrue "${CMD_MDADM}"
index 80e48830a29401144c85c8c5d80a8a67c320b432..4ebf57bbe5d98375d7c02640f7408b4472203946 100755 (executable)
@@ -139,13 +139,13 @@ print_info() {
 
                if [ "${NEWLINE}" = '0' ]
                then
-                       if [ "${TODEBUGCACHE}" -eq 1 ]; then
+                       if [ "${TODEBUGCACHE}" -eq '1' ]; then
                                DEBUGCACHE="${DEBUGCACHE}${STR}"
                        else
                                echo -ne "${STR}" >> ${LOGFILE}
                        fi      
                else
-                       if [ "${TODEBUGCACHE}" -eq 1 ]; then
+                       if [ "${TODEBUGCACHE}" -eq '1' ]; then
                                DEBUGCACHE="${DEBUGCACHE}${STR}"$'\n'
                        else
                                echo "${STR}" >> ${LOGFILE}
@@ -428,3 +428,86 @@ copy_image_with_preserve() {
        fi
 }
 
+#
+# Helper function to allow command line arguments to override configuration
+# file specified values and to apply defaults.
+#
+# Arguments:
+#     $1  Argument type:
+#           1  Switch type arguments (e.g., --color / --no-color).
+#           2  Value type arguments (e.g., --debuglevel=5).
+#     $2  Config file variable name.
+#     $3  Command line variable name.
+#     $4  Default.  If both the config file variable and the command line
+#         option are not present, then the config file variable is set to
+#         this default value.  Optional.
+#
+# The order of priority of these three sources (highest first) is:
+#     Command line, which overrides
+#     Config file (/etc/genkernel.conf), which overrides
+#     Default.
+#
+# Arguments $2 and $3 are variable *names*, not *values*.  This function uses
+# various forms of indirection to access the values.
+#
+# For switch type arguments, all forms of "True" are converted to a numeric 1
+# and all forms of "False" (everything else, really) to a numeric 0.
+#
+# - JRG
+#
+set_config_with_override() {
+       local VarType=$1
+       local CfgVar=$2
+       local OverrideVar=$3
+       local Default=$4
+       local Result
+
+       #
+       # Syntax check the function arguments.
+       #
+       case "$VarType" in
+               1|2)
+                       ;;
+               *)
+                       gen_die "Illegal variable type \"$VarType\" passed to set_config_with_override()."
+                       ;;
+       esac
+
+       if [ -n "${!OverrideVar}" ]
+       then
+               Result=${!OverrideVar}
+               if [ -n "${!CfgVar}" ]
+               then
+                       print_info 5 "  $CfgVar overridden on command line to \"$Result\"."
+               else
+                       print_info 5 "  $CfgVar set on command line to \"$Result\"."
+               fi
+       else
+               if [ -n "${!CfgVar}" ]
+               then
+                       Result=${!CfgVar}
+                       print_info 5 "  $CfgVar set in config file to \"${Result}\"."
+               else
+                       if [ -n "$Default" ]
+                       then
+                               Result=${Default}
+                               print_info 5 "  $CfgVar defaulted to \"${Result}\"."
+                       else
+                               print_info 5 "  $CfgVar not set."
+                       fi
+               fi
+       fi
+
+       if [ "$VarType" -eq "1" ]
+       then
+               if isTrue "${Result}"
+               then
+                       Result=1
+               else
+                       Result=0
+               fi
+       fi
+
+       eval ${CfgVar}=${Result}
+}
+
index ff625bded45bb903aa42a83b7c140f73f48bed2a..1b24b257a2f4fd2703ca4bf9bbf1468a4bd91e30 100644 (file)
@@ -456,7 +456,7 @@ create_initramfs() {
        append_data 'evms' "${EVMS}"
        append_data 'mdadm' "${MDADM}"
        
-       if [ "${NOINITRDMODULES}" = '' ]
+       if [ "${NOINITRDMODULES}" -eq '0' ]
        then
                append_data 'modules'
        else
@@ -480,7 +480,7 @@ create_initramfs() {
                        # Pegasos hack for merging the initramfs into the kernel at compile time
                        cp ${TMPDIR}/initramfs-${KV} ${KERNEL_DIR}/arch/powerpc/boot/ramdisk.image.gz &&
                        rm ${TMPDIR}/initramfs-${KV}
-       elif [ ${BUILD_INITRAMFS} -eq 1 ]
+       elif [ ${BUILD_INITRAMFS} -eq '1' ]
        then
                # Mips also mimics Pegasos to merge the initramfs into the kernel
                cp ${TMPDIR}/initramfs-${KV} ${KERNEL_DIR}/initramfs.cpio.gz
index 5a5e162c7550607671ed1ba22def6e43b26c9ca6..2d59bcc131f60ed03f551470b756e910419c880b 100644 (file)
@@ -59,7 +59,7 @@ create_base_initrd_sys() {
 
        # SGI LiveCDs need the following binary (no better place for it than here)
        # getdvhoff is a DEPEND of genkernel, so it *should* exist
-       if [ ${BUILD_INITRAMFS} -eq 1 ]
+       if [ ${BUILD_INITRAMFS} -eq '1' ]
        then
                [ -e /usr/lib/getdvhoff/getdvhoff ] \
                        && cp /usr/lib/getdvhoff/getdvhoff ${TEMP}/initrd-temp/bin \
@@ -111,7 +111,7 @@ create_base_initrd_sys() {
        fi
 
        # DMRAID 
-       if [ "${DMRAID}" = '1' ]
+       if [ "${DMRAID}" -eq '1' ]
        then
                print_info 1 'DMRAID: Adding support (compiling binaries)...'
                compile_dmraid
@@ -120,7 +120,7 @@ create_base_initrd_sys() {
        fi
 
        # LVM
-       if [ "${LVM}" = '1' ]
+       if [ "${LVM}" -eq '1' ]
        then
                if [ -e '/sbin/lvm' ] && LC_ALL="C" ldd /sbin/lvm|grep -q 'not a dynamic executable';
                then
@@ -156,7 +156,7 @@ create_base_initrd_sys() {
        fi
        
        # EVMS
-       if [ "${EVMS}" = '1' ]
+       if [ "${EVMS}" -eq '1' ]
        then
                if [ -e '/sbin/evms_activate' ]
                then
@@ -348,7 +348,7 @@ create_initrd() {
        print_info 1 "initrd: >> Initializing..."
        create_base_initrd_sys
 
-       if [ "${NOINITRDMODULES}" = '' ]
+       if [ "${NOINITRDMODULES}" -eq '0' ]
        then
                print_info 1 "        >> Copying modules..."
                create_initrd_modules
index 44897f0ee5a95f02e6ea28821b6d97db3ce3c0f0..84b1eb88a9e44ff04e76892565e166cd381211bd 100644 (file)
@@ -1,17 +1,16 @@
 #!/bin/bash
 
-gen_minkernpackage()
-{
+gen_minkernpackage() {
        print_info 1 'Creating minimal kernel package'
        rm -rf "${TEMP}/minkernpackage" > /dev/null 2>&1
        mkdir "${TEMP}/minkernpackage" || gen_die 'Could not make a directory for the kernel package!'
-       if [ "${CMD_KERNCACHE}" != "" ]
+       if [ "${KERNCACHE}" != "" ]
        then
-               /bin/tar -xj -C ${TEMP}/minkernpackage -f ${CMD_KERNCACHE} kernel-${ARCH}-${KV}
-               /bin/tar -xj -C ${TEMP}/minkernpackage -f ${CMD_KERNCACHE} config-${ARCH}-${KV}
+               /bin/tar -xj -C ${TEMP}/minkernpackage -f ${KERNCACHE} kernel-${ARCH}-${KV}
+               /bin/tar -xj -C ${TEMP}/minkernpackage -f ${KERNCACHE} config-${ARCH}-${KV}
                if [ "${ENABLE_PEGASOS_HACKS}" = 'yes' ]
                then
-                       /bin/tar -xj -C ${TEMP}/minkernpackage -f ${CMD_KERNCACHE} kernelz-${ARCH}-${KV}
+                       /bin/tar -xj -C ${TEMP}/minkernpackage -f ${KERNCACHE} kernelz-${ARCH}-${KV}
                fi
        else
                cd "${KERNEL_DIR}"
@@ -33,9 +32,9 @@ gen_minkernpackage()
                fi
        fi
 
-       if [ "${CMD_KERNCACHE}" != "" ]
+       if [ "${KERNCACHE}" != "" ]
        then
-               /bin/tar -xj -C ${TEMP}/minkernpackage -f ${CMD_KERNCACHE} System.map-${ARCH}-${KV}
+               /bin/tar -xj -C ${TEMP}/minkernpackage -f ${KERNCACHE} System.map-${ARCH}-${KV}
        else
                cp "${KERNEL_DIR}/System.map" "${TEMP}/minkernpackage/System.map-${ARCH}-${KV}" || gen_die 'Could not copy System.map for the kernel package!';
        fi
@@ -44,8 +43,8 @@ gen_minkernpackage()
        /bin/tar -jcpf ${MINKERNPACKAGE} * || gen_die 'Could not compress the kernel package!'
        cd "${TEMP}" && rm -rf "${TEMP}/minkernpackage" > /dev/null 2>&1
 }
-gen_modulespackage()
-{
+
+gen_modulespackage() {
        print_info 1 'Creating modules package'
        rm -rf "${TEMP}/modulespackage" > /dev/null 2>&1
        mkdir "${TEMP}/modulespackage" || gen_die 'Could not make a directory for the kernel package!'
@@ -139,7 +138,7 @@ gen_kerncache_extract_config()
 gen_kerncache_is_valid()
 {
        KERNCACHE_IS_VALID=0
-       if [ "${CMD_NO_KERNEL_SOURCES}" = '1' ]
+       if [ "${NO_KERNEL_SOURCES}" = '1' ]
        then
                
                BUILD_KERNEL=0
index bcc8fc519bcb17a769b9afd3d7e1e1655ea899fc..887d5c43a4a757afb600c79656fffe527a2d91da 100755 (executable)
--- a/genkernel
+++ b/genkernel
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 PATH="/bin:/usr/bin:/sbin:/usr/sbin"
-GK_V='3.4.9_pre7'
+GK_V='3.4.9_pre8'
 
 # Set the default for TMPDIR.  May be modified by genkernel.conf or the
 # --tempdir command line option.
@@ -84,7 +84,7 @@ do
 done
 
 # Check if no action is specified...
-if [ "${BUILD_KERNEL}" -eq 0 -a "${BUILD_INITRD}" -eq 0 ]
+if [ "${BUILD_KERNEL}" -eq '0' -a "${BUILD_INITRD}" -eq '0' ]
 then
        usage
        exit 1
@@ -212,7 +212,7 @@ then
     gen_kerncache_is_valid
 fi
 
-if [ ${BUILD_KERNEL} -eq 1 -a "${KERNCACHE_IS_VALID}" == "0" ]
+if [ ${BUILD_KERNEL} -eq '1' -a "${KERNCACHE_IS_VALID}" == "0" ]
 then
        # Configure kernel
        config_kernel
@@ -229,17 +229,17 @@ then
        # KV may have changed due to the configuration
        get_KV
 
-       # Compile kernel; If using --genzimage, or building a mips kernel, skip compile
-       # till after initrd/initramfs is done
-       [ "${ENABLE_PEGASOS_HACKS}" != 'yes' -a ${BUILD_INITRAMFS} -eq 0 ] && compile_kernel
+       # Compile kernel; If using --genzimage, or building a mips kernel, skip
+       # compile until after initrd/initramfs is done
+       [ "${ENABLE_PEGASOS_HACKS}" != 'yes' -a ${BUILD_INITRAMFS} -eq '0' ] && compile_kernel
 
        # Compile modules
-       if [ ${BUILD_MODULES} -eq 1 -a ${BUILD_STATIC} -eq 0 ]
+       if [ ${BUILD_MODULES} -eq '1' -a ${BUILD_STATIC} -eq '0' ]
        then
                compile_modules
        fi
 
-       if [ ${SAVE_CONFIG} -eq 1 ]
+       if [ ${SAVE_CONFIG} -eq '1' ]
        then
                print_info 1 "Copying config for successful build to /etc/kernels/kernel-config-${ARCH}-${KV}"
                [ ! -e '/etc/kernels' ] && mkdir -p /etc/kernels
@@ -264,11 +264,10 @@ fi
 
 if [ "${KERNCACHE}" != "" -a "${KERNCACHE_IS_VALID}" != "0" ] 
 then
-       [ ${BUILD_STATIC} -eq 0 ] && gen_kerncache_extract_modules
+       [ ${BUILD_STATIC} -eq '0' ] && gen_kerncache_extract_modules
        gen_kerncache_extract_config
 fi
 
-
 # Run callback
 if [ "${CMD_CALLBACK}" != "" ]
 then
@@ -279,13 +278,13 @@ then
        CALLBACK_COUNT=0
 
        trap "CALLBACK_ESCAPE=1" TERM KILL INT QUIT ABRT
-       while [[ ${CALLBACK_ESCAPE} -eq 0 && ${CALLBACK_COUNT} -lt 5 ]]
+       while [[ ${CALLBACK_ESCAPE} -eq '0' && ${CALLBACK_COUNT} -lt 5 ]]
        do
                sleep 1; echo -n '.';
                let CALLBACK_COUNT=${CALLBACK_COUNT}+1
        done
 
-       if [ "${CALLBACK_ESCAPE}" -eq 0 ]
+       if [ "${CALLBACK_ESCAPE}" -eq '0' ]
        then
                echo
                echo
index e1549b4c7630e3fb97f937ad443b15cbc48e64ab..b405b6a842100193e61dc9ae6263c413f8033403 100755 (executable)
@@ -5,7 +5,7 @@
 # with the internal settings being least important, configuration file
 # settings next, and command line options being most important.
 
-# ===========GENKERNEL BASIC CONFIGURATION=============
+# =========Common Command Line Option Defaults=========
 
 # Run 'make oldconfig' before compiling this kernel?
 # If set to "yes", also suppresses the fetch of the kernel .config file from
@@ -53,6 +53,57 @@ USECOLOR="yes"
 # argument is: <number of processors>*<number of cores per processor>+1
 # MAKEOPTS="-j2"
 
+# Add in LVM support from static binaries if they exist on the system, or
+# compile static LVM binaries if static ones do not exist.
+# LVM="no"
+
+# Add in EVMS support from static binaries if they exist on the system: you
+# should run "emerge evms" first.
+# EVMS="no"
+
+# UnionFS support.  Under active development.  Do not use unless you are working
+# on developing this feature.
+# UNIONFS="no"
+
+# Add DMRAID support.
+# DMRAID="no"
+
+# Include (or suppresses the inclusion of) busybox in the initrd or initramfs.
+# If included, busybox is rebuilt if the cached copy is out of date,
+# BUSYBOX="yes"
+
+# =========Low Level Compile Settings=========
+#
+# GNU Make to use for kernel.  See also the --kernel-make command line option.
+# KERNEL_MAKE="make"
+
+# Compiler to use for the kernel (e.g. distcc).  See also the --kernel-cc
+# command line option.
+# KERNEL_CC="gcc"
+
+# Assembler to use for the kernel.  See also the --kernel-as command line
+# option.
+# KERNEL_AS="as"
+
+# Linker to use for the kernel.  See also the --kernel-ld command line option.
+# KERNEL_LD="ld"
+
+# GNU Make to use for the utilities.  See also the --utils-make command line
+# option.
+# UTILS_MAKE="make"
+
+# Compiler to use for the utilities (e.g. distcc).  See also the --utils-cc
+# command line option.
+# UTILS_CC="gcc"
+
+# Assembler to use for the utilities.  See also the --utils-as command line
+# option.
+# UTILS_AS="as"
+
+# Linker to use for the utilities.  See also the --utils-ld command line
+# option.
+# UTILS_LD="ld"
+
 # =========GENKERNEL LOCATION CONFIGURATION============
 # Variables:
 #   %%ARCH%%  - Final determined architecture
index 1204d951ba0b0be16098d9cb783bffcac5a88936..0373b271a069927f90a5b0b13ecb2919f57c488e 100644 (file)
@@ -1,20 +1,27 @@
 #!/bin/bash
 
+#
+# Arch-specific options that normally shouldn't be changed.
+#
 KERNEL_MAKE_DIRECTIVE=""
 KERNEL_MAKE_DIRECTIVE_2=""
 KERNEL_BINARY="vmlinux.gz"
 
-[ -z "${MAKEOPTS}" ] && MAKEOPTS="-j2"
+COMPRESS_INITRD=yes
 
-KERNEL_MAKE=make
-UTILS_MAKE=make
+#
+# Arch-specific defaults that can be overridden in the config file or on the
+# command line.
+#
+DEFAULT_MAKEOPTS="-j2"
 
-KERNEL_CC=gcc
-KERNEL_AS=as
-KERNEL_LD=ld
+DEFAULT_KERNEL_MAKE=make
+DEFAULT_UTILS_MAKE=make
 
-UTILS_CC=gcc
-UTILS_AS=as
-UTILS_LD=ld
+DEFAULT_KERNEL_CC=gcc
+DEFAULT_KERNEL_AS=as
+DEFAULT_KERNEL_LD=ld
 
-COMPRESS_INITRD=yes
+DEFAULT_UTILS_CC=gcc
+DEFAULT_UTILS_AS=as
+DEFAULT_UTILS_LD=ld
index f4822841062518dafc896f9b45990571e89bc53a..b8b11318310eb319f459e679707556b5834055b7 100644 (file)
@@ -1,17 +1,12 @@
 #!/bin/bash
 
-# Kernel Build Info
-KERNEL_MAKE=make
+#
+# Arch-specific options that normally shouldn't be changed.
+#
 KERNEL_MAKE_DIRECTIVE="vmlinux"
 KERNEL_MAKE_DIRECTIVE_2=""
 KERNEL_BINARY="./vmlinux"
 
-# Utils Build Info
-UTILS_MAKE=make
-UTILS_CC=gcc
-UTILS_AS=as
-UTILS_LD=ld
-
 # Initrd/Initramfs Options
 COMPRESS_INITRD="yes"
 USECOLOR="yes"
@@ -24,3 +19,14 @@ DISKLABEL=0
 # genkernel on mips is only used for LiveCDs && netboots.  Catalyst
 # will know where to get the kernels at.
 CMD_NOINSTALL=1
+
+#
+# Arch-specific defaults that can be overridden in the config file or on the
+# command line.
+#
+DEFAULT_KERNEL_MAKE=make
+DEFAULT_UTILS_MAKE=make
+DEFAULT_UTILS_CC=gcc
+DEFAULT_UTILS_AS=as
+DEFAULT_UTILS_LD=ld
+
index fe721cb1117237d75c080c736949ba936daa8ef7..db6a73c5842540c803d74db08f448d3a7b9ee971 100644 (file)
@@ -1,20 +1,27 @@
 #!/bin/bash
 
+#
+# Arch-specific options that normally shouldn't be changed.
+#
 KERNEL_MAKE_DIRECTIVE="vmlinux"
 KERNEL_MAKE_DIRECTIVE_2=""
 KERNEL_BINARY="vmlinux"
 
-[ -z "${MAKEOPTS}" ] && MAKEOPTS="-j2"
+COMPRESS_INITRD=yes
 
-KERNEL_MAKE=make
-UTILS_MAKE=make
+#
+# Arch-specific defaults that can be overridden in the config file or on the
+# command line.
+#
+DEFAULT_MAKEOPTS="-j2"
 
-KERNEL_CC=gcc
-KERNEL_AS=as
-KERNEL_LD=ld
+DEFAULT_KERNEL_MAKE=make
+DEFAULT_UTILS_MAKE=make
 
-UTILS_CC=gcc
-UTILS_AS=as
-UTILS_LD=ld
+DEFAULT_KERNEL_CC=gcc
+DEFAULT_KERNEL_AS=as
+DEFAULT_KERNEL_LD=ld
 
-COMPRESS_INITRD=yes
+DEFAULT_UTILS_CC=gcc
+DEFAULT_UTILS_AS=as
+DEFAULT_UTILS_LD=ld
index fe721cb1117237d75c080c736949ba936daa8ef7..db6a73c5842540c803d74db08f448d3a7b9ee971 100644 (file)
@@ -1,20 +1,27 @@
 #!/bin/bash
 
+#
+# Arch-specific options that normally shouldn't be changed.
+#
 KERNEL_MAKE_DIRECTIVE="vmlinux"
 KERNEL_MAKE_DIRECTIVE_2=""
 KERNEL_BINARY="vmlinux"
 
-[ -z "${MAKEOPTS}" ] && MAKEOPTS="-j2"
+COMPRESS_INITRD=yes
 
-KERNEL_MAKE=make
-UTILS_MAKE=make
+#
+# Arch-specific defaults that can be overridden in the config file or on the
+# command line.
+#
+DEFAULT_MAKEOPTS="-j2"
 
-KERNEL_CC=gcc
-KERNEL_AS=as
-KERNEL_LD=ld
+DEFAULT_KERNEL_MAKE=make
+DEFAULT_UTILS_MAKE=make
 
-UTILS_CC=gcc
-UTILS_AS=as
-UTILS_LD=ld
+DEFAULT_KERNEL_CC=gcc
+DEFAULT_KERNEL_AS=as
+DEFAULT_KERNEL_LD=ld
 
-COMPRESS_INITRD=yes
+DEFAULT_UTILS_CC=gcc
+DEFAULT_UTILS_AS=as
+DEFAULT_UTILS_LD=ld
index 119f0a4f3cdda9f027ccd29a91500ac6b2e89f27..e8102be6ed90b8c809cd1949bde6cb7629bb40d5 100644 (file)
@@ -1,19 +1,26 @@
 #!/bin/bash
 
+#
+# Arch-specific options that normally shouldn't be changed.
+#
 KERNEL_MAKE_DIRECTIVE="vmlinux"
 KERNEL_BINARY="vmlinux"
 
-[ -z "${MAKEOPTS}" ] && MAKEOPTS="-j2"
+COMPRESS_INITRD=yes
 
-KERNEL_MAKE=make
-UTILS_MAKE=make
+#
+# Arch-specific defaults that can be overridden in the config file or on the
+# command line.
+#
+DEFAULT_MAKEOPTS="-j2"
 
-KERNEL_CC=gcc
-KERNEL_AS=as
-KERNEL_LD=ld
+DEFAULT_KERNEL_MAKE=make
+DEFAULT_UTILS_MAKE=make
 
-UTILS_CC=gcc
-UTILS_AS=as
-UTILS_LD=ld
+DEFAULT_KERNEL_CC=gcc
+DEFAULT_KERNEL_AS=as
+DEFAULT_KERNEL_LD=ld
 
-COMPRESS_INITRD=yes
+DEFAULT_UTILS_CC=gcc
+DEFAULT_UTILS_AS=as
+DEFAULT_UTILS_LD=ld
index 119f0a4f3cdda9f027ccd29a91500ac6b2e89f27..e8102be6ed90b8c809cd1949bde6cb7629bb40d5 100644 (file)
@@ -1,19 +1,26 @@
 #!/bin/bash
 
+#
+# Arch-specific options that normally shouldn't be changed.
+#
 KERNEL_MAKE_DIRECTIVE="vmlinux"
 KERNEL_BINARY="vmlinux"
 
-[ -z "${MAKEOPTS}" ] && MAKEOPTS="-j2"
+COMPRESS_INITRD=yes
 
-KERNEL_MAKE=make
-UTILS_MAKE=make
+#
+# Arch-specific defaults that can be overridden in the config file or on the
+# command line.
+#
+DEFAULT_MAKEOPTS="-j2"
 
-KERNEL_CC=gcc
-KERNEL_AS=as
-KERNEL_LD=ld
+DEFAULT_KERNEL_MAKE=make
+DEFAULT_UTILS_MAKE=make
 
-UTILS_CC=gcc
-UTILS_AS=as
-UTILS_LD=ld
+DEFAULT_KERNEL_CC=gcc
+DEFAULT_KERNEL_AS=as
+DEFAULT_KERNEL_LD=ld
 
-COMPRESS_INITRD=yes
+DEFAULT_UTILS_CC=gcc
+DEFAULT_UTILS_AS=as
+DEFAULT_UTILS_LD=ld
index 4053b4abb3ac8a29abdf4f098d7ee916bde83413..887c0d3be125a89e4c35488a828b8d4c6f128bda 100644 (file)
@@ -1,19 +1,26 @@
 #!/bin/bash
 
+#
+# Arch-specific options that normally shouldn't be changed.
+#
 KERNEL_MAKE_DIRECTIVE="vmlinux"
 KERNEL_MAKE_DIRECTIVE_2=""
 KERNEL_BINARY="vmlinux"
 
-[ -z "${MAKEOPTS}" ] && MAKEOPTS="-j1"
+COMPRESS_INITRD=yes
+USECOLOR="no"
 
-KERNEL_MAKE=make
-UTILS_MAKE=make
+#
+# Arch-specific defaults that can be overridden in the config file or on the
+# command line.
+#
+DEFAULT_MAKEOPTS="-j1"
 
-KERNEL_CC=gcc
+DEFAULT_KERNEL_MAKE=make
+DEFAULT_UTILS_MAKE=make
 
-UTILS_CC=gcc
-UTILS_AS=as
-UTILS_LD=ld
+DEFAULT_KERNEL_CC=gcc
 
-COMPRESS_INITRD=yes
-USECOLOR="no"
+DEFAULT_UTILS_CC=gcc
+DEFAULT_UTILS_AS=as
+DEFAULT_UTILS_LD=ld
index 68c6ea601d02fee23e7326da44ac0cfd1aeeedb6..9bdb11b256a62de2ee50eae2851d1db0a0a935ea 100644 (file)
@@ -1,21 +1,28 @@
 #!/bin/bash
 
+#
+# Arch-specific options that normally shouldn't be changed.
+#
 KERNEL_MAKE_DIRECTIVE="vmlinux"
 KERNEL_MAKE_DIRECTIVE_2="image"
 KERNEL_BINARY="arch/sparc64/boot/image"
 
-[ -z "${MAKEOPTS}" ] && MAKEOPTS="-j2"
+COMPRESS_INITRD=yes
+USECOLOR="no"
 
-KERNEL_MAKE=make
-UTILS_MAKE=make
+#
+# Arch-specific defaults that can be overridden in the config file or on the
+# command line.
+#
+DEFAULT_MAKEOPTS="-j2"
 
-KERNEL_CC=sparc64-linux-gcc
-#KERNEL_AS=as
-#KERNEL_LD=ld
+DEFAULT_KERNEL_MAKE=make
+DEFAULT_UTILS_MAKE=make
 
-UTILS_CC=gcc
-UTILS_AS=as
-UTILS_LD=ld
+DEFAULT_KERNEL_CC=sparc64-linux-gcc
+#DEFAULT_KERNEL_AS=as
+#DEFAULT_KERNEL_LD=ld
 
-COMPRESS_INITRD=yes
-USECOLOR="no"
+DEFAULT_UTILS_CC=gcc
+DEFAULT_UTILS_AS=as
+DEFAULT_UTILS_LD=ld
index a4c6b0bfc9486b34fc06811f435ba6af7e84f506..0f3d9cfcce7f803bf38f109600bb0cf98c091acd 100644 (file)
@@ -1,21 +1,28 @@
 #!/bin/bash
 
+#
+# Arch-specific options that normally shouldn't be changed.
+#
 KERNEL_MAKE_DIRECTIVE="linux"
 KERNEL_MAKE_DIRECTIVE_2=""
 KERNEL_BINARY="linux"
 
-[ -z "${MAKEOPTS}" ] && MAKEOPTS="-j2"
+COMPRESS_INITRD=yes
+ARCH_HAVENOPREPARE=yes
 
-KERNEL_MAKE="make ARCH=um"
-UTILS_MAKE=make
+#
+# Arch-specific defaults that can be overridden in the config file or on the
+# command line.
+#
+DEFAULT_MAKEOPTS="-j2"
 
-KERNEL_CC=gcc
-KERNEL_AS=as
-KERNEL_LD=ld
+DEFAULT_KERNEL_MAKE="make ARCH=um"
+DEFAULT_UTILS_MAKE=make
 
-UTILS_CC=gcc
-UTILS_AS=as
-UTILS_LD=ld
+DEFAULT_KERNEL_CC=gcc
+DEFAULT_KERNEL_AS=as
+DEFAULT_KERNEL_LD=ld
 
-COMPRESS_INITRD=yes
-ARCH_HAVENOPREPARE=yes
+DEFAULT_UTILS_CC=gcc
+DEFAULT_UTILS_AS=as
+DEFAULT_UTILS_LD=ld
index 24ddad2cbe616e1c8eb0240444248c6417aac67d..df72b1b5278bd570aac7a65b46131a36900f0fa8 100644 (file)
@@ -1,20 +1,27 @@
 #!/bin/bash
 
+#
+# Arch-specific options that normally shouldn't be changed.
+#
 KERNEL_MAKE_DIRECTIVE="bzImage"
 KERNEL_MAKE_DIRECTIVE_2=""
 KERNEL_BINARY="arch/i386/boot/bzImage"
 
-[ -z "${MAKEOPTS}" ] && MAKEOPTS="-j2"
+COMPRESS_INITRD=yes
 
-KERNEL_MAKE=make
-UTILS_MAKE=make
+#
+# Arch-specific defaults that can be overridden in the config file or on the
+# command line.
+#
+DEFAULT_MAKEOPTS="-j2"
 
-KERNEL_CC=gcc
-KERNEL_AS=as
-KERNEL_LD=ld
+DEFAULT_KERNEL_MAKE=make
+DEFAULT_UTILS_MAKE=make
 
-UTILS_CC=gcc
-UTILS_AS=as
-UTILS_LD=ld
+DEFAULT_KERNEL_CC=gcc
+DEFAULT_KERNEL_AS=as
+DEFAULT_KERNEL_LD=ld
 
-COMPRESS_INITRD=yes
+DEFAULT_UTILS_CC=gcc
+DEFAULT_UTILS_AS=as
+DEFAULT_UTILS_LD=ld
index fa3ccd0608f878403bcba70d4cab307763d3f243..5751c6ca80e5c824325ac8ad5c4b879692934fa1 100644 (file)
@@ -1,20 +1,27 @@
 #!/bin/bash
 
+#
+# Arch-specific options that normally shouldn't be changed.
+#
 KERNEL_MAKE_DIRECTIVE="bzImage"
 KERNEL_MAKE_DIRECTIVE_2=""
 KERNEL_BINARY="arch/x86_64/boot/bzImage"
 
-[ -z "${MAKEOPTS}" ] && MAKEOPTS="-j2"
+COMPRESS_INITRD=yes
 
-KERNEL_MAKE=make
-UTILS_MAKE=make
+#
+# Arch-specific defaults that can be overridden in the config file or on the
+# command line.
+#
+DEFAULT_MAKEOPTS="-j2"
 
-KERNEL_CC=gcc
-KERNEL_AS=as
-KERNEL_LD=ld
+DEFAULT_KERNEL_MAKE=make
+DEFAULT_UTILS_MAKE=make
 
-UTILS_CC=gcc
-UTILS_AS=as
-UTILS_LD=ld
+DEFAULT_KERNEL_CC=gcc
+DEFAULT_KERNEL_AS=as
+DEFAULT_KERNEL_LD=ld
 
-COMPRESS_INITRD=yes
+DEFAULT_UTILS_CC=gcc
+DEFAULT_UTILS_AS=as
+DEFAULT_UTILS_LD=ld
index e5a04a9c6aa54743cad9d597f20f26e4e6d70cd7..6b3ec88dbe5f7a5af5ad1b2e5ea448d13b2cee23 100644 (file)
@@ -1,20 +1,27 @@
 #!/bin/bash
 
+#
+# Arch-specific options that normally shouldn't be changed.
+#
 KERNEL_MAKE_DIRECTIVE=""
 KERNEL_MAKE_DIRECTIVE_2=""
 KERNEL_BINARY="vmlinuz"
 
-[ -z "${MAKEOPTS}" ] && MAKEOPTS="-j2"
+COMPRESS_INITRD=yes
 
-KERNEL_MAKE="make ARCH=xen"
-UTILS_MAKE=make
+#
+# Arch-specific defaults that can be overridden in the config file or on the
+# command line.
+#
+DEFAULT_MAKEOPTS="-j2"
 
-KERNEL_CC=gcc
-KERNEL_AS=as
-KERNEL_LD=ld
+DEFAULT_KERNEL_MAKE="make ARCH=xen"
+DEFAULT_UTILS_MAKE=make
 
-UTILS_CC=gcc
-UTILS_AS=as
-UTILS_LD=ld
+DEFAULT_KERNEL_CC=gcc
+DEFAULT_KERNEL_AS=as
+DEFAULT_KERNEL_LD=ld
 
-COMPRESS_INITRD=yes
+DEFAULT_UTILS_CC=gcc
+DEFAULT_UTILS_AS=as
+DEFAULT_UTILS_LD=ld
index e5a04a9c6aa54743cad9d597f20f26e4e6d70cd7..8e0e1d33d17df7a9014425eb2a9aec431a130120 100644 (file)
@@ -1,20 +1,28 @@
 #!/bin/bash
 
+#
+# Arch-specific options that normally shouldn't be changed.
+#
 KERNEL_MAKE_DIRECTIVE=""
 KERNEL_MAKE_DIRECTIVE_2=""
 KERNEL_BINARY="vmlinuz"
 
-[ -z "${MAKEOPTS}" ] && MAKEOPTS="-j2"
+COMPRESS_INITRD=yes
 
-KERNEL_MAKE="make ARCH=xen"
-UTILS_MAKE=make
+#
+# Arch-specific defaults that can be overridden in the config file or on the
+# command line.
+#
+DEFAULT_MAKEOPTS="-j2"
 
-KERNEL_CC=gcc
-KERNEL_AS=as
-KERNEL_LD=ld
+DEFAULT_KERNEL_MAKE="make ARCH=xen"
+DEFAULT_UTILS_MAKE=make
 
-UTILS_CC=gcc
-UTILS_AS=as
-UTILS_LD=ld
+DEFAULT_KERNEL_CC=gcc
+DEFAULT_KERNEL_AS=as
+DEFAULT_KERNEL_LD=ld
+
+DEFAULT_UTILS_CC=gcc
+DEFAULT_UTILS_AS=as
+DEFAULT_UTILS_LD=ld
 
-COMPRESS_INITRD=yes