I'm going to build a little kernel module for Alpine, but get some problems.
Host: Ubuntu 16.04LTS 64bit
Guest : Alpine-vanilla-3.7.0-x86(kernel version 4.9.65) in qemu
It looks like there is no build environment for a kernel module natively in Alpine, so I tried to use cross-compiler to build it in the host.
I first get an i686-linux-musl-gcc cross-compiler from https://github.com/richfelker/musl-cross-make
> . It works fine since a compiled Hello_World.c runs perfectly in the guest.
Right now, I'm trying to build a kernel module hello_kernel.c. I download linux kernel 4.9.65 first from kernel.org <http://kernel.org/
> (e.g. in /home/yuxing/linux 4.9.65 ), and compile it with the cross-compiler mentioned above. Next, I use the build environment in /home/yuxing/linux 4.9.65 with the cross compiler to build the hello_kernel.ko . It looks fine since no errors come out.
But when I insmod hello_kernel.ko in Alpine, the error
Can someone please give me some advices to figure this problem or how to build a kernel module for Alpine. Thanks in advance.
Received on Tue Jan 02 2018 - 18:24:54 UTC