参考如下两篇文章:
1. https://blog.csdn.net/stevenqian/article/details/76864832?utm_source=blogxgwz8
2.https://blog.csdn.net/housezhu/article/details/72229165
两篇文章都是基于aosp7.1.2,但https://github.com/android-rpi/device_brcm_rpi3已经升级到aosp10,所以我是基于aosp10编译的,可以编译成功并在树莓派3B运行,Ubuntu版本为1804。
关于sd卡分区
参考:https://github.com/android-rpi/device_brcm_rpi3里sd卡分区。
注意这里分区表要求是MBR,不是GPT。可以用parted命令进行转换。
判断当前硬盘是gpt还是mbr。使用如下命令:
-
# fdisk -l /dev/sde
出现如下图片中的“WARNING: GPT (GUID Partition Table) detected“,说明当前硬盘是gpt的,否则是mbr的。
-
在进行gpt转mbr时,硬盘的数据会被清除,需要提前备份。
gpt的硬盘转换成mbr,使用如下命令:
# parted /dev/sde
-
在进行mbr转gpt时,硬盘的数据会被清除,需要提前备份。
mbr的硬盘转换成gpt,使用如下命令:
# parted /dev/sde