缺少到linux源代码树的软链接

时间:2015-10-18 03:05:37

标签: linux kernel kernel-module

在/lib/modules/xx.xx.xx-xx中,应该有两个软链接,一个叫做source,一个叫做build。源代码就在那里,很好但是构建版本丢失了,我不知道它应该指向哪里,我需要为我的视频卡安装驱动程序。有没有办法找出应该指出的地方,如果是这样的话。我知道还有很多其他问题,但实际上并没有描述它们应该指向的最终位置。

更新了链接,现在它出现了我无法修复的构建错误,因为我甚至找不到它所讨论的结构

make -C /lib/modules/3.16.0-4-amd64/build M=/home/gibsont/gpuTempDriver modules
make[1]: Entering directory '/usr/src/linux-headers-3.16.0-4-amd64'
Makefile:10: *** mixed implicit and normal rules: deprecated syntax
make[1]: Entering directory `/usr/src/linux-headers-3.16.0-4-amd64'
  CC [M]  /home/gibsont/gpuTempDriver/base.o
/home/gibsont/gpuTempDriver/base.c: In function ‘_rtl_init_mac80211’:
/home/gibsont/gpuTempDriver/base.c:319:6: error: ‘IEEE80211_HW_BEACON_FILTER’ undeclared (first use in this function)
      IEEE80211_HW_BEACON_FILTER |
      ^
/home/gibsont/gpuTempDriver/base.c:319:6: note: each undeclared identifier is reported only once for each function it appears in
/home/gibsont/gpuTempDriver/base.c:349:4: error: ‘struct ieee80211_hw’ has no member named ‘channel_change_time’
  hw->channel_change_time = 100;
    ^
/home/gibsont/gpuTempDriver/base.c: In function ‘rtl_action_proc’:
/home/gibsont/gpuTempDriver/base.c:858:32: error: ‘struct ieee80211_conf’ has no member named ‘channel’
       rx_status.freq = hw->conf.channel->center_freq;
                                ^
/home/gibsont/gpuTempDriver/base.c:859:32: error: ‘struct ieee80211_conf’ has no member named ‘channel’
       rx_status.band = hw->conf.channel->band;
                                ^
/home/gibsont/gpuTempDriver/base.c:861:25: error: ‘RX_FLAG_MACTIME_MPDU’ undeclared (first use in this function)
       rx_status.flag |= RX_FLAG_MACTIME_MPDU;
                         ^
/home/gibsont/gpuTempDriver/base.c: In function ‘rtl_beacon_statistic’:
/home/gibsont/gpuTempDriver/base.c:1132:2: error: implicit declaration of function ‘compare_ether_addr’ [-Werror=implicit-function-declaration]
  if (compare_ether_addr(hdr->addr3, rtlpriv->mac80211.bssid))
  ^
/home/gibsont/gpuTempDriver/base.c: In function ‘rtl_send_smps_action’:
/home/gibsont/gpuTempDriver/base.c:1414:16: error: ‘struct <anonymous>’ has no member named ‘sta’
   info->control.sta = sta;
                ^
/home/gibsont/gpuTempDriver/base.c:1415:24: error: ‘struct ieee80211_conf’ has no member named ‘channel’
   info->band = hw->conf.channel->band;
                        ^
cc1: some warnings being treated as errors
/usr/src/linux-headers-3.16.0-4-common/scripts/Makefile.build:262: recipe for target '/home/gibsont/gpuTempDriver/base.o' failed
make[4]: *** [/home/gibsont/gpuTempDriver/base.o] Error 1
/usr/src/linux-headers-3.16.0-4-common/Makefile:1350: recipe for target '_module_/home/gibsont/gpuTempDriver' failed
make[3]: *** [_module_/home/gibsont/gpuTempDriver] Error 2
Makefile:181: recipe for target 'sub-make' failed
make[2]: *** [sub-make] Error 2
Makefile:8: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-3.16.0-4-amd64'
Makefile:27: recipe for target 'all' failed
make: *** [all] Error 2

我从磁盘上复制了它,因为它是只读的并放在我的主目录中。

我觉得这已经成为一个全新的问题,或者可能是链接错误并导致了这个问题。

1 个答案:

答案 0 :(得分:0)

这是我的:

2509142 lrwxrwxrwx  1 root root     37 Apr 24 15:02 build -> /usr/src/linux-headers-3.16.0-4-amd64

实际上它是由包管理器管理的。我使用apt-get安装linux头文件。我认为你应该这样做,除非你是高级内核开发人员。