需要编译内核,用下面的脚本:
#!/bin/sh
# This script is use for configure and compile network card driver
# Create date :Tue Dec 17 09:07:26 CST 2013
# Create by : pangping
# My email adress : ppkingpping@gmail.com
# script name :ethernetdriver.sh
# You can copy and save it as name ethernetdriver.sh run it
# sh ethernetdriver.sh or chmod 755 ethernetdriver.sh and
#./ethenetdriver.sh to run it
source_dir=/usr/src/linux
bus_id=`lspci | grep -i ethernet | awk -F: '{ print $1 }'`
pci_dir=/sys/bus/pci/devices/0000\:$bus_id\:00.0
vendor=`cat $pci_dir/vendor`
device=`cat $pci_dir/device`
vendor_id=`grep $vendor $source_dir/include/linux/pci_ids.h | awk -F" " '{print $2}'`
device_id=`grep $device $source_dir/include/linux/pci_ids.h | awk -F" " '{print $2}'`
echo $vendor $device $vendor_id $device_id
for driverfiles in `grep -Rl $vendor_id $source_dir/* | grep net `
do
networkdriver=`echo $driverfiles | awk -F/ '{ print $(NF-1) }'`
grep $device_id $driverfiles 2>&1 /dev/null
if [ $? -eq 0 ]
then
echo "ethernet driver is found"
else
#for drivername in `grep -Rl $vendor_id $source_dir/* | grep net | awk -F/ '{ print $(NF-1) }'`
driver=`echo $networkdriver | tr [:lower:] [:upper:]`
grep $driver $source_dir/.config >/dev/null
if [ $? -eq 0 ]
then
echo "CONFIG_$driver=y" >>$source_dir/.config
fi
fi
done
echo "Use instead network driver"
cd $source_dir && make && make modules_install
没有,上网找网卡芯片型号