Nexus 6内核构建错误

时间:2015-07-08 20:42:20

标签: android linux linux-kernel

在android-msm-shamu-3.10-lollipop-mr1分支下构建Nexus 6内核(来源:https://android.googlesource.com/kernel/msm.git)。我正在使用arm-linux-androideabi-4.9工具链。

我收到以下错误:

  CC      drivers/net/wireless/bcmdhd/dhd_linux.o
drivers/net/wireless/bcmdhd/dhd_linux.c: In function 'dhd_watchdog_thread':
drivers/net/wireless/bcmdhd/dhd_linux.c:2978:47: error: 'MAX_RT_PRIO' undeclared (first use in this function)
   param.sched_priority = (dhd_watchdog_prio < MAX_RT_PRIO)?
                                               ^
drivers/net/wireless/bcmdhd/dhd_linux.c:2978:47: note: each undeclared identifier is reported only once for each function it appears in
drivers/net/wireless/bcmdhd/dhd_linux.c: In function 'dhd_dpc_thread':
drivers/net/wireless/bcmdhd/dhd_linux.c:3095:42: error: 'MAX_RT_PRIO' undeclared (first use in this function)
   param.sched_priority = (dhd_dpc_prio < MAX_RT_PRIO)?dhd_dpc_prio:(MAX_RT_PRIO-1);
                                          ^
drivers/net/wireless/bcmdhd/dhd_linux.c: In function 'dhd_rxf_thread':
drivers/net/wireless/bcmdhd/dhd_linux.c:3156:42: error: 'MAX_RT_PRIO' undeclared (first use in this function)
   param.sched_priority = (dhd_rxf_prio < MAX_RT_PRIO)?dhd_rxf_prio:(MAX_RT_PRIO-1);
                                          ^
drivers/net/wireless/bcmdhd/dhd_linux.c:3160:2: error: implicit declaration of function 'daemonize' [-Werror=implicit-function-declaration]
  DAEMONIZE("dhd_rxf");
  ^
drivers/net/wireless/bcmdhd/dhd_linux.c: In function 'dhd_preinit_ioctls':
drivers/net/wireless/bcmdhd/dhd_linux.c:5354:3: error: implicit declaration of function 'srandom32' [-Werror=implicit-function-declaration]
   SRANDOM32((uint)jiffies);
   ^
drivers/net/wireless/bcmdhd/dhd_linux.c:5355:3: error: implicit declaration of function 'random32' [-Werror=implicit-function-declaration]
   rand_mac = RANDOM32();
   ^
cc1: some warnings being treated as errors
make[4]: *** [drivers/net/wireless/bcmdhd/dhd_linux.o] Error 1
make[3]: *** [drivers/net/wireless/bcmdhd] Error 2
make[2]: *** [drivers/net/wireless] Error 2
make[1]: *** [drivers/net] Error 2
make: *** [drivers] Error 2

从某些研究来看,似乎random32和srandom32来自较旧的内核(~3.6)。所以我使用Grub引导到较旧的内核版本。但是,make仍然必须运行较新的(3.16)内核库,因为我收到了相同的错误。

我编辑了makefile以包含&#39; include&#39; 3.06头文件的目录,但也没有解决问题。如何强制make使用这些旧库而不是新库。为什么我需要去一个旧内核来构建Nexus 6内核?我之前构建了Nexus 4内核,没有出现任何问题,这是一部较旧的手机..

0 个答案:

没有答案