install3c90x

来自「vxworks 驱动开发 示例代码」· 代码 · 共 45 行

TXT
45
字号
#!/bin/csh -f

if (`id -u` != 0) then
    echo "You must have root priveleges to install the 3c90x driver module."
    echo "Installation of 3c90x driver module failed."
    exit 1
endif

set kernel_release=`uname -r`

echo "Attempting to install the $kernel_release version of the 3c90x" 
echo "driver module."
echo "You are running the $kernel_release version of kernel release..."

set module_dir = /lib/modules/$kernel_release/net


if (! -d i486/$kernel_release) then
    echo "The 3c90x driver module was not built for this kernel release."
    echo "You will need to compile the driver yourself."
    echo "Installation of 3c90x driver module failed."
    exit 2
endif

if (! -d $module_dir) then
    echo "Module directory $module_dir not found; can't install."
    echo "Installation of 3c90x driver module failed."
    exit 3
endif

echo "Found modules directory $module_dir"
echo "Copying the driver module into the modules directory."
cp i486/$kernel_release/3c90x.o $module_dir

echo "Updating module dependencies..."
/sbin/depmod -a
if ($status != 0) then
    echo "Update of module dependencies failed... perhaps you've updated your system?"
    echo "You may need to compile the driver yourself."
    echo "Installation of 3c90x driver module failed."
    exit 4
endif

echo "Installation of 3c90x driver module was successful."

⌨️ 快捷键说明

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