cygwin is a linux running on windows platform simulation environment, the working mechanism will not go into here, I do not care about this issue.
1.cygwin the download and installation
(1) Download and click setup.exe to install, install mode "Install from Internet", "Download form Internet", "Install from Local Directory" of three. "Install from Internet" is a direct upload from the internet for faster speeds the situation. If the speeds are not fast, or want to download after install over the installation files are saved, the next is no longer downloaded directly install, you should select "Download from Internet", download and install the files (about 40M or so). If you choose the "Download from Internet", then download the finished install when re-open the cygwin setup.exe, select "Install from Local Directory" to install.
(2) The next objective is to select installation path and the path where the installation source files, and then entered the path where the installation package selection. Note that the A, but main event here. When I first installed is not see this step, the results did not go in gcc installed, causing compile the file can not.
+ All Default
+ Admin Default
+ Devel Default
+ Editors Default
As shown above, you are one of the nodes in the TreeView on the click, you can change its state, a Default, Install, Uninstall, Reinstall the four states. The default is Default state, that state is not installed. All of this should be here later in the Default line click on its status changes to Install, which is the total installation.
Choose Download Site, select the Available Download Sites http://www.cygwin.cn or other mirrors, do not select the first 2 Site, slow speed of the machine. You can also add a User URL in http://www.cygwin.cn/pub/.
the use of cygwin (1) Double-click the Cygwin icon on the desktop, you can start Cygwin in the Bash.
(2) C: / Cygwin / bin added to the% PATH% of them, which can be used directly in cmd.exe Linux command.
3.android open cygwin input source code download
$ Mkdir / home / android / / create a working directory (the directory storing the source code, and the repo command stored in the directory)
$ Cd / home / android
$ Mkdir bin
/ / Download and install the repo tool: repo is written in python Android source code used to obtain the command line tool
$ Curl http://android.git.kernel.org/repo> / home / android / bin / repo / / the repo file in the bin directory
$ Cd bin
$ Chmod a + x repo / / modify the repo file for the executable file ready to download Android:
$ Cd / home / android
$ Python. / Bin / repo init-u git: / / android.git.kernel.org / platform / manifest.git-bcupcake
$ Your Name [xxxxxx \ Administrator]:
$ Your Email [Administrator @ xxxxx. <none>]:
User name and email address can be customized, in fact, skip this step there is no problem.
/ / Download Source:
$ Python. / Bin / repo sync
The only difference, and linux is embedded in the environment does not seem to support python, so need to call the repo command line python script.
Git and Repo literacy: how to get Android source code
Git to manage Linux kernel developed a distributed version control software, which is different from Subversion, CVS this centralized version control system. In the centralized version control system, only one warehouse (repository), many working directory (working copy), and such like Git distributed version control system, each working directory contains a complete warehouse, they can support offline work submitted can be submitted to the local server. Theory of distributed systems than centralized in a single server system more robust, single-server systems, once the overall issue of server system can not of the operation, distributed systems are usually Bukuaiyinwei 12 nodes and Shoudao affected.
Because Android is a kernel, Dalvik, Bionic, prebuilt, build, and other components of Git, so Android project has prepared a Python script called Repo for unified management of these items to the warehouse, making more easy to use Git.
1, Git installed in Ubuntu 8.04 install git simply set the correct update source, and then use apt-get on it, what dependency problems, let it solve it. CURL which is a URL syntax used to work at the command line file transfer tool, will be used later when the installation of Repo.
sudo apt-get install git-core curl
2, the installation Repo
First of all, to ensure that the current user's home directory, create a / bin directory, then it (~ / bin) added to the PATH environment variable then the script through cURL to download the repo, save to ~ / bin / file
curl http://android.git.kernel.org/repo> ~ / bin / repo
Do not forget to repo executable permissions: chmod a + x ~ / bin / repo
3, initialization version of the library (1) If it wants to make Android the latest version of the current main line all the sourcecode win, we need to repo help. First create a directory, such as ~ / android, into the future can use the repo init command.
repo init-u git: / / android.git.kernel.org / platform / manifest.git
This process will continue for a long time (at least a good sleep), specific to how much time depends on network conditions, the final will see the repo initialized in / android these tips, it shows the local repository is initialized completed, and includes the current latest sourcecode.
(2) If want to take a branch rather than the main line of code, we need to develop branch-b parameter name, such as:
repo init-u git: / / android.git.kernel.org / platform / manifest.git-b cupcake
(3) In other cases, we only need to code a certain project, such as kernel / common, you do not need a repo, Git can be used directly.
git clone git: / / android.git.kernel.org / kernel / common.git
This also requires a lot of time because it will copy the code in the Linux Kernel's down.
If you need a branch of the code, you can use git checkout. For instance, we just took a kernel / common.get code, it first entered the common directory, then use the following command:
git checkout origin/android-goldfish-2.6.27-b goldfish
So we called in the local establishment of a goldfish's android-goldfish-2.6.27 branch, the code is already with the android-goldgish-2.6.27 sync. We can git branch to list all the branches of the local.
4, synchronous version of the library using the repo sync command, we do the Android code synchronized to a local tree, and similarly, we can use similar
repo sync project1 project2 ...
This command to synchronize a number of projects simultaneously, if Android is a single item, as long as the project directory to perform simple
Access to source code using GIT
Source code is all. Size is about 2.1G, build around after the 5G. Proposal is to compile some of their concerns.
Description of each package:
Installation instructions at: