njsss
Posts: 35
Joined: Fri May 20, 2016 9:36 pm

How to build a power gauge driver?

Fri Mar 01, 2019 8:43 pm

I currently have an AXP17x power management chip to manage the battery supply. To query the power information, I was given a set of driver files, in which the instruction requires it to be built under directory kernel/drivers/power with Makefile and Kconfig. However under my /lib/modules/4.14.98-v7+/kernel/drivers/power there are no such files. So I guess this is not the expected location to build.

I do find on GitHub https://github.com/raspberrypi/linux/tr ... vers/power under drivers/power there are Makefile and Kconfig, plus a bunch of other power supply source files under folder supply (but why only two xx.ko files under my local folder?).

So how to build the driver? Is there a tutorial somewhere?

And the instruction also requires configuration with menuconfig, which is mentioned under "Configuring the kernel" Rpi documentation. Does it mean I actually need to build a kernel?
Last edited by njsss on Tue Mar 05, 2019 3:39 pm, edited 1 time in total.

njsss
Posts: 35
Joined: Fri May 20, 2016 9:36 pm

Re: How to build a power driver?

Tue Mar 05, 2019 3:39 pm

Can anyone help? I really don't want to build a customized kernel that has to be rebuilt again when a new kernel is available.

Return to “Advanced users”