Nataliya Korovkina wrote: > Michael Neises wrote: > > 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. <skydivebcn(a)gmail.com> > > 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 > > <neisesmichael(a)gmail.com> > > > 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_li… > > > . > > > > > > 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 -- devel(a)sel4.systems > > > To unsubscribe send an email to devel-leave(a)sel4.systems > > > > > > > > > > > > Hi Michael and all, > > I'm writing in the mailing list to maintain the history of the issue since I > encountered the same situation. > > Version mismatch is: "4.8.16 SMP mod_unload 686" in the module VS. > "4.8.16 mod_unload 686" in the kernel. > > The fastest way to solve it (to ones who is running the tutorial right now) > is to use > kernel config file "config.backup-singlecore" from the same repository to > compile > "non-SMP" module. It can be done by replacing line: > > set(linux_config > "${CAMKES_VM_LINUX_DIR}/linux_configs/${linux_major}.${linux_minor}/32/config") > > with > > set(linux_config > "${CAMKES_VM_LINUX_DIR}/linux_configs/${linux_major}.${linux_minor}/32/config.backup-singlecore") > > in CMakeList.txt (tutorial directory camkes-vm-linuxyyy). > > I have reported the diagnosis in the issue #80 in sel4-tutorials. > > > Thanks > Nataliya
PS. If you have built the module with original kernel config once, you will need to reconfigure the kernel and rebuild the module: ninja -t clean configure_vm_linux ninja configure_vm_linux touch [...]/modules/poke/poke.c ninja Nataliya _______________________________________________ Devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
