
Linux z Linux has come a long way since its humble beginnings in 1991 z Today Linux supports a very wide range of Embedded Linux platforms, from Embedded Systems based on ARM, PowerPC, Intel, and Hitachi microprocessors to name a few, all the way up to workstations, servers, and clusters z It also served as a launch pad for the open source movement, and consequently lead to great interest from academia and business alike Babak Kia Adjunct Professor Boston University 2 College of Engineering Email: bkia -at- bu.edu ENG SC757 - Advanced Microprocessor Design What is Linux? Why Linux? z Linux is free open source operating system which z Due to its open source nature, Linux has a highly is fully featured, portable, and extremely versatile qualified code base z It runs on everything from PDAs to the largest z The Kernel can be very small, it could fit onto a single Mainframes 1.4MB floppy disk drive, while including all the fundamental operating system tasks! z Unlike traditional proprietary software, Linux is z It is highly portable, it is available for almost every developed by a multitude of developers across microprocessor system in existence today the world z It is highly supported, it draws on the open source z People often (and mistakenly) use the term Linux community across the globe for both development and to refer to one of three disparate concepts: support • A Linux Distribution z It supports a multi-user environment with a built in • A Linux System capability to concurrently execute applications belonging to 2 or more users • The Linux Kernel z Supports multi-processor systems z Our focus is primarily on the Linux Kernel, and therefore the term Linux refers to the Kernel itself z Well documented. The source code is available! 3 4 What is uClinux What is a Linux Distribution? z uClinux is not Linux, it is a variant of it which runs z A Linux distribution is a collection of software on processors which lack memory management components, including the Linux Kernel itself, as z Without memory management, there is no well as the GNU toolchain (compiler, linker, etc.), differentiation between user space and kernel and a number of free and open source software space, and therefore all applications run at such as Emacs, X11, FTP, etc. Privilege Level 0 z There are many companies involved in creating z Without memory management, all code runs in a distributions, such as RedHat, SUSE, and flat memory space, and therefore doesn’t require Mandriva, and there are many community projects a virtual memory subsystem dedicated to creating distributions (or distros) such as Debian and Gentoo Linux z Therefore in this configuration all processes have direct access to memory and I/O resources, and z There are over 300 active Linux distribution device drivers are not necessary projects in existence today 5 6 1 Linux Distribution The Linux Kernel z Without distros, a person interested in Linux z The most important element of Embedded Linux would have install everything manually which is its core, called the Linux Kernel basically required a great expertise of the Unix z The Linux Kernel is maintained and distributed by Operating System Linus Trovalds, who initially wrote the Kernel z Distros therefore making the process of installing when he was a student at the University of Linux easier, they usually provide both binaries Helsinki and source, and are segmented into packages, z Unlike proprietary Operating Systems, its source each package providing one component of the code is available for anyone to freely use, system such as font, web browser, etc. distribute, or modify z Some popular Package Management Systems are: z The latest released version of the Linux Kernel is • RPM – The RPM package manager version 2.4, though development of the Linux • deb – The Debian package Kernel is of course ongoing and newer versions • tgz, or tar.gz – Archived tar and gzipped file, used to become available on a regular basis distribute simple hand made packages 7 8 The Linux Kernel GNU z Like any Operating System, the Linux Kernel is z GNU is an acronym for GNU’s Not Unix, and is responsible for managing resources (memory and pronounced guh-noo I/O), contains device drivers, networking stack, file z The GNU project was started in 1983 with the goal system, and performs other OS tasks of creating a UNIX flavored operating system which was freely distributable z Linux implements different privilege levels, where a module, which is a Kernel function runs in z GNU is not Linux! GNU is used in conjunction with the Linux kernel to form a completely kernel space (supervisor mode), and user operational Operating System. This GNU/Linux applications run in user space (user mode) combination (distribution) is often mistakenly z Linux can mange both multiple processes and called Linux multiple processors (symmetric multiprocessing, z Some software developed by the GNU project are: or SMP systems). As such, all kernel code is Bash (command shell), Emacs (text editor), gzip reentrant (data compression), and GNOME (graphical desktop environment) 9 10 General Public License General Public License z The GNU General Public License, or GPL as it is z The GPL has been at the center of controversy recently, otherwise known is the free software license under opponents of GPL often call it viral, implying that the which Linux is written and distributed license acts as a virus in that once it comes in contact z The GPL grants the recipient of a computer program the with proprietary code, then the proprietary code following rights: becomes GPL • The freedom to run the program for any purpose z This is an incorrect assessment as GPL simply requires • The freedom to study how the program works and to all copies of derived work to be GPL licensed modify it z In another example, in 2003 the SCO group sued IBM • The freedom to redistribute copies of the program claiming that the latter had contributed portions of • The freedom to improve the program, and to redistribute SCO’s copyrighted code to the Linux Kernel and went the improvements to the public further by threatening legal action against a number of z The GPL is in contrast to the end-user licenses that companies and demanding licensing fees from them plague proprietary software, which rarely grant the end- z To date, there is no proof to SCO’s claims of the use of user any rights copyrighted code 11 12 2 Other Licensing Models The Copyleft z GPL is not the only licensing model available z The right to redistribute GPL-based code is granted only if the licensee includes the source code in the z Some licenses such as BSD permit distribution of redistribution (including all modifications!) a modified BSD-based code as proprietary software z The redistributed copies themselves are required to include and be licensed under GPL in a mechanism z The difference between GPL and BSD licenses is known as copyleft legal mechanism known as copyleft, invented by z Copyleft actually derives its legal impact from the fact Richard Stallman (initiator of GNU project and that the program is copyrighted! founder of Free Software Foundation) z Under a copyright, a licensee does not have the right to z Copyleft requires that derivative works of a GPL- modify or redistribute the code unless under the terms licensed application also be covered by the GLP outlined in copyleft license z Therefore copyleft uses copyright law to accomplish an almost opposite effect – granting modification and redistribution rights 13 14 The GNU Toolchain The GNU Toolchain z Linux relies on the GNU development z The GNU toolchain is an overall term given to the toolchain series of programming tools developed by the GNU project z A toolchain is series of programming z The projects include: tools (assembler, compiler, linker, etc.) • GNU make – Build and compilation automation which are used to create another • GNU Compiler Collection (GCC) – Compilers for computer program several programming languages • GNU Binutils – Linker, assembler, and other tools z The tools are used sequentially, or in a • GNU Debugger (GDB) – Interactive debugger chain, in such a way that the output of z Other related projects are: one program becomes the input of • GNU C Library – A standard C library another one, hence the term toolchain • CVS – Concurrent Version System 15 16 CVS CVS z The Concurrent Versions System z The way CVS works is as follows: implements a version control system to • Any number of clients (developers) can check- keep track of all the work and changes in out a full copy of a given project • One or more developers can work on the same a set of files copy of the code and then check-in their z This enables developers from across the modifications globe to collaborate on a project and as • The CVS server automatically attempts to merge the different changes such as become a popular component of • If it is unsuccessful, for example in the case the open-source development community where two developers are trying to modify the same line of code, it rejects the second developer from updating the code, and directs the two developers to merge the code manually 17 18 3 Developing a Linux System Starting up Linux z There are three basic setup mechanisms which z From system power up to the time the developers use to develop code for Linux system is up and running, there are three • The Permanent Link Setup is where the host and the distinct steps the must be completed target are permanently connected together via an Ethernet cable for example.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages7 Page
-
File Size-