Linux-a free unix-386 kernel (Author: Linus Torvalds)

Source: Internet
Author: User


LInux-- A free unix-386 Kernel

Linus Torvalds (torvalds@kruuna.helsinki.fi)

October 10,199 1


Introduction to L Inux


What is L Inux ?

LInuxIs a free UNIX-like kernel for 386-at computers, coming
Full source code. It is meant for hackers/computer science students
Use, learn and enjoy. It is written mostly inC, But parts
It are in GNU-format explorer, and the boot-sequence is in Intel 086
Assembly language.C-Code is relatively ANSI, with a few
GNU enhancements (mostly_ ASM __AndInline).

While there are a number of unices available for 386 computers, most
Them cost a lot of money, and come with no source. Thus, they are ideal
For actuallyUsingYour computer, but if you want to learn how
They work, you are f--ked.

there are also a few unices available with source. minix, the learning
tool written by Andrew S. tanenbaum, has been used in universities as a
teaching tool for years. the BSD-386 system comes with source, but has a
restrictive copyright and costs a lot of money ($995 is the starting
price, I think ). the GNU kernel (Hurd) will be free, but is currently
not ready, and will be too big to understand learn.

LInuxMost closely resembles minix, in that it is small and not very
Sophisticated, and thus easy (well...) to understand. lInuxWas
Also written under minix, so there are quite a bit of similarities, and
Any minix hacker will feel relatively at home with LInux. None of
Minix code was used in the project though, so the minix Copyright
Doesn' t cover the new system. It also isCompletely free, And has
A very loose copyright. Thus there is no need for megabytes of diffs
Like under Minix.


The L Inux Copyright

While being freely distributable, I do restrict the use of LInuxIn
Few ways:

    • you may freely copy and redistribute the source and binaries, As long as:

      • complete source is available. Thus binaries may not be distributed
        by themselves, even if you have made changes to them.
      • you do not profit from the distribution. In fact even ''handling
        costs ''are not acceptable.
      • you keep the appropriate copyrights intact.
    • you may change the source to your liking, but if you distries
      parts of the new system (or just binaries ), all the new code must be
      encoded ded.
    • you may make small privileges ts from the code without including
      copyrights. this is up to you, but a reference to me or the Code wocould
      be appreciated.

This shoshould be loose enough not to cause any worry in anybody using or
Expanding the system. If you have a friend who really doesn't want
Source, but just a working binary, You may of course give it to him
Without worrying whether I will sue you. Keep it between friends, though.


Hardware/software needed to get L Inux Running

LInuxWas written on a 386-at running Minix. As lInuxIs a real
Operating System, and goes directly to the hardware to do things, you
Have to have a very similar system to get it going without problems:

    • 386-at (PS/2's are different enough that things won't work)
    • VGA or pull screen hardware.
    • Standard at hard-disk interface, IDE disks work fine (in fact
      That's what I use ).
    • Normal real-mode bios. Some machines seem to use virtual-86 mode
      To run the bootup program, and on such machines LInuxWon't boot up
      And run correctly.

While lInuxWill be expanded to be a self-sufficient system, Minix-386
Is currently needed to get the ball rolling. You need minix to make
Initial root file system, and to compile the OS Binary. after that
LInuxIs a self-sufficient system, but minix is recommended in order
To make file system checking (Fsck) And to recompile the system
After making changes.


Getting L Inux

LInuxCan currently be gotten by anonymousFTPFrom'Nic. funet. Fi'In
Directory'/Pub/OS/Linux'. This directory contains the full source to the operating
System, as well as a couple of binaries so that you can actually use
System.


Note! The binaries are mostly GNU software,
And are under a stricter copyright (the GNU Copyleft) than
LInuxSources. Thus you may not redistribute them without distributing their
Source, found in/Pub/gnu. See any GNU software package for more
Information on the GNU Copyleft.

The various files found in this directory are:

  • Linux-0.03.tar.Z-- Complete source to the operating system,
    In a 16-bit compressed tar archive.
  • Linux. Tex-- LATEX source for this file.
  • Bash. Z-- Bash binary to run under LInux. This binary shocould
    Be put under tha name/Bin/shIn the file system reserved
    LInux(See installation ).
  • Update. Z-- Update Binary, to be put in/Bin/update.
  • Gccbin.tar. Z-- Gnu cc binaries needed to get a working
    Compiler. This tarred archive contains the compiler, loader, Volume er
    And support programs (nm, strip etc). It also contains a small library
    Sufficient for most programs.
  • Include.tar. Z-- Include-files necessary to get GCC working.
  • Unistd.tar. Z-- Source to the unistd Library Routines (ie
    System Call interface). With this you can build a bigger library
    Using System-independent library sources.
  • Utilbin.tar. Z-- Binaries to various GNU utilities, including
    GNU fileutils, make and tar. also contains the emacs-cloneUemacs.
  • Readme, RELNOTES-0.01, Installation-- ASCII files containing
    Some (somewhat out-of-date) Information about LInux.

The absolute minimum needed to get a system going is the OS source and
The bash and update binaries. You won't be doing much with just these
Though.


Installation

After you have gotten the necessary lInuxFiles, You need to compile
The system and make a root directory. The necessary binaries need to be
Put in the root file system.
Do this:

  1. Back up your software. While lInuxNever has destroyed any of my
    Files, nothing is certain. Better safe than sorry.
  2. Choose/make a standard minix HD-partition to be the new LInuxRoot
    File System.
  3. Make the necessary device nodes on the new root. LInuxUses
    Same type of nodes as minix, so use the minixMknodCommand
    Make the following devices:

    • /Dev/tty
    • /Dev/tty [0-2]
    • /Dev/HD [0-9]

    Node numbers are the same as in Minix.

  4. Move the necessary files to the New Root partition. The files
    Shocould be in the following directories:

    • /Bin:

      • Sh, IeBash. Z.
      • Update
    • /Usr/bin:
      • ContentsUtilbin.tar. Z

    • /Usr/include:
      • ContentsInclude.tar. Z
    • /Usr/local/lib:
      • ContentsGccbin.tar. Z, Sort TingGcc
    • /Usr/local/bin:
      • Gcc
      • Links to files in/Usr/local/libOf your choice. I link

        LD,As,Nm,StripAndSizeTo their
        Counterparts in/Usr/local/lib/GCC-xxx.

    • EditLinux/include/Linux/config. hFile for your system.
      This file contains the system-specific information: memory space, disk
      Types, root Partition Number (again the numbering is the same as in
      Minix), keyboard type (currently just us and Finnish) etc.
    • Compile the LInuxSources. A simpleMakeShocould do
      Trick, after you have editedMakefileS to suit your system
      (Ie, removed-Mstring-insnsFlag and changed the paths to suit
      You.) usersGccVersions earlier than 1.40 will probably have
      To addGnulibTo'Libs ='-Line inMakefile.

    • Copy the resultantImage-File to a floppy (ie,CP Image
      /Dev/ps0Or similar .)
    • Reboot with the new floppy. the startup screen shoshould tell you
      That the system is booting (Loading System...), Then some vital
      Root file system information (Xxx/xxx inodes/blocks free),
      Followed byOK.And the bash prompt (initiallyBash #If
      You have no. BashrcFile ).

    Hopefully you now have a functioning UNIX, And you are logged in
    Root. LInuxCurrently has no'Init'Process, and As soon
    As you log out, the system willSyncAnd just wait. Use
    Three-finger-Salute to reboot your machine.


Things missing/incomplete in L Inux

While lInuxIs meant to be a fully selfsufficient kernel, this is
Currently not the case. As already mentioned, you need minix to set
Things up, and to check the file system once it's running. There are
Number of other deficiencies:

  • Incomplete hardware-support. Some of the standard features of
    At are not currently supported. Most notably are floppy disk drives,
    Making using LInuxFor real work (backing up etc) currently not
    Possible. Also some of the features of the serial lines aren't yet
    Implemented (hard-wired to 2400bps, no hang-up notification etc ).
  • Incomplete Standard C library.Libc.Found in the GCC
    Distribution package is not complete, and I'm very much interested in
    Freely distributable library functions.
  • Some of the system CILS are not fully implemented. This concerns
    Mostly ''seldom-used' features like debugging (Yeah, who needs it
    Anyway, don't all your programs work the first time And some
    Other features.
  • As mentioned, noLoginAndInitProcesses. Currently
    LInuxBoots up in single-user mode, with the root as console-user.
    This is enough for some porting work, but not really practical.

  • 387-support is not yet implemented, although some skeleton
    Routines are present. The GCC-binary found on'Nic. funet. Fi'Will correctly use
    Soft-float (ie emulation function CILS) for the four basic math
    Operations. 387-support will materialize as soon as a 387 finds its way
    Into my computer. Hopefully in a month or two.
  • None of the important system-administration commands has yet been
    Written for LInux. These include things likeMkfs,Format,
    Fsck,MknodEtc. Some of these need kernel features not yet
    Implemented (Format,Mknod), Some just need to be written.
    As with the library, I 'd welcome any freely distributable files.

As you can see, lInuxIs as yet not a complete system. Your help is
Appreciated to make it better. I'm not interested in minix-Commands
Rewritten for LInux, Unless you have written them yourself from
Scratch. You are of course free (and encouraged) to use everything you
Have in your minix-distribution for your own lInux-System, but due
The minix copyrights, they cannot be distributed to a wider audience.

Some of the probelms mentioned here will be fixed by me (ie serial
Lines/387/Floppy Support) as soon as possible, but I'm hoping to get
Help with the libraries etc. Bug-Reports/patches and wish-lists will be
Appreciated, and if you actually have the patch to the problem, I'll try
To implement it right away. Small changes will be sent out as patches
The mailing list and be set up on'Nic. funet. Fi', But after heavy rewrites or
Bigger patches, the whole system will be updated'Nic. funet. Fi'.


Porting software for L Inux

LInuxWas designed to make porting relatively easy. Thus the full
Termios-Implementation, and the somewhatPOSIXLibrary.
(Admittedly relativly few) programs I 've ported posed no problems.

Even though lInuxResembles minix a great deal, minix programs are not
Generally easier to port than programs designed for some other UNIX.
Thus I wouldn't recommend starting from a minix-version of a particle
Program, but instead trying to port the ''virgin ''program from scratch.
Being closer to sysv than BSD means that most programs port easily when
Given-DusgOr-DsysvFlag.

One of the more difficult problem in porting can be missing Library
Functions. These must be written by you, or copied from some other
Source (minix being one possibility for those that have it ).
Alternatively, some programs (notably GNU) have varous flags making it
Possible to define which functions aren't available (the GNU fileutils
Will compile quite nicely, once a sufficient number
-Dxxx_missingFlags are added toMakefile.)


Programs already ported

These programs have already been ported to LInux:

    • Gnu cc (GCC, PC3, CPP)
    • GNU Explorer (as386)
    • GNU binutils (LD, AR, nm, size, strip, ranlib)
    • GNU compress (16-bit)
    • GNU Tar
    • GNU make
    • GNU bash (Bourne again shell)
    • GNU SED
    • Gnu bison (YACC-lookalike)
    • GNU awk
    • GNU fileutils (LS, CP, RM, mkdir, rmdir, tail etc)
    • Less
    • Uemacs

All of the above sources can be found on'Nic. funet. Fi'(Mostly in
'/Pub/gnu'), And most of the LInux-Binaries can be found in
Directory'/Pub/OS/Linux'. All of these programs compiled without changes, even
Though GCC (PC3) has some enhancements of my own. Mail me
Diffs/sources, but try first to compile them yourself.

Additionally I have reports that GNU diff compiles cleanly and works.


Technical help

LInuxCurrently has a mailing-list, which you can subscribe to
Mailing to the address:Linux-activists-request@niksula.hut.fi
And asking to be writable ded into the list. You can then ask questions
Mailing themLinux-activists@niksula.hut.fi, Which will
Duplicate your question/answer/whatever and send them to all persons on
The list.

Note the differenceLinux-activistsAnd
Linux-activists-Request-- The first sends mail to all persons on
The list, the second is used only to subscribe and unsubscribe from
List.

Naturally, you can also mail me directlyTorvalds@kruuna.helsinki.fi. I'll try to answer all questions within
Day or two.

Although'Nic. funet. Fi'Will probably be kept reasonably up-to-date, there are
Few problems with it (ie, I cannot personally get to the files, but have
To go through a couple of Persons). Thus people on the mailing-list will
Get patches/binaries faster if they ask for them.


Thanks

I 'd like to thank the Emy...

Seriously, this system never wowould have seen the light of day or wowould
Have been much worse without the help of some others. Bruce Evans
Helped me find the places needed to be changed in orderGccTo
Correctly handle floating point, and came with a lot of useful
Idea/suggestions (and his Minix-386 was used to build the system ).
Also, Earl Chew'sEstdioPackage was used for the standard
Io-library. More freely distributable packages like this!

Alain W black and Richard Tobin made the GCC for minix, without which I
Couldn't have compiled the thing. GNU made most of the programs I use
Under LInux. Alfred Leung sent the US keyboard patches.

PS. ''thanks''Wirzeniu@kruuna.helsinki.fiFor his
''Structive'' criticism and ''witty ''comments. He was also my first
-Tester, and shoshould be given a medal for courage.


About this document...

LInux-- A free unix-386 Kernel

This document was generated using
Latex2HtmlTranslator version 2002 (1.62)

Copyright 1993,199 4, 1995,199 6,
Nikos drakos,
Computer Based Learning Unit, University of Leeds.

Copyright 1997,199 8, 1999,
Ross Moore,
Mathematics Department, Macquarie University, sysydney.

The command line arguments were:
Latex2html -Local_icons-address gohigh@sh163.net-split 1 Linux. Tex

The translation was initiated by root on



Gohigh@sh163.net

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.