All,

With Hugo's help, I've figured out how to compile kernel modules for
camkes-vm-linux.
I've written up the procedure here:
https://github.com/NeisesResearch/kernel_module_workstation/wiki/seL4Config
and I've partially automated it here:
https://github.com/NeisesResearch/kernel_module_workstation

I'm happy to receive any feedback, and I hope this makes someone's life a
bit easier.

Cheers,
Michael Neises

On Sun, Jul 11, 2021 at 6:23 PM Hugo V.C. <[email protected]> wrote:

> Hi Michael,
>
> in my specific case (qemu-arm-virt) I got the linux kernel config and
> symbols from the linux kernel folder that allowed me to compile custom
> kernel version and from there I could compile custom module and my custom
> kernel. When I tried to just compile a module for the provided kernel it
> didn't worked for me. Think that you do not have control on what
> compiler/environment has been used to generate the kernel binary provided
> in the tutorials...
>
> My suggestion is you download the latest version of kernel 4.9, import
> .config and symbols file of the current kernel, and first compile your own
> linux kernel from scratch and in a separe step. Then overwrite the old
> kernel image with your custom image and then change the path of the new
> kernel sources in the .build file so the modules can compile correctly.
>
> Hope it helps. Don't hesitate to contact me privately so I can try to help
> you and so you can document it as I agree this is really required..
>
> El lun., 12 jul. 2021 0:26, Michael Neises <[email protected]>
> escribió:
>
>> Hello all,
>>
>> I recently spent a lot of time getting the camkes-vm-linux tutorial to
>> work, because it is the only example I could find of compiling a kernel
>> module for the linux vm as a part of the camkes build process.
>> Unfortunately, the kernel module doesn't seem to work. For more
>> information, see the previous email chain as well as
>>
>> https://github.com/NeisesResearch/vm_measure/wiki/Building-the-camkes_vm_linux-Tutorial-on-Debian-10
>> .
>>
>> In lieu of doing things the right way, I believe I could compile a kernel
>> module for the linux kernel that is provided as part of the camkes build
>> system. I believe this is how the introspect-app accomplishes its work.
>> However, I need to have the exact kernel and exact configuration in order
>> to compile the kernel module correctly.
>>
>> Can anyone point me to the correct kernel version and configuration, so
>> that I can target the provided linux kernel for module compilation?
>>
>> Or if there's a better way to get a kernel module in there, please let me
>> know.
>>
>> Cheers,
>> Michael Neises
>> _______________________________________________
>> Devel mailing list -- [email protected]
>> To unsubscribe send an email to [email protected]
>>
>
_______________________________________________
Devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to