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
cleanup-cruft
Chris Gianelloni 17 years ago
parent a98d5330f0
commit 58c13464ec

@ -2,6 +2,13 @@
# Copyright 2006-2008 Gentoo Foundation; Distributed under the GPL v2 # Copyright 2006-2008 Gentoo Foundation; Distributed under the GPL v2
# $Header: $ # $Header: $
14 Feb 2008; Chris Gianelloni <wolf31o2@gentoo.org> 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 <wolf31o2@gentoo.org> 14 Feb 2008; Chris Gianelloni <wolf31o2@gentoo.org>
generic/initrd.scripts: generic/initrd.scripts:
Added a line to make sure we remove image.squashfs as well as the other loop Added a line to make sure we remove image.squashfs as well as the other loop

@ -462,34 +462,6 @@ compile_dmraid() {
fi 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() { compile_device_mapper() {
if [ ! -f "${DEVICE_MAPPER_BINCACHE}" ] if [ ! -f "${DEVICE_MAPPER_BINCACHE}" ]
then then

@ -111,8 +111,6 @@ determine_real_args() {
set_config_with_override 1 EVMS CMD_EVMS set_config_with_override 1 EVMS CMD_EVMS
set_config_with_override 1 DMRAID CMD_DMRAID set_config_with_override 1 DMRAID CMD_DMRAID
set_config_with_override 1 BUSYBOX CMD_BUSYBOX "yes" 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 DISKLABEL CMD_DISKLABEL
set_config_with_override 1 LUKS CMD_LUKS set_config_with_override 1 LUKS CMD_LUKS
set_config_with_override 1 MDADM CMD_MDADM set_config_with_override 1 MDADM CMD_MDADM
@ -122,8 +120,6 @@ determine_real_args() {
CACHE_DIR=`arch_replace "${CACHE_DIR}"` CACHE_DIR=`arch_replace "${CACHE_DIR}"`
BUSYBOX_BINCACHE=`cache_replace "${BUSYBOX_BINCACHE}"` 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}"` DEVICE_MAPPER_BINCACHE=`cache_replace "${DEVICE_MAPPER_BINCACHE}"`
LVM_BINCACHE=`cache_replace "${LVM_BINCACHE}"` LVM_BINCACHE=`cache_replace "${LVM_BINCACHE}"`
DMRAID_BINCACHE=`cache_replace "${DMRAID_BINCACHE}"` DMRAID_BINCACHE=`cache_replace "${DMRAID_BINCACHE}"`

@ -245,8 +245,8 @@ has_loop() {
fi fi
if [ -e '/dev/loop0' -o -e '/dev/loop/0' -a ${PIPESTATUS[1]} ] if [ -e '/dev/loop0' -o -e '/dev/loop/0' -a ${PIPESTATUS[1]} ]
then then
# We found devfs or standard dev loop device, assume # We found a standard dev loop device, assume loop is compiled into the
# loop is compiled into the kernel or the module is loaded # kernel or the module is loaded
return 0 return 0
else else
return 1 return 1

@ -423,7 +423,6 @@ create_initramfs() {
append_data 'base_layout' append_data 'base_layout'
append_data 'auxilary' append_data 'auxilary'
append_data 'busybox' "${BUSYBOX}" append_data 'busybox' "${BUSYBOX}"
# append_data 'devfs' "${DEVFS}"
append_data 'lvm' "${LVM}" append_data 'lvm' "${LVM}"
append_data 'dmraid' "${DMRAID}" append_data 'dmraid' "${DMRAID}"
append_data 'evms' "${EVMS}" append_data 'evms' "${EVMS}"

@ -49,14 +49,6 @@ create_base_initrd_sys() {
echo "/dev/ram0 / ext2 defaults 0 0" > ${TEMP}/initrd-temp/etc/fstab echo "/dev/ram0 / ext2 defaults 0 0" > ${TEMP}/initrd-temp/etc/fstab
echo "proc /proc proc 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) # SGI LiveCDs need the following binary (no better place for it than here)
# getdvhoff is a DEPEND of genkernel, so it *should* exist # getdvhoff is a DEPEND of genkernel, so it *should* exist
if [ ${BUILD_INITRAMFS} -eq '1' ] if [ ${BUILD_INITRAMFS} -eq '1' ]
@ -82,14 +74,6 @@ create_base_initrd_sys() {
gen_die 'Could not extract busybox bincache!' gen_die 'Could not extract busybox bincache!'
chmod +x "${TEMP}/initrd-temp/bin/busybox" 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 # DMRAID
if [ "${DMRAID}" -eq '1' ] if [ "${DMRAID}" -eq '1' ]
then then

@ -2,9 +2,6 @@
PATH="/usr/sbin:/usr/bin:/sbin:/bin" PATH="/usr/sbin:/usr/bin:/sbin:/bin"
# Default to the udev device manager
USE_UDEV_NORMAL='1'
# Insert ctrl character # Insert ctrl character
# ctrl-V then esc will print ^[ # ctrl-V then esc will print ^[
# ctrl-V then ctrl-shift-m will print ^M # ctrl-V then ctrl-shift-m will print ^M

@ -187,17 +187,13 @@ cache_cd_contents() {
mount_sysfs() { mount_sysfs() {
if [ "${KV_2_6_OR_GREATER}" ] if [ "${KV_2_6_OR_GREATER}" ]
then then
# Udev is semi-broken on non /sys sysfs mount points.
mount -t sysfs /sys /sys >/dev/null 2>&1 mount -t sysfs /sys /sys >/dev/null 2>&1
ret=$? ret=$?
[ "$ret" -eq '0' ] || bad_msg "Failed to mount /sys!"
# sysfs mount failed .. udev wont work fall back to devfs if available
[ "$ret" -eq '0' ] || USE_UDEV_NORMAL=0
fi fi
} }
findnfsmount() { findnfsmount() {
if [ "${IP}" != '' ] || busybox udhcpc -R rootpath -n -s /bin/udhcpc.scripts if [ "${IP}" != '' ] || busybox udhcpc -R rootpath -n -s /bin/udhcpc.scripts
then then
[ -e /rootpath ] && NFSROOT=`cat /rootpath` [ -e /rootpath ] && NFSROOT=`cat /rootpath`
@ -263,10 +259,6 @@ findnfsmount() {
fi fi
} }
kill_devfsd() {
killall devfsd > /dev/null 2>&1
}
check_loop() { check_loop() {
if [ "${LOOP}" = '' -o ! -e "mnt/cdrom/${LOOP}" ] if [ "${LOOP}" = '' -o ! -e "mnt/cdrom/${LOOP}" ]
then then
@ -375,49 +367,37 @@ bind_mount_dev() {
} }
setup_hotplug() { setup_hotplug() {
# Check udev is available... if [ "${KV_2_6_OR_GREATER}" ]
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' ]
then then
# catch udev hotplug events
echo /sbin/mdev > /proc/sys/kernel/hotplug echo /sbin/mdev > /proc/sys/kernel/hotplug
fi fi
} }
start_dev_mgr() { check_slowusb() {
# Check udev is available... [ "${DO_slowusb}" ] || \
if [ "${KV_2_6_OR_GREATER}" -a "${USE_UDEV_NORMAL}" != '0' ] for dir in /sys/bus/usb/drivers/usb-storage/*
then do
USE_UDEV_NORMAL=1 [ -d "${dir}" ] && FORCE_slowusb="1"
else done
USE_UDEV_NORMAL=0 }
fi
if [ "${USE_UDEV_NORMAL}" = '1' ] start_dev_mgr() {
if [ "${KV_2_6_OR_GREATER}" ]
then then
cd /sys cd /sys
[ "${DO_slowusb}" ] && sleep 10 [ "${DO_slowusb}" ] && sleep 10
kill_devfsd check_slowusb
[ "${FORCE_slowusb}" ] && sleep 10
good_msg 'Activating mdev' good_msg 'Activating mdev'
runmdev runmdev
[ "${DO_slowusb}" ] && sleep 20 [ "${DO_slowusb}" ] || \
[ "${FORCE_slowusb}" ] && sleep 20
cd / cd /
else
good_msg 'Activating devfs'
mount -t devfs devfs /dev 2>/dev/null
devfsd /dev -np
fi fi
} }
cmdline_hwopts() { cmdline_hwopts() {
# Scan CMDLINE for any "doscsi" or "noscsi"-type arguments # Scan CMDLINE for any "doscsi" or "noscsi"-type arguments
local FOUND local FOUND
local TMP_HWOPTS local TMP_HWOPTS

@ -225,7 +225,7 @@ mount_sysfs
# Delay if needed for USB hardware # Delay if needed for USB hardware
sdelay sdelay
# Start udev/devfs # Start device manager
start_dev_mgr start_dev_mgr
# Setup md device nodes if they dont exist # Setup md device nodes if they dont exist
@ -581,6 +581,7 @@ then
# Let Init scripts know that we booted from CD # Let Init scripts know that we booted from CD
export CDBOOT export CDBOOT
CDBOOT=1 CDBOOT=1
check_slowusb
if [ "${DO_slowusb}" ] || [ "${FORCE_slowusb}" ] if [ "${DO_slowusb}" ] || [ "${FORCE_slowusb}" ]
then then
sleep 10 sleep 10
@ -617,31 +618,14 @@ then
fi fi
echo -ne "${BOLD}.${NORMAL}" echo -ne "${BOLD}.${NORMAL}"
if /tmp/.initrd/bin/[ "${USE_DEVFS_NORMAL}" = '1' -a "${CDROOT}" = 0 ] /tmp/.initrd/bin/[ -e /tmp/.initrd/dev/fd ] && rm /tmp/.initrd/dev/fd
then /tmp/.initrd/bin/[ -e /tmp/.initrd/dev/stdin ] && rm /tmp/.initrd/dev/stdin
umount /tmp/.initrd/proc || echo '*: Failed to unmount the initrd /proc!' /tmp/.initrd/bin/[ -e /tmp/.initrd/dev/stdout ] && rm /tmp/.initrd/dev/stdout
mount -n --move /tmp/.initrd/dev dev || echo '*: Failed to move over the /dev tree!' /tmp/.initrd/bin/[ -e /tmp/.initrd/dev/stderr ] && rm /tmp/.initrd/dev/stderr
rm -rf /tmp/.initrd/dev || echo '*: Failed to remove the initrd /dev!' /tmp/.initrd/bin/[ -e /tmp/.initrd/dev/core ] && rm /tmp/.initrd/dev/core
elif /tmp/.initrd/bin/[ "${USE_UDEV_NORMAL}" = '1' ] umount /tmp/.initrd/dev || echo '*: Failed to unmount the initrd /dev!'
then umount /tmp/.initrd/proc || echo '*: Failed to unmount the initrd /proc!'
/tmp/.initrd/bin/[ -e /tmp/.initrd/dev/fd ] && rm /tmp/.initrd/dev/fd umount /tmp/.initrd/sys || echo '*: Failed to unmount the initrd /sys!'
/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
echo -ne "${BOLD}.${NORMAL}" echo -ne "${BOLD}.${NORMAL}"
# /usr/src/linux/Documentation/initrd.txt: # /usr/src/linux/Documentation/initrd.txt:

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
PATH="${PATH}:/sbin:/usr/sbin" 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 # Set the default for TMPDIR. May be modified by genkernel.conf or the
# --tempdir command line option. # --tempdir command line option.
@ -306,11 +306,6 @@ if [ "${BUILD_INITRD}" -eq '1' ]
then then
[ "${DISKLABEL}" -eq '1' ] && compile_e2fsprogs [ "${DISKLABEL}" -eq '1' ] && compile_e2fsprogs
if [ "${KERN_24}" -eq '1' ]
then
compile_devfsd
fi
if [ "${KERN_24}" != '1' ] if [ "${KERN_24}" != '1' ]
then then
if [ "${BUSYBOX}" -eq '1' ] if [ "${BUSYBOX}" -eq '1' ]

@ -207,9 +207,6 @@ Add in Luks support from static binaries if they exist on the
system. system.
.RE .RE
.TP .TP
\fB\-\-no-udev\fR
Force devfs on 2.6 series kernels. Not recommended or supported.
.TP
\fB\-\-static\fR \fB\-\-static\fR
This builds a monolithic kernel without any modules on any initial ramdisks. This builds a monolithic kernel without any modules on any initial ramdisks.
.TP .TP

@ -137,12 +137,6 @@ BUSYBOX_SRCTAR="${GK_SHARE}/pkg/busybox-${BUSYBOX_VER}.tar.bz2"
BUSYBOX_DIR="busybox-${BUSYBOX_VER}" BUSYBOX_DIR="busybox-${BUSYBOX_VER}"
BUSYBOX_BINCACHE="%%CACHE%%/busybox-${BUSYBOX_VER}-%%ARCH%%.tar.bz2" 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_VER="VERSION_DMAP"
DEVICE_MAPPER_DIR="device-mapper.${DEVICE_MAPPER_VER}" DEVICE_MAPPER_DIR="device-mapper.${DEVICE_MAPPER_VER}"
DEVICE_MAPPER_SRCTAR="${GK_SHARE}/pkg/device-mapper.${DEVICE_MAPPER_VER}.tgz" DEVICE_MAPPER_SRCTAR="${GK_SHARE}/pkg/device-mapper.${DEVICE_MAPPER_VER}.tgz"

Loading…
Cancel
Save