Performed some general cleanup on a few files and removed devfs/udev selection code...
authorChris Gianelloni <wolf31o2@gentoo.org>
Mon, 17 Sep 2007 19:05:59 +0000 (19:05 +0000)
committerChris Gianelloni <wolf31o2@gentoo.org>
Mon, 17 Sep 2007 19:05:59 +0000 (19:05 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@532 67a159dc-881f-0410-a524-ba9dfbe2cb84

ChangeLog
gen_bootloader.sh
gen_cmdline.sh
gen_compile.sh
gen_determineargs.sh
gen_initramfs.sh
gen_initrd.sh
generic/linuxrc
genkernel
mips/config.sh

index 1b7fd427467e621c75c82fa4a0cb1fbd49a57e1f..c3b29fdd54a3abe82cceb397bce7b4d0949239d3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,13 +2,19 @@
 # Copyright 2006-2007 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+  17 Sep 2007; Chris Gianelloni <wolf31o2@gentoo.org> gen_bootloader.sh,
+  gen_cmdline.sh, gen_compile.sh, gen_determineargs.sh, gen_initramfs.sh,
+  gen_initrd.sh, generic/linuxrc, genkernel, mips/config.sh:
+  Performed some general cleanup on a few files and removed devfs/udev
+  selection code, since we force devfs on 2.4 and mdev on 2.6 kernels.
+
   30 Aug 2007; Chris Gianelloni <wolf31o2@gentoo.org> gen_cmdline.sh,
   gen_compile.sh, gen_configkernel.sh, gen_determineargs.sh,
   gen_initramfs.sh, generic/initrd.scripts, generic/linuxrc, genkernel,
   genkernel.conf, +pkg/genkernel-svn-suspend.patch:
   Removing the suspend support that was added for bug #156445 until suspend is
   added to the tree and we can determine the proper way to support it. For
-  more information, see bug #156431.
+  more information, see bug #156431. This is genkernel 3.4.9_pre2 for testing.
 
   22 Aug 2007; Chris Gianelloni <wolf31o2@gentoo.org> x86/kernel-config-2.6,
   x86_64/kernel-config-2.6, genkernel:
index 9fa25b422e48a37d99e044674da30d730b0ee6ca..8dc6b7f780f4765e8a9c1e9c6f2de2c7cb5c697c 100644 (file)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 set_bootloader() {
-       if [ "x$BOOTLOADER" == 'xgrub' ]
+       if [ "x${BOOTLOADER}" == 'xgrub' ]
        then
                set_grub_bootloader
        else
@@ -13,7 +13,7 @@ set_grub_bootloader() {
        local GRUB_CONF="${BOOTDIR}/grub/grub.conf"
 
        print_info 1 ''
-       print_info 1 "Adding kernel to $GRUB_CONF..."
+       print_info 1 "Adding kernel to ${GRUB_CONF}..."
        if [ "${BOOTFS}" != '' ]
        then
                GRUB_BOOTFS=${BOOTFS}
@@ -23,7 +23,7 @@ set_grub_bootloader() {
                GRUB_BOOTFS=$(awk 'BEGIN{RS="((#[^\n]*)?\n)"}( $2 == "'${BOOTDIR}'") { print $1; exit }' /etc/fstab)
 
                # If ${BOOTDIR} is not defined in /etc/fstab, it must be the same as /
-               [ "x$GRUB_BOOTFS" == 'x' ] && GRUB_BOOTFS=$GRUB_ROOTFS
+               [ "x${GRUB_BOOTFS}" == 'x' ] && GRUB_BOOTFS=${GRUB_ROOTFS}
        fi
 
        # Read GRUB device map
@@ -32,43 +32,43 @@ set_grub_bootloader() {
 quit
 EOF
        # Get the GRUB mapping for our device
-       local GRUB_BOOT_DISK1=$(echo $GRUB_BOOTFS | sed -e 's#\(/dev/.\+\)[[:digit:]]\+#\1#')
-       local GRUB_BOOT_DISK=$(awk '{if ($2 == "'$GRUB_BOOT_DISK1'") {gsub(/(\(|\))/, "", $1); print $1;}}' ${TEMP}/grub.map)
+       local GRUB_BOOT_DISK1=$(echo ${GRUB_BOOTFS} | sed -e 's#\(/dev/.\+\)[[:digit:]]\+#\1#')
+       local GRUB_BOOT_DISK=$(awk '{if ($2 == "'${GRUB_BOOT_DISK1}'") {gsub(/(\(|\))/, "", $1); print $1;}}' ${TEMP}/grub.map)
 
-       local GRUB_BOOT_PARTITION=$(echo $GRUB_BOOTFS | sed -e 's#/dev/.\+\([[:digit:]]?*\)#\1#')
+       local GRUB_BOOT_PARTITION=$(echo ${GRUB_BOOTFS} | sed -e 's#/dev/.\+\([[:digit:]]?*\)#\1#')
        [ ! -d ${TEMP} ] && rm -r ${TEMP}
        
        # Create grub configuration directory and file if it doesn't exist.
-       [ ! -e `dirname $GRUB_CONF` ] && mkdir -p `dirname $GRUB_CONF`
+       [ ! -e `dirname ${GRUB_CONF}` ] && mkdir -p `dirname ${GRUB_CONF}`
 
-       if [ ! -e $GRUB_CONF ]
+       if [ ! -e ${GRUB_CONF} ]
        then
                if [ "${GRUB_BOOT_DISK}" != '' -a "${GRUB_BOOT_PARTITION}" != '' ]
                then
                        GRUB_BOOT_PARTITION=`expr ${GRUB_BOOT_PARTITION} - 1`
                        # grub.conf doesn't exist - create it with standard defaults
-                       touch $GRUB_CONF
-                       echo 'default 0' >> $GRUB_CONF
-                       echo 'timeout 5' >> $GRUB_CONF
-                       echo >> $GRUB_CONF
+                       touch ${GRUB_CONF}
+                       echo 'default 0' >> ${GRUB_CONF}
+                       echo 'timeout 5' >> ${GRUB_CONF}
+                       echo >> ${GRUB_CONF}
 
                        # Add grub configuration to grub.conf   
-                       echo "# Genkernel generated entry, see GRUB documentation for details" >> $GRUB_CONF
-                       echo "title=Gentoo Linux ($KV)" >> $GRUB_CONF
-                       echo -e "\troot ($GRUB_BOOT_DISK,$GRUB_BOOT_PARTITION)" >> $GRUB_CONF
+                       echo "# Genkernel generated entry, see GRUB documentation for details" >> ${GRUB_CONF}
+                       echo "title=Gentoo Linux ($KV)" >> ${GRUB_CONF}
+                       echo -e "\troot (${GRUB_BOOT_DISK},${GRUB_BOOT_PARTITION})" >> ${GRUB_CONF}
                        if [ "${BUILD_INITRD}" -eq '0' ]
                        then
-                               echo -e "\tkernel /kernel-${KNAME}-${ARCH}-${KV} root=$GRUB_ROOTFS" >> $GRUB_CONF
+                               echo -e "\tkernel /kernel-${KNAME}-${ARCH}-${KV} root=${GRUB_ROOTFS}" >> ${GRUB_CONF}
                        else
-                               echo -e "\tkernel /kernel-${KNAME}-${ARCH}-${KV} root=/dev/ram0 init=/linuxrc real_root=$GRUB_ROOTFS" >> $GRUB_CONF
+                               echo -e "\tkernel /kernel-${KNAME}-${ARCH}-${KV} root=/dev/ram0 init=/linuxrc real_root=${GRUB_ROOTFS}" >> ${GRUB_CONF}
                                if [ "${PAT}" -gt '4' -a  "${CMD_BOOTSPLASH}" != '1' ]
                                then
-                                   echo -e "\tinitrd /initramfs-${KNAME}-${ARCH}-${KV}" >> $GRUB_CONF
+                                   echo -e "\tinitrd /initramfs-${KNAME}-${ARCH}-${KV}" >> ${GRUB_CONF}
                                else
-                                   echo -e "\tinitrd /initrd-${KNAME}-${ARCH}-${KV}" >> $GRUB_CONF
+                                   echo -e "\tinitrd /initrd-${KNAME}-${ARCH}-${KV}" >> ${GRUB_CONF}
                                fi
                        fi
-                       echo >> $GRUB_CONF
+                       echo >> ${GRUB_CONF}
                else
                        print_error 1 "Error! ${BOOTDIR}/grub/grub.conf does not exist and the correct settings can not be automatically detected."
                        print_error 1 "Please manually create your ${BOOTDIR}/grub/grub.conf file."
@@ -79,7 +79,7 @@ EOF
                local TYPE
                [ "${KERN_24}" -eq '1' ] && TYPE='rd' || TYPE='ramfs'
 
-               cp -f $GRUB_CONF $GRUB_CONF.bak
+               cp -f ${GRUB_CONF} ${GRUB_CONF}.bak
                awk 'BEGIN { RS="\n"; }
                     {
                        if(match($0, "kernel-" KNAME "-" ARCH "-" KV))
@@ -88,11 +88,11 @@ EOF
                        { have_i="1" }
                        if(have_k == "1" && have_i == "1")
                        { exit 1; }
-                    }' KNAME=$KNAME ARCH=$ARCH KV=$KV TYPE=$TYPE $GRUB_CONF.bak
+                    }' KNAME=${KNAME} ARCH=${ARCH} KV=${KV} TYPE=${TYPE} ${GRUB_CONF}.bak
                if [ "$?" -eq '0' ]
                then
-                       local LIMIT=$(wc -l $GRUB_CONF.bak)
-                       awk -f ${GK_BIN}/gen_bootloader_grub.awk LIMIT=${LIMIT/ */} KNAME=$KNAME ARCH=$ARCH KV=$KV TYPE=$TYPE $GRUB_CONF.bak > $GRUB_CONF
+                       local LIMIT=$(wc -l ${GRUB_CONF}.bak)
+                       awk -f ${GK_BIN}/gen_bootloader_grub.awk LIMIT=${LIMIT/ */} KNAME=${KNAME} ARCH=${ARCH} KV=${KV} TYPE=${TYPE} ${GRUB_CONF}.bak > ${GRUB_CONF}
                else
                        print_info 1 "GRUB: Definition found, not duplicating."
                fi
index 7d75d95fb61014960349164be488f41f570018c0..42495908719c4679a34ebefa4164d55ec9b218a6 100755 (executable)
@@ -39,8 +39,6 @@ longusage() {
   echo "       --symlink               Manage symlinks in /boot for installed images"
   echo "       --no-symlink            Do not manage symlinks"
   echo "       --no-initrdmodules      Don't copy any modules to the initrd"
-  echo "       --no-udev               Disable udev support"
-  echo "       --no-devfs              Disable devfs support"
   echo "       --callback=<...>        Run the specified arguments after the"
   echo "                               kernel and modules have been compiled"
   echo "       --static                Build a static (monolithic kernel)."
@@ -73,13 +71,15 @@ longusage() {
   echo "       --gensplash=<theme>     Force gensplash using <theme>"
   echo "       --gensplash-res=<res>   Select gensplash resolutions"
   echo "       --do-keymap-auto        Forces keymap selection at boot"
+  echo "       --evms                  Include EVMS2 support"
+  echo "                               --> 'emerge evms' in the host operating system"
+  echo "                               first"
   echo "       --evms2                 Include EVMS2 support"
   echo "                               --> 'emerge evms' in the host operating system"
   echo "                               first"
+  echo "       --lvm                   Include LVM2 support"
   echo "       --lvm2                  Include LVM2 support"
-#  echo "      --unionfs               Include UNIONFS support"
   echo "       --dmraid                Include DMRAID support"
-#  echo "      --suspend               Include userspace suspend/resume (uswsusp) support"
   echo "       --slowusb               Enables extra pauses for slow USB CD boots"
   echo "       --bootloader=grub       Add new kernel to GRUB configuration"
   echo "       --linuxrc=<file>        Specifies a user created linuxrc"
@@ -93,24 +93,24 @@ longusage() {
   echo "       --tempdir=<dir>         Location of Genkernel's temporary directory"
   echo "       --postclear             Clear all tmp files and caches after genkernel has run"
   echo "  Output Settings"
-  echo "        --kernname=<...>       Tag the kernel and initrd with a name:"
+  echo "       --kernname=<...>        Tag the kernel and initrd with a name:"
   echo "                               If not defined the option defaults to"
   echo "                               'genkernel'"
-  echo "        --minkernpackage=<tbz2> File to output a .tar.bz2'd kernel and initrd:"
+  echo "       --minkernpackage=<tbz2> File to output a .tar.bz2'd kernel and initrd:"
   echo "                               No modules outside of the initrd will be"
   echo "                               included..."
-  echo "        --modulespackage=<tbz2> File to output a .tar.bz2'd modules after the"
+  echo "       --modulespackage=<tbz2> File to output a .tar.bz2'd modules after the"
   echo "                               callbacks have run"
-  echo "        --kerncache=<tbz2>     File to output a .tar.bz2'd kernel contents"
+  echo "       --kerncache=<tbz2>      File to output a .tar.bz2'd kernel contents"
   echo "                               of /lib/modules/ and the kernel config"
   echo "                               NOTE: This is created before the callbacks"
   echo "                               are run!"
-  echo "        --no-kernel-sources    This option is only valid if kerncache is"
+  echo "       --no-kernel-sources     This option is only valid if kerncache is"
   echo "                               defined. If there is a valid kerncache no checks"
   echo "                               will be made against a kernel source tree"
-  echo "        --initramfs-overlay=<dir>"
-  echo "                               Directory structure to include in the initramfs,"
-  echo "                               only available on 2.6 kernels that do not use"
+  echo "       --initramfs-overlay=<dir>"
+  echo "                               Directory structure to include in the initramfs,"
+  echo "                               only available on 2.6 kernels that do not use"
   echo "                               bootsplash"
 }
 
@@ -141,84 +141,81 @@ parse_cmdline() {
        case "$*" in
              --kernel-cc=*)
                      CMD_KERNEL_CC=`parse_opt "$*"`
-                     print_info 2 "CMD_KERNEL_CC: $CMD_KERNEL_CC"
+                     print_info 2 "CMD_KERNEL_CC: ${CMD_KERNEL_CC}"
              ;;
              --kernel-ld=*)
                      CMD_KERNEL_LD=`parse_opt "$*"`
-                     print_info 2 "CMD_KERNEL_LD: $CMD_KERNEL_LD"
+                     print_info 2 "CMD_KERNEL_LD: ${CMD_KERNEL_LD}"
              ;;
              --kernel-as=*)
                      CMD_KERNEL_AS=`parse_opt "$*"`
-                     print_info 2 "CMD_KERNEL_AS: $CMD_KERNEL_AS"
+                     print_info 2 "CMD_KERNEL_AS: ${CMD_KERNEL_AS}"
              ;;
              --kernel-make=*)
                      CMD_KERNEL_MAKE=`parse_opt "$*"`
-                     print_info 2 "CMD_KERNEL_MAKE: $CMD_KERNEL_MAKE"
+                     print_info 2 "CMD_KERNEL_MAKE: ${CMD_KERNEL_MAKE}"
              ;;
              --kernel-cross-compile=*)
                      CMD_KERNEL_CROSS_COMPILE=`parse_opt "$*"`
                      CMD_KERNEL_CROSS_COMPILE=$(echo ${CMD_KERNEL_CROSS_COMPILE}|sed -e 's/.*[^-]$/&-/g')
-                     print_info 2 "CMD_KERNEL_CROSS_COMPILE: $CMD_KERNEL_CROSS_COMPILE"
+                     print_info 2 "CMD_KERNEL_CROSS_COMPILE: ${CMD_KERNEL_CROSS_COMPILE}"
              ;;
              --utils-cc=*)
                      CMD_UTILS_CC=`parse_opt "$*"`
-                     print_info 2 "CMD_UTILS_CC: $CMD_UTILS_CC"
+                     print_info 2 "CMD_UTILS_CC: ${CMD_UTILS_CC}"
              ;;
              --utils-ld=*)
                      CMD_UTILS_LD=`parse_opt "$*"`
-                     print_info 2 "CMD_UTILS_LD: $CMD_UTILS_LD"
+                     print_info 2 "CMD_UTILS_LD: ${CMD_UTILS_LD}"
              ;;
              --utils-as=*)
                      CMD_UTILS_AS=`parse_opt "$*"`
-                     print_info 2 "CMD_UTILS_AS: $CMD_UTILS_AS"
+                     print_info 2 "CMD_UTILS_AS: ${CMD_UTILS_AS}"
              ;;
              --utils-make=*)
                      CMD_UTILS_MAKE=`parse_opt "$*"`
-                     print_info 2 "CMD_UTILS_MAKE: $CMD_UTILS_MAKE"
+                     print_info 2 "CMD_UTILS_MAKE: ${CMD_UTILS_MAKE}"
              ;;
              --utils-cross-compile=*)
                      CMD_UTILS_CROSS_COMPILE=`parse_opt "$*"`
                      CMD_UTILS_CROSS_COMPILE=$(echo ${CMD_UTILS_CROSS_COMPILE}|sed -e 's/.*[^-]$/&-/g')
-                     print_info 2 "CMD_UTILS_CROSS_COMPILE: $CMD_UTILS_CROSS_COMPILE"
+                     print_info 2 "CMD_UTILS_CROSS_COMPILE: ${CMD_UTILS_CROSS_COMPILE}"
              ;;
              --utils-arch=*)
                      CMD_UTILS_ARCH=`parse_opt "$*"`
-                     print_info 2 "CMD_UTILS_ARCH: $CMD_ARCHOVERRIDE"
+                     print_info 2 "CMD_UTILS_ARCH: ${CMD_ARCHOVERRIDE}"
              ;;
              --makeopts=*)
                      CMD_MAKEOPTS=`parse_opt "$*"`
-                     print_info 2 "CMD_MAKEOPTS: $CMD_MAKEOPTS"
+                     print_info 2 "CMD_MAKEOPTS: ${CMD_MAKEOPTS}"
              ;;
              --mountboot)
                      CMD_MOUNTBOOT=1
-                     print_info 2 "CMD_MOUNTBOOT: $CMD_MOUNTBOOT"
+                     print_info 2 "CMD_MOUNTBOOT: ${CMD_MOUNTBOOT}"
              ;;
              --no-mountboot)
                      CMD_MOUNTBOOT=0
-                     print_info 2 "CMD_MOUNTBOOT: $CMD_MOUNTBOOT"
+                     print_info 2 "CMD_MOUNTBOOT: ${CMD_MOUNTBOOT}"
              ;;
              --bootdir=*)
                      BOOTDIR=`parse_opt "$*"`
-                     print_info 2 "BOOTDIR: $BOOTDIR"
+                     print_info 2 "BOOTDIR: ${BOOTDIR}"
              ;;
              --do-keymap-auto)
                      CMD_DOKEYMAPAUTO=1
-                     print_info 2 "CMD_DOKEYMAPAUTO: $CMD_DOKEYMAPAUTO"
+                     print_info 2 "CMD_DOKEYMAPAUTO: ${CMD_DOKEYMAPAUTO}"
+             ;;
+             --evms)
+                     CMD_EVMS=1
+                     print_info 2 "CMD_EVMS: ${CMD_EVMS}"
              ;;
              --evms2)
-                     CMD_EVMS2=1
-                     print_info 2 "CMD_EVMS2: $CMD_EVMS2"
+                     CMD_EVMS=1
+                     print_info 2 "CMD_EVMS: ${CMD_EVMS}"
              ;;
              --unionfs)
-                     echo
-                     print_warning 1 "WARNING: unionfs support is in active development and is not meant for general"
-                         print_warning 1 "use."
-                     print_warning 1 "DISABLING UNIONFS SUPPORT AT THIS TIME."
-                     echo
-             ;;
-             --unionfs-dev)
                      CMD_UNIONFS=1
-                     print_info 2 "CMD_UNIONFS: $CMD_UNIONFS"
+                     print_info 2 "CMD_UNIONFS: ${CMD_UNIONFS}"
                      echo
                      print_warning 1 "WARNING: unionfs support is in active development and is not meant for general"
                          print_warning 1 "use."
@@ -229,26 +226,15 @@ parse_cmdline() {
              ;;
              --lvm2)
                      CMD_LVM2=1
-                     print_info 2 "CMD_LVM2: $CMD_LVM2"
-             ;;
-#            --suspend)
-#                    if [ ! -e /etc/suspend.conf ]
-#                    then
-#                      echo 'Error: --suspend requires sys-power/suspend to be installed'
-#                      echo '       on the host system; try "emerge sys-power/suspend".'
-#                      echo '       Once installed, configure the resume settings in /etc/suspend.conf'
-#                      exit 1
-#                    fi
-#                    CMD_SUSPEND=1
-#                    print_info 2 "CMD_SUSPEND: $CMD_SUSPEND"
-#            ;;
+                     print_info 2 "CMD_LVM2: ${CMD_LVM2}"
+             ;;
              --no-busybox)
                      CMD_NO_BUSYBOX=1
-                     print_info 2 "CMD_NO_BUSYBOX: $CMD_NO_BUSYBOX"
+                     print_info 2 "CMD_NO_BUSYBOX: ${CMD_NO_BUSYBOX}"
              ;;
              --slowusb)
                      CMD_SLOWUSB=1
-                     print_info 2 "CMD_SLOWUSB: $CMD_SLOWUSB"
+                     print_info 2 "CMD_SLOWUSB: ${CMD_SLOWUSB}"
              ;;
              --dmraid)
                      if [ ! -e /usr/include/libdevmapper.h ]
@@ -258,16 +244,16 @@ parse_cmdline() {
                        exit 1
                      fi
                      CMD_DMRAID=1
-                     print_info 2 "CMD_DMRAID: $CMD_DMRAID"
+                     print_info 2 "CMD_DMRAID: ${CMD_DMRAID}"
              ;;
              --bootloader=*)
                      CMD_BOOTLOADER=`parse_opt "$*"`
-                     print_info 2 "CMD_BOOTLOADER: $CMD_BOOTLOADER"
+                     print_info 2 "CMD_BOOTLOADER: ${CMD_BOOTLOADER}"
              ;;
              --debuglevel=*)
                      CMD_DEBUGLEVEL=`parse_opt "$*"`
                      DEBUGLEVEL="${CMD_DEBUGLEVEL}"
-                     print_info 2 "CMD_DEBUGLEVEL: $CMD_DEBUGLEVEL"
+                     print_info 2 "CMD_DEBUGLEVEL: ${CMD_DEBUGLEVEL}"
              ;;
              --menuconfig)
                      TERM_LINES=`stty -a | head -n 1 | cut -d\  -f5 | cut -d\; -f1`
@@ -280,227 +266,188 @@ parse_cmdline() {
                        exit 1
                      fi
                      CMD_MENUCONFIG=1
-                     print_info 2 "CMD_MENUCONFIG: $CMD_MENUCONFIG"
+                     print_info 2 "CMD_MENUCONFIG: ${CMD_MENUCONFIG}"
              ;;
              --no-menuconfig)
                      CMD_MENUCONFIG=0
-                     print_info 2 "CMD_MENUCONFIG: $CMD_MENUCONFIG"
+                     print_info 2 "CMD_MENUCONFIG: ${CMD_MENUCONFIG}"
              ;;
              --gconfig)
                      CMD_GCONFIG=1
-                     print_info 2 "CMD_GCONFIG: $CMD_GCONFIG"
+                     print_info 2 "CMD_GCONFIG: ${CMD_GCONFIG}"
              ;;
              --xconfig)
                      CMD_XCONFIG=1
-                     print_info 2 "CMD_XCONFIG: $CMD_XCONFIG"
+                     print_info 2 "CMD_XCONFIG: ${CMD_XCONFIG}"
              ;;
              --save-config)
                      CMD_SAVE_CONFIG=1
-                     print_info 2 "CMD_SAVE_CONFIG: $CMD_SAVE_CONFIG"
+                     print_info 2 "CMD_SAVE_CONFIG: ${CMD_SAVE_CONFIG}"
              ;;
              --no-save-config)
                      CMD_SAVE_CONFIG=0
-                     print_info 2 "CMD_SAVE_CONFIG: $CMD_SAVE_CONFIG"
+                     print_info 2 "CMD_SAVE_CONFIG: ${CMD_SAVE_CONFIG}"
              ;;
              --mrproper)
                      CMD_MRPROPER=1
-                     print_info 2 "CMD_MRPROPER: $CMD_MRPROPER"
+                     print_info 2 "CMD_MRPROPER: ${CMD_MRPROPER}"
              ;;
              --no-mrproper)
                      CMD_MRPROPER=0
-                     print_info 2 "CMD_MRPROPER: $CMD_MRPROPER"
+                     print_info 2 "CMD_MRPROPER: ${CMD_MRPROPER}"
              ;;
              --clean)
                      CMD_CLEAN=1
-                     print_info 2 "CMD_CLEAN: $CMD_CLEAN"
+                     print_info 2 "CMD_CLEAN: ${CMD_CLEAN}"
              ;;
              --no-clean)
                      CMD_CLEAN=0
-                     print_info 2 "CMD_CLEAN: $CMD_CLEAN"
+                     print_info 2 "CMD_CLEAN: ${CMD_CLEAN}"
              ;;
              --oldconfig)
                      CMD_CLEAN=0
                      CMD_OLDCONFIG=1
-                     print_info 2 "CMD_CLEAN: $CMD_CLEAN"
-                     print_info 2 "CMD_OLDCONFIG: $CMD_OLDCONFIG"
-             ;;
-             --bootsplash=*)
-                     CMD_BOOTSPLASH=1
-                     CMD_GENSPLASH=0
-                     BOOTSPLASH_THEME=`parse_opt "$*"`
-                     print_info 2 "CMD_BOOTSPLASH: $CMD_BOOTSPLASH"
-                     print_info 2 "CMD_GENSPLASH: $CMD_GENSPLASH"
-                     print_info 2 "BOOTSPLASH_THEME: $BOOTSPLASH_THEME"
-             ;;
-             --bootsplash)
-                     CMD_BOOTSPLASH=1
-                     CMD_GENSPLASH=0
-                     print_info 2 "CMD_BOOTSPLASH: $CMD_BOOTSPLASH"
-                     print_info 2 "CMD_GENSPLASH: $CMD_GENSPLASH"
-             ;;
-             --no-bootsplash)
-                     CMD_BOOTSPLASH=0
-                     print_info 2 "CMD_BOOTSPLASH: $CMD_BOOTSPLASH"
+                     print_info 2 "CMD_CLEAN: ${CMD_CLEAN}"
+                     print_info 2 "CMD_OLDCONFIG: ${CMD_OLDCONFIG}"
              ;;
              --gensplash=*)
                      CMD_GENSPLASH=1
-                     CMD_BOOTSPLASH=0
                      GENSPLASH_THEME=`parse_opt "$*"`
-                     print_info 2 "CMD_GENSPLASH: $CMD_GENSPLASH"
-                     print_info 2 "GENSPLASH_THEME: $GENSPLASH_THEME"
-                     print_info 2 "CMD_BOOTSPLASH: $CMD_BOOTSPLASH"
+                     print_info 2 "CMD_GENSPLASH: ${CMD_GENSPLASH}"
+                     print_info 2 "GENSPLASH_THEME: ${GENSPLASH_THEME}"
              ;;
              --gensplash)
                      CMD_GENSPLASH=1
-                     CMD_BOOTSPLASH=0
                      GENSPLASH_THEME='default'
-                     print_info 2 "CMD_GENSPLASH: $CMD_GENSPLASH"
-                     print_info 2 "CMD_BOOTSPLASH: $CMD_BOOTSPLASH"
+                     print_info 2 "CMD_GENSPLASH: ${CMD_GENSPLASH}"
              ;;
              --no-gensplash)
                      CMD_GENSPLASH=0
-                     print_info 2 "CMD_GENSPLASH: $CMD_GENSPLASH"
+                     print_info 2 "CMD_GENSPLASH: ${CMD_GENSPLASH}"
              ;;
              --gensplash-res=*)
                      GENSPLASH_RES=`parse_opt "$*"`
-                     print_info 2 "GENSPLASH_RES: $GENSPLASH_RES"
+                     print_info 2 "GENSPLASH_RES: ${GENSPLASH_RES}"
              ;;
              --install)
                      CMD_NOINSTALL=0
-                     print_info 2 "CMD_NOINSTALL: $CMD_NOINSTALL"
+                     print_info 2 "CMD_NOINSTALL: ${CMD_NOINSTALL}"
              ;;
              --no-install)
                      CMD_NOINSTALL=1
-                     print_info 2 "CMD_NOINSTALL: $CMD_NOINSTALL"
+                     print_info 2 "CMD_NOINSTALL: ${CMD_NOINSTALL}"
              ;;
              --no-initrdmodules)
                      CMD_NOINITRDMODULES=1
-                     print_info 2 "CMD_NOINITRDMODULES: $CMD_NOINITRDMODULES"
-             ;;
-             --udev)
-                     echo
-                     echo
-                     print_info 1 "--udev is deprecated and no longer necessary as udev is on by default"
-                     sleep 3
-                     echo
-                     echo
-                     print_info 2 "CMD_UDEV: $CMD_UDEV"
-             ;;
-             --no-udev)
-                     CMD_NO_UDEV=1
-                     print_info 2 "CMD_NO_UDEV: $CMD_NO_UDEV"
-             ;;
-             --no-devfs)
-                     CMD_NO_DEVFS=1
-                     print_info 2 "CMD_NO_DEVFS: $CMD_NO_DEVFS"
+                     print_info 2 "CMD_NOINITRDMODULES: ${CMD_NOINITRDMODULES}"
              ;;
              --callback=*)
                      CMD_CALLBACK=`parse_opt "$*"`
-                     print_info 2 "CMD_CALLBACK: $CMD_CALLBACK/$*"
+                     print_info 2 "CMD_CALLBACK: ${CMD_CALLBACK}/$*"
              ;;
              --static)
                      CMD_STATIC=1
-                     print_info 2 "CMD_STATIC: $CMD_STATIC"
+                     print_info 2 "CMD_STATIC: ${CMD_STATIC}"
              ;;
              --initramfs)
                      CMD_INITRAMFS=1
-                     print_info 2 "CMD_INITRAMFS: $CMD_INITRAMFS"
+                     print_info 2 "CMD_INITRAMFS: ${CMD_INITRAMFS}"
              ;;
              --tempdir=*)
                      TMPDIR=`parse_opt "$*"`
                      TEMP=${TMPDIR}/$RANDOM.$RANDOM.$RANDOM.$$
-                     print_info 2 "TMPDIR: $TMPDIR"
-                     print_info 2 "TEMP: $TEMP"
+                     print_info 2 "TMPDIR: ${TMPDIR}"
+                     print_info 2 "TEMP: ${TEMP}"
              ;; 
              --postclear)
                      CMD_POSTCLEAR=1
-                     print_info 2 "CMD_POSTCLEAR: $CMD_POSTCLEAR"
+                     print_info 2 "CMD_POSTCLEAR: ${CMD_POSTCLEAR}"
              ;; 
              --arch-override=*)
                      CMD_ARCHOVERRIDE=`parse_opt "$*"`
-                     print_info 2 "CMD_ARCHOVERRIDE: $CMD_ARCHOVERRIDE"
+                     print_info 2 "CMD_ARCHOVERRIDE: ${CMD_ARCHOVERRIDE}"
              ;;
              --color)
                      USECOLOR=1
-                     print_info 2 "USECOLOR: $USECOLOR"
+                     print_info 2 "USECOLOR: ${USECOLOR}"
                      setColorVars
              ;;
              --no-color)
                      USECOLOR=0
-                     print_info 2 "USECOLOR: $USECOLOR"
+                     print_info 2 "USECOLOR: ${USECOLOR}"
                      setColorVars
              ;;
              --debugfile=*)
                      CMD_DEBUGFILE=`parse_opt "$*"`
                      DEBUGFILE=`parse_opt "$*"`
-                     print_info 2 "CMD_DEBUGFILE: $CMD_DEBUGFILE"
-                     print_info 2 "DEBUGFILE: $CMD_DEBUGFILE"
+                     print_info 2 "CMD_DEBUGFILE: ${CMD_DEBUGFILE}"
+                     print_info 2 "DEBUGFILE: ${CMD_DEBUGFILE}"
              ;;
              --kerneldir=*)
                      CMD_KERNELDIR=`parse_opt "$*"`
-                     print_info 2 "CMD_KERNELDIR: $CMD_KERNELDIR"
+                     print_info 2 "CMD_KERNELDIR: ${CMD_KERNELDIR}"
              ;;
              --kernel-config=*)
                      CMD_KERNEL_CONFIG=`parse_opt "$*"`
-                     print_info 2 "CMD_KERNEL_CONFIG: $CMD_KERNEL_CONFIG"
+                     print_info 2 "CMD_KERNEL_CONFIG: ${CMD_KERNEL_CONFIG}"
              ;;
              --module-prefix=*)
                      CMD_INSTALL_MOD_PATH=`parse_opt "$*"`
-                     print_info 2 "CMD_INSTALL_MOD_PATH: $CMD_INSTALL_MOD_PATH"
+                     print_info 2 "CMD_INSTALL_MOD_PATH: ${CMD_INSTALL_MOD_PATH}"
              ;;
              --cachedir=*)
                      CACHE_DIR=`parse_opt "$*"`
-                     print_info 2 "CACHE_DIR: $CACHE_DIR"
+                     print_info 2 "CACHE_DIR: ${CACHE_DIR}"
              ;;
              --minkernpackage=*)
                      CMD_MINKERNPACKAGE=`parse_opt "$*"`
-                     print_info 2 "MINKERNPACKAGE: $CMD_MINKERNPACKAGE"
+                     print_info 2 "MINKERNPACKAGE: ${CMD_MINKERNPACKAGE}"
              ;;
              --modulespackage=*)
                      CMD_MODULESPACKAGE=`parse_opt "$*"`
-                     print_info 2 "MODULESPACKAGE: $CMD_MODULESPACKAGE"
+                     print_info 2 "MODULESPACKAGE: ${CMD_MODULESPACKAGE}"
              ;;
              --kerncache=*)
                      CMD_KERNCACHE=`parse_opt "$*"`
-                     print_info 2 "KERNCACHE: $CMD_KERNCACHE"
+                     print_info 2 "KERNCACHE: ${CMD_KERNCACHE}"
              ;;
              --kernname=*)
                      CMD_KERNNAME=`parse_opt "$*"`
-                     print_info 2 "KERNNAME: $CMD_KERNNAME"
+                     print_info 2 "KERNNAME: ${CMD_KERNNAME}"
              ;;
              --symlink)
                      CMD_SYMLINK=1
-                     print_info 2 "CMD_SYMLINK: $CMD_SYMLINK"
+                     print_info 2 "CMD_SYMLINK: ${CMD_SYMLINK}"
              ;;
              --no-symlink)
                      CMD_SYMLINK=0
-                     print_info 2 "CMD_SYMLINK: $CMD_SYMLINK"
+                     print_info 2 "CMD_SYMLINK: ${CMD_SYMLINK}"
              ;;
              --no-kernel-sources)
                      CMD_NO_KERNEL_SOURCES=1
-                     print_info 2 "CMD_NO_KERNEL_SOURCES: $CMD_NO_KERNEL_SOURCES"
+                     print_info 2 "CMD_NO_KERNEL_SOURCES: ${CMD_NO_KERNEL_SOURCES}"
              ;;
              --initramfs-overlay=*)
                      CMD_INITRAMFS_OVERLAY=`parse_opt "$*"`
-                     print_info 2 "CMD_INITRAMFS_OVERLAY: $CMD_INITRAMFS_OVERLAY"
+                     print_info 2 "CMD_INITRAMFS_OVERLAY: ${CMD_INITRAMFS_OVERLAY}"
              ;;
              --linuxrc=*)
                        CMD_LINUXRC=`parse_opt "$*"`
-                       print_info 2 "CMD_LINUXRC: $CMD_LINUXRC"
+                       print_info 2 "CMD_LINUXRC: ${CMD_LINUXRC}"
              ;;
-              --genzimage)
+             --genzimage)
                        KERNEL_MAKE_DIRECTIVE_2='zImage.initrd'
                        KERNEL_BINARY_2='arch/powerpc/boot/zImage.initrd'
                        GENERATE_Z_IMAGE=1
-                       print_info 2 "GENERATE_Z_IMAGE: $GENERATE_Z_IMAGE"
+                       print_info 2 "GENERATE_Z_IMAGE: ${GENERATE_Z_IMAGE}"
              ;;
              --disklabel)
                      CMD_DISKLABEL=1
-                     print_info 2 "CMD_DISKLABEL: $CMD_DISKLABEL"
+                     print_info 2 "CMD_DISKLABEL: ${CMD_DISKLABEL}"
              ;;
              --luks)
                      CMD_LUKS=1
-                     print_info 2 "CMD_LUKS: $CMD_LUKS"
+                     print_info 2 "CMD_LUKS: ${CMD_LUKS}"
              ;;
              all)
                      BUILD_KERNEL=1
@@ -520,7 +467,7 @@ parse_cmdline() {
                      BUILD_MODULES=0
                      BUILD_INITRD=1
                      CMD_NOINITRDMODULES=1
-                     print_info 2 "CMD_NOINITRDMODULES: $CMD_NOINITRDMODULES"
+                     print_info 2 "CMD_NOINITRDMODULES: ${CMD_NOINITRDMODULES}"
              ;;
              --help)
                      longusage
index 0e3b3190267de1c076dfe7ea7116119e27c20f9b..bb9187f887ec08c4b48a239912340817c3272c07 100644 (file)
@@ -560,43 +560,7 @@ compile_dmraid() {
        fi
 }
 
-#compile_suspend() {
-#      [ -f "${SUSPEND_BINCACHE}" ] && return
-#      [ -f "${SUSPEND_SRCTAR}" ] ||
-#              gen_die "Could not find SUSPEND source tarball: ${SUSPEND_SRCTAR}! Please place it there, or place another version, changing /etc/genkernel.conf as necessary!"
-#      cd ${TEMP}
-#      rm -rf ${SUSPEND_DIR} > /dev/null
-#      /bin/tar -zxpf ${SUSPEND_SRCTAR} ||
-#              gen_die 'Could not extract SUSPEND source tarball!'
-#      [ -d "${SUSPEND_DIR}" ] ||
-#              gen_die "SUSPEND directory ${DMRAID_DIR} is invalid!"
-
-#      cd "${SUSPEND_DIR}"
-#      if [ -f "${GK_SHARE}/pkg/suspend-0.5-Makefile.patch" ]
-#      then
-#              patch -p1 -i \
-#                      ${GK_SHARE}/pkg/suspend-0.5-Makefile.patch \
-#                      || gen_die "Failed patching suspend"
-#      fi
-
-#      print_info 1 'suspend: >> Compiling...'
-#      compile_generic '' utils CC_FLAGS= LD_FLAGS=
-
-#      print_info 1 '         >> Copying to bincache...'
-#      mkdir -p "${TEMP}/bincache/sbin"
-#      cp -f resume "${TEMP}/bincache/sbin" ||
-#              gen_die 'Could not copy resume binary'
-#      cd "${TEMP}/bincache"
-#      /bin/tar -cjf "${SUSPEND_BINCACHE}" * ||
-#              gen_die 'Could not create suspend binary cache'
-#      cd "${TEMP}"
-#      rm -rf bincache suspend-0.5
-#}
-
 compile_devfsd() {
-       # I've disabled dietlibc support for the time being since the
-       # version we use misses a few needed system calls.
-
        local ARGS
        if [ ! -f "${DEVFSD_BINCACHE}" ]
        then
@@ -609,26 +573,8 @@ compile_devfsd() {
                        gen_die "Devfsd directory ${DEVFSD_DIR} invalid"
                cd "${DEVFSD_DIR}"
 
-#              if [ "${USE_DIETLIBC}" -eq '1' ]
-#              then
-#                      extract_dietlibc_bincache
-#                      OLD_CC="${UTILS_CC}"
-#                      UTILS_CC="${TEMP}/diet/bin/diet ${UTILS_CC}"
-#              fi
-
                print_info 1 'devfsd: >> Compiling...'
-#              if [ "${USE_DIETLIBC}" -eq '1' ]
-#              then
-#                      compile_generic 'has_dlopen=0 has_rpcsvc=0' utils
-#              else
-                       compile_generic 'LDFLAGS=-static' utils
-#              fi
-
-#              if [ "${USE_DIETLIBC}" -eq '1' ]
-#              then
-#                      clean_dietlibc_bincache
-#                      UTILS_CC="${OLD_CC}"
-#              fi
+               compile_generic 'LDFLAGS=-static' utils
 
                print_info 1 '        >> Copying to cache...'
                [ -f "${TEMP}/${DEVFSD_DIR}/devfsd" ] || gen_die 'The devfsd executable does not exist after the compilation of devfsd!'
@@ -637,10 +583,6 @@ compile_devfsd() {
                [ -f "${TEMP}/${DEVFSD_DIR}/devfsd.bz2" ] || gen_die 'Could not find compressed devfsd.bz2 binary!'
                mv "${TEMP}/${DEVFSD_DIR}/devfsd.bz2" "${DEVFSD_BINCACHE}" || gen_die 'Could not move compressed binary to the package cache!'
 
-#              [ -f "${TEMP}/${DEVFSD_DIR}/devfsd.conf" ] || gen_die 'devfsd.conf does not exist after the compilation of devfsd!'
-#              bzip2 "${TEMP}/${DEVFSD_DIR}/devfsd.conf" || gen_die 'Compression of devfsd.conf failed!'
-#              mv "${TEMP}/${DEVFSD_DIR}/devfsd.conf.bz2" "${DEVFSD_CONF_BINCACHE}" || gen_die 'Could not move the compressed configuration to the package cache!'
-
                cd "${TEMP}"
                rm -rf "${DEVFSD_DIR}" > /dev/null
        fi
@@ -679,195 +621,6 @@ compile_device_mapper() {
        fi
 }
 
-compile_dietlibc() {
-       local BUILD_DIETLIBC
-       local ORIGTEMP
-
-       BUILD_DIETLIBC=0
-       [ ! -f "${DIETLIBC_BINCACHE}" ] && BUILD_DIETLIBC=1
-       [ ! -f "${DIETLIBC_BINCACHE_TEMP}" ] && BUILD_DIETLIBC=1
-       if ! isTrue "${BUILD_DIETLIBC}"
-       then
-               ORIGTEMP=`cat "${DIETLIBC_BINCACHE_TEMP}"`
-               if [ "${TEMP}" != "${ORIGTEMP}" ]
-               then
-                       print_warning 1 'dietlibc: Bincache exists, but the current temporary directory'
-                       print_warning 1 '          is different to the original. Rebuilding.'
-                       BUILD_DIETLIBC=1
-               fi
-       fi
-
-       if [ "${BUILD_DIETLIBC}" -eq '1' ]
-       then
-               [ -f "${DIETLIBC_SRCTAR}" ] ||
-                       gen_die "Could not find dietlibc source tarball: ${DIETLIBC_SRCTAR}"
-               cd "${TEMP}"
-               rm -rf "${DIETLIBC_DIR}" > /dev/null
-               /bin/tar -jxpf "${DIETLIBC_SRCTAR}" ||
-                       gen_die 'Could not extract dietlibc source tarball'
-               [ -d "${DIETLIBC_DIR}" ] ||
-                       gen_die "Dietlibc directory ${DIETLIBC_DIR} is invalid!"
-               cd "${DIETLIBC_DIR}"
-               print_info 1 "dietlibc: >> Compiling..."
-               compile_generic "prefix=${TEMP}/diet" utils
-               print_info 1 "          >> Installing..."
-               compile_generic "prefix=${TEMP}/diet install" utils
-               print_info 1 "          >> Copying to bincache..."
-               cd ${TEMP}
-               /bin/tar -jcpf "${DIETLIBC_BINCACHE}" diet ||
-                       gen_die 'Could not tar up the dietlibc binary!'
-               [ -f "${DIETLIBC_BINCACHE}" ] ||
-                       gen_die 'Dietlibc cache not created!'
-               echo "${TEMP}" > "${DIETLIBC_BINCACHE_TEMP}"
-
-               cd "${TEMP}"
-               rm -rf "${DIETLIBC_DIR}" > /dev/null
-               rm -rf "${TEMP}/diet" > /dev/null
-       fi
-}
-compile_klibc() {
-       cd "${TEMP}"
-       rm -rf "${KLIBC_DIR}" klibc-build
-       [ ! -f "${KLIBC_SRCTAR}" ] &&
-               gen_die "Could not find klibc tarball: ${KLIBC_SRCTAR}"
-       /bin/tar jxpf "${KLIBC_SRCTAR}" ||
-               gen_die 'Could not extract klibc tarball'
-       [ ! -d "${KLIBC_DIR}" ] &&
-               gen_die "klibc tarball ${KLIBC_SRCTAR} is invalid"
-       cd "${KLIBC_DIR}"
-       if [ -f ${GK_SHARE}/pkg/klibc-1.1.16-sparc2.patch ]
-       then
-               patch -p1 -i \
-                       ${GK_SHARE}/pkg/klibc-1.1.16-sparc2.patch \
-                       || gen_die "Failed patching klibc"
-       fi
-       if [ -f "${GK_SHARE}/pkg/klibc-1.2.1-nostdinc-flags.patch" ]
-       then
-               patch -p1 -i \
-                       ${GK_SHARE}/pkg/klibc-1.2.1-nostdinc-flags.patch \
-                       || gen_die "Failed patching klibc"
-       fi
-
-       # Don't install to "//lib" fix
-       sed -e 's:SHLIBDIR = /lib:SHLIBDIR = $(INSTALLROOT)$(INSTALLDIR)/$(KLIBCCROSS)lib:' -i scripts/Kbuild.install
-       print_info 1 'klibc: >> Compiling...'
-       ln -snf "${KERNEL_DIR}" linux || gen_die "Could not link to ${KERNEL_DIR}"
-       sed -i Makefile -e "s|prefix      = /usr|prefix      = ${TEMP}/klibc-build|g"
-       if [ "${UTILS_ARCH}" != '' ]
-       then
-               sed -i Makefile -e "s|export ARCH.*|export ARCH := ${UTILS_ARCH}|g"
-       fi
-       if [ "${ARCH}" = 'um' ]
-       then
-               compile_generic "ARCH=um" utils
-       elif [ "${ARCH}" = 'x86' ]
-       then
-               compile_generic "ARCH=i386" utils
-       elif [ "${UTILS_CROSS_COMPILE}" != '' ]
-       then
-               compile_generic "CROSS=${UTILS_CROSS_COMPILE}" utils
-       else
-               compile_generic "" utils
-       fi
-
-       compile_generic "install" utils
-        
-}
-compile_udev() {
-       if [ ! -f "${UDEV_BINCACHE}" ]
-       then
-               # PPC fixup for 2.6.14
-               # Headers are moving around .. need to make them available
-               if [ "${VER}" -eq '2' -a "${PAT}" -eq '6' -a "${SUB}" -ge '14' ]
-               then
-                   if [ "${ARCH}" = 'ppc' -o "${ARCH}" = 'ppc64' ]
-                   then
-                       cd ${KERNEL_DIR}
-                       echo 'Applying hack to workaround 2.6.14+ PPC header breakages...'
-                       compile_generic 'include/asm' kernel
-                   fi
-               fi
-               compile_klibc
-               cd "${TEMP}"
-               rm -rf "${UDEV_DIR}" udev
-               [ ! -f "${UDEV_SRCTAR}" ] &&
-                       gen_die "Could not find udev tarball: ${UDEV_SRCTAR}"
-               /bin/tar -jxpf "${UDEV_SRCTAR}" ||
-                       gen_die 'Could not extract udev tarball'
-               [ ! -d "${UDEV_DIR}" ] &&
-                       gen_die "Udev tarball ${UDEV_SRCTAR} is invalid"
-
-               cd "${UDEV_DIR}"
-               local extras="extras/scsi_id extras/volume_id extras/ata_id extras/run_directory extras/usb_id extras/floppy extras/cdrom_id extras/firmware"
-               # No selinux support yet .. someday maybe
-               #use selinux && myconf="${myconf} USE_SELINUX=true"
-               print_info 1 'udev: >> Compiling...'
-               # SPARC fixup
-               if [ "${UTILS_ARCH}" = 'sparc' ]
-               then
-                       echo "CFLAGS += -mcpu=v8 -mtune=v8" >> Makefile
-               fi
-               # PPC fixup for 2.6.14
-               if [ "${VER}" -eq '2' -a "${PAT}" -eq '6' -a "${SUB}" -ge '14' ]
-               then
-                       if [ "${ARCH}" = 'ppc' -o "${ARCH}" = 'ppc64' ]
-                       then
-                               # Headers are moving around .. need to make them available
-                               echo "CFLAGS += -I${KERNEL_DIR}/arch/${ARCH}/include" >> Makefile
-                       fi
-               fi
-
-               if [ "${ARCH}" = 'um' ]
-               then
-                       compile_generic "EXTRAS=\"${extras}\" ARCH=um USE_KLIBC=true KLCC=${TEMP}/klibc-build/bin/klcc USE_LOG=false DEBUG=false udevdir=/dev all" utils
-               else
-                       # This *needs* to be runtask, or else it breakson most
-                       # architectures.  -- wolf31o2
-                       compile_generic "EXTRAS=\"${extras}\" USE_KLIBC=true KLCC=${TEMP}/klibc-build/bin/klcc USE_LOG=false DEBUG=false udevdir=/dev all" runtask
-               fi
-
-
-               print_info 1 '      >> Installing...'
-               install -d "${TEMP}/udev/etc/udev" "${TEMP}/udev/sbin" "${TEMP}/udev/etc/udev/scripts" "${TEMP}/udev/etc/udev/rules.d" "${TEMP}/udev/etc/udev/permissions.d" "${TEMP}/udev/etc/udev/extras" "${TEMP}/udev/etc" "${TEMP}/udev/sbin" "${TEMP}/udev/usr/" "${TEMP}/udev/usr/bin" "${TEMP}/udev/usr/sbin"||
-                       gen_die 'Could not create directory hierarchy'
-               
-               install -c etc/udev/gentoo/udev.rules "${TEMP}/udev/etc/udev/rules.d/50-udev.rules" ||
-                   gen_die 'Could not copy gentoo udev.rules to 50-udev.rules'
-
-#              compile_generic "EXTRAS=\"${extras}\" DESTDIR=${TEMP}/udev install-config" utils
-#              compile_generic "EXTRAS=\"${extras}\" DESTDIR=${TEMP}/udev install-bin" utils
-               # We are going to install our files by hand.  Why are we doing this?
-               # Well, the udev ebuild does so, and I tend to think that Greg
-               # Kroah-Hartman knows what he's doing with regards to udev.
-               for i in udev udevd udevsend udevstart udevtrigger
-               do
-                       install -D $i "${TEMP}/udev/sbin"
-               done
-               install -c extras/ide-devfs.sh "${TEMP}/udev/etc/udev/scripts" 
-               install -c extras/scsi-devfs.sh "${TEMP}/udev/etc/udev/scripts" 
-               install -c extras/raid-devfs.sh "${TEMP}/udev/etc/udev/scripts" 
-
-               cd "${TEMP}/udev"
-               print_info 1 '      >> Copying to bincache...'
-               /bin/tar -cjf "${UDEV_BINCACHE}" * ||
-                       gen_die 'Could not create binary cache'
-
-               cd "${TEMP}"
-               rm -rf "${UDEV_DIR}" udev
-               
-               # PPC fixup for 2.6.14
-               if [ "${VER}" -eq '2' -a "${PAT}" -eq '6' -a "${SUB}" -ge '14' ]
-               then
-                   if [ "${ARCH}" = 'ppc' -o "${ARCH}" = 'ppc64' ]
-                   then
-                       cd ${KERNEL_DIR}
-                       compile_generic 'archclean' kernel
-                       cd "${TEMP}"
-                   fi
-               fi
-       fi
-}
-
 compile_e2fsprogs() {
        if [ ! -f "${BLKID_BINCACHE}" ]
        then
index 963e07727853a6418240183636446235b9a78b50..e54c90ce203b3eea82fe0095796679e1c6c6dcad 100644 (file)
@@ -197,36 +197,24 @@ determine_real_args() {
 
        CACHE_DIR=`arch_replace "${CACHE_DIR}"`
        BUSYBOX_BINCACHE=`cache_replace "${BUSYBOX_BINCACHE}"`
-       DIETLIBC_BINCACHE=`cache_replace "${DIETLIBC_BINCACHE}"`
-       DIETLIBC_BINCACHE_TEMP=`cache_replace "${DIETLIBC_BINCACHE_TEMP}"`
        DEVFSD_BINCACHE=`cache_replace "${DEVFSD_BINCACHE}"`
        DEVFSD_CONF_BINCACHE=`cache_replace "${DEVFSD_CONF_BINCACHE}"`
-       UDEV_BINCACHE=`cache_replace "${UDEV_BINCACHE}"`
-       KLIBC_BINCACHE=`cache_replace "${KLIBC_BINCACHE}"`
        DEVICE_MAPPER_BINCACHE=`cache_replace "${DEVICE_MAPPER_BINCACHE}"`
        LVM2_BINCACHE=`cache_replace "${LVM2_BINCACHE}"`
        DMRAID_BINCACHE=`cache_replace "${DMRAID_BINCACHE}"`
        UNIONFS_BINCACHE=`cache_replace "${UNIONFS_BINCACHE}"`
        UNIONFS_MODULES_BINCACHE=`cache_replace "${UNIONFS_MODULES_BINCACHE}"`
        BLKID_BINCACHE=`cache_replace "${BLKID_BINCACHE}"`
-#      SUSPEND_BINCACHE=`cache_replace "${SUSPEND_BINCACHE}"`
   
        DEFAULT_KERNEL_CONFIG=`arch_replace "${DEFAULT_KERNEL_CONFIG}"`
        BUSYBOX_CONFIG=`arch_replace "${BUSYBOX_CONFIG}"`
        BUSYBOX_BINCACHE=`arch_replace "${BUSYBOX_BINCACHE}"`
-       DIETLIBC_BINCACHE=`arch_replace "${DIETLIBC_BINCACHE}"`
-       DIETLIBC_BINCACHE_TEMP=`arch_replace "${DIETLIBC_BINCACHE_TEMP}"`
-       DEVFSD_BINCACHE=`arch_replace "${DEVFSD_BINCACHE}"`
-       DEVFSD_CONF_BINCACHE=`arch_replace "${DEVFSD_CONF_BINCACHE}"`
-       UDEV_BINCACHE=`arch_replace "${UDEV_BINCACHE}"`
-       KLIBC_BINCACHE=`arch_replace "${KLIBC_BINCACHE}"`
        DEVICE_MAPPER_BINCACHE=`arch_replace "${DEVICE_MAPPER_BINCACHE}"`
        LVM2_BINCACHE=`arch_replace "${LVM2_BINCACHE}"`
        DMRAID_BINCACHE=`arch_replace "${DMRAID_BINCACHE}"`
        UNIONFS_BINCACHE=`arch_replace "${UNIONFS_BINCACHE}"`
        UNIONFS_MODULES_BINCACHE=`arch_replace "${UNIONFS_MODULES_BINCACHE}"`
        BLKID_BINCACHE=`arch_replace "${BLKID_BINCACHE}"`
-#      SUSPEND_BINCACHE=`arch_replace "${SUSPEND_BINCACHE}"`
        
        if [ "${CMD_BOOTSPLASH}" != '' ]
        then
@@ -401,31 +389,6 @@ determine_real_args() {
                OLDCONFIG=0
        fi
 
-       if isTrue "${CMD_NO_UDEV}"
-       then
-               UDEV=0
-               if isTrue "${CMD_NO_DEVFS}"
-               then
-                   DEVFS=0
-               else
-                   DEVFS=1
-               fi
-       else
-               UDEV=1
-               DEVFS=0
-       fi
-       
-       if isTrue "${CMD_NO_DEVFS}"
-       then
-               DEVFS=0
-       fi
-       
-       if isTrue "${CMD_DEVFS}"
-       then
-               DEVFS=1
-               UDEV=0
-       fi
-
        if isTrue "${CMD_LVM2}"
        then
                LVM2=1
@@ -433,14 +396,7 @@ determine_real_args() {
                LVM2=0
        fi
 
-#      if isTrue "${CMD_SUSPEND}"
-#      then
-#              SUSPEND=1
-#      else
-#              SUSPEND=0
-#      fi
-       
-       if isTrue "${CMD_EVMS2}"
+       if isTrue "${CMD_EVMS}"
        then
                EVMS2=1
        else
index 3cff7cc1dae0ba26470c367d032b4e2836993495..0342374aff2df534311243d6bd2d9fec62c00d46 100644 (file)
@@ -24,14 +24,6 @@ append_base_layout() {
        echo "/dev/ram0     /           ext2    defaults        0 0" > ${TEMP}/initramfs-base-temp/etc/fstab
        echo "proc          /proc       proc    defaults    0 0" >> ${TEMP}/initramfs-base-temp/etc/fstab
        
-       if [ "${DEVFS}" -eq '1' ]
-       then
-           echo "REGISTER        .*           MKOLDCOMPAT" > ${TEMP}/initramfs-base-temp/etc/devfsd.conf
-           echo "UNREGISTER      .*           RMOLDCOMPAT" >> ${TEMP}/initramfs-base-temp/etc/devfsd.conf
-           echo "REGISTER        .*           MKNEWCOMPAT" >> ${TEMP}/initramfs-base-temp/etc/devfsd.conf
-           echo "UNREGISTER      .*           RMNEWCOMPAT" >> ${TEMP}/initramfs-base-temp/etc/devfsd.conf
-       fi
-
        cd ${TEMP}/initramfs-base-temp/dev
        mknod -m 660 console c 5 1
        mknod -m 660 null c 1 3
@@ -56,11 +48,6 @@ append_busybox() {
                gen_die 'Could not extract busybox bincache!'
        chmod +x "${TEMP}/initramfs-busybox-temp/bin/busybox"
 
-       # down devfsd we use with dietlibc
-#      cp "${DEVFSD_CONF_BINCACHE}" "${TEMP}/initramfs-temp/etc/devfsd.conf.bz2" ||
-#              gen_die "could not copy devfsd.conf from bincache"
-#      bunzip2 "${TEMP}/initramfs-temp/etc/devfsd.conf.bz2" ||
-#              gen_die "could not uncompress devfsd.conf"
        for i in '[' ash sh mount uname echo cut; do
                rm -f ${TEMP}/initramfs-busybox-temp/bin/$i > /dev/null
                ln ${TEMP}/initramfs-busybox-temp/bin/busybox ${TEMP}/initramfs-busybox-temp/bin/$i ||
@@ -72,20 +59,6 @@ append_busybox() {
        rm -rf "${TEMP}/initramfs-busybox-temp" > /dev/null
 }
 
-append_udev(){
-       if [ -d "${TEMP}/initramfs-udev-temp" ]
-       then
-               rm -r "${TEMP}/initramfs-udev-temp/"
-       fi
-       cd ${TEMP}
-       mkdir -p "${TEMP}/initramfs-udev-temp/bin/"
-       [ "${UDEV}" -eq '1' ] && { /bin/tar -jxpf "${UDEV_BINCACHE}" -C "${TEMP}/initramfs-udev-temp" ||
-               gen_die "Could not extract udev binary cache!"; }
-       cd "${TEMP}/initramfs-udev-temp/"
-       find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}"
-       rm -rf "${TEMP}/initramfs-udev-temp" > /dev/null
-}
-
 append_blkid(){
        if [ -d "${TEMP}/initramfs-blkid-temp" ]
        then
@@ -101,23 +74,6 @@ append_blkid(){
        rm -rf "${TEMP}/initramfs-blkid-temp" > /dev/null
 }
 
-append_devfs(){
-       if [ -d "${TEMP}/initramfs-devfs-temp" ]
-       then
-               rm -r "${TEMP}/initramfs-devfs-temp/"
-       fi
-       cd ${TEMP}
-       print_info 1 'DEVFS: Adding support (compiling binaries)...'
-       compile_devfsd
-       mkdir -p "${TEMP}/initramfs-devfs-temp/bin/"
-       cp "${DEVFSD_BINCACHE}" "${TEMP}/initramfs-devfs-temp/bin/devfsd.bz2" || gen_die "could not copy devfsd executable from bincache"
-       bunzip2 "${TEMP}/initramfs-devfs-temp/bin/devfsd.bz2" || gen_die "could not uncompress devfsd"
-       chmod +x "${TEMP}/initramfs-devfs-temp/bin/devfsd"
-       cd "${TEMP}/initramfs-devfs-temp/"
-       find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}"
-       rm -rf "${TEMP}/initramfs-devfs-temp" > /dev/null
-}
-
 append_unionfs_modules(){
        if [ -d "${TEMP}/initramfs-unionfs-modules-temp" ]
        then
@@ -475,10 +431,8 @@ create_initramfs() {
        append_data 'auxilary'
        append_data 'busybox' "${BUSYBOX}"
        append_data 'devfs' "${DEVFS}"
-#      append_data 'udev' "${UDEV}"
        append_data 'unionfs_modules' "${UNIONFS}"
        append_data 'unionfs_tools' "${UNIONFS}"
-#      append_data 'suspend' "${SUSPEND}"
        append_data 'lvm2' "${LVM2}"
        append_data 'dmraid' "${DMRAID}"
        append_data 'evms2' "${EVMS2}"
index 432f0af548fc551935e5ae23e03d5a224976e34a..54f87d05c801ae99709f5d01e81cb019a17f8e34 100644 (file)
@@ -14,15 +14,13 @@ create_initrd_loop() {
                gen_die 'Could not mount the initrd filesystem!'
 }
 
-create_initrd_unmount_loop()
-{
+create_initrd_unmount_loop() {
        cd ${TEMP}
        umount "${TEMP}/initrd-mount" ||
                gen_die 'Could not unmount initrd system!'
 }
 
-move_initrd_to_loop()
-{
+move_initrd_to_loop() {
        cd "${TEMP}/initrd-temp"
        mv * "${TEMP}/initrd-mount" >> ${DEBUGFILE} 2>&1
 }
@@ -94,21 +92,6 @@ create_base_initrd_sys() {
                chmod +x "${TEMP}/initrd-temp/bin/devfsd"
        fi
 
-       # udev
-#      if [ "${UDEV}" -eq '1' ]
-#      then
-#              /bin/tar -jxpf "${UDEV_BINCACHE}" -C "${TEMP}/initrd-temp" || gen_die 'Could not extract udev binary cache!'
-#              if [ ! -e "${TEMP}/initrd-temp/bin/udevstart" ]
-#              then
-#                  ln -sf "./udev" "${TEMP}/initrd-temp/bin/udevstart" || gen_die 'Could not symlink udev -> udevstart!'
-#              fi
-               
-#              if [ ! -e "${TEMP}/initrd-temp/bin/udevsend" ]
-#              then
-#                  ln -sf "./udev" "${TEMP}/initrd-temp/bin/udevsend" || gen_die 'Could not symlink udev -> udevsend!'
-#              fi
-#      fi
-       
        #unionfs modules
        if [ "${UNIONFS}" -eq '1' ]
        then
@@ -127,18 +110,6 @@ create_base_initrd_sys() {
                        gen_die "Could not extract unionfs tools binary cache!";
        fi
 
-       # Suspend
-       if [ "${SUSPEND}" = '1' ]
-       then
-               print_info 1 'SUSPEND: Adding support (compiling binaries)...'
-               compile_suspend
-               /bin/tar -jxpf "${SUSPEND_BINCACHE}" -C "${TEMP}/initrd-temp" ||
-                       gen_die "Could not extract suspend binary cache!"
-               mkdir -p "${TEMP}/initrd-temp/etc"
-               cp -f /etc/suspend.conf "${TEMP}/initrd-temp/etc" ||
-                       gen_die 'Could not copy /etc/suspend.conf'
-       fi
-
        # DMRAID 
        if [ "${DMRAID}" = '1' ]
        then
index 7d017e84fb9f2b8e8efc5ca34da8d82f4d8f3de4..504d2fea27baf0adfdcf5db853569c3419968a99 100644 (file)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright 2003-2006 Gentoo Foundation 
+# Copyright 2003-2007 Gentoo Foundation 
 # Distributed under the terms of the GNU General Public License v2
 
 . /etc/initrd.defaults
@@ -79,15 +79,6 @@ do
                looptype\=*)
                        LOOPTYPE=`parse_opt "${x}"`
                ;;
-               # Start Device Manager options 
-               devfs)
-                       USE_DEVFS_NORMAL=1
-                       USE_UDEV_NORMAL=0
-               ;;
-               udev)
-                       USE_DEVFS_NORMAL=0
-                       USE_UDEV_NORMAL=1
-               ;;
                unionfs)
                        if [ ! -x /sbin/unionctl ]
                        then
index bfacd6406b8274fc0b5256e2b9520accf4d974c2..98dc83b5fca2bb5319fd8fe1e220881c408ea99c 100755 (executable)
--- a/genkernel
+++ b/genkernel
@@ -290,13 +290,8 @@ if [ "${BUILD_INITRD}" -eq '1' ]
 then
        [ "${DISKLABEL}" -eq '1' ] && compile_e2fsprogs
 
-       if [ "${KERN_24}" != '1' -a "${UDEV}" -eq '1' ] 
+       if [ "${KERN_24}" -eq '1' ] 
        then
-               :
-#              compile_udev 
-       else
-               DEVFS=1
-               UDEV=0
                compile_devfsd
        fi
 
index 1144db9e66c81d8d0c4f19b5691cc8625382e218..c22be83395a908d2fda5a2e4116d93f9e1f6f20c 100644 (file)
@@ -21,8 +21,6 @@ GENSPLASH=0
 USECOLOR="yes"
 NOINITRDMODULES="yes"
 BUSYBOX=1
-UDEV=1
-DEVFS=0
 UNIONFS=0
 LVM2=0
 DMRAID=0