[elrepo] patching kernel modules agasint elrepo

Morgan Yang morgan.yang1982 at gmail.com
Tue Nov 22 05:35:24 EST 2016


Hi Phil:

Thanks for the tip. I went ahead and installed the kernel-lt-headers for
4.4-32-1 and downloaded the nosource.rpm as well. Here are my steps, please
let me know if I missed any steps

(1) rpm -i kernel-lt-devel-4.4.32-1.el7.elrepo.x86_64.rpm

(2) rpm -i kernel-lt-4.4.32-1.el7.elrepo.nosrc.rpm  2>&1 | grep -v exist

(3) I extracted linux-4.4.32 source (from kernel.org) under

~/rpmbuild/BUILD/kernel-4.4.32/linux-4.4.32

(4) I copied Module.symvers
from /usr/src/kernels/4.4.32-1.el7.elrepo.x86_64/ to
~/rpmbuild/BUILD/kernel-4.4.32/linux-4.4.32

(5) make clean && make oldconfig && make prepare && make modules_prepare

(6) make M=net/ipv4 -j8 modules

(7) I copied ip_gre to /usr/lib/modules/$(uname -r)/kernel/net/ipv4/

(8) sudo depmod -a

(9) sudo modprobe ip_gre

modprobe: ERROR: could not insert 'ip_gre': Exec format error

dmesg
[295045.997265] ip_gre: no symbol version for module_layout

I also repeated step 6 by changing the default kernel.org Makefile. I added
"-1.el7.elrepo" to EXTRAVERSION

VERSION = 4
PATCHLEVEL = 4
SUBLEVEL = 32
EXTRAVERSION = -1.el7.elrepo
NAME = Blurry Fish Butt

That didn't see to make a difference as well.

On Mon, Nov 21, 2016 at 11:30 PM, Phil Perry <phil at elrepo.org> wrote:

> On 21/11/16 21:31, Morgan Yang wrote:
>
>> Hi All:
>>
>> I have downloaded and installed 4.4.32-1.el7.elrepo.x86_64 from elrepo-lt,
>> I'm not patching kernel modules against 4.4.32 source code from
>> www.kernel.org
>>
>>
> I don't fully understand what you are trying to do, but...
>
>
> 1. I downloaded and extracted the source https://www.kernel.org/
>> pub/linux/kernel/v4.x/linux-4.4.32.tar.gz
>>
>> 2. I ported the patches from to the latest source
>>
>> 3. Built via the following commands
>>
>>    1. make clean && make oldconfig && make prepare && make modules_prepare
>>    2. make modules -j8
>>
>>
> you don't need to rebuild the whole kernel, you can just compile the
> module in question against the currently running kernel. You will need the
> kernel-lt-devel and kernel-lt-headers packages installed.
>
> I then copied the <module>.ko to /usr/lib/modules/4.4.32-1.e
>> l7.elrepo.x86_64/kernel
>>
>> However, when  attemp to load the module, I see
>>
>> [242683.114843] ip_gre: no symbol version for module_layout
>>
>> Is it because version 4.4.32-1.el7.elrepo.x86_64 is failing the check?
>> Since elrepo has no SRPM's, how would one go about patching changes
>> without
>> building and installing the entire kernel from kernel.org?
>>
>>
> SRPMs are available here:
>
> http://elrepo.org/linux/kernel/el7/SRPMS/
>
> they are actually nosrc.rpm's (to save mirror space and bandwidth) so
> you'll also need to download the corresponding kernel source tarball from
> kernel.org, but otherwise contain everything you need to rebuild elrepo's
> kernel packages.
>
>
>
> _______________________________________________
> elrepo mailing list
> elrepo at lists.elrepo.org
> http://lists.elrepo.org/mailman/listinfo/elrepo
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.elrepo.org/pipermail/elrepo/attachments/20161122/482fd68f/attachment.html>


More information about the elrepo mailing list