Friday, 2 July 2010

Linux Amiga Project - Basics

I would like to pause before hitting the command line to go over some of the core concepts in building a Linux System so that I have these clear in my mind before I start downloading and compiling stuff.

Guides for users new to Gnu seems to break down into two classes. First, the “this is a mouse, it makes the arrow on the screen move” type of advice for simpletons. Second the IT Ph.D. level with intricate lists of options and parameters, and detailed explanations of what things are, but not what they are for. There does not seem to be a happy middle ground of advice for people comfortable and experienced with computers, but without graduate degrees in IT. Me, in other words.

If I was building a kit-car, I would already know what an engine is, what wheels are for, and roughly where all the bits go. I would then read the instructions on how to actually assemble the car. Linux From Scratch is the instructions, but it would be a good idea to set out some of the background knowledge now. It should make the rest of the process less painful. Marginally less painful.

Linux is the kernel. OK, simple to say, but lets break that down. At the center of a PC running Linux, any kind of Linux, there is one program always running. That program is called the kernel. It knows about and controls all the hardware in the PC. It manages all the other programs. It is both the boss of the company in the plush top floor office and the janitor who knows where all the pipes and cables are, at the same time. It is important. Oddly, given its importance, the Kernel comes very late in the installation of Linux From Scratch.

This program is also the one that the then student Linus Torvalds wrote at university in the early 1990's. I guess the type of program that he wrote was a bit like Unix and Minix, so he decided to name it in a similar way, but also like himself – hence Linux. I don't really know though, and it's not important. It is now worked on by lots of people, and is regularly updated to include new hardware or ideas that come along.

There are lots of other programs that have to run on a computer so that you can actually do anything with it. For instance, even if you just want a flashing command prompt cursor, that's a separate program. That's not the kernel generating that flashing cursor. In the case of Linux From Scratch that program is called Bash. You also get utilities to run from that flashing cursor. These let you move around the file system, and change the files in it. Most of these extras, as it were, were not written by Mr Torvalds. A lot of them come from the Gnu organisation. This is why some people with more beard than face insist on calling the operating system we are about to try to install “Gnu/Linux”. It is safe to ignore these people After all, these are the people who came up with the hilarious 'Gnu' name, which stands for Gnu's Not Unix. Oh, my. The long winter evenings must simply fly by at their house.

Because the Amiga Emulator we are going to be installing is a graphical program, and because we are not masochists, we need to interact with the PC through a graphical interface, rather than a text interface. So we will need to run a program called X, which basically changes the screen from text to graphics. We can then run more programs which draw windows, menu bars, and so forth, on that graphical screen. Finally we can then run actual applications such as Firefox, OpenOffice, and media players, or in this case, an Amiga Emulator.

One last point; the kernel doesn't know anything about the languages that the programs we are going to run are written in. So to be able to run anything, you need to install information about the programming languages we are going to use. Most programs we are going to use are written in C (although there are also Perl and Python). The information needed for C programs is contained in the Glibc package. You also need to be able to compile programs from their source code to a state where they can be run by the kernel. The Gcc package does this. These two packages take up quite a large chunk of the time required to install Linux From Scratch.

No comments:

Post a Comment