build android N for RPI3
来源:互联网 发布:nba新秀数据榜 编辑:程序博客网 时间:2024/06/15 13:35
Download
Install repo
Make sure you have a bin/ directory in your home directory and that it is included in your path:
$ mkdir ~/bin$ PATH=~/bin:$PATH
Download the Repo tool and ensure that it is executable:
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo$ chmod a+x ~/bin/repo
Create an empty directory to hold your working files. Give it any name you like:
$ mkdir WORKING_DIRECTORY$ cd WORKING_DIRECTORY
Configure git with your real name and email address.
$ git config --global user.name "Your Name"$ git config --global user.email "you@example.com"
Download with local_manifests
Download Android source with patches(local_manifests)
$ repo init -u https://android.googlesource.com/platform/manifest -b android-n-preview-1 $ cd .repo $ git clone https://github.com/peyo-hd/local_manifests -b npv $ repo sync
*1 local_manifests allows you to customize the list of repositories used in your copy of the source code by overriding or supplementing the default manifest.
*2 the files will be saved in .repo while downloading, and moved to working directory after downloading.
Build
Build kernel
$ sudo apt-get install gcc-arm-linux-gnueabihf
if you found “depends error”, please try:
$ sudo apt-get purge libc6-dev-armel-armhf-cross
start to build
$ cd kernel/rpi$ ARCH=arm scripts/kconfig/merge_config.sh arch/arm/configs/bcm2709_defconfig android/configs/android-base.cfg android/configs/android-recommended.cfg$ ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make zImage$ ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make dtbs
build anroid
$ sudo apt-get install python-mako
avoid logcat flood
Apply following patch under frameworks/base, to avoid logcat flood by mouse event. frameworks/base/core/java/android/view/GestureDetector.java
@@ line 490 @@ public class GestureDetector {
public boolean onTouchEvent(MotionEvent ev) {
+ switch(ev.getAction() & MotionEvent.ACTION_MASK) {
+ case MotionEvent.ACTION_HOVER_MOVE:
+ case MotionEvent.ACTION_HOVER_ENTER:
+ case MotionEvent.ACTION_HOVER_EXIT:
+ case MotionEvent.ACTION_BUTTON_PRESS:
+ case MotionEvent.ACTION_BUTTON_RELEASE:
+ case MotionEvent.ACTION_SCROLL:
+ return false;
+ }
if (mInputEventConsistencyVerifier != null) {
Continue build with
http://source.android.com/source/building.html
http://source.android.com/source/initializing.html
$ source build/envsetup.sh$ lunch rpi3-eng$ make
* you can run with make -j4
* aobut out of memory
add following to ~/.jacksetting
JACK_VM_COMMAND=${JACK_VM_COMMAND:=”java -Xmx4096m”}
SERVER_NB_COMPILE=1
and run
export JACK_SERVER_VM_ARGUMENTS=”-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4096m”
out/host/linux-x86/bin/jack-admin kill-server
out/host/linux-x86/bin/jack-admin start-server
Prepare sd card
- Partitions of the card should be set-up like followings.
- p1 512MB for BOOT : Do fdisk : W95 FAT32(LBA) & Bootable, mkfs.vfat
- p2 512MB for /system : Do fdisk, new primary partition
- p3 512MB for /cache : Do fdisk, mkfs.ext4
- p4 remainings for /data : Do fdisk, mkfs.ex4
- Set volume label for each partition - system, cache, userdata
- use -L option of mkfs.ext4, e2label command, or -n option of mkfs.vfat
Write system partition
$ cd out/target/product/rpi3$ sudo dd if=system.img of=/dev/<p2> bs=1M
Boot partition, kernel & ramdisk
device/brcm/rpi3/boot/* to p1:/
kernel/rpi/arch/arm/boot/zImage to p1:/
kernel/rpi/arch/arm/boot/dts/bcm2710-rpi-3-b.dtb to p1:/
out/target/product/rpi3/ramdisk.img to p1:/
refs:
https://groups.google.com/forum/m/#!forum/android-rpi
https://github.com/peyo-hd/local_manifests/tree/npv
https://github.com/peyo-hd/device_brcm_rpi3
https://github.com/peyo-hd/kernel_rpi/tree/rpi3
https://github.com/peyo-hd/device_brcm_rpi2/wiki
- build android N for RPI3
- build android for VMware
- build android for VMware
- Build Busybox for Android
- build WebRTC for android
- Build Webrtc For Android
- Build Webrtc For Android .
- build WebRTC for android .
- build WebRTC for android
- build WebRTC for android
- build webrtc for android
- build WebRTC for android .
- build webrtc for android
- build chromium for android
- Build WebRTC for Android
- Build lxh264 for android
- Build opencv for android
- WebRtc Build for Android
- TCP滑动窗口杂陈
- html5 web缓存localStorage和sessionStorage
- Android-handler用法
- leetcode 119.Pascal's Triangle II-杨辉三角形
- 分布式架构高可用架构篇_06_MySQL源码编译安装(CentOS-6.7+MySQL-5.6)
- build android N for RPI3
- Node.js开发入门(二)——HelloWorld再分析
- 简单实例讲解linux的module模块编译步骤
- IOS 设计模式 生成器模式
- 1023 Another Eight Puzzle
- 阿里宣布开源Weex ,亿级应用匠心打造跨平台移动开发工具
- JAVA——运行时异常(RuntimeException)
- Android之解析GML并显示
- Node.js开发入门(三)——HTTP文件服务器