⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dep.linux

📁 最新rtlinux内核源码
💻 LINUX
字号:
#!/bin/shif [ -f /lib/modules/$(uname -r)/build/Makefile ];then	default="/lib/modules/$(uname -r)/build"else	default="/usr/src/linux"fidefault=${LINUXDIR:=$default}if [ "${interactive}" = "y" ];then	echo -n "Enter location of Linux source tree [$default]: "	read LINUXDIRfi: ${LINUXDIR:=$default}if [ ! -f "$LINUXDIR/.config" ];then	echo	echo Kernel source tree at $LINUXDIR is not configured	echo Fix before continuing	echo	exit 1fiif [ ! -f "$LINUXDIR/.hdepend" ];then	echo	echo You need to run \'make dep\' on the kernel source before	echo continuing.	echo	exit 1fiecho using LINUXDIR=$LINUXDIRexport LINUXDIR. $LINUXDIR/.config## check for a bad situation#if [ "$CONFIG_MODULES" = "n" ]then	cat <<EOF ***** *****    WARNING!!! ***** *****    Your kernel is configured to not allow loadable modules. *****    You are attempting to compile a loadable module for this *****    kernel.  This is a problem.  Please correct it. *****EOFexitfi## check running kernel vs. /usr/src/linux and warn if necessary#UTS_VERSION=$(grep UTS_RELEASE ${LINUXDIR}/include/linux/version.h| \	sed 's/[^"]*"\(.*\)\{1\}"/\1/')echo "Kernel source version is ${UTS_VERSION}"UNAME=$(uname -r)if [ "${UNAME}" != "${UTS_VERSION}" ]then	cat <<EOF *** ***    WARNING!!! *** ***    The kernel that is currently running ($UNAME) ***    appears to be a different version than the source in ***    $LINUXDIR ($UTS_VERSION). ***    If so, the current compile will create a module that is ***    INCOMPATIBLE with the running kernel.  (This could be ***    what you want, however.) ***EOFfitopdir=$(pwd)cd ${topdir}/scripts/linux_flagsmake LINUXDIR=${LINUXDIR}if [ $? != 0 ]; then	echo "make in linux source directory failed, do you have write permission?"	exit $?ficd ${topdir}mv scripts/linux_flags/flags .buildvarsif [ "$(echo ${UTS_VERSION} | grep '^2.[45]')" != "" ];then	echo "FLAT_MODULES := no" >>.buildvarselse	echo "FLAT_MODULES := yes" >>.buildvarsfi

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -