Bozic
Bozic

Reputation: 157

Adding new System Call in Minix

I am trying to create a new system call in Minix 3.3. At first i just want to create simple printmsg() call that will write "Hello World" on screen.
I looked various tutorials on internet and still couldn't find out solution.

When I test my system call in user program _syscall(PM_PROC_NR, PM_PRINTMSG, &m); I don't get any errors but no printf is displayed.

So, is it possible to printf messages from system calls since i had to add <stdio.h> myself in misc.c or i missed some steps. I forgot to mention that i go in /usr/src/releasetools and type make services and make install respectively to recompile kernel.

Upvotes: 3

Views: 4051

Answers (2)

Ola_leke
Ola_leke

Reputation: 71

In my opinion, with the continuous evolution of MINIX 3 and its series, it will be wise to only follow the developer's guide directly from the minix3.org website here

Although you managed to solve the problem yourself, the latest version of MINIX3 (MINIX 3.4) will follow a more advanced and suitable approach.

Please visit the link to learn more.

Many regards.

Ola

Upvotes: 0

Bozic
Bozic

Reputation: 157

I figured out what was the problem, so i will post answer if someone needs this in future. I did everything well in this example but i failed to compile kernel.
The location was correct which is usr/src/releasetools, but command needed is make hdboot. Also i figured out my PC somehow wasnt working well with this virtual machines and i had many errors while compiling even though i didn't change anything. When i switched to laptop everything worked fine.
My conclusion is sometimes there is just something wrong on your machine so you should try and test problems on different ones

Upvotes: 5

Related Questions