DEV Community

Discussion on: How to add system call (syscall) to the kernel, compile and test it?

Collapse
omergulen profile image
Ömer Gülen Author

Hello,
What did you add to your arch/x86/entry/syscalls/syscall_32.tbl file exactly? Also, other than this, what did you do differently to match up with a slight change which is x32 bit.

Collapse
jpo234 profile image
jpo234

The Pi is ARM based, so anything under the arch/x86 tree is irrelevant.

Collapse
syaifulnizarrr profile image
syaifulnizarrr • Edited

Hi,

Linux raspberrypi 4.19.93.-v7+ for my raspberry pi. and it's a 32 bit. So for what I had added to my arch/x86/entry/syscalls/syscall_32.tbl was

387 i386 hello sys_calls __ia32_sys_hello

in addition, on hello.c file,

i tried to play around with assigning integers where if int a = 1, then it will print out like "Test" with but it says along the lines where it's not allowed to assign numbers?

So when I had tried to run using the make command, it gives me an error saying that my syscall hello is not implemented.

And addition, I found out that my kernel is not updated and my core is armv7