0

I am working in MINIX 3.1.6, and currently I am changing a little thing in do_fork.C class which is located int /usr/src/kernel/system.

Usually to compile the files in Kernel folder, is use make install in the kernel directory, and then make hdboot.

I used this form, but it didn't compile me the ../kernel/system folder! Then I went first in the directory with cd: "cd /usr/src/kernel/system" and then I used there make clean and make install. In the end I used the command make hdboot in the directory /usr/src/tools

But even that one didn't work... the compiler doesn't show any error or anything, it just doesn't take my changes.

Does anyone know how to compile the whole directory: /usr/src/kernel/system in Minix ?

Thanks in Advance

EDITED

It's interesting, I did a mistake in do_fork class, and when I tried make install it showed me an Error. This means that do_fork.c is being taken by the make install. Can the problem be in the make hdboot that it isn't taking the changes of do_fork.c?

sepp2k
  • 363,768
  • 54
  • 674
  • 675
user3774470
  • 29
  • 2
  • 10
  • is the minux kernel running? if so, is it "allowed" to recompile code while the system is running? (Just guessing. Weird there are no error messages). Good luck. – shellter Nov 20 '15 at 01:35
  • Obvious but important question: Are you rebooting the system after running `make hdboot`? –  Nov 20 '15 at 01:38
  • I think this the only way to compile the MINIX code. Because when you start MINIX you have 2 choices, the Original one, and the Custom Minix (that I am editing). I tried to compile the Code first from the Custom Minix, it didn't take the changes, after reading your comment, I went and compiled the directory from the Original Minix, which doesn't take changes but updates the Custom Minix... it didn't work :( – user3774470 Nov 20 '15 at 01:40
  • @duskwuff, yes I am rebooting the system after `make hdboot` – user3774470 Nov 20 '15 at 01:40
  • I read here: http://www.cis.syr.edu/~wedu/seed/Labs/Lab_Setup/files/WorkingInMinix.pdf , how to compile the Minix code, and for different libraries the guy in this paper, used different ways to compile it. I wonder, is there any other way to compile the code for the directory `/usr/src/kernel/system`? – user3774470 Nov 20 '15 at 01:41
  • rather then edit your Q 12 hrs ago AND add a comment 12 hrs ago, please edit your question with extra **Edit 1 ... n** sections to show your continuing research. You might add a section to your question to show all the steps that you do for an edit /rebuild cycle, as in the document you have included. Better to edit your question to indicate which method you have used from the iinked document. Else people have to guess. Good luck. – shellter Nov 20 '15 at 14:13

1 Answers1

1

I changed the main.c file in /usr/src/kernel folder by adding an additional printf statement in announce method and the following commands worked for me in MINIX 3.2 version.

  1. Run command "make install" inside /usr/src/kernel folder.
  2. Go to the directory /usr/src/tools and run command "make hdboot".
  3. Restart OS.

Select first option in boot screen and my changes was available.