After updating to kernel 2.6.18 (using gentoo-sources-2.6.18-r2) I could not re-emerge acpi4asus, a kernel module for Asus laptops. I've created a patch that makes it compile correctly on 2.6.18, but at least one change is not backwards compatible. I'm including the patch here anyway as it may be a useful starting point.
Created attachment 101623 [details, diff] acpi4asus-0.30-2.6.18.patch
Created attachment 102145 [details, diff] acpi4asus-0.30-2.6.18.patch: try 2 The Makefile change is actually needed because it fails to detect that it's building on 2.6, but the patch posted fails for me on AMD64 with the message x86_64-pc-linux-gnu-gcc -DLINUX -D__KERNEL__ -DMODULE -I/usr/src/linux/include `./get_include.sh /usr/src/linux/drivers/acpi /usr/src/linux/include/acpi` -Wall -Wstrict-prototypes -fno-strict-aliasing -pipe -mpreferred-stack-boundary=2 -fomit-frame-pointer -c -o asus_core.o asus_core.c asus_core.c:1: error: -mpreferred-stack-boundary=2 is not between 4 and 12 make: *** [asus_core.o] Error 1 and even after fixing that it complains that it can't find the .ko file. I made a new patch that fixes that (and includes the other half of the previous patch). Note: so far, I've only tested that it builds, I haven't tried running it yet.
Sorry to ask, but how do I patch? I copied the patch to /usr/portage/app-laptop/acpi4asus/ and then tried to apply the patch with: $ patch <acpi4asus-0.30-2.6.18.patch I'm happy to post the errors, but I have the feeling i'm just doing something wrong... Thanks!
Created attachment 102491 [details, diff] acpi4asus-0.30-2.6.18.patch: try 3 Patch that actually works.
(In reply to comment #3) > Sorry to ask, but how do I patch? See http://gentoo-wiki.com/HOWTO_Create_an_Updated_Ebuild for instructions.
(In reply to comment #5) > (In reply to comment #3) > > Sorry to ask, but how do I patch? > > See http://gentoo-wiki.com/HOWTO_Create_an_Updated_Ebuild for instructions. > Oh, and make sure you use the new patch that I just posted (acpi4asus-0.30-2.6.18.patch: try 3). (Sorry for the spam, everyone.)
I tried your patch but I get the following: >>> Unpacking source... >>> Unpacking acpi4asus-0.30.tar.bz2 to /var/tmp/portage/app-laptop/acpi4asus-0.30/work * Applying acpi4asus-0.30-2.6.18.patch ... [ ok ] >>> Source unpacked. >>> Compiling source in /var/tmp/portage/app-laptop/acpi4asus-0.30/work/acpi4asus-0.30 ... * Preparing asus_acpi module make -C /usr/src/linux SUBDIRS=/var/tmp/portage/app-laptop/acpi4asus-0.30/work/acpi4asus-0.30/driver modules make[1]: Entering directory `/usr/src/linux-2.6.19-suspend2-r1' CC [M] /var/tmp/portage/app-laptop/acpi4asus-0.30/work/acpi4asus-0.30/driver/asus_core.o /var/tmp/portage/app-laptop/acpi4asus-0.30/work/acpi4asus-0.30/driver/asus_core.c:33:26: error: linux/config.h: No such file or directory make[2]: *** [/var/tmp/portage/app-laptop/acpi4asus-0.30/work/acpi4asus-0.30/driver/asus_core.o] Error 1 make[1]: *** [_module_/var/tmp/portage/app-laptop/acpi4asus-0.30/work/acpi4asus-0.30/driver] Error 2 make[1]: Leaving directory `/usr/src/linux-2.6.19-suspend2-r1' make: *** [driver] Error 2 !!! ERROR: app-laptop/acpi4asus-0.30 failed. Call stack: ebuild.sh, line 1580: Called dyn_compile ebuild.sh, line 945: Called src_compile acpi4asus-0.30.ebuild, line 30: Called linux-mod_src_compile linux-mod.eclass, line 510: Called die !!! Unable to make KERNELSRC=/usr/src/linux . !!! If you need support, post the topmost build error, and the call stack if relevant. !!! This ebuild is from an overlay: '/usr/local/portage'
A new version of acpi4asus is available, so it probably makes more sense to use the acpi4asus 0.31 ebuild in #157603 instead of this patch.
(In reply to comment #8) > A new version of acpi4asus is available, so it probably makes more sense to use > the acpi4asus 0.31 ebuild in #157603 instead of this patch. > 0.32 has been released, please, check #157603
I just commited 0.32 to the tree, if this still is an issue please reopen this bug.