In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the knowledge of "how to compile android4.0 code". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Based on Xunwei 4412 development board
6.3.1.1 repo download
Android code management is different from uboot,kernel, because Android code is relatively large, we put Android
The project is split by folder, and each subdirectory under the android source root directory is divided into a repository or
Version management is carried out in multiple repositories. The code download of Android needs to use the repo tool, and the repo tool is the seal of Git.
The bottom layer is downloaded using the Git command.
Suppose the repo tool to be downloaded is stored in the / media/data/gitHub directory:
# cd / media/data/GitHub/
# git clone git://aosp.tuna.tsinghua.edu.cn/android/git-repo.git/
After downloading the git-repo repository, you will see that there is a repo script file in this folder:
6.3.1.2 Android4.0 Code download
Suppose our Android4.0 code is stored in the / media/data/GitHub/iTop4412_ICS_git directory:
# cd / media/data/GitHub/iTop4412_ICS_git
#.. / git-repo/repo init-u https://github.com/TOPEET-Develop/android.git-b
Exynos4412_android4.0.3_master
Notice that in the previous command, the newline character "- b" is followed by a space.
Note: the-u parameter in the repo init command specifies the download address of the android warehouse, and the-b parameter specifies the download in the warehouse.
Branch.
What I download here is the exynos4412_android4.0.3_master branch, which needs to be typed during the execution of the command.
Related information, as shown in the following figure:
Your Name input root
Your Email: enter directly, and then enter y to continue:
#.. / git-repo/repo sync
Note: repo sync begins to download Android code. The download process has something to do with the network environment.
If there is no progress display for a long time during the loading process, you can stop the download by ctrl+c, and then execute the repo sync command to start over.
The following figure shows the progress during the download of the source code:
After the code download is complete, Android will be displayed under the / media/data/GitHub/ iTop4412_ICS_git directory.
System source code directory:
There will be one or more Git repositories under each folder directory. By default, these repositories have no branches. We need
Use the repo star command to create a branch, here we create a master branch, you can also use another name to define the branch
Name, the repo branch command can view the branches created:
#.. / git-repo/repo start master-- all
#.. / git-repo/repo branch
6.3.1.3 Android4.0 source code compilation
After the Android code has been downloaded, it can be compiled. Android source code compilation needs kernel support.
So we need to put the Android code and the kernel code in the same directory:
Note: iTOP4412_Kernel_3.0 in the above figure is the kernel code of Android and the directory of Android4.0 source code.
ITOP4412_ICS_git is at the same level, and you need to compile kernel code, kernel code, before compiling Android4.0.
Record and execute:
# cp config_for_android_XX_YY .config
# make zImage
# make modules
The XX in config_for_android_XX_YY refers to the core board type: scp,pop,pop2G, and the YY refers to the backplane.
Type: elite version of elite, or all-round version of supper.
Make modules will compile the driver library file * .ko, and Android4.0 will copy the driver library file to Android's
Directory structure, otherwise some features of Android cannot be used.
Execute the compile command for Android4.0:
# cd iTop4412_ICS_git
#. / build_android.sh
In addition, after the Android code is downloaded and compiled, we can periodically use the repo sync command to synchronize our Git repository.
Library to local, so that your local code will be updated synchronously with our repository, and the latest system mirror will be formed after compilation.
Like.
Our Android4.0 code distinguishes between the elite version and the all-around version. By default, the compiled image of the code we download can
To run on the elite board, to compile the omnipotent board version, you only need to modify one configuration:
File path: iTop4412_ICS_git/device/samsung/smdk4x12/BoardConfig.mk
Configuration item: BOARD_HAVE_MPU6050. This value is configured as false, which means that the compiled version is the elite board version, if
Set to true, the omnipotent board version is compiled.
Elite configuration:
Omnipotent configuration:
This is the end of "how to compile android4.0 Code". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.