初识Linux
自从开始学习嵌入式和接触Linux,我开始慢慢的了解编程的魅力。严谨的逻辑,神奇的语法,以及强大的解决问题的能力,让我了解到了Linux和嵌入式的美丽。虽然最近的学习一直都比较痛苦,毕竟大学前三年的学习没有那么上心,也没有真的学到那种可以给企业带去利益,给社会带去价值,给人们的生活带去一丁点的帮助。
尽管之前就已经了解到了一些常见的操作系统,比如Unix ,Windows,Linux,iOS ,Android,塞班等,但是真的认真的去了解,真的去追究他的历史,他的发展,这是从来没有过的。
要想说Linux,我们就不得不说Unix。首先我们追溯到1969年,著名的c语言之父——丹尼斯 李奇 开始在一部PDP-7上进行的一些工作,后来这个系统变成了Unix系统。但是这款并不强大,强大的是在1969年AT&T的贝尔实验室中开发的由KenThompson、DennisRitchie和DouglasMcIlroy,这是一款一个强大的多用户、多任务操作系统,支持多种处理器架构。当然,他并不免费,开发者从中得到了很多的利益。
1991 年的十月,当初网际网路还不像现在这么普遍,上网的人大部分都隶属于一些研究机构,或者是大学里面的学生、教授,1991年10月5日, 上午11时53分,有一个名为 Linus Torvalds 的年轻芬兰大学生在 comp.os.minix 这个新闻群组上发表了这样一个帖子,它标志着linux的诞生了:[2]
Do you pine for the nice days of minix-1.1, when men were men and wrote
their own device drivers? Are you without a nice project and just dying
to cut your teeth on a OS you can try to modify for your needs? Are you
finding it frustrating when everything works on minix? No more all-
nighters to get a nifty program working? Then this post might be just
for you :-)
As I mentioned a month(?) ago, I'm working on a free version of a
minix-lookalike for AT-386 computers. It has finally reached the stage
where it's even usable (though may not be depending on what you want),
and I am willing to put out the sources for wider distribution. It is
just version 0.02 (+1 (very small) patch already), but I've successfully
run bash/gcc/gnu-make/gnu-sed/compress etc under it.
Sources for this pet project of mine can be found at [3] in the directory /pub/OS/Linux. The directory also
contains some README-file and a couple of binaries to work under linux
(bash, update and gcc, what more can you ask for :-). Full kernel
source is provided, as no minix code has been used. Library sources are
only partially free, so that cannot be distributed currently. The
system is able to compile "as-is" and has been known to work. Heh.
Sources to the binaries (bash and gcc) can be found at the same place in
/pub/gnu.
ALERT! WARNING! NOTE! These sources still need minix-386 to be compiled
(and gcc-1.40, possibly 1.37.1, haven't tested), and you need minix to
set it up if you want to run it, so it is not yet a standalone system
for those of you without minix. I'm working on it. You also need to be
something of a hacker to set it up (?), so for those hoping for an
alternative to minix-386, please ignore me. It is currently meant for
hackers interested in operating systems and 386's with access to minix.
The system needs an AT-compatible harddisk (IDE is fine) and EGA/VGA. If
you are still interested, please ftp the README/RELNOTES, and/or mail me
for additional info.
I can (well, almost) hear you asking yourselves "why?". Hurd will be
out in a year (or two, or next month, who knows), and I've already got
minix. This is a program for hackers by a hacker. I've enjouyed doing
it, and somebody might enjoy looking at it and even modifying it for
their own needs. It is still small enough to understand, use and
modify, and I'm looking forward to any comments you might have.
I'm also interested in hearing from anybody who has written any of the
utilities/library functions for minix. If your efforts are freely
distributable (under copyright or even public domain), I'd like to hear
from you, so I can add them to the system. I'm using Earl Chews estdio
right now (thanks for a nice and working system Earl), and similar works
will be very wellcome. Your (C)'s will of course be left intact. Drop me
a line if you are willing to let me use your code.
Linus
PS. to PHIL NELSON! I'm unable to get through to you, and keep getting
"forward error - strawberry unknown domain" or something.
这个 Linus 的兴趣(hobby)就是 Linux 核心程式 0.02 版的原始码,当初还是个大学生的 Linus 大概完全没想到当初被他视为个人兴趣的程式,在几年以後会有超过千万个使用者,由他自己带头开发的作业系统现在已经在世界各地受到普遍的欢迎,还被视为是软体业巨人微软公司大力促销的 NT 系统最大的竞争对手。这或许就是兴趣的力量吧。就像爱因斯坦说的一样——兴趣是最好的老师,他远远高于责任感。虽然我现在的学习还是基于责任感,但是我还是会慢慢的积累我的兴趣,让我在其中收获快乐,当然也要收获一份好的工作。
说到Linux必须要说的就是,Linux是开放的,开源的系统。其中比较重要的就是一个标准,一个协议和一个计划。
1,POSIX(标准可移植操作系统接口),让Linux和其他其他的操作系统,比如Unix这种当时的行业霸主之间实现了可移植性,这也促进了Linux的发展和广泛使用。
2,GPL协议,是General Public License的缩写,也就是GNU通用公共许可证,我们的GNU通用公共许可证决意保证你有发布自由软件的自由(如果你愿意,你可以对此项服务收取一定的费用);保证你能收到源程序或者在你需要时能得到它;保证你能修改软件或将它的一部分用于新的自由软件;而且还保证你知道你能做这些事情。
为了保护你的权利,我们需要作出规定:禁止任何人不承认你的权利,或者要求你放弃这些权利。如果你修改了自由软件或者发布了软件的副本,这些规定就转化为你的责任。
例如,如果你发布这样一个程序的副本,不管是收费的还是免费的,你必须将你具有的一切权利给予你的接受者;你必须保证他们能收到或得到源程序;并且将这些条款给他们看,使他们知道他们有这样的权利。
我们采取两项措施来保护你的权利。
(1)给软件以版权保护。
(2)给你提供许可证。它给你复制,发布和修改这些软件的法律许可。
3,GNU计划,GNU是“GNU is Not Unix”的递归缩写。Stallman宣布GNU应当发音为Guh-NOO以避免与new这个单词混淆(注:Gnu在英文中原意为非洲牛羚,发音与new相同)。UNIX是一种广泛使用的商业操作系统的名称。由于GNU将要实现UNIX系统的接口标准,因此GNU计划可以分别开发不同的操作系统部件。GNU计划采用了部分当时已经可自由使用的软件,例如TeX排版系统和X Window视窗系统等。不过GNU计划也开发了大批其他的自由软件。这让Linux在Unix之后发展,并且区别于Unix,让Linux和Unix有所区别。
几天下来的学习,让我了解到了系统之后的故事和发展,也让我了解到了Linux之父让Linux开源的伟大之处。比起人类的进步,可能那些金钱就微不足道了。
此致
伟大的Linus Torvalds