在构建内核时隐式声明函数'get_radio_flag'错误

时间:2018-09-29 09:18:23

标签: android makefile kernel

我正在尝试为HTC M8构建一个内核,但在构建它时却出现此错误。我花了5个小时尝试解决它,但是没有运气。有想法吗?

$ export PATH=$PATH:~/Downloads/arm-eabi-4.6/bin
$ export CROSS_COMPILE=arm-eabi-
$ export ARCH=arm
$ make

(...)

CC      arch/arm/mach-msm/pil-q6v5-lpass.o
CC      arc`enter code here`h/arm/mach-msm/pil-msa.o
CC      arch/arm/mach-msm/pil-q6v5-mss.o
arch/arm/mach-msm/pil-q6v5-mss.c: In function 'restart_modem':
arch/arm/mach-msm/pil-q6v5-mss.c:94:2: error: implicit declaration of function 'get_radio_flag' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors

scripts/Makefile.build:307: recipe for target 'arch/arm/mach-msm/pil-q6v5-ss.o' failed
make[1]: *** [arch/arm/mach-msm/pil-q6v5-mss.o] Error 1
Makefile:955: recipe for target 'arch/arm/mach-msm' failed
make: *** [arch/arm/mach-msm] Error 2

这是我的restart_modem函数:

(...)

#define subsys_to_drv(d) container_of(d, struct modem_data, subsys_desc)

static void restart_modem(struct modem_data *drv)
{
    log_modem_sfr();
    drv->ignore_errors = true;
    modem_read_spmi_setting(get_radio_flag() & BIT(3));
    subsystem_restart_dev(drv->subsys);
}

 (...)

0 个答案:

没有答案