Reading the kernel ... - Minix

This is a discussion on Reading the kernel ... - Minix ; Hello There, Sorry If this question is in the FAQ, but I am a completely newcomer (newbie) and as such I am not known with the possibilities. Having downloaded the (complete) MINIX3 - kernel I am interested in studying the ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Reading the kernel ...

  1. Reading the kernel ...

    Hello There,

    Sorry If this question is in the FAQ, but I am a completely newcomer
    (newbie) and as such I am not known with the possibilities.

    Having downloaded the (complete) MINIX3 - kernel I am interested in
    studying the exact code (in C and Assembler), to get some ideas how to
    to try make other drivers (example: USB-drivers), but no matter how I
    do it I get the extracted code as ONE LARGE FILE (and not a directory
    with several files).

    (I can't copy the source files from /usr/src/ directory)

    It is obviously that I am doing something wrong, but can anybody help
    me ?

    Here is the necessary details (running Windows 2000):

    I am first downloding the complete sourcecode (-complete - ). Renaming
    it to complet.bz2 (The 8.3 problem). Then going to DOS-mode.

    Than again using the BZIP2.Exe -df Complet.bz2 ...

    This works, but the result is ONE LARGE TEXT file. ....

    Greeting

    Chris


  2. Re: Reading the kernel ...

    > Having downloaded the (complete) MINIX3 - kernel I am interested in
    > studying the exact code (in C and Assembler), to get some ideas how to
    > to try make other drivers (example: USB-drivers), but no matter how I
    > do it I get the extracted code as ONE LARGE FILE (and not a directory
    > with several files).
    >
    > (I can't copy the source files from /usr/src/ directory)
    >
    > It is obviously that I am doing something wrong, but can anybody help
    > me ?
    >
    > Here is the necessary details (running Windows 2000):
    >
    > I am first downloding the complete sourcecode (-complete - ). Renaming
    > it to complet.bz2 (The 8.3 problem). Then going to DOS-mode.
    >
    > Than again using the BZIP2.Exe -df Complet.bz2 ...
    >
    > This works, but the result is ONE LARGE TEXT file. ....


    I suppose you downloaded this file?

    http://www.minix3.org/download/minix...mplete.tar.bz2

    The ".tar.bz2" double extension shows that the files has been processed
    by TAR (which puts many files into a single archive file) and then by
    BZIP2 (which compresses a single file). This is a common way to create
    archives on Unix-like systems. In effect it works just like ZIP, but
    the archiving and compression have been split.

    You should not rename the file. Both extensions are needed for programs
    to understand what's in there. There is also no need to rename. Windows
    2000 does not have the 8.3 restriction. In fact, it doesn't even have
    DOS or a DOS mode. The CMD.EXE program is a DOS-like shell, which does
    support long filenames.

    In fact you don't even need to use the shell. The easiest solution is
    to download WinRAR which can open .tar.bz2 (and many other formats)
    without trouble. YHou can get it here:

    http://www.rarlab.com/download.htm

    You may, however, want to first install Linux on some PC and use it for
    some time to get used the the Unix-like environment before you try
    Minix. You really need to know this kind of thing to be able to use
    (and even more, develop for) Minix.

  3. Re: Reading the kernel ...

    Hello,

    > Sorry If this question is in the FAQ, but I am a completely newcomer
    > (newbie) and as such I am not known with the possibilities.


    No problem to me as everyone did begin once as a newbie.

    > Having downloaded the (complete) MINIX3 - kernel I am interested in
    > studying the exact code (in C and Assembler), to get some ideas how to
    > to try make other drivers (example: USB-drivers), but no matter how I
    > do it I get the extracted code as ONE LARGE FILE (and not a directory
    > with several files).


    Then you did a mistake. :-)

    > It is obviously that I am doing something wrong, but can anybody help
    > me ?


    Sure.

    > I am first downloding the complete sourcecode (-complete - ). Renaming
    > it to complet.bz2 (The 8.3 problem). Then going to DOS-mode.


    If you run Windows 2000, then there is no DOS mode, so don't rename that
    file to complet.bz2.

    > Than again using the BZIP2.Exe -df Complet.bz2 ...
    >
    > This works, but the result is ONE LARGE TEXT file. ....


    Yes, that is correct. The complete file name should end on .tar.bz2.
    Bzip2 (and gzip, too, for that matter) only compress -a single file- and
    never many files as you would expect. So bzip2 and gzip are not comparable
    to ZIP in this way. But there was a solution in Unix a very long time ago -
    tar (tape archiver). Tar simply puts many files (or directories) in a single
    file (as you need these files on a tape device), but does not compress them
    (there are many programs that can compress better; and decompressing took a
    long time on old machines (like sun2 or whatever) and so - if the tape was
    long enough and could hold enough space - there was no need to compress.

    But as data files grew, and computers were getting faster, programs were
    developed (compress and uncompress, later gzip and gunzip, now bzip2 and
    bunzip2) which did compress -a single file- (as tar did the rest of the
    work) and this is where we are now.

    For your solution: Add the .tar extension again, which you took away (the
    file should be called something.tar or complete-3.1.2a.tar after bzip2 -d or
    bunzip2) and let tar run on it. The command line for that is:

    tar -xvf file.tar

    and this extracts the archive into the folder you are in right now. Of
    course, under Windows you need some kind of tar (like using cygwin or
    whatever), but that should do the trick.

    Regards,
    Sebastian



+ Reply to Thread