mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

64 lines
2.4 KiB

# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
#
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# Please add additional copyright information _after_ the line containing
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
#
# ROCK Linux: rock-src/package/base/udev/udev.conf
# ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. A copy of the GNU General Public
# License can be found at Documentation/COPYING.
#
# Many people helped and are helping developing ROCK Linux. Please
# have a look at http://www.rocklinux.org/ and the Documentation/TEAM
# file for details.
#
# --- ROCK-COPYRIGHT-NOTE-END ---
udev_pm() {
mkdir -p $root/lib/udev/devices
# the deletion and re-creation is needed for stage 9 rebuilds
rm -f $root/lib/udev/devices/fd
ln -sv /proc/self/fd $root/lib/udev/devices/fd
rm -f $root/lib/udev/devices/core
ln -sv /proc/kcore $root/lib/udev/devices/core
rm -f $root/lib/udev/devices/stdin
ln -sv /proc/self/fd/0 $root/lib/udev/devices/stdin
rm -f $root/lib/udev/devices/stdout
ln -sv /proc/self/fd/1 $root/lib/udev/devices/stdout
rm -f $root/lib/udev/devices/stderr
ln -sv /proc/self/fd/2 $root/lib/udev/devices/stderr
rm -rf $root/lib/udev/devices/{pts,shm}
mkdir -p $root/lib/udev/devices/{pts,shm,bus/usb}
# Somehow on boot-up this prevents errors like:
# cp: will not create hard link `/dev/pts' to directory `/dev/bus/usb'
touch $root/lib/udev/devices/{pts,shm,bus/usb}/.empty
cp -v $confdir/rules/* $root/etc/udev/rules.d/
cp -v $confdir/scripts/*.sh $confdir/scripts/modalias_* $root/lib/udev/
chmod +x $root/lib/udev/*.sh $root/lib/udev/modalias_*
mkdir -p $root/lib/firmware
}
udev_prem() {
for i in $(find extras/ -name Makefile -maxdepth 2); do
udev_extras="${udev_extras} $(dirname ${i})"
done
var_append makeopt " " 'EXTRAS="${udev_extras}"'
var_append makeinstopt " " 'EXTRAS="${udev_extras}"'
}
prefix=""
hook_add postmake 1 udev_pm
hook_add premake 3 udev_prem
if [ $stagelevel = 1 ] ; then
var_append makeopt " " "CROSS_COMPILE=$archprefix"
var_append makeinstopt " " "CROSS_COMPILE=$archprefix"
fi