diff --git a/README.md b/README.md index 21c0326aa9103f1ccebe5374ca24f6ded7fb132d..1fa048230f979d14843dc85168c26cc3841d9aa1 100644 --- a/README.md +++ b/README.md @@ -6,15 +6,14 @@ | -------- | ------------------------------------------------------------ | | 完整镜像 | [rk3568_sig.tar.gz](https://gitee.com/hihope-rockchip/images) | -## 烧录方式 - -### 工具下载 - -烧写工具下载及使用。 -[参考](https://gitee.com/hihope-rockchip/rkdownload/tree/master/%E7%83%A7%E5%86%99%E5%B7%A5%E5%85%B7) - ## 编译方法 编译方法简单,但编译环境搭建相对复杂。 -[参考](https://gitee.com/hihope-rockchip/rkdownload) +[参考](compile.md) + + +## 烧录工具 + +烧写工具下载及使用。 +[参考](rk3568/tools) \ No newline at end of file diff --git a/compile.md b/compile.md new file mode 100644 index 0000000000000000000000000000000000000000..86864a862c794d2ed4a3ef437afce5bf8fb112a4 --- /dev/null +++ b/compile.md @@ -0,0 +1,104 @@ +# 介绍 + +以下介绍了RK3568 在ubuntu上搭建编译环境,及烧录指导 + +# 搭建Ubuntu环境及编译 + +- [安装依赖工具](#section18431165519244) +- [获取标准系统源码](#section113751052102517) + - [前提条件](#section102871547153314) + - [操作步骤](#section429012478331) + +- [执行prebuilts](#section0495320152619) +- [编译](#section1664835963517) +- [镜像烧录](#section1667485963517) + +## 安装依赖工具 + +安装命令如下: + +``` +sudo apt-get update && sudo apt-get install binutils git git-lfs gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip m4 bc gnutls-bin python3.8 python3-pip ruby +``` + +>**说明:** +>以上安装命令适用于Ubuntu18.04,其他版本请根据安装包名称采用对应的安装命令。 + +## 获取标准系统源码 + +### 前提条件 + +1. 注册码云gitee账号。 +2. 注册码云SSH公钥,请参考[码云帮助中心](https://gitee.com/help/articles/4191)。 +3. 安装[git客户端](http://git-scm.com/book/zh/v2/%E8%B5%B7%E6%AD%A5-%E5%AE%89%E8%A3%85-Git)和[git-lfs](https://gitee.com/vcs-all-in-one/git-lfs?_from=gitee_search#downloading)并配置用户信息。 + + ``` + git config --global user.name "yourname" + git config --global user.email "your-email-address" + git config --global credential.helper store + ``` + +4. 安装码云repo工具,可以执行如下命令。 + + ``` + curl -s https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 > /usr/local/bin/repo #如果没有权限,可下载至其他目录,并将其配置到环境变量中 + chmod a+x /usr/local/bin/repo + pip3 install -i https://repo.huaweicloud.com/repository/pypi/simple requests + ``` + + +### 操作步骤 + +方式一(推荐):通过repo + ssh 下载(需注册公钥,请参考[码云帮助中心](https://gitee.com/help/articles/4191))。 + +``` +repo init -u ssh://git@gitee.com/openharmony-sig/manifest.git -b master -m devboard_rk3568.xml --no-repo-verify +repo sync -c +repo forall -c 'git lfs pull' +``` + +方式二:通过repo + https 下载。 + +``` +repo init -u https://gitee.com/openharmony-sig/manifest.git -b master -m devboard_rk3568.xml --no-repo-verify +repo sync -c +repo forall -c 'git lfs pull' +``` + +## 执行prebuilts + +在源码根目录下执行脚本,安装编译器及二进制工具。 + +``` +bash build/prebuilts_download.sh +``` + +下载的prebuilts二进制默认存放在与OpenHarmony同目录下的OpenHarmony\_2.0\_canary\_prebuilts下。 + +## 编译 + +在Linux环境进行如下操作: + +1. 进入源码根目录,执行如下命令进行版本编译。 + + ``` + ./build.sh --product-name rk3568 --ccache + ``` + + +2. 检查编译结果。编译完成后,log中显示如下: + + ``` + post_process + =====build rk3568 successful. + 2021-09-13 09:22:28 + ``` + + 编译所生成的文件都归档在out/ohos-arm-release/目录下,结果镜像输出在 out/ohos-arm-release/packages/phone/images/ 目录下。 + + +3. 编译源码完成,请进行镜像烧录。 + +## 镜像烧录 + + 具体请参见[镜像烧录](https://gitee.com/hihope-rockchip/rkdownload/tree/master/%E7%83%A7%E5%86%99%E5%B7%A5%E5%85%B7)。 diff --git a/rk3568/tools/README.md b/rk3568/tools/README.md index ae03ab62aa7d617ad8fbea3325a41d585f658f00..24de7577ad292c3f3980853a6363fd5eedcb4257 100644 --- a/rk3568/tools/README.md +++ b/rk3568/tools/README.md @@ -88,15 +88,4 @@ python3 flash.py -v //烧写vendor.img python3 flash.py -d //烧写userdata.img ``` -*说明:烧写多个指定固件,可以根据需要执行输入多个参数。如:-sv表示烧写system.img和vendor.img* - -## 注意 - -因为RK3566和RK3568的MiniLoaderAll.bin无法兼容,默认的MiniLoaderAll.bin是支持RK3568。 - -如果你开发板是RK3566请执行如下下载后在按上诉步骤烧写固件: - -``` -cp out/ohos-arm-release/packages/phone/images/MiniLoaderAll_RK3566.bin out/ohos-arm-release/packages/phone/images/MiniLoaderAll.bin -``` - +*说明:烧写多个指定固件,可以根据需要执行输入多个参数。如:-sv表示烧写system.img和vendor.img* \ No newline at end of file diff --git a/rk3568/tools/windows/DriverAssitant/ADBDriver/amd64/NOTICE.txt b/rk3568/tools/windows/DriverAssitant/ADBDriver/amd64/NOTICE.txt deleted file mode 100755 index 6cfa57a65d8c2252688ceeabe22c6c6039363002..0000000000000000000000000000000000000000 --- a/rk3568/tools/windows/DriverAssitant/ADBDriver/amd64/NOTICE.txt +++ /dev/null @@ -1,4 +0,0 @@ -The .dll files here are distributed by Microsoft Corporation as part of the -Windows Driver Kit (available at -http://www.microsoft.com/whdc/resources/downloads.mspx) and included here as -permitted by the Microsoft Software License Terms. \ No newline at end of file diff --git a/rk3568/tools/windows/DriverAssitant/ADBDriver/amd64/WUDFUpdate_01009.dll b/rk3568/tools/windows/DriverAssitant/ADBDriver/amd64/WUDFUpdate_01009.dll deleted file mode 100755 index 1424634393e6202390a12c5dfe1aa3a2c4783681..0000000000000000000000000000000000000000 Binary files a/rk3568/tools/windows/DriverAssitant/ADBDriver/amd64/WUDFUpdate_01009.dll and /dev/null differ diff --git a/rk3568/tools/windows/DriverAssitant/ADBDriver/amd64/WdfCoInstaller01009.dll b/rk3568/tools/windows/DriverAssitant/ADBDriver/amd64/WdfCoInstaller01009.dll deleted file mode 100755 index 1731b962d68d52030b32b19d6f0f913cbc47729e..0000000000000000000000000000000000000000 Binary files a/rk3568/tools/windows/DriverAssitant/ADBDriver/amd64/WdfCoInstaller01009.dll and /dev/null differ diff --git a/rk3568/tools/windows/DriverAssitant/ADBDriver/amd64/winusbcoinstaller2.dll b/rk3568/tools/windows/DriverAssitant/ADBDriver/amd64/winusbcoinstaller2.dll deleted file mode 100755 index 30e55025b2fb6455a18165ad9df1ba1a3aa90566..0000000000000000000000000000000000000000 Binary files a/rk3568/tools/windows/DriverAssitant/ADBDriver/amd64/winusbcoinstaller2.dll and /dev/null differ diff --git a/rk3568/tools/windows/DriverAssitant/ADBDriver/android_winusb.inf b/rk3568/tools/windows/DriverAssitant/ADBDriver/android_winusb.inf deleted file mode 100755 index dd8eedcea90f2b10aec0a4e6e305c53f6092bc66..0000000000000000000000000000000000000000 --- a/rk3568/tools/windows/DriverAssitant/ADBDriver/android_winusb.inf +++ /dev/null @@ -1,106 +0,0 @@ -; -; Android WinUsb driver installation. -; -[Version] -Signature = "$Windows NT$" -Class = AndroidUsbDeviceClass -ClassGuid = {3F966BD9-FA04-4ec5-991C-D326973B5128} -Provider = %ProviderName% -DriverVer = 08/28/2014,11.0.0000.00000 -CatalogFile.NTx86 = androidwinusb86.cat -CatalogFile.NTamd64 = androidwinusba64.cat - -[ClassInstall32] -Addreg = AndroidWinUsbClassReg - -[AndroidWinUsbClassReg] -HKR,,,0,%ClassName% -HKR,,Icon,,-1 - - -[Manufacturer] -%ProviderName% = Rockchip, NTx86, NTamd64 - - -[Rockchip.NTx86] -;rockchip -%SingleAdbInterface% = USB_Install, USB\VID_2207&PID_0006 -%CompositeAdbInterface% = USB_Install, USB\VID_2207&PID_0010&MI_01 -%CompositeAdbInterface% = USB_Install, USB\VID_2207&PID_0011&MI_01 -%CompositeAdbInterface% = USB_Install, USB\VID_2207&PID_0012&MI_01 -%CompositeAdbInterface% = USB_Install, USB\VID_2207&PID_0013&MI_01 -%CompositeAdbInterface% = USB_Install, USB\VID_2207&PID_0014&MI_01 -%CompositeAdbInterface% = USB_Install, USB\VID_2207&PID_0015&MI_01 - -[Rockchip.NTamd64] -%SingleAdbInterface% = USB_Install, USB\VID_2207&PID_0006 -%CompositeAdbInterface% = USB_Install, USB\VID_2207&PID_0010&MI_01 -%CompositeAdbInterface% = USB_Install, USB\VID_2207&PID_0011&MI_01 -%CompositeAdbInterface% = USB_Install, USB\VID_2207&PID_0012&MI_01 -%CompositeAdbInterface% = USB_Install, USB\VID_2207&PID_0013&MI_01 -%CompositeAdbInterface% = USB_Install, USB\VID_2207&PID_0014&MI_01 -%CompositeAdbInterface% = USB_Install, USB\VID_2207&PID_0015&MI_01 - - - -[USB_Install] -Include = winusb.inf -Needs = WINUSB.NT - -[USB_Install.Services] -Include = winusb.inf -AddService = WinUSB,0x00000002,WinUSB_ServiceInstall - -[WinUSB_ServiceInstall] -DisplayName = %WinUSB_SvcDesc% -ServiceType = 1 -StartType = 3 -ErrorControl = 1 -ServiceBinary = %12%\WinUSB.sys - -[USB_Install.Wdf] -KmdfService = WINUSB, WinUSB_Install - -[WinUSB_Install] -KmdfLibraryVersion = 1.9 - -[USB_Install.HW] -AddReg = Dev_AddReg - -[Dev_AddReg] -HKR,,DeviceInterfaceGUIDs,0x10000,"{F72FE0D4-CBCB-407d-8814-9ED673D0DD6B}" - -[USB_Install.CoInstallers] -AddReg = CoInstallers_AddReg -CopyFiles = CoInstallers_CopyFiles - -[CoInstallers_AddReg] -HKR,,CoInstallers32,0x00010000,"WdfCoInstaller01009.dll,WdfCoInstaller","WinUSBCoInstaller2.dll" - -[CoInstallers_CopyFiles] -WinUSBCoInstaller2.dll -WdfCoInstaller01009.dll - -[DestinationDirs] -CoInstallers_CopyFiles=11 - -[SourceDisksNames] -1 = %DISK_NAME%,,,\i386 -2 = %DISK_NAME%,,,\amd64 - -[SourceDisksFiles.x86] -WinUSBCoInstaller2.dll = 1 -WdfCoInstaller01009.dll = 1 - -[SourceDisksFiles.amd64] -WinUSBCoInstaller2.dll = 2 -WdfCoInstaller01009.dll = 2 - -[Strings] -ProviderName = "Rockchip, Inc." -SingleAdbInterface = "Android ADB Interface" -CompositeAdbInterface = "Android Composite ADB Interface" -SingleBootLoaderInterface = "Android Bootloader Interface" -WinUSB_SvcDesc = "Android USB Driver" -DISK_NAME = "Android WinUsb installation disk" -ClassName = "Android Device" diff --git a/rk3568/tools/windows/DriverAssitant/ADBDriver/androidwinusb86.cat b/rk3568/tools/windows/DriverAssitant/ADBDriver/androidwinusb86.cat deleted file mode 100755 index 518ff9b9eca24a68c9c3aced70bb0d3c2b3381c6..0000000000000000000000000000000000000000 Binary files a/rk3568/tools/windows/DriverAssitant/ADBDriver/androidwinusb86.cat and /dev/null differ diff --git a/rk3568/tools/windows/DriverAssitant/ADBDriver/androidwinusba64.cat b/rk3568/tools/windows/DriverAssitant/ADBDriver/androidwinusba64.cat deleted file mode 100755 index 38c4018d87917532d541106919253718239faeb8..0000000000000000000000000000000000000000 Binary files a/rk3568/tools/windows/DriverAssitant/ADBDriver/androidwinusba64.cat and /dev/null differ diff --git a/rk3568/tools/windows/DriverAssitant/ADBDriver/i386/NOTICE.txt b/rk3568/tools/windows/DriverAssitant/ADBDriver/i386/NOTICE.txt deleted file mode 100755 index 6cfa57a65d8c2252688ceeabe22c6c6039363002..0000000000000000000000000000000000000000 --- a/rk3568/tools/windows/DriverAssitant/ADBDriver/i386/NOTICE.txt +++ /dev/null @@ -1,4 +0,0 @@ -The .dll files here are distributed by Microsoft Corporation as part of the -Windows Driver Kit (available at -http://www.microsoft.com/whdc/resources/downloads.mspx) and included here as -permitted by the Microsoft Software License Terms. \ No newline at end of file diff --git a/rk3568/tools/windows/DriverAssitant/ADBDriver/i386/WUDFUpdate_01009.dll b/rk3568/tools/windows/DriverAssitant/ADBDriver/i386/WUDFUpdate_01009.dll deleted file mode 100755 index f19c370188a0d74333f5b4c13c5a926f7a0361fa..0000000000000000000000000000000000000000 Binary files a/rk3568/tools/windows/DriverAssitant/ADBDriver/i386/WUDFUpdate_01009.dll and /dev/null differ diff --git a/rk3568/tools/windows/DriverAssitant/ADBDriver/i386/WdfCoInstaller01009.dll b/rk3568/tools/windows/DriverAssitant/ADBDriver/i386/WdfCoInstaller01009.dll deleted file mode 100755 index 30e81af6202448f1f81fb8423af5fa97fa4a110a..0000000000000000000000000000000000000000 Binary files a/rk3568/tools/windows/DriverAssitant/ADBDriver/i386/WdfCoInstaller01009.dll and /dev/null differ diff --git a/rk3568/tools/windows/DriverAssitant/ADBDriver/i386/winusbcoinstaller2.dll b/rk3568/tools/windows/DriverAssitant/ADBDriver/i386/winusbcoinstaller2.dll deleted file mode 100755 index fc450d2b25d0f8069454cc0bde5ba9c13927fe4d..0000000000000000000000000000000000000000 Binary files a/rk3568/tools/windows/DriverAssitant/ADBDriver/i386/winusbcoinstaller2.dll and /dev/null differ diff --git a/rk3568/tools/windows/DriverAssitant/README.md b/rk3568/tools/windows/DriverAssitant/README.md new file mode 100644 index 0000000000000000000000000000000000000000..2d21b11536ce49ebde0b3ba4dda9749a642b8c45 --- /dev/null +++ b/rk3568/tools/windows/DriverAssitant/README.md @@ -0,0 +1,9 @@ +### о΢װ +1. ֧RockusbԤװж +2. ֧xp,win7_32,win7_64,win8_32,win8_64,win10_32,win10_64ϵͳ +### Ŀ¼˵ +Ŀ¼\Driver:RockusbĿ¼ + +### ע +Ϊ豸ʹøµȡжءٽСװ + diff --git a/rk3568/tools/windows/DriverAssitant/Readme.txt b/rk3568/tools/windows/DriverAssitant/Readme.txt deleted file mode 100755 index 0431c4105b093730f0302fd9877ae399f7c87f0a..0000000000000000000000000000000000000000 --- a/rk3568/tools/windows/DriverAssitant/Readme.txt +++ /dev/null @@ -1,10 +0,0 @@ -о΢װ -֧RockusbRockchip AdbԤװж -֧xp,win7_32,win7_64,win8_32,win8_64,win10_32,win10_64ϵͳ -Ŀ¼˵ -Ŀ¼\Driver:RockusbĿ¼ -Ŀ¼\ADBDriver:Rockchip ADBĿ¼ - -ע -Ϊ豸ʹøµȡжءٽСװ -xpϵͳͨ߰װ,Rockchip ADB豸ʱʾ㷢豸װʱѡ"Զװ",ɳɹװ diff --git a/rk3568/tools/windows/bin/AFPTool.exe b/rk3568/tools/windows/bin/AFPTool.exe deleted file mode 100755 index 84d9b33047cc06f4fcfee8a32a15bece8dbfe680..0000000000000000000000000000000000000000 Binary files a/rk3568/tools/windows/bin/AFPTool.exe and /dev/null differ diff --git a/rk3568/tools/windows/bin/AdbWinApi.dll b/rk3568/tools/windows/bin/AdbWinApi.dll deleted file mode 100755 index 7abe26cf1d2ab67f0107b19c5fe5a9c4543f90c0..0000000000000000000000000000000000000000 Binary files a/rk3568/tools/windows/bin/AdbWinApi.dll and /dev/null differ diff --git a/rk3568/tools/windows/bin/AdbWinUsbApi.dll b/rk3568/tools/windows/bin/AdbWinUsbApi.dll deleted file mode 100755 index e7a6de1208910df2577ef86bbe536fb23fa5f015..0000000000000000000000000000000000000000 Binary files a/rk3568/tools/windows/bin/AdbWinUsbApi.dll and /dev/null differ diff --git a/rk3568/tools/windows/bin/RKImageMaker.exe b/rk3568/tools/windows/bin/RKImageMaker.exe deleted file mode 100755 index 0816b57aa04f9d098cf6dccf01e799d7ddfac163..0000000000000000000000000000000000000000 Binary files a/rk3568/tools/windows/bin/RKImageMaker.exe and /dev/null differ diff --git a/rk3568/tools/windows/bin/adb.exe b/rk3568/tools/windows/bin/adb.exe deleted file mode 100755 index 83016362826186f5b9b656c5a553e6ca9871f494..0000000000000000000000000000000000000000 Binary files a/rk3568/tools/windows/bin/adb.exe and /dev/null differ