Minix 2.04 problem adding systemcall - Minix

This is a discussion on Minix 2.04 problem adding systemcall - Minix ; Hello everybody, I am experimenting with minix 2.04 on bochs. I have tried to extend the MM with an extra function(a simple function foo() without arguments that always succeeds). Compiling the kernel and library goes well, but when I try ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Minix 2.04 problem adding systemcall

  1. Minix 2.04 problem adding systemcall

    Hello everybody,

    I am experimenting with minix 2.04 on bochs. I have tried to extend the
    MM with an extra function(a simple function foo() without arguments that
    always succeeds). Compiling the kernel and library goes well, but when I
    try to execute a simple test program I get a ENOSYS error. I have
    included a list of files that I created or changed to implement the
    function.

    Can somebody give me a hint where to look for?

    Kind regards,

    Jaap ter Woerds

    changed files to implement foo():

    /usr/include/foolib.h
    /usr/include/minix/callnr.h
    /usr/include/unistd.h

    /usr/src/fs/table.c

    /usr/src/mm/table.c
    /usr/src/mm/proto.h
    /usr/src/mm/misc.c

    /usr/src/lib/posix/_foo.c
    /usr/src/lib/posix/Makefile
    /usr/src/lib/syscall/foo.s
    /usr/src/lib/syscall/Makefile

  2. Re: Minix 2.04 problem adding systemcall

    All,

    > I am experimenting with minix 2.04 on bochs. I have tried to extend the
    > MM with an extra function(a simple function foo() without arguments that
    > always succeeds). Compiling the kernel and library goes well, but when I
    > try to execute a simple test program I get a ENOSYS error. I have
    > included a list of files that I created or changed to implement the
    > function.


    If you increased NCALLS, added do_foo to the table of MM, and
    no_sys to FS, and sent your message to FS, that should be all you
    have to do. (And make sure your new image is booted of course.)

    If it doesn't work, print out a debug message in FS and MM when
    you get your new call number, and see where the ENOSYS is generated.

    =Ben



  3. Re: Minix 2.04 problem adding systemcall

    Thank you for your quick reply, I have my foo() function up and running
    now! The problem was indeed that my new image wasn't booted. I
    mistakenly assumed the 'make hdboot' would replace the old kernell file
    and save it with with r1 suffix. I see now that it works the other way
    around.

    Jaap ter Woerds

    Ben Gras wrote:
    > All,
    >
    >
    >>I am experimenting with minix 2.04 on bochs. I have tried to extend the
    >>MM with an extra function(a simple function foo() without arguments that
    >>always succeeds). Compiling the kernel and library goes well, but when I
    >>try to execute a simple test program I get a ENOSYS error. I have
    >>included a list of files that I created or changed to implement the
    >>function.

    >
    >
    > If you increased NCALLS, added do_foo to the table of MM, and
    > no_sys to FS, and sent your message to FS, that should be all you
    > have to do. (And make sure your new image is booted of course.)
    >
    > If it doesn't work, print out a debug message in FS and MM when
    > you get your new call number, and see where the ENOSYS is generated.
    >
    > =Ben
    >
    >


+ Reply to Thread