Cygwin Complete Installation Steps method (PHOTOS)

Source: Internet
Author: User
Tags virtual environment

Installing GCC
The quickest way to install GCC is to install a complete Cygwin environment on your machine. Cygwin is a Linux-like environment on Windows. It includes a DLL that provides a basic subset of UNIX functionality and a set of tools on top of that. After installing the Cygwin, you can usually ignore it, even if you are a fan of the command line, you can still find you live more comfortable.
Make sure you have a fairly fast Internet connection. The GCC compiler and related utilities are about 50 megabytes (MB). Also verify that your connection requires a proxy server. This can be determined through your Internet browser options: Tools-> Internet Options-> Connection-> Local area network (LAN) settings.
Be sure to install the program under your administrator account and select Install for all users.
Point your Internet browser to
Www.cygwin.com
。 In the middle of the screen is a "C" logo with a black and green color, titled "Install or Update now." Click on the link, which will download a small program setup.exe (250KB). This installer will boot the installation or update process of the CYGWIN environment on your machine.
Running the Setup program
Download the setup.exe to a known place, such as the desktop, and then run it.
It opens the Setup Wizard, as shown in the following illustration:
Figure 1. Installation Wizard for Cygwin environment


Click the Next button.
Select Download location
On this page, select "Install from the Internet".
Figure 2. Select installation Type


Click the Next button.
Select an installation directory
On this page, select the directory where the execution Cygwin resides.
Set the remaining options shown in Figure 3.
Figure 3. Select an installation directory


Click the Next button.
Select a temporary installation directory
On this page (Figure 4), select a temporary directory for the installation package. When the Cygwin installation is complete, you can delete the directory and its contents.
Note that the installer remembers this directory and downloads only the newer version of the package in this directory when it is updated. If you delete this directory and reinstall it, Setup will reinstall all of the content you selected, regardless of whether the package installer already exists in the running directory.
Figure 4. Select a temporary installation directory


Click the Next button.
To specify your Internet connection
On this page (Figure 5), specify an Internet connection. If you have a proxy server, select Use IE5 settings, or get the server name from your browser option, select Use a proxy, and then enter the proxy server hostname and port number.
Figure 5. Select connection Type


Click the Next button.
Select Download site
On this page (Figure 6), select a download site. Because these sites are an obligation mirror, it is risky to choose a download point (usually they are available but sometimes unavailable). Usually, try the site closer to you.
Figure 6. Select a download site


Click the Next button.
Select Package for installation
On this page, you will select the package to install. By default, the Cygwin base package will not install GCC, so you must modify the default settings.
Move the mouse over the plus sign (+) on the devel edge and click it to expand the Devel class.
Figure 7. Select Package for installation

When you are not sure what you need, it is best to download it all, click All the default for install. That is, it is fully installed. Guarantees the use of the GCC editor.

You will see that there are many entrances under Devel, of which only three are required, in the following order: Binutilsgccgcc-mingw
Not all default base packages need to run GCC, but they are not too large, so they are installed for simplicity.
Note that it is easy to select the wrong package or version, especially when reinstalling, because the loop button in the Selection window is not standard. In this step we propose to be more careful, especially with multiple versions of GCC.
To select the three packages, click each double-headed arrow in column new until the version number of each package is displayed. According to the appropriate version of the installed and mirrored on your machine, the included ports circulate between the icons:


If more than one version is available, select the one with the largest number. To download the binaries, make sure the check box for the Bin column is selected.
Figure 9. Download binary files


Download complete
After you select three packages, Cygwin accesses the selected mirror host and downloads the three packages and the default base package. Depending on your connection speed this will last a few minutes, and during installation, many pop-ups will open and close.
Because a mirrored site that hosts Cygwin installations is mandatory, sometimes unavailable or overloaded. If you find that the selected mirror is not responding, press Cancel (cancel), which terminates the entire Setup program.
The only way to do that is to restart the installation and select another mirror; this is very frustrating. Fortunately, the installer remembers most of what you did last time, so you usually take the default. You must be careful when choosing the correct package, as you will not be selected for this in a later installation.
The Setup program then asks if you want to create a Cygwin shortcut key on your desktop or Start menu. The accelerator launches the Cygwin shell (called bash), which is not necessary for our planned DB2 use, but is useful for testing our installation. So that Setup creates at least one desktop shortcut key. We will use it later in the installation.
Finally, click the Finish button. We will be in
Behind
Test the installation results.
Figure 10. Complete the installation

Introduction:
Learning Linux, the need to convert the system is the most headaches, because Windows and Linux have their own advantages, each has a purpose, so can only trouble in between the switch, repeated restart. When the boot is also troublesome, because most beginners use Windows, installed Linux, the boot will automatically start Linux (of course, you can set up or after the installation process to modify the corresponding file to decide when to boot the first system), want to enter windows to sit beside the computer Deng. Cygwin just solved the problem.

Introduced:
1. Cygwin is a UNIX simulation environment running on the Windows platform that is portable for learning unix/linux operating environments, or for Applications from UNIX to Windows, or for some special development work, It is especially useful to use the GNU toolset for Embedded system development on Windows.

Characteristics:
1. Cygwin only simulates a UNIX environment to help beginners learn, and can now develop programs under Windows. But the command he supports does not have a new version of Linux, it is a not very complete UNIX system.
2. Virtual machine software such as Vmware,qemu, VMware, for example, is the first installation of VMware virtual machines in Windows, and then on the VMware virtual machine with a Linux CD or ISO image installed complete Linux system, VMware is a virtual CPU. Compared with the virtual machine, Cygwin itself is a part of Linux in the Windows environment, the use of relatively few resources, while the function and "real sense" is also smaller, and some imperfections.
Download and install:
1. Explanation: The installation of software is a very simple thing, but the first contact with Cygwin. Often many people toss for days to finish. The main reason is: We used to install a software in Windows, usually just download a Setup.exe installation package on the Internet, and then can be in the absence of network, double-click Setup.exe, can be installed at any time. Cygwin is also to download a setup.exe, but this setup.exe is not the installation package, but only to download and customize the installation package, download customization is completed, is the real installation (you do not need the network), will be understood later.
2. Download installation: Login: http://www.cygwin.com, click "Install Cygwin Now" Download the installation Wizard file Setup.exe, this is Cygwin's Official Download Installation Wizard file, and only through it can download the latest Cygwin version correctly. Double-click "Setup.exe" and the following interface appears (figure)


Click "Next" to show three options, three ways to install:
(1) Install from Internet: Download directly from the Internet and install immediately (after the installation completes, the downloaded installation files are not deleted, but are still reserved for next installation).
(2) Download without installing: Just download the installation package to the local, but not install.
(3) Install from local directory: Do not download the installation files, install directly from a directory containing the installation files (to ensure that your computer has already downloaded the installation package on the Internet setup.exe).
For the first time, the option (3) will not be selected. Option (1) The most time-consuming, if the speed of 20kb/s, more than a day to do a good job, but the most convenient, the first time I do not know how to do, I choose the safest way: options (1), a process to fix. In fact, the option (2) also has a long time. So anyway you can keep surfing the internet for a whole day, but don't sit in front of the computer Deng, do something else. When the selection is complete, click Next. root directory (root installation, that is, to determine where to install the Cygwin, to ensure that at least 5G of free space), click on the right "Browse ... ”
Choose where you want to put the Cygwin, I installed in the F plate. Other defaults on the line.

When you are sure, click Next. The following interface appears, determining where to place the installation package (that is, the installation package downloaded with Setup.exe to actually install the Cygwin simulation environment) for later use for direct installation of the Cygwin simulation environment. Confirm the same way as above, I put it in the F disk set up a folder Cygwinset.

When you are sure to click Next, the following interface appears. There are three ways to connect,
(1) Direct Connection: Directly connected.
(2) Use IE5 settings: Connect using IE's connection parameter setting.
(3) Use HTTP/FTP Proxy: Connect using an HTTP or FTP proxy server (you need to enter the server address and port number).

Direct Default selection: Option (1) On the line, click "Next", wait a moment to appear the following interface: (figure)

The interface lists more than one download site, I am the default option, (Must remember the site you choose), may download speed is different, direct "next".

The Setup Wizard is getting the compressed installation list file from the download mirror site, and the following interface, the installation list file interface, appears for a moment.


You can see that "all" has a "default" character, that is, for the defaults installation, click "Default" to turn to "install", "reinstall"; Reinstall "First," Default "defaults" many such as VIVI,GCC will not be installed, click "All" after "default" to become "install", all installed can be. The following interface appears:
Click Next to have a good wait, I spent a day or so.
After installation, the last interface prompts whether to create a desktop shortcut, directly hit "\/", and then "OK" is completely completed. My f disk in the Cygwinset folder to see the name "Ftp%3a%2f%2fcygwin.dp.ua%2fpub%2fmirrors%2fcygwin" installation package, you may be "http%3a%2f% ... "It doesn't matter, save it for later installation."

Double-click the desktop icon to enter the Cygwin virtual environment.

If download installation is not smooth, such as "Down Incomplete,try again?" Prompt. Or at a certain progress card, you can click "Cancel", and then click Setup.exe Repeat the above action, but there are two key actions: First, choose to download the site to choose the same URL, the following interface (this is the above recommended to remember the reason for the Web site.)
Second key action: choose "Reinstall" instead of "install" When installing, so click "Next" to continue downloading the installation from the original schedule. Otherwise it will start from scratch.

Use:
Set the environment variable path before using the Cygwin virtual environment. The path variable is used by the Cygwin application as a list of paths to search for knowable files. If you want to be able to use the Cygwin toolset without running bash, the path should at least contain x:\cygwin\bin, where X:\cygwin is the Cygwin directory in your system. For example, mine is F:\cygwin. Then Path=f:\cygwin\bin. Set the method as follows:
1. Open the Windows System Properties dialog box and click "Advanced"-"environment variable" to open the environment variable Settings window.
2. Click on the User Environment variable window "New", is the top one. The following new user environment variable interface appears: Enter the following

Click OK, OK, now you can use, double-click the desktop icon to enter the Cygwin.
1. The first thing you want to do is look at the contents of Windows.
Input directive "mount"
$mount
All directories that can be viewed appear "

C disk  /cygdrive/c  on host
to view the C disk, enter the directive:
$CD  /CYGDRIVE/C
To view the contents of the C disk:
$ls
View the D, E, f disk, empathy Cygwin common instructions and Linux under the Basic agreement, please check yourself. But my Cygwin can view the file, unable to edit the file, vi, keyboard input is not normal. Can only be established under Windows. The C files that are built under Windows can be compiled and run under Cygwin.
Insert a small problem: When you view the files for Windows, some filenames have spaces between two words.
You can insert "\" in the middle when viewing. For example, to view the program  Files folder in C disk, first enter the C disk and then instruct the following:
$CD   program\  files
.
Cross-compilation Vivi,kernel:
1.      installation ARM-LINUX-GCC cross-compilation Environment:
(1)        First set up a folder under the X:\cygwin such as: Opt.
(2)       unzip the ARM-LINUX-GCC's compressed package into opt. Mine is
arm-linux-toolchains_cygwin.tgz 
$cd opt
$tar zxvf  arm-linux-toolchains_cygwin.tgz  The
Opt directory appears in the Friendlyarm directory, which is the cross-compilation tool source code.
Modify the PATH environment variable in the startup script/etc/profile file (available in Windows in text X:\cygwin\etc\profile
) to
path=/usr/local/bin:/usr/bin:/ Bin:/usr/x11r6/bin:/opt/friendlyarm/crosstool/arm-linux/gcc-2.95.3-glibc-2.2.3/bin: $PATH

The


can be viewed with the mouse click on the directory and feel more intuitive.
Enter command: "ARM-LINUX-GCC–V"   Confirm successful Installation
2. Compile Vivi:
because Vivi wants to use some of the header files of kernel, you need kernel source code, press Vivi and kernel under/friendlyarm
and then modify/friendly-arm/vivi/ Some variables in makefile set the
Linux_include_dir =/friendly-arm/kernel/include
cross_compile   = arm-linux-
arm_gcc_libs=/opt/friendlyarm/crosstool/arm-linux/gcc-2.95.3-glibc-2.2.3/lib/gcc-lib/arm-linux/2.95.3
It is said that in order to ensure the validity of compiling, it is best to compile the Vivi of all the "*.O" and "*.o.flag" deleted, but I did not find, there is no tube.


Enter the/friendlyarm/vivi directory, enter "Make Menuconfig" and start selecting the configuration. Be sure to choose Yes to save the configuration when you exit.
then enter "make" to start compiling formally, and it will be over in a moment. If you don't make an error, you have your own "Vivi" in the Friendlyarm/vivi.

3. Compile kernel:
Kernel source program in the above compiled Vivi has been solved in/friendly-arm/kernel. Because this package has been compiled in Linux, there are some intermediate and target codes and Cygwin that are incompatible. Must be processed first, otherwise it will not compile properly.

To enter the/friendly-arm/kernel directory, you can lose the "make Menuconfig" try. The result prompts an error. This is because the configuration script has been compiled in Linux, creating a lxdialog executable program under Linux in Scripts/lxdialog. It's a bad guy in the Cygwin, and it's not going to execute, it's also blocking the execution of executable programs. It has to be deleted. The directory is as follows:
/friendlyarm/kernel/scripts/lxdialog/lxdialog
By the way, all the. o files under the same file are also deleted, so do not delete the. C source file.

You should be able to complete the compilation by performing a "Make Zimage". If you receive the following prompt: Make: * * * No rule, "/friendly-arm/kernel/include/asm/arch/param.h", needed by '/friendly-arm/ Kernel/include/asm/param.h '. STOP.&NBSP
"make DEP"
and then ' make zimage '
Wait a minute, and you'll generate the zimage you compiled in the//friendlyarm/kernel/arch/arm/boot directory.
by the way: Sometimes Cygwin will appear incomplete phenomenon, such as "make DEP", it may appear, without the tube, as long as make DEP for a period of time, the screen does not move, LS can be used, directly enter the "makes Zimage" build the kernel.

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.