The script will now compile the DRM kernel modules for your machine.
Press ENTER to continue or CTRL-C to exit.
Compiling...
ERROR: Kernel modules did not compile
The DRI drivers can not be installed without the latest kernel modules.
Installation will be aborted. See the dri.log file for information on
what went wrong.
--------------分割线------------------------------------------------
之后试图用google&baidu搜索关键词
“Cannot find a kernel config file” 和“The DRI drivers can not be installed without the latest kernel ” 发现类似的问题不少,但成功解决的可供参考的解决方案不多。
[PHP]
# Determine Xorg Directory and Kernel Module directory from user input
ERR=-1;
while [ "$ERR" == "-1" ]; do
# Determine Xorg directory
if [ -d $DRV_NAME -o -d core ]; then
print_logo
echo "The script will need to copy the DRI Xorg driver modules to"
echo "your Xorg directories."
echo ""
echo "The script will use the following Xorg directories:"
echo ""
echo "Xorg Dir : $XF86_DIR"
echo "Xorg Modules Dir : $XF86_MODULES_DIR"
echo "Xorg Library Dir : $XF86_GL_DIR"
echo ""
echo "If this is correct press ENTER, press C to change or CTRL-C to exit."
read KEY
if [ "$KEY" == "C" ] || [ "$KEY" == "c" ]; then
print_logo
echo "lease enter the Xorg directories you would like to use."
echo ""
echo "ress ENTER when done or CTRL-C to abort."
echo ""
echo -n "Xorg Dir : "
read XF86_DIR ;
echo -n "Xorg Modules Dir : "
read XF86_MODULES_DIR ;
echo -n "Xorg Library Dir : "
read XF86_GL_DIR ;
fi
fi
# Determine Kernel module directory
if [ -d drm ]; then
print_logo
echo "The script also needs to copy the DRM kernel modules to your"
echo "kernel module directory."
echo ""
echo "This version of the script supports 2.4.x and 2.6.x kernels."
echo ""
echo "Kernel Version : $KERNEL_VER"
echo "Module Directory : $KERNEL_LIB_DIR"
echo ""
echo "If this is correct press ENTER, press C to change or CTRL-C to exit."
read KEY
if [ "$KEY" == "C" ] || [ "$KEY" == "c" ]; then
print_logo
echo "lease enter your kernel module directory."
echo ""
echo "ress ENTER when done or CTRL-C to abort."
echo ""
echo -n "Directory: "
read KERNEL_LIB_DIR ;
fi
fi
# Determine paths from user input or defaults
set_values
# Check if values are good
check_values
ERR="$?";
done
# Compile the kernel modules
if [ -d drm ]; then
print_logo
echo "The script will now compile the DRM kernel modules for your machine."
echo ""
echo "ress ENTER to continue or CTRL-C to exit."
read KEY
echo ""
echo -n "Compiling..."
cd drm
UP=..
if [ -d linux -a -d linux-core ]; then
if [ $KERNEL_MINOR == 6 ]; then
cd linux-core
else
cd linux
fi
UP=../..
fi
if [ -e Makefile.linux ]; then
MAKEFILE=Makefile.linux
else
MAKEFILE=Makefile
fi
# Makefile.linux doesn't have a rule to build .ko-files for 2.6 kernels.
# They are somehow created automagically after $DRV_MODULE.o is built.
make -f $MAKEFILE $DRV_MODULE.o >& $UP/$LOGFILE_TMP
if [ $? != 0 ]; then
cd $UP
cat $LOGFILE_TMP >> $LOGFILE
echo ""
echo "ERROR: Kernel modules did not compile"
echo ""
echo "The DRI drivers can not be installed without the latest kernel modules."
echo "Installation will be aborted. See the $LOGFILE file for information on"
echo "what went wrong."
echo ""
exit 127;
else
echo "done";
fi
cd $UP
unset UP
cat $LOGFILE_TMP >> $LOGFILE
fi
# Print a last message
print_logo
echo "The script is now ready to complete the installation."
echo ""
echo "ress ENTER to continue or CTRL-C to exit."
read KEY
echo ""
echo "ress ENTER to continue."
read KEY
# Print last message
print_logo
echo "The DRI installation is complete."
echo ""
if [ -d drm -a "$X_RUNNING" == "1" ]; then
echo "Stop your X server, reload the drm module and restart the X server"
echo "to try the new DRI drivers."
echo ""
elif [ -d $DRV_NAME -o -d core ]; then
echo "Restart your X server to try the new DRI drivers."
echo ""
fi
echo "If you have problems with the DRI after upgrading your drivers"
echo "please visit the DRI website and read the Help and FAQ section."
echo "The FAQ contains solutions to many common problems."
echo ""
echo "Report any bugs, problems and comments on the dri-devel mailing list."
echo ""
echo "Thank you for using the DRI."
echo ""
[/PHP]