Embedded Linux Development Environment __linux

Source: Internet
Author: User
Tags configuration settings posix

A Installation of embedded Linux development environment

(i). Introduction to Linux operating systems

Linux is an operating system that is free to use and spread freely. Linux operating systems are designed and implemented by many programmers around the world. The purpose of Linux is to create rights that are not copyrighted by commercial software, and are free to use, reproduce, modify, and distribute by all. Linux is an increasingly mature operating system, because of its security, efficiency, free and so on, making Linux more and more people understand and use.

1. History of the Linux operating system

Linux founder Linus Toravlds

The Linux operating system is a clone system of the UNIX operating system. It was born in 1991 of October 5 (this is the first official outward release time). With the help of Internet networks and the efforts of computer enthusiasts around the world, it has become one of the most widely used UNIX-type operating systems in the world today, and the number of users is growing rapidly. The birth, development, and growth of the Linux operating system always relies on the following five key pillars: the UNIX operating system, the MINIX operating system, the GNU program, the POSIX standard, and the Internet network.

GPL: GPL is the abbreviation of GNU Public License, the first is a copyright agreement that the Free Software Foundation developed to promote the development of open source code.

POSIX Standard: This standard is based on existing UNIX practices and experience, describes the operating system of the call service interface, used to ensure that the application can be compiled at the source level on a variety of operating systems on the migration run.

GNU Program: (Linux is not Unix) the GNU program was founded in 1984. Designed to develop a complete operating system that is similar to Unix, and is free software: the GNU system.

2. Linux and Unix relationships

The biggest difference between Linux and Unix is that the former is the free software that develops the source code, and the latter is the traditional commercial software that protects the source code with intellectual property.

Linux: Open Source, free

UNIX: Closed source, charge

3. Features of Linux

(1). Open

Refers to the system's adherence to world standards, in particular to the Open Systems Interconnection (OSI) international standards. All the hardware and software developed in accordance with international standards are compatible and can be easily interconnected.

(2). Multi-user

Refers to the system resources can be used by different users, each user of their own resources (such as: files, devices) have specific permissions, do not affect each other. Both Linux and Unix have multiple user features.

(3). Multi-task

is one of the most important features of modern computers. It means that the computer executes multiple programs at the same time, and each program runs independently of each other.

(4). Good user interface

Linux provides users with two interfaces: the user interface and system calls. The traditional Linux user interface is a text-based command-line interface, the shell that can be used online and available offline on files. The system call provides the user with the interface to use when programming. Users can programmatically use system invoke commands provided by the system. Through this interface, the system provides low and efficient service for the user program. Linux also provides a graphical user interface for users. It uses the mouse, the menu, the window, the scroll bar and so on the facility, presents the user to be intuitive, easy to operate, the interactive strong friendly graphical interface.

(5). Equipment Independence

Device independence means that the operating system treats all external devices uniformly as files, and as long as they are installed, any user can manipulate and use them as if they were using a file without having to know their exact form.

(b). Introduction to Linux Distributions

1. What is a distribution. The composition of the distribution.

With Linux core as the center, integration with a variety of system management software or utility software to form a complete set of operating systems, such a combination is called the Linux distribution.

2. What distributions Linux has. Individual characteristics.

(1). PCLinuxOS

PCLinuxOS's philosophy is adhering to the "easy to use, safe and worry-free" concept, without installation can be directly run on the CD, integrated program Rich. However, livecd performance degradation due to the speed limit of data read on the disc.

(2). Redhat

Redhat Linux is the world's most widely used Linux operating system on the server, in the efficiency, scalability, reliability, security, integrated virtualization and so on have the characteristics of leading other Linux, known as the most Trustworthy data center platform system, its main application in the Server field.

(3). Suse

SuSE contains an installation and System Management tool YaST2. It enables disk partitioning, system installation, online updates, network and firewall configuration settings, user management, and more. It provides a convenient combination interface for the original complicated setup work. It is called the most beautiful Linux server in particular.

(4). Ubuntu

There are two main advantages of Ubuntu: a large and active development community, and a software library that is updated at any time. According to the domestic 2 years of actual operation experience, Ubuntu Server version of the operation is extremely stable, safe and reliable, perfect management tools can greatly reduce the maintenance costs, and the structure of lamp support is very, especially suitable for small and medium-sized enterprises.

(Linux distribution is much more, not to repeat here)

(c). Installation of Linux Systems

1. What is a virtual machine. The role of virtual machines.

Virtual Machine is a complete computer system that is run in a completely isolated environment through software simulation with full hardware function.

Function: (1). Demo environment, you can install a variety of demo environment, easy to do a variety of examples;

(2). To ensure the rapid operation of the host, reduce unnecessary garbage installation program, the occasional use of the program, or test the program on the virtual machine running;

(3). Avoid every reinstall, banks and other common tools, not often used, but also require confidentiality is better, separate under an environment to run;

(4). Test unfamiliar application, install and delete in the virtual machine casually;

(5). Experience different versions of the operating system, such as Linux, Mac, and so on.

2. Why do I need a virtual machine?

Since embedded products are based on the Linux kernel, we should have a basic development environment for convenience at the beginning of development, which is why the Linux OS is installed.

And why the virtual machine, because we are accustomed to living in the desktop operating system, and have to be sure that the Windows operating system provides a lot of users experience a very high application, so, in life, work, learning, need to use the Linux operating system to develop, You can install the virtual machines directly on Windows.

Another point is that the development process, between the nature of Cross-platform, many products are also running under Windows, so also need to cross compile.

3. What is System mirroring.

System mirroring is an exact copy of the drive. By default, system mirroring contains the drives required for the system to run. It also contains system and system settings, programs, and files. If your hard disk or computer does not work, you can use the system image to restore the contents of your computer. When you restore a computer from a system image, a full restore is made, and individual items cannot be selected for restoration, and all current programs, system settings, and files are replaced by the corresponding content in the system image.

4. Virtual Machine Installation Demo

(See the installation tutorial for details)

Two The use of embedded Linux development environment

(i). Linux command

(See the Linux Command Encyclopedia for details)

(b). Installation of vmtools and creation of shared files

(See the Vmtools Installation tutorial for details)

(c). Use of vim (see Linux Command encyclopedia for details)

1. What are the text editors?

Vim Editor, EMACS (Macro editor), notepad++, TextMate, Sublimetext

2. Vim's three modes of switching mode

Command mode (bottom line mode),

Insert mode (insertion mode),

Visual mode (command line mode)

Switch:

Command-line mode--> insert mode: Press I

Insert mode--> command line mode: Press ESC

Command line mode--> bottom line mode: press:

3. Use of the command line command of VIM

For more information, see Linux Command Encyclopedia.

4. Vim Configuration Modification

can modify/ETC/VIM/VIMRC

Set number shows line numbers

Set autoindent Auto Align

Set Smartindent Smart Alignment

Set Showmatch bracket matching pattern

Set ruler display status line

Set tabstop=4 Tab key to 4 spaces

Set shiftwidth=4 alternating rows using 4 spaces

Set softtabstop=4 setting (Soft) tab Width 4

Set cindent C language format alignment

Set Nobackup do not back up files

Set clipboard+=unnamed with Windows sharing clipboard

5. The use of Vim's bottom line mode

(See the Linux Command Encyclopedia for details)

                     

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.