RK3568开发板安卓系统之开发环境搭建(一)
1 开发环境搭建
1.1 更新系统
hale@thinkpad:~$ sudo apt-get update
1.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 tree
1.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_Android11
1.4 编译sdk
1.4.1 准备编译环境
hale@thinkpad:rk3568_aybering_Android11$ source build/envsetup.sh
1.4.2 选择产品
hale@thinkpad:rk3568_aybering_Android11$ lunch
You're 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是硬件固定电压不需要配置
- pmuio2
- vccio1
- vccio3
- vccio5
- vccio6
- vccio7
GPIO电压按照上面的方式配置即可
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
至此,开发环境搭建完成
- 分享
- 举报
-
浏览量:9434次2022-10-12 09:28:15
-
浏览量:18180次2022-09-30 16:51:48
-
浏览量:2645次2022-09-30 16:48:25
-
浏览量:4081次2022-10-11 10:48:08
-
浏览量:6597次2022-10-08 14:00:42
-
浏览量:6600次2022-10-09 10:20:09
-
浏览量:7933次2022-10-13 19:26:04
-
浏览量:2537次2022-09-30 16:46:03
-
浏览量:6002次2022-10-08 13:56:28
-
浏览量:10295次2022-10-09 15:56:41
-
浏览量:9733次2022-10-10 11:27:15
-
浏览量:11454次2022-10-18 09:33:58
-
浏览量:4860次2022-10-14 08:34:42
-
浏览量:7518次2022-10-10 20:15:42
-
浏览量:8184次2022-10-17 11:49:55
-
浏览量:2760次2022-10-28 09:28:29
-
浏览量:8808次2022-06-11 10:47:27
-
浏览量:2981次2021-06-15 09:44:15
-
浏览量:32835次2022-06-11 11:06:24
-
广告/SPAM
-
恶意灌水
-
违规内容
-
文不对题
-
重复发帖
万万没想到
感谢您的打赏,如若您也想被打赏,可前往 发表专栏 哦~
举报类型
- 内容涉黄/赌/毒
- 内容侵权/抄袭
- 政治相关
- 涉嫌广告
- 侮辱谩骂
- 其他
详细说明
&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_3v3>; // by lwx aybering should be 3v3 sz should be 1v8 vccio7-supply = <&vcc_3v3>; };
这个vccio6-supply = <&vcc_3v3>;和你的有出入,因为手头没有图纸,所以没法确认哪个是正确的。