compile patched modules for current kernel 3.14.1

Post your comments, questions, bug reports or suggest new features for alphaOS
pentajazz
Advanced
Posts: 48
Joined: 27 Apr 2014, 23:09

compile patched modules for current kernel 3.14.1

Postby pentajazz » 03 Sep 2014, 01:14

I've had difficulties compiling 2 single patched driver modules for current kernel 3.14.1
I could not find an easy way to do this without rebuilding the whole kernel
those belong to "/lib/modules/3.14.1-ALPHAOS/source/drivers/acpi" directory: ac.c, acpi_platform.c
I've attached those patched source files, patch is: https://bugzilla.kernel.org/show_bug.cgi?id=71711

i do not know if those could be loaded from the savefile, i guess it is ok as they belong to the drivers section of the kernel
If someone could do that easily without compiling all modules again that would be great (or if you have a tip for single module rebuild for alphaos)
Attachments
ac.c.tar.bz2
patched ac.c, acpi_platform.c
(3.85 KiB) Downloaded 171 times

Scooby
Site Admin
Posts: 826
Joined: 09 Sep 2013, 16:52

Re: compile patched modules for current kernel 3.14.1

Postby Scooby » 03 Sep 2014, 16:36

pentajazz wrote:I've had difficulties compiling 2 single patched driver modules for current kernel 3.14.1
I could not find an easy way to do this without rebuilding the whole kernel
those belong to "/lib/modules/3.14.1-ALPHAOS/source/drivers/acpi" directory: ac.c, acpi_platform.c
I've attached those patched source files, patch is: https://bugzilla.kernel.org/show_bug.cgi?id=71711

i do not know if those could be loaded from the savefile, i guess it is ok as they belong to the drivers section of the kernel
If someone could do that easily without compiling all modules again that would be great (or if you have a tip for single module rebuild for alphaos)


if you could compile the ko's I think they would be OK to load at boot time?

you could check dkms

Maybe you have to recompile kernel!?

pentajazz
Advanced
Posts: 48
Joined: 27 Apr 2014, 23:09

Re: compile patched modules for current kernel 3.14.1

Postby pentajazz » 04 Sep 2014, 12:01

ok, no need for full kernel recompile,
info about this is mostly distro specific and not so universal
used info from: http://www.pixelbeat.org/docs/rebuild_k ... odule.html

I used these commands to rebuild the ac.ko driver

Code: Select all

cd /lib/modules/$(uname -r)/build
make oldconfig
make prepare
make modules_prepare
make SUBDIRS=scripts/mod
make SUBDIRS=drivers/acpi modules


remove driver

Code: Select all

rmmod ac

copy file ac.ko from the acpi build directory to the modules one, renaming the original, after replacement, install the new

Code: Select all

insmod /usr/lib/modules/3.14.1-ALPHAOS/kernel/drivers/acpi/ac.ko

reboot

if it is needed rebuild the main kernel image also, i do not know if this driver has to do with this
ac.ko driver recompile fixed this issue:
acpi fan issues, no fan and overheating = 3.13+ kernel bug viewtopic.php?f=6&t=1095

Scooby
Site Admin
Posts: 826
Joined: 09 Sep 2013, 16:52

Re: compile patched modules for current kernel 3.14.1

Postby Scooby » 04 Sep 2014, 18:45

Excellent!!!

thanks for sharing the solution.

I guess this work for other kernel modules as well

I think I will try it so I learn how to do it

to where do you copy the patched source files?

pentajazz
Advanced
Posts: 48
Joined: 27 Apr 2014, 23:09

Re: compile patched modules for current kernel 3.14.1

Postby pentajazz » 05 Sep 2014, 09:41

just replace original with patched source files into the build directory (or patch them there) /lib/modules/$(uname -r)/build/[other_directory], in this case 2 source files patched.
If you learn more, you would probably discover a way to replace the whole kernel, If you do so, let us know
for example I would like to use this modded kernel:
http://repo-ck.com/
https://wiki.archlinux.org/index.php/linux-ck
https://wiki.archlinux.org/index.php/repo-ck
alongside with nvidia/virtualbox

It would be good to have an "alphaos kernel replacement" howto, hopefully this could be done without building from scratch every os part
note also the new arch-lts 3.14.17
https://www.archlinux.org/packages/core ... linux-lts/
https://aur.archlinux.org/packages/linux-lts-ck/
i propose for this os to use at least one lts kernel


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 5 guests

cron