[linux] modeversions.h in RH7.2
kasr
fodrek na kasr.elf.stuba.sk
Čtvrtek Březen 7 13:31:10 CET 2002
Caute !
----- Original Message -----
From: Marek Kilimajer <kilimajer na webglobe.sk>
To: fodrek <linux na lists.linux.sk>
Sent: Thursday, March 07, 2002 11:26 AM
Subject: Re[2]: [linux] modeversions.h in RH7.2
> Tak potom pozri do skriptu, niekde to tam bude.
Praveze sa v tom scripte nenachadza -I/usr/src/linux/include ani nic
podobne... Jedine co ma napada je pridat
-I/lib/modules/$(uname -r)/build/include ako parameter gcc, hoci podla toto
co som si precital v man gcc -I sluzi na nieco ine ako si myslim, ze ma tato
zmena urobit. Mozno niekomu pomoze script... Aj ked predpokl;adam, ze by
stacilio po riadok gcc -c -O acslx.c. Ten zvysok je uz asi nepodstany pre
tento problem... Ale aspon vidite, co dodali autori...
#!/bin/sh
module="acslx"
device="acslx"
group=""
mode="664"
# Compile the acslx
gcc -c -O acslx.c
# Install the driver in the /lib/modules/misc directory
install -d /lib/modules/misc
install -c acslx.o /lib/modules/misc
rm -f *.o *~ core
# Invoke insmod with all arguments we got
insmod $module $* || exit 1
# Create the device nodes. The major number is allocated dynamically while
# the driver is loaded, the devices we create must have the same major
number
# as the driver, so we read the driver's major number from the
# /proc/devices file
major=`cat /proc/devices | awk "\\$2==\"$module\" {print \\$1}"`
rm -f /dev/${device}?
mknod /dev/${device}0 c $major 0
mknod /dev/${device}1 c $major 1
mknod /dev/${device}2 c $major 2
mknod /dev/${device}3 c $major 3
#chgrp $group /dev/${device}[0-3]
#chmod $mode /dev/${device}[0-3]
>
> > D?a Ut 5. Marec 2002 16:15 ste napísali:
> > Cau,
> >
> > otvor Makefile v zdrojakoch a zmen tam -I/usr/src/linux/include (or
> > similar) na -I/lib/modules/$(uname -r)/build/include
> >
> nema to makefile ale ale instaluje sa to scriptom...
S pozdravom
Peto..
Další informace o konferenci linux