udev-084 & clfs-x86_64 multi-lib.

George Boudreau georgeb at linuxfromscratch.org
Thu Feb 16 13:48:26 PST 2006


  I borrowed (stole/recycled/pinched) the udev-84 code from the lfs 
udev-update branch and applied it along with a kernel upgrade to 
2.6.15.1 to my most recent build of xx6-64 multilib.

  The following quirks were noticed.
  1. CROSS=  has been replaced by CROSS_COMPILE=
  2. udevstart is compiled by the Makefile but is not installed and must 
be copied manually to /sbin.

  I cannot test the install other than by plugging in a usb flash drive 
but it seems to work. The included scripts show what udev looks like for 
my build

   George.

#!/bin/bash
set -e
#####################################
     NAME=067-udev
     PACKAGE=udev
     VERSION=084
     PKG_URL=( 
http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev-084.tar.bz2 )
     PATCHES=(  )
#####################################

cd $PKGDIR
#------------------

make CROSS_COMPILE="${LFS_TARGET}-" CC="${CC} ${BUILD64}" LD="${CC} 
${BUILD64}" \
EXTRAS="extras/ata_id extras/cdrom_id extras/edd_id \
         extras/firmware extras/floppy extras/scsi_id \
	extras/usb_id"

make DESTDIR=${LFS} \
EXTRAS="extras/ata_id extras/cdrom_id extras/edd_id \
         extras/firmware extras/floppy extras/scsi_id \
	extras/usb_id" \
install
# oops.. udevstart is build but not installed..
cp -v udevstart ${LFS}/sbin

cp -v ../udev-config-5.rules ${LFS}/etc/udev/rules.d/25-lfs.rules


sed -i 147,150d ${LFS}/etc/udev/rules.d/25-lfs.rules
cat >> ${LFS}/etc/udev/rules.d/25-lfs.rules << EOF
# Rules to allow hotplugging of devices with modular drivers
ACTION=="add", SUBSYSTEM=="usb", MODALIAS=="*", \
   RUN+="/sbin/modprobe $modalias"
ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="[07]", \
   RUN+="/sbin/modprobe sd_mod"
EOF
exit
#------------------

#!/bin/bash
set -e
#####################################
     NAME=158-udev
     PACKAGE=udev
     VERSION=084
     PKG_URL=( 
http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev-084.tar.bz2 )
     PATCHES=(  )
#####################################

cd $PKGDIR
#------------------

ln -sv /proc/self/fd /lib/udev/devices/fd
ln -sv /proc/self/fd/0 /lib/udev/devices/stdin
ln -sv /proc/self/fd/1 /lib/udev/devices/stdout
ln -sv /proc/self/fd/2 /lib/udev/devices/stderr
ln -sv /proc/kcore /lib/udev/devices/core


make CC="gcc ${BUILD64}" LD="gcc ${BUILD64}" \
EXTRAS="extras/ata_id extras/cdrom_id extras/edd_id extras/firmware 
extras/floppy extras/scsi_id extras/usb_id extras/volume_id"

sed -i 's@/usr/bin/test@/bin/test@' test/udev-test.pl

make CC="gcc ${BUILD64}" LD="gcc ${BUILD64}" \
DESTDIR=/ \
EXTRAS="extras/ata_id extras/cdrom_id extras/edd_id extras/firmware 
extras/floppy extras/scsi_id extras/usb_id extras/volume_id" \
install

# oops.. udev no longer installs udevstart
cp -v udevstart /sbin

cp -v ../udev-config-5.rules /etc/udev/rules.d/25-lfs.rules

sed -i 147,150d /etc/udev/rules.d/25-lfs.rules
cat >> /etc/udev/rules.d/25-lfs.rules << EOF
# Rules to allow hotplugging of devices with modular drivers
ACTION=="add", SUBSYSTEM=="usb", MODALIAS=="*", \
   RUN+="/sbin/modprobe $modalias"
ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="[07]", \
   RUN+="/sbin/modprobe sd_mod"
EOF

install -v -m644 -D docs/writing_udev_rules/index.html \ 
/usr/share/doc/udev-084/index.html

/sbin/udevstart
#------------------
exit

#!/bin/bash
set -e
#####################################
     NAME=164-bootscripts
     PACKAGE=lfs-bootscripts
     VERSION=3.2.2
     PKG_URL=( 
http://downloads.linuxfromscratch.org/lfs-bootscripts-3.2.2.tar.bz2 )
     PATCHES=( 
http://www.linuxfromscratch.org/patches/downloads/lfs-bootscripts/lfs-bootscripts-20051223-recent_udev-1.patch 
)
#####################################

cd $PKGDIR
#------------------
sed -i '/hotplug/d' Makefile
patch -Np1 -i ../lfs-bootscripts-20051223-recent_udev-1.patch
make install
#------------------
exit





More information about the cross-lfs mailing list