Hikey960开发板+ AOSP 9.0 +hikey linaro 4.9.76 + data分区为F2FS

Compile aosp and hikey-linaro

文档

首先最有用的就是官方文档了,附上Google的官网地址。https://source.android.com/source/devices

官网上的说明是简明概要的,但是在我们的编译过程中其实可能会遇到各种奇奇怪怪的问题。下面就一些 我们踩过的雷给排掉。

  • Hikey960官方网站:

https://www.96boards.org/product/hikey960/

  • Hikey960的aosp编译安装文档:

https://source.android.com/setup/build/devices#hikey960

  • Hikey960官方预先编译好的代码:

https://www.96boards.org/documentation/consumer/hikey/hikey960/downloads/aosp.md.html

准备工作

(一)首先就是下载aosp和hikey-linaro的源码。

aosp比较大,压缩后都有60G左右,解压后有115G左右。hikey-linaro压缩不超过2G。这两个源码官网上 可以下载,但是要翻墙!!!

好在校园网ipv6可以直连Google,但是我在实验室下载很慢,据说寝室下载 要快一些。hikey-linaro我们下载的master分支,前期编译4.4版本,
后期编译4.9版本。以下描述二个版本可以通用。

下载清华的hikey-linaro镜像

aosp配套的内核代码

git clone https://aosp.tuna.tsinghua.edu.cn/kernel.common.git

hikey专用内核镜像

git clone heeps://aosp.tuna.tsinghua.edu.cn/kernel/hikey-linaro.git

补充一下从清华的镜像下载aosp和相关工具的方法(该方法非常好用)

详细资料参考他们的官网:
https://mirrors.tuna.tsinghua.edu.cn/help/AOSP/

  • 正常方法只是因为无法翻墙才无法下载,但是可以将 https://android.googlesource.com/ 全部使用 https://aosp.tuna.tsinghua.edu.cn/ 代替即可。
  • 有一个步骤是repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest 该步骤无法完成的原因是repo这个脚本里面默认使用了google的REPO_URL。解法:vim repo,按照下面内容进行修改:
if not REPO_URL:
  REPO_URL = 'https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/'

可能的error:
AttributeError: 'str' object has no attribute 'decode'
解决方法:直接去掉代码 decode('utf8')

scripts:

#aosp
mkdir WORKING_DIRECTORY
cd WORKING_DIRECTORY
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
repo init -u https://aosp.tuna.tsinghua.ed
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值