You are not logged in.
Currently working on updating the PKGBUILD of acer-wmi-battery-dkms-git to meet the following:
- Use the original source of the module/driver (not a fork of it)
- Make it closely resemble that of acer-wmi-battery-dkms
Currently, my changes are looking bright, but DKMS reports issues as soon as it starts integrating the module.
Error! Build of acer_wmi_battery.ko failed for: 6.8.7-zen1-2-zen (x86_64)
Make sure the name of the generated module is correct and at the root of the
build directory, or consult make.log in the build directory
/var/lib/dkms/acer-wmi-battery/0.1.0/build for more information.
==> WARNING: `dkms install --no-depmod acer-wmi-battery/0.1.0 -k 6.8.7-zen1-2-zen' exited 7
==> dkms install --no-depmod acer-wmi-battery/0.1.0 -k 6.6.29-1-lts
Error! Build of acer_wmi_battery.ko failed for: 6.6.29-1-lts (x86_64)
Make sure the name of the generated module is correct and at the root of the
build directory, or consult make.log in the build directory
/var/lib/dkms/acer-wmi-battery/0.1.0/build for more information.
==> WARNING: `dkms install --no-depmod acer-wmi-battery/0.1.0 -k 6.6.29-1-lts' exited 7
according to make.log
DKMS make.log for acer-wmi-battery-0.1.0 for kernel 6.6.29-1-lts (x86_64)
Fri May 3 12:52:05 PM MDT 2024
make: Entering directory '/usr/lib/modules/6.6.29-1-lts/build'
CC [M] /var/lib/dkms/acer-wmi-battery/0.1.0/build/acer-wmi-battery.o
MODPOST /var/lib/dkms/acer-wmi-battery/0.1.0/build/Module.symvers
CC [M] /var/lib/dkms/acer-wmi-battery/0.1.0/build/acer-wmi-battery.mod.o
LD [M] /var/lib/dkms/acer-wmi-battery/0.1.0/build/acer-wmi-battery.ko
BTF [M] /var/lib/dkms/acer-wmi-battery/0.1.0/build/acer-wmi-battery.ko
make: Leaving directory '/usr/lib/modules/6.6.29-1-lts/build'
Frankly, I'm not getting what's wrong here besides the changes I've made. However, here's the PKGBUILD for you to review:
PKGBUILD
# Custom variables
_name="acer-wmi-battery"
_user="frederik-h"
_ver=0.1.0 # Interchanging this with $pkgver doesn't change the installation's fate
# Main info
pkgname="${_name}-dkms-git"
pkgver=r11.4e605fb
pkgrel=1
pkgdesc="For Acer laptops -- kernel module to set Battery Charge Limit to 80%."
arch=('any')
url="https://github.com/${_user}/${_name}"
license=('GPL-2.0')
groups=('acer-wmi')
depends=("dkms")
makedepends=("git")
provides=("${_name}-dkms")
conflicts=("${_name}-dkms")
install="${_name}.install"
source=(
"${_name}::git+https://github.com/${_user}/${_name}.git"
"${_name}.conf"
"dkms.conf"
)
sha256sums=(
"SKIP"
"35988ccdeee6343d66b9ec99a47ee9fe9577932fc48158083df241ca3b5b3096"
"b864ea5957cab885cedd8ec462e4a5a0c11bef13714cc154b5365d4eacfe0283"
)
pkgver() {
cd "${_name}"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}
package() {
# Copy dkms.conf
install -Dm644 dkms.conf -t "${pkgdir}"/usr/src/${_name}-${_ver}/
# Set version
sed -e "s/@PKGVER@/${_ver}/" \
-i "${pkgdir}"/usr/src/${_name}-${_ver}/dkms.conf
# Copy sources (including Makefile)
cp -r ${srcdir}/${_name}/* "${pkgdir}"/usr/src/"${_name}-${_ver}"
# Copy "acer-wmi-battery.conf" to "modules-load.d" directory
install -Dm644 acer-wmi-battery.conf -t "${pkgdir}"/usr/lib/modules-load.d/
}
dkms.conf
PACKAGE_NAME=acer_wmi_battery
PACKAGE_VERSION="@PKGVER@"
BUILT_MODULE_NAME[0]=acer_wmi_battery
BUILT_MODULE_LOCATION[0]="./"
DEST_MODULE_LOCATION[0]="/kernel/updates/dkms"
AUTOINSTALL="YES"
Any help will be appreciated. Thanks
Offline
BUILT_MODULE_NAME[0]=acer_wmi_battery
LD [M] /var/lib/dkms/acer-wmi-battery/0.1.0/build/acer-wmi-battery.ko
Error! Build of acer_wmi_battery.ko failed for: 6.8.7-zen1-2-zen (x86_64)
The built module name in dkms.conf does not match the name of the module that is being built.
Edit:
license=('GPL-2.0')
Should be GPL-2.0-or-later
cp -r ${srcdir}/${_name}/* "${pkgdir}"/usr/src/"${_name}-${_ver}"
Unquoted use of $srcdir.
Last edited by loqs (2024-05-03 19:19:33)
Offline
BUILT_MODULE_NAME[0]=acer_wmi_battery
LD [M] /var/lib/dkms/acer-wmi-battery/0.1.0/build/acer-wmi-battery.ko
Error! Build of acer_wmi_battery.ko failed for: 6.8.7-zen1-2-zen (x86_64)
The built module name in dkms.conf does not match the name of the module that is being built.
Fixed. Thanks!
Just an inquiry on -dkms-git packages. What should the @PKGVER be set as in here?
_ver=0.1.0
. . .
pkgver=r11.4e605fb
. . .
# Set version
sed -e "s/@PKGVER@/${pkgver}/" \ #pkgver or ${_ver}?
-i "${pkgdir}"/usr/src/"${_name}-${pkgver}"/dkms.conf
Offline
I would set @PKGVER to $_ver if you keep that variable.
Edit:
If you do that I would suggest changing $_name-$pkgver to $_name-$_ver so the installation location is consistent.
Last edited by loqs (2024-05-03 19:24:13)
Offline
Done. Thanks
Offline