From: Chris Gianelloni Date: Thu, 14 Feb 2008 06:48:33 +0000 (+0000) Subject: Removing DEVFS support from genkernel since we don't support 2.4 kernels anymore... X-Git-Tag: v3.4.10.902~152 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=58c13464ec5d36b02f87dc77aa680d33618fde13;p=genkernel.git Removing DEVFS support from genkernel since we don't support 2.4 kernels anymore. This is 3.4.10_pre2. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@600 67a159dc-881f-0410-a524-ba9dfbe2cb84 --- diff --git a/ChangeLog b/ChangeLog index e74a913..47374c4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,13 @@ # Copyright 2006-2008 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ + 14 Feb 2008; Chris Gianelloni gen_compile.sh, + gen_determineargs.sh, gen_funcs.sh, gen_initramfs.sh, gen_initrd.sh, + generic/initrd.defaults, generic/initrd.scripts, generic/linuxrc, + genkernel, genkernel.8, genkernel.conf: + Removing DEVFS support from genkernel since we don't support 2.4 kernels + anymore. This is 3.4.10_pre2. + 14 Feb 2008; Chris Gianelloni generic/initrd.scripts: Added a line to make sure we remove image.squashfs as well as the other loop diff --git a/gen_compile.sh b/gen_compile.sh index 975708c..8cd2fb9 100644 --- a/gen_compile.sh +++ b/gen_compile.sh @@ -462,34 +462,6 @@ compile_dmraid() { fi } -compile_devfsd() { - local ARGS - if [ ! -f "${DEVFSD_BINCACHE}" ] - then - [ ! -f "${DEVFSD_SRCTAR}" ] && - gen_die "Could not find devfsd source tarball: ${DEVFSD_SRCTAR}" - cd "${TEMP}" - rm -rf "${DEVFSD_DIR}" - /bin/tar -jxpf "${DEVFSD_SRCTAR}" - [ ! -d "${DEVFSD_DIR}" ] && - gen_die "Devfsd directory ${DEVFSD_DIR} invalid" - cd "${DEVFSD_DIR}" - - print_info 1 'devfsd: >> Compiling...' - 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!' - strip "${TEMP}/${DEVFSD_DIR}/devfsd" || gen_die 'Could not strip devfsd!' - bzip2 "${TEMP}/${DEVFSD_DIR}/devfsd" || gen_die 'Compression of devfsd failed!' - [ -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!' - - cd "${TEMP}" - rm -rf "${DEVFSD_DIR}" > /dev/null - fi -} - compile_device_mapper() { if [ ! -f "${DEVICE_MAPPER_BINCACHE}" ] then diff --git a/gen_determineargs.sh b/gen_determineargs.sh index 31f000e..f025389 100644 --- a/gen_determineargs.sh +++ b/gen_determineargs.sh @@ -111,8 +111,6 @@ determine_real_args() { set_config_with_override 1 EVMS CMD_EVMS 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" - set_config_with_override 1 DISKLABEL CMD_DISKLABEL set_config_with_override 1 LUKS CMD_LUKS set_config_with_override 1 MDADM CMD_MDADM @@ -122,8 +120,6 @@ determine_real_args() { CACHE_DIR=`arch_replace "${CACHE_DIR}"` BUSYBOX_BINCACHE=`cache_replace "${BUSYBOX_BINCACHE}"` - DEVFSD_BINCACHE=`cache_replace "${DEVFSD_BINCACHE}"` - DEVFSD_CONF_BINCACHE=`cache_replace "${DEVFSD_CONF_BINCACHE}"` DEVICE_MAPPER_BINCACHE=`cache_replace "${DEVICE_MAPPER_BINCACHE}"` LVM_BINCACHE=`cache_replace "${LVM_BINCACHE}"` DMRAID_BINCACHE=`cache_replace "${DMRAID_BINCACHE}"` diff --git a/gen_funcs.sh b/gen_funcs.sh index 9d726de..3942740 100755 --- a/gen_funcs.sh +++ b/gen_funcs.sh @@ -245,8 +245,8 @@ has_loop() { fi if [ -e '/dev/loop0' -o -e '/dev/loop/0' -a ${PIPESTATUS[1]} ] then - # We found devfs or standard dev loop device, assume - # loop is compiled into the kernel or the module is loaded + # We found a standard dev loop device, assume loop is compiled into the + # kernel or the module is loaded return 0 else return 1 diff --git a/gen_initramfs.sh b/gen_initramfs.sh index 014de67..2d4994b 100644 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -423,7 +423,6 @@ create_initramfs() { append_data 'base_layout' append_data 'auxilary' append_data 'busybox' "${BUSYBOX}" -# append_data 'devfs' "${DEVFS}" append_data 'lvm' "${LVM}" append_data 'dmraid' "${DMRAID}" append_data 'evms' "${EVMS}" diff --git a/gen_initrd.sh b/gen_initrd.sh index 2cd02ac..8fc64ef 100644 --- a/gen_initrd.sh +++ b/gen_initrd.sh @@ -49,14 +49,6 @@ create_base_initrd_sys() { echo "/dev/ram0 / ext2 defaults 0 0" > ${TEMP}/initrd-temp/etc/fstab echo "proc /proc proc defaults 0 0" >> ${TEMP}/initrd-temp/etc/fstab - if [ "${NODEVFSD}" = '' ] - then - echo "REGISTER .* MKOLDCOMPAT" > ${TEMP}/initrd-temp/etc/devfsd.conf - echo "UNREGISTER .* RMOLDCOMPAT" >> ${TEMP}/initrd-temp/etc/devfsd.conf - echo "REGISTER .* MKNEWCOMPAT" >> ${TEMP}/initrd-temp/etc/devfsd.conf - echo "UNREGISTER .* RMNEWCOMPAT" >> ${TEMP}/initrd-temp/etc/devfsd.conf - fi - # 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' ] @@ -82,14 +74,6 @@ create_base_initrd_sys() { gen_die 'Could not extract busybox bincache!' chmod +x "${TEMP}/initrd-temp/bin/busybox" - # devfsd - if [ "${KERN_24}" -eq '1' ] - then - cp "${DEVFSD_BINCACHE}" "${TEMP}/initrd-temp/bin/devfsd.bz2" || gen_die 'Could not copy devfsd executable from bincache!' - bunzip2 "${TEMP}/initrd-temp/bin/devfsd.bz2" || gen_die 'Could not uncompress devfsd!' - chmod +x "${TEMP}/initrd-temp/bin/devfsd" - fi - # DMRAID if [ "${DMRAID}" -eq '1' ] then diff --git a/generic/initrd.defaults b/generic/initrd.defaults index a9f0918..859d515 100644 --- a/generic/initrd.defaults +++ b/generic/initrd.defaults @@ -2,9 +2,6 @@ PATH="/usr/sbin:/usr/bin:/sbin:/bin" -# Default to the udev device manager -USE_UDEV_NORMAL='1' - # Insert ctrl character # ctrl-V then esc will print ^[ # ctrl-V then ctrl-shift-m will print ^M diff --git a/generic/initrd.scripts b/generic/initrd.scripts index c1ec60b..d703b3e 100644 --- a/generic/initrd.scripts +++ b/generic/initrd.scripts @@ -187,17 +187,13 @@ cache_cd_contents() { mount_sysfs() { if [ "${KV_2_6_OR_GREATER}" ] then - # Udev is semi-broken on non /sys sysfs mount points. mount -t sysfs /sys /sys >/dev/null 2>&1 ret=$? - - # sysfs mount failed .. udev wont work fall back to devfs if available - [ "$ret" -eq '0' ] || USE_UDEV_NORMAL=0 + [ "$ret" -eq '0' ] || bad_msg "Failed to mount /sys!" fi } findnfsmount() { - if [ "${IP}" != '' ] || busybox udhcpc -R rootpath -n -s /bin/udhcpc.scripts then [ -e /rootpath ] && NFSROOT=`cat /rootpath` @@ -263,10 +259,6 @@ findnfsmount() { fi } -kill_devfsd() { - killall devfsd > /dev/null 2>&1 -} - check_loop() { if [ "${LOOP}" = '' -o ! -e "mnt/cdrom/${LOOP}" ] then @@ -375,49 +367,37 @@ bind_mount_dev() { } setup_hotplug() { - # Check udev is available... - if [ "${KV_2_6_OR_GREATER}" -a "${USE_UDEV_NORMAL}" != '0' ] - then - USE_UDEV_NORMAL=1 - else - USE_UDEV_NORMAL=0 - fi - - if [ "${USE_UDEV_NORMAL}" = '1' ] + if [ "${KV_2_6_OR_GREATER}" ] then - # catch udev hotplug events echo /sbin/mdev > /proc/sys/kernel/hotplug fi } -start_dev_mgr() { - # Check udev is available... - if [ "${KV_2_6_OR_GREATER}" -a "${USE_UDEV_NORMAL}" != '0' ] - then - USE_UDEV_NORMAL=1 - else - USE_UDEV_NORMAL=0 - fi +check_slowusb() { + [ "${DO_slowusb}" ] || \ + for dir in /sys/bus/usb/drivers/usb-storage/* + do + [ -d "${dir}" ] && FORCE_slowusb="1" + done +} - if [ "${USE_UDEV_NORMAL}" = '1' ] +start_dev_mgr() { + if [ "${KV_2_6_OR_GREATER}" ] then cd /sys [ "${DO_slowusb}" ] && sleep 10 - kill_devfsd + check_slowusb + [ "${FORCE_slowusb}" ] && sleep 10 good_msg 'Activating mdev' runmdev - [ "${DO_slowusb}" ] && sleep 20 + [ "${DO_slowusb}" ] || \ + [ "${FORCE_slowusb}" ] && sleep 20 cd / - else - good_msg 'Activating devfs' - mount -t devfs devfs /dev 2>/dev/null - devfsd /dev -np fi } cmdline_hwopts() { # Scan CMDLINE for any "doscsi" or "noscsi"-type arguments - local FOUND local TMP_HWOPTS diff --git a/generic/linuxrc b/generic/linuxrc index 0bb75e4..e1db31e 100644 --- a/generic/linuxrc +++ b/generic/linuxrc @@ -225,7 +225,7 @@ mount_sysfs # Delay if needed for USB hardware sdelay -# Start udev/devfs +# Start device manager start_dev_mgr # Setup md device nodes if they dont exist @@ -581,6 +581,7 @@ then # Let Init scripts know that we booted from CD export CDBOOT CDBOOT=1 + check_slowusb if [ "${DO_slowusb}" ] || [ "${FORCE_slowusb}" ] then sleep 10 @@ -617,31 +618,14 @@ then fi echo -ne "${BOLD}.${NORMAL}" - if /tmp/.initrd/bin/[ "${USE_DEVFS_NORMAL}" = '1' -a "${CDROOT}" = 0 ] - then - umount /tmp/.initrd/proc || echo '*: Failed to unmount the initrd /proc!' - mount -n --move /tmp/.initrd/dev dev || echo '*: Failed to move over the /dev tree!' - rm -rf /tmp/.initrd/dev || echo '*: Failed to remove the initrd /dev!' - elif /tmp/.initrd/bin/[ "${USE_UDEV_NORMAL}" = '1' ] - then - /tmp/.initrd/bin/[ -e /tmp/.initrd/dev/fd ] && rm /tmp/.initrd/dev/fd - /tmp/.initrd/bin/[ -e /tmp/.initrd/dev/stdin ] && rm /tmp/.initrd/dev/stdin - /tmp/.initrd/bin/[ -e /tmp/.initrd/dev/stdout ] && rm /tmp/.initrd/dev/stdout - /tmp/.initrd/bin/[ -e /tmp/.initrd/dev/stderr ] && rm /tmp/.initrd/dev/stderr - /tmp/.initrd/bin/[ -e /tmp/.initrd/dev/core ] && rm /tmp/.initrd/dev/core - umount /tmp/.initrd/dev || echo '*: Failed to unmount the initrd /dev!' - umount /tmp/.initrd/proc || echo '*: Failed to unmount the initrd /proc!' - umount /tmp/.initrd/sys || echo '*: Failed to unmount the initrd /sys!' - elif /tmp/.initrd/bin/[ "${CDROOT}" -eq 1 ] - then - umount /tmp/.initrd/proc || echo "*: Failed to unmount the initrd /proc!" - umount /dev 2>/dev/null - mount -n --move /tmp/.initrd/dev dev 2>/dev/null - rm -rf /tmp/.initrd/dev || echo '*: Failed to remove the initrd /dev!' - - umount /sys 2>/dev/null - umount /tmp/.initrd/sys 2>/dev/null - fi + /tmp/.initrd/bin/[ -e /tmp/.initrd/dev/fd ] && rm /tmp/.initrd/dev/fd + /tmp/.initrd/bin/[ -e /tmp/.initrd/dev/stdin ] && rm /tmp/.initrd/dev/stdin + /tmp/.initrd/bin/[ -e /tmp/.initrd/dev/stdout ] && rm /tmp/.initrd/dev/stdout + /tmp/.initrd/bin/[ -e /tmp/.initrd/dev/stderr ] && rm /tmp/.initrd/dev/stderr + /tmp/.initrd/bin/[ -e /tmp/.initrd/dev/core ] && rm /tmp/.initrd/dev/core + umount /tmp/.initrd/dev || echo '*: Failed to unmount the initrd /dev!' + umount /tmp/.initrd/proc || echo '*: Failed to unmount the initrd /proc!' + umount /tmp/.initrd/sys || echo '*: Failed to unmount the initrd /sys!' echo -ne "${BOLD}.${NORMAL}" # /usr/src/linux/Documentation/initrd.txt: diff --git a/genkernel b/genkernel index ad6d068..91da497 100755 --- a/genkernel +++ b/genkernel @@ -1,7 +1,7 @@ #!/bin/bash PATH="${PATH}:/sbin:/usr/sbin" -GK_V='3.4.10_pre1' +GK_V='3.4.10_pre2' # Set the default for TMPDIR. May be modified by genkernel.conf or the # --tempdir command line option. @@ -306,11 +306,6 @@ if [ "${BUILD_INITRD}" -eq '1' ] then [ "${DISKLABEL}" -eq '1' ] && compile_e2fsprogs - if [ "${KERN_24}" -eq '1' ] - then - compile_devfsd - fi - if [ "${KERN_24}" != '1' ] then if [ "${BUSYBOX}" -eq '1' ] diff --git a/genkernel.8 b/genkernel.8 index 66e9cc0..86b0f98 100644 --- a/genkernel.8 +++ b/genkernel.8 @@ -207,9 +207,6 @@ Add in Luks support from static binaries if they exist on the system. .RE .TP -\fB\-\-no-udev\fR -Force devfs on 2.6 series kernels. Not recommended or supported. -.TP \fB\-\-static\fR This builds a monolithic kernel without any modules on any initial ramdisks. .TP diff --git a/genkernel.conf b/genkernel.conf index 45b967c..8ab0ac7 100755 --- a/genkernel.conf +++ b/genkernel.conf @@ -137,12 +137,6 @@ BUSYBOX_SRCTAR="${GK_SHARE}/pkg/busybox-${BUSYBOX_VER}.tar.bz2" BUSYBOX_DIR="busybox-${BUSYBOX_VER}" BUSYBOX_BINCACHE="%%CACHE%%/busybox-${BUSYBOX_VER}-%%ARCH%%.tar.bz2" -DEVFSD_VER="1.3.25-dietlibc-kernel25" -DEVFSD_SRCTAR="${GK_SHARE}/pkg/devfsd-${DEVFSD_VER}.tar.bz2" -DEVFSD_DIR="devfsd" -DEVFSD_BINCACHE="%%CACHE%%/devfsd-${DEVFSD_VER}-%%ARCH%%.bz2" -DEVFSD_CONF_BINCACHE="%%CACHE%%/devfsd-conf-${DIETLIBC_VER}-%%ARCH%%.bz2" - DEVICE_MAPPER_VER="VERSION_DMAP" DEVICE_MAPPER_DIR="device-mapper.${DEVICE_MAPPER_VER}" DEVICE_MAPPER_SRCTAR="${GK_SHARE}/pkg/device-mapper.${DEVICE_MAPPER_VER}.tgz"