In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail about the 4412 development board to build Uboot, Kernel and Android4.0 compilation environment method is, the content of the article is of high quality, so the editor to share to you to do a reference, I hope you read this article after you have a certain understanding of the relevant knowledge.
Fast is based on the Ubuntu12.04.2 platform for development, all the configuration and compilation scripts are also based on this platform, has not been tested on other platforms. If you are familiar with Linux and Android development, I believe you will gradually find the cause and solve the problem according to the error prompt, which is generally caused by the lack of some library files or tools on the selected platform; it is recommended that beginners use the same platform.
The compilation environments of Uboot, Kernel, and Android seem complex, but you only need to grasp the following four main points.
(1) installation of Uboot and Kernel compilers. The compiler is provided on the CD, and the location of the compiler on the CD will be stated in the steps that need to be used.
(2) set the environment variable. When the environment variables of the Uboot, Kernel, QtE, and Qtopia compilers are set, the system can find the compiler at the time of compilation.
(3) Compiler of Android file system. The compiler needs to use the gcc compiler that comes with the Ubuntu system, but the version is wrong, so you need to lower the version. Xunwei wrote this process into several simple commands, and the user only needs to execute the commands one by one.
(4) Library files. During the construction process, the library files will be installed by executing simple script commands, and the complex steps will become simple and effective.
In addition, if you want to know exactly how the compilation environment is built, you can use the provided script files and commands to learn.
1. Use the built compilation environment
There are two ways to build a compilation environment, one is that the user installs the virtual machine, and then installs the basic Ubuntu12.04.2 system, using Xunwei to provide tools and detailed steps to build the compilation environment; the other is that the user installs the virtual machine and then loads the "built Ubuntu image" directly, and the user only needs to modify the environment variables of the compiler to compile the source code directly.
The following is a detailed explanation of how to build a compilation environment.
It should be noted that all kinds of software used in the construction process need to be consistent with the version mentioned in the manual. If you are using a "built image", you can skip this section, but set the environment variables specifically during compilation.
two。 Install basic softwar
The Ubuntu system needs some basic software to facilitate subsequent use.
(1) install virtual machine "Vmware_Workstaion_wm"
(2) then use the virtual machine to install the Ubuntu12.04.2 initial system.
(3) enter the Ubuntu terminal after installation and activate the root user
(4) then log in to the root user
(5) Virtual machines set up networking, CPU, memory, USB, etc.
(6) modify the Ubuntu data source address to the domestic 163server address
(7) use "apt-get update command" to update the data source
(8) install the software vim,apt-get install vim in Ubuntu
(9) install software ssh,apt-get install ssh in Ubuntu.
3. Cross compilation tool
Cross-compilation tools are required for compilation. This section describes how to install arm-2009q3, the compilation tool for compiling Uboot and Kernel.
The cross-compilation tool provided is the compressed package "arm-2009q3.tar.bz2" in the folder of the user CD-ROM "02 _ compiler" and the burning tool "→" arm cross-compiler.
Use the SSH tool to copy the cross-compilation tool to the folder "usr"-- > "local"-- > "arm" on the Ubuntu12.04.2 system. There is no arm folder under local by default, so you can create a new one.
Use the command "cd / usr/local/arm/" to enter the / usr/local/arm folder, and then use the extract command "tar-vxf arm-2009q3.tar.bz2" to extract the package.
Then modify the cross-compilation tool path, and you need to modify the environment variables. On the Ubuntu command line, execute the commands "cd / root" and "vim .bashrc", and open the environment variable file ".bashrc".
As shown in the following figure, add the following information to the last line of the ".bashrc" file:
"export PATH=$PATH:/usr/local/arm/arm-2009q3/bin"
Save and exit after the modification is completed. Execute the command to update the environment variable "source. Bashrc".
Finally, enter the command "arm" on the Ubuntu command line, and then press the TAB key. If you can see the information about the arm compiler on the command line, it indicates that the cross-compilation tool has been installed successfully. This is shown in the following figure.
4. Install library files, JDK, and lower GCC versions
For the convenience of users, we make the library files and JDK installation commands into script files, users only need to execute two scripts to install the library files and JDK. These two scripts are found in the compressed package "Android_JDK.tar.bz2" under the user CD-ROM "02 _ compiler" and the burning tool "→" tools folder.
The user copies the compressed package to the Ubuntu system, and the unzipped package generates a folder "Android_JDK". Using the cd command, enter the unzipped "Android_JDK"-- > "jdk6" folder. As shown in the following figure, use the command ". / install-sun-java6.sh" to run the script file "install-sun-java6.sh". It should be noted that this command may take more than 15 minutes to complete. When executing the script, enter the corresponding selection command according to the prompt.
After the previous script has been run, as shown in the following figure, enter the extracted folder "Android_JDK", execute the command ". / install-devel-packages.sh" to run the script "install-devel-packages.sh", and install the library files. It should be noted that this command may take more than 40 minutes. When the above script is executed, you need to enter the select command according to the prompt.
When the above script is finished, pay attention to whether there are some library files that are not installed. If you find that the library files are not installed, it may be that the network is not good or the download source is missing. At this point, use the command "apt-get update" to update the download source, and then execute the above two scripts.
For example, after running ". / install-devel-packages.sh" again, as shown in the following figure, if there is no prompt for 'libraries and software that cannot be installed', it indicates that the installation is complete.
Finally, the method of reducing the GCC version of Android compiler is introduced.
When you use Ubuntu to compile Android, you need to use the GCC4.4.7 compiler that comes with the Ubuntu system, but the version of Ubuntu12.04.2 installed is too high for GCC, so you need to reduce the GCC compiler to 4.4.7.
Go to the previously extracted folder "Android_JDK" and find the text "update_gcc.txt". After opening the text "update_gcc.txt", you will see that there are 8 commands inside, which need to be executed on the Ubuntu command line in turn.
Use the command to open the "update_gcc.txt" file, as shown in the following figure.
After executing these eight commands in turn, the Ubuntu system reduced the version of gcc to 4.4.7. Using the command "gcc-v", you can see that the version of gcc is 4.4.7.
In the execution of these eight commands, only the first command will take about 10 minutes, and the rest will be completed quickly. It should be noted that the commands must be executed in turn and there can be no omissions.
On the 4412 development board to build Uboot, Kernel and Android4.0 compilation environment method is shared here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.