From 22c6bf718f64cc06ebc8ed01020f8b75a1a73724 Mon Sep 17 00:00:00 2001 From: Jeff Curless Date: Mon, 6 Oct 2025 09:01:20 -0400 Subject: [PATCH] Attempting to build on Trixie with older headers --- battery/Makefile | 2 ++ battery/build | 5 +++-- battery/install | 2 +- battery/oneUpPower.c | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/battery/Makefile b/battery/Makefile index d2a3a60..2bba597 100644 --- a/battery/Makefile +++ b/battery/Makefile @@ -1,4 +1,6 @@ + obj-m += oneUpPower.o +#obj-m += test_power.o # Build with: # make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules diff --git a/battery/build b/battery/build index 115292e..c44922a 100755 --- a/battery/build +++ b/battery/build @@ -1,5 +1,6 @@ #!/usr/bin/bash -make -C /lib/modules/$(uname -r)/build M=$PWD clean -make -C /lib/modules/$(uname -r)/build M=$PWD modules +HEADERS=6.12.47+rpt-rpi-v8 +make -C /lib/modules/$HEADERS/build M=$PWD clean +make -C /lib/modules/$HEADERS/build M=$PWD modules diff --git a/battery/install b/battery/install index 6de7e8a..7ff7768 100755 --- a/battery/install +++ b/battery/install @@ -1,4 +1,4 @@ -sudo insmod test_power.ko +sudo insmod oneUpPower.ko ls -l /sys/class/power_supply/BAT0 cat /sys/class/power_supply/BAT0/uevent diff --git a/battery/oneUpPower.c b/battery/oneUpPower.c index b666a96..923cd33 100644 --- a/battery/oneUpPower.c +++ b/battery/oneUpPower.c @@ -136,7 +136,7 @@ static int get_battery_property(struct power_supply *psy, return get_battery_propertiesInts( psy, psp, val ); } - return 0 + return 0; } static enum power_supply_property test_power_ac_props[] = {