编译A20内核时出现如下错误

drivers/built-in.o: In function `axp20_init_chip':
/home/linux-sunxi/drivers/power/axp_power/axp20-mfd.h:149: undefined reference to `hwmon_device_register'
drivers/built-in.o: In function `axp_mfd_remove':
/home/linux-sunxi/drivers/power/axp_power/axp-mfd.c:368: undefined reference to `hwmon_device_unregister'
make: *** [.tmp_vmlinux1] Error 1

其原因时在内核配置时配置了CONFIG_AXP_HWMON=y但是CONFIG_HWMON没有配置或配置成了m,解决办法时修改.config,将CONFIG_HWMON配置为y,即

vi .config
修改:
CONFIG_HWMON=y


修改完成后重新编译就可以了。

Logo

更多推荐