Embedded 4412 Development Platform Android System development environment building and compiling

Source: Internet
Author: User

This paperIntroductionUboot,Linux3.0.15and thelinux-3.5Kernel,Android4.0.3and theAndroid4.2.2Build and compile the environment.

More information: http://topeetboard.com more about: https://arm-board.taobao.com

Uboot,Kernelas wellAndroidthe compilation environment looks complex, the user can only grasp the following points toTheFirst:Uboot,Kernelcompiler. The compiler is available on the CD, and in the steps that need to be used, it saysThe location of the compiler on the disc.Second: Set environment variables. Uboot,Kernelafter the compiler's environment variable is set, the system is onlycan find the compiler.Third:Androidthe compiler for the file system. The compiler needs to use theUbuntuthe system comes withGCCcompiler,But the version is not correct, so you need to lower the version. In order to write this process into a few simple commands, the user only need to execute the command in turn. IV: library file. The complex steps are simple and effective when you install the library files by executing simple script commands during the build process.

In addition, if the user wants to know how the compilation environment is built up, we can use the script files we provide to learn.

Android4.0.3two ways to build a compilation environmentSchindler provides users with two ways to build a compilation environment, one way to install a virtual machine, and then install the baseof the infrastructureUbuntu12.04.2system, using our tools and detailed use of the steps to build a compilation environment, another way is to install the virtual machine, and then directly load our "builtUbuntuMirror ", the user only needs to modify the compiler environment variables, it can be directly used to compile the source code.

1. Build Your own environmentInstall the virtual machine yourself, installUbuntu12.04.2system to build the environment. 2. How to set up the environment to build a compilation environmentIt is important to note that all types of software used in the construction process need to be consistent with the version mentioned in the manual, if you are using"Set up a good image", you can skip this section, but compile the time to target the environment variables.

3. Install the basic softwareInstall the virtual machine first“VMWARE_WORKSTAION_WM", and then use the virtual machine installation"Ubuntu12.04.2Initial System”。 UbuntuThe installation method can refer to3.2section to installUbuntu12.04.2The original system, as shown,UbuntuThe initial system installation is complete.

<ignore_js_op>

Enter Password“Topeet", LandingUbuntuon the keyboard, press thectrl+alt+t",PopupUbuntuthe controlConsole As shown in.

<ignore_js_op>

Enter after installation is completeUbuntuthe terminal, activatingRootuser, the specific operation is as follows.

in theUbuntucommand line, execute the command "sudo passwd root". then inUbuntuEnter the password and new password for the installation,Ubuntupasswords are hidden by default in the system. As shown in.

<ignore_js_op>



then loginRootuser, the specific operation is as follows. in theUbuntucommand line, execute the command "su Root". then enter the password, you can loginRootuser. all subsequent operations need to beRootThe user takes action as shown below.

<ignore_js_op>

Virtual Machinesvmware-workstation8.0.3NetworkingModify the data source address,will beUbuntuThe data source address is modified to a domestic address.

Update the data source.and then inUbuntuInstalling the SoftwareVimand theSSH, inUbuntucommand line, execute the command "Apt-get InstallVim"and"apt-get Install SSH". the above installedSshsoftware, can easily transfer files on the host and virtual machine, but also can be controlled by remote terminalUbuntusystem, recommended here for everyone to use.



Installing the Compile Component cross-compilation toolA cross-compilation tool is required for compilation, and the cross-compilation tool we provide is a user CD“02_compiler toand burn Writing tools→Armzipped package in the cross-compiler folderarm-2009q3.tar.bz2".

<ignore_js_op>

UseSshtool to copy the cross-compilation tool toUbuntu12.04.2System's Folder "usr" -"Local" -"Arm"in,LocalThe default is notArmfolder, you can create a new one. As shown in.

<ignore_js_op>

Copy the compiler as shown below.

<ignore_js_op>and then inUbuntuThe system extracts the compressed package into the current directory. using Commands“cd/usr/local/arm/"Enter/usr/local/armfolder, and then use the Unzip command "TAR-VXF arm-2009q3.tar.bz2the Unzip package,as shown in. <ignore_js_op> Modify the path of the cross-compilation tool (modify environment variables)to modify the cross-compilation tool path, you need to modify the environment variables. In theUbuntucommand line, execute the command "CD/root"and"vim. BASHRC", open the environment variable file". BASHRC"as shown in.



<ignore_js_op>and then in“. BASHRCThe last line in the file adds the following information:“export path= $PATH:/usr/local/arm/arm-2009q3/bin"As shown in.

<ignore_js_op>

Save exit after the modification is complete.Update the environment variables by executing the following command“source. BASHRC"command, as shown in.

<ignore_js_op>

Finally, inUbuntuCommand line, enter command "Arm", and then pressTABkey, if you can see it in the command lineto theArmThe compiler's information indicates that the cross-compilation tool was successfully installed. As shown in. <ignore_js_op>installation library files,Jdkand reduceGCCversionfor the convenience of users, the library files andJdkthe installation command is made into a script file, the user only executes two scriptsYou can install the library files andJdk. These two scripts are on the user CD "02_compiler and burn-write tool "→"Tools"Compressed package under Folder"Android_JDK.tar.bz2", as shown in. <ignore_js_op>

The user copies the compressed package toUbuntuin the system, the unzip package will generate a folder "ANDROID_JDK", such asis shown.

<ignore_js_op>

Installation library files andJdkUseCdcommand, into the extracted "ANDROID_JDK" -"Jdk6"folder, run the script file“install-sun-java6.sh". Note that this command may take time to complete15minutes or more. as shown, the execution“./install-sun-java6.sh"script. <ignore_js_op>

when executing the above command, follow the prompts to enterThe "enter" command. After the upgrade is complete, as shown.

<ignore_js_op>

go to the extracted folder“ANDROID_JDK"Run script in"install-devel-packages.sh", AnnInstall the library file. In theUbuntucommand line, execute the command "./install-devel-packages.sh", it is important to note thatYes, this command can be time-consuming40minutes or more, as shown in.

<ignore_js_op>when the above command executes, you need to follow the prompts to enter“Y".

<ignore_js_op>

then during the installation, you will also be prompted to enter“y"as shown in<ignore_js_op>

As shown, the installation is complete.

<ignore_js_op>

It is important to note that when the above script is finished, note that some library files are not prompted for installation. If you find that a library file is not installed, it is possible that the network is bad or the download source is missing. This time the user uses acommand to update download source under”apt-get Update, and then execute the two scripts above. For example, as shown, run again“./install-devel-packages.sh"After that, the prompt does not installLibraries and software, then the installation is complete. <ignore_js_op>reducedGccversionUseUbuntucompilingAndroidneeds to be used.Ubuntuthe system comes withGCC4.4.7compiler, butit's installed.Ubuntu12.04.2version, it'sGCCThe version is too high, so there is going to beGCCreduced version of compilationto the4.4.7. go to the folder that you extracted earlier“ANDROID_JDK", you'll see a text"Update_gcc.txt", opentext“Update_gcc.txt"Then you'll see inside there8command, which8command needs to beUbuntuin the command line, depending onexecution. As shown, use the command to open the“Update_gcc.txt"file. <ignore_js_op>as shown, there are8command. <ignore_js_op> For example, execute the first command. <ignore_js_op>follow the prompts to enter“y"as shown in. <ignore_js_op> the remaining few commands, as shown, execute quickly. <ignore_js_op>



in the execution of this8command,Ubuntuthe system willGCCversion is reduced to4.4.7. as shown, use the command“gcc-v", you can seeGCCthe version is4.4.7up. <ignore_js_op>

It is important to note that in performing this8command, only the first command is time consumingTenminutes or so, the rest of the MetropolisFinish soon, and the command must be executed in turn, without omission

Embedded 4412 Development Platform Android System development environment building and compiling

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.