编译AOSP for hikey970
compile aosp 9.0 (P)for hikey970记录
编译AOSP for hikey970
编译时主要参考网站的帖子:
http://www.arm-cn.com/thread-1208-1-1.html
两个重要的官方参考网站:
https://www.96boards.org/documentation/consumer/hikey/hikey970/build/aosp.md.html
https://www.96boards.org/documentation/consumer/hikey/hikey970/build/linux-kernel.md.html
官网:
repo init -u https://android.googlesource.com/platform/manifest -b master
帖子:
repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest -b android-9.0.0_r8 --no-repo-verify --repo-branch=stable
获取源码的方式不同,我们在宿舍下载aosp.tar后解压到aosp目录。
一般,先在宿舍在镜像源下载最新版本的aosp。repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest
进入aosp路径后:
git clone https://github.com/96boards-hikey/android-manifest.git -b hikey970_v1.0 .repo/local_manifests
repo sync -j8
cd /mnt/hikey970/aosp/device/linaro/hikey
vim manifest.xml
在倒数第二行增加关于wifi的设置
<hal format="hidl">
<name>android.hardware.wifi.hostapd</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IHostapd</name>
<instance>default</instance>
</interface>
</hal>
vim /mnt/hikey970/aosp/device/linaro/hikey/sepolicy/hostapd.te
其中关于wifi的设置全部注释掉
$ mkdir $AOSP_ROOT/bootloader
$ sudo apt install uuid-dev build-essential
$ sudo apt install libssl-dev
$ git clone https://github.com/96boards-hikey/tools-images-hikey970.git
$ git clone https://github.com/96boards-hikey/OpenPlatformPkg.git -b hikey970_v1.0
$ git clone https://github.com/96boards-hikey/arm-trusted-firmware.git -b hikey970_v1.0
$ git clone https://github.com/96boards-hikey/l-loader.git -b hikey970_v1.0
$ git clone https://github.com/96boards-hikey/edk2.git -b hikey970_v1.0
$ git clone https://github.com/96boards-hikey/uefi-tools.git -b hikey970_v1.0
$
$ cd edk2
$ ln -sf ../OpenPlatformPkg
我也有修改交叉编译的路径:
$ cd $AOSP_ROOT/bootloader/l-loader
vim build_uefi.sh
- AARCH64_GCC_7_1=/o