Thread: MINIX Help

  1. #1
    Registered User
    Join Date
    Jun 2007
    Posts
    11

    MINIX Help

    I was supposed to modify the echo.c code of MINIX. I moved to the directory : /usr/src/commands/simple and created the echo.c file with vi editor.
    I compiled it (cc) and then edited Makefile with vi editor. (Actually added echo where was needed)
    Then i moved to usr/src and hit: "make world" to translate Minix' core and after:"hdboot" to use the new one. But i'm still confused on how i'm supposed to run the new echo.
    I found the echo code of MINIX to ...../commands/ash/bltin and i see that despite what i've done that's the one still used by MINIX.
    Any ideas?
    (If i just wanted to run my echo.c file with MINIX what would i have to do?)
    Thanks

  2. #2
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Well, built-ins are preferred. And if you're supposed to modify echo.c, why did you create a new one?
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  3. #3
    Registered User
    Join Date
    Jun 2007
    Posts
    11
    Quote Originally Posted by CornedBee View Post
    Well, built-ins are preferred. And if you're supposed to modify echo.c, why did you create a new one?
    Because the teacher said i had to go to ...../simple and modify the existing file. The only problem is that that there is no f******* existing echo file in there.
    Ok is there any way of "compelling" MINIX to use my code?

  4. #4
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Modify the code in /commands/ash/bltin.

    Also, if /simple is what I think, then there should be an echo binary in /bin or /usr/bin; you could call that explicitly using a full path.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  5. #5
    Registered User
    Join Date
    Jun 2007
    Posts
    11
    Quote Originally Posted by CornedBee View Post
    Modify the code in /commands/ash/bltin.

    Also, if /simple is what I think, then there should be an echo binary in /bin or /usr/bin; you could call that explicitly using a full path.
    Sorry for my "ignorance" but could you explain what do you mean by saying: call /usr/bin/echo? Where should i use the full path?

  6. #6
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    On the command line.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  7. #7
    Registered User
    Join Date
    Jun 2007
    Posts
    11
    Thanks Corned Bee! You really helped a lot. I was running the commands i had constructed or modified from usr/bin and managed to make them work, till this morning i figured out that i could rename echo as echo2 or echo_i_am_stupid and don't have conflicts with the biltin commands. Because replacing the existing commands wasn't something i wanted at the time.
    The problem is that after 15h of programming the brain doesn't work very good.
    No worries. 10 is mine now and the next one is dedicated to you and all the fellow programmers around the world Nice speech, ah?
    write in C

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. minix system call pls help for project
    By porvas in forum Linux Programming
    Replies: 2
    Last Post: 06-14-2009, 02:40 AM
  2. Minix and system calls!!!help!
    By squeezah in forum Linux Programming
    Replies: 24
    Last Post: 04-02-2008, 07:19 PM
  3. Assembly and C++
    By LoafOfBread34 in forum C++ Programming
    Replies: 14
    Last Post: 03-31-2008, 03:29 PM
  4. Access file's info in MINIX
    By Zuko in forum Linux Programming
    Replies: 3
    Last Post: 01-07-2008, 10:14 AM
  5. programming in Minix
    By oracus in forum C Programming
    Replies: 2
    Last Post: 05-29-2006, 03:43 PM