1.1 更新系统
hale@thinkpad:~$ sudo apt-get update1.2 安装依赖
hale@thinkpad:~$ sudo apt-get install repo git ssh make gcc libssl-devliblz4-toolexpect g++ patchelf chrpath gawk texinfo chrpathdIFfstatbinfmt-supportqemu-user-static live-build bison flex fakeroot cmakegcc-multilibg++-multilib unzip device-tree-compiler python-piplibncurses5-devbuild-essential vim tree1.3 解压rk3568_sdk
hale@thinkpad:~$ mkdir rk3568_aybering_Android11.0 hale@thinkpad:~$ cat rk3568_aybering_Android11.0_sdk.tar.gz* | tar -zx -C rk3568_aybering_Android11 hale@thinkpad:~$ cd rk3568_aybering_Android111.4 编译sdk
1.4.1 准备编译环境
hale@thinkpad:rk3568_aybering_Android11$ source build/envsetup.sh1.4.2 选择产品
hale@thinkpad:rk3568_aybering_Android11$ lunch Youre building on Linux Lunch menu… pick a combo: … 50. rk3566_r-user 51. rk3566_r-userdebug 52. rk3566_rgo-user 53. rk3566_rgo-userdebug 54. rk3568_r-user 55. rk3568_r-userdebug … Which would you like? [aosp_arm-eng] 55 ============================================ PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=11 TARGET_PRODUCT=rk3568_r TARGET_BUILD_VARIANT=userdebug TARGET_BUILD_TYPE=release TARGET_ARCH=arm64 TARGET_ARCH_VARIANT=armv8-a TARGET_CPU_VARIANT=cortex-a55 TARGET_2ND_ARCH=arm TARGET_2ND_ARCH_VARIANT=armv8-2a TARGET_2ND_CPU_VARIANT=cortex-a55 HOST_ARCH=x86_64 HOST_2ND_ARCH=x86 HOST_OS=linux HOST_OS_EXTRA=Linux-5.4.0-124-generic-x86_64-Ubuntu-18.04.6-LTS HOST_CROSS_OS=windows HOST_CROSS_ARCH=x86 HOST_CROSS_2ND_ARCH=x86_64 HOST_BUILD_TYPE=release BUILD_ID=RQ3A.210705.001 OUT_DIR=out ============================================ hale@thinkpad:rk3568_aybering_Android11$1.4.3 GPIO电压配置确认
RK3568 GPIO电压没配置对会导致芯片GPIO烧坏,因此需要根据实际硬件原理图,对IO-Domain GPIO电压配置进行确认。
&pmu_io_domains { status = “okay”; pmuio2-supply = <&vcc3v3_pmu>; vccio1-supply = <&vccio_acodec>; vccio3-supply = <&vccio_sd>; vccio4-supply = <&vcc_1v8>; vccio5-supply = <&vcc_3v3>; vccio6-supply = <&vcc_1v8>; vccio7-supply = <&vcc_3v3>; };vccio1-supply为例,首先查看硬件原理图确认vccio1电源域(VCCIO1)的配置如图所示:
在硬件原理图上面搜索 VCCIO1 ,如下图:
从上图找到 VCCIO1 的电源是 vccio_acodec 。
在原理图上搜索 vccio_acodec ,可以找到如下图:
从上图找到 vccio_acodec 是由RK809的LDO4供电。
从软件的DTS里面找到LDO_REG4(LDO4)的配置信息,如下 vccio_acodec: LDO_REG4 { regulator-always-on; regulator-boot-on; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; regulator-name = “vccio_acodec”; regulator-state-mem { regulator-off-in-suspend; };将上面的 vccio_acodec 配置到pmu_io_domains节点中的vccio1-supply = <&vccio_acodec>;即可完成vccio1的电压配置
&pmu_io_domains { status = “okay”; pmuio2-supply = <&vcc3v3_pmu>; vccio1-supply = <&vccio_acodec>; vccio3-supply = <&vccio_sd>; vccio4-supply = <&vcc_1v8>; vccio5-supply = <&vcc_3v3>; vccio6-supply = <&vcc_1v8>; vccio7-supply = <&vcc_3v3>;` };其他几路按照上面的方式配置即可,其中vccio2是硬件固定电压不需要配置
pmuio2vccio1vccio3vccio5vccio6vccio7GPIO电压按照上面的方式配置即可
1.4.4 开始编译sdk
hale@thinkpad:rk3568_aybering_Android11$ source build/envsetup.sh hale@thinkpad:rk3568_aybering_Android11$ lunch rk3568_r-userdebug ============================================ PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=11 TARGET_PRODUCT=rk3568_r TARGET_BUILD_VARIANT=userdebug TARGET_BUILD_TYPE=release TARGET_ARCH=arm64 TARGET_ARCH_VARIANT=armv8-a TARGET_CPU_VARIANT=cortex-a55 TARGET_2ND_ARCH=arm TARGET_2ND_ARCH_VARIANT=armv8-2a TARGET_2ND_CPU_VARIANT=cortex-a55 HOST_ARCH=x86_64 HOST_2ND_ARCH=x86 HOST_OS=linux HOST_OS_EXTRA=Linux-5.4.0-125-generic-x86_64-Ubuntu-18.04.6-LTS HOST_CROSS_OS=windows HOST_CROSS_ARCH=x86 HOST_CROSS_2ND_ARCH=x86_64 HOST_BUILD_TYPE=release BUILD_ID=RD2A.211001.002 OUT_DIR=out ============================================ hale@thinkpad:rk3568_aybering_Android11$1.4.5 RK356X kernel编译弹出IO-Domain确认对话框
编译kernel时弹出如下对话框:
弹出这个对话框目的是检查实际硬件原理图和软件dts的GPIO电压是否匹配, 需要根据硬件原理图的实际设计电压来选择(对话框中选择的值不会保存到dts中,dts需要手动去修改)。如果你是软件工程师请与你们的硬件工程师一起核对确认,这个很重要。如果GPIO电压配置不对会导致芯片GPIO烧坏。当你正确确认GPIO电压后这个对话框就不会在弹出(输入值和dts配置的值相同),如果dts名字或者dts里面的io-domian发生变化,则会在继续弹出进行确认。
1.4.6 编译完成,生成固件路径
hale@thinkpad:rk3568_aybering_Android11$ ls IMAGE/ RK3568_R_USERDEBUG_RK3568-EVB1-DDR4-V10__20220816.1803至此,开发环境搭建完成
免责声明:文章内容来自互联网,本站不对其真实性负责,也不承担任何法律责任,如有侵权等情况,请与本站联系删除。
转载请注明出处:RK3568开发板安卓系统之开发环境搭建(一)-rk3399 开发板 https://www.yhzz.com.cn/a/9776.html