开发者手机开源代码编译指导
1、下载代码 repo init -u https://gitee.com/develop-phone-open-source/manifest -b OpenHarmony-4.0-Release repo sync -c repo forall -c 'git lfs pull'2、补全原厂闭源文件 原厂闭源文件,原厂不允许公开提供,所以在开源代码中
编译环境建议:
1. ubuntu20.04
2. Linux系统内存:最低16G
3. Pyhon 3.8
4. 安装必要工具:
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-pip ruby libtinfo-dev libtinfo5
sudo apt-get install openjdk-17-jre-headless default-jdk libssl-dev genext2fs u-boot-tools mtd-utils scons gcc-arm-none-eabi gcc-arm-linux-gnueabi
编译环境参考附录2:OpenHarmony编译环境搭建
1、下载代码
下载命令:
repo init -u https://gitee.com/develop-phone-open-source/manifest -b OpenHarmony-4.0-Release
repo sync -c
repo forall -c 'git lfs pull'
2、补全原厂闭源文件
原厂闭源文件只能从原厂license客户处获取,需要开发者自行补齐这些文件,否则会编译失败系统运行不起来。
参考下方附录1:原厂闭源文件列表,将闭源文件放置到对应的目录。
3、编译
编译开发者手机之前,请确保本地的编译环境OK(比如可以正常编译官方RK3568 OpenHarmony4.0的代码,证明环境没问题)。
bash build/prebuilts_download.sh --skip-ssl
./build.sh --product-name laphone –ccache --no-prebuilt-sdk
编译后的文件:out/laphone/packages/phone/images/laphone_nosec_userdebug.pac
4、烧录指导
附录1:原厂闭源文件列表
闭源文件 | 代码工程放置目录 |
---|---|
libae3.x.z.so | vendor/hys/laphone/camera/ispalg/isp_lib/libs/32/oh_libae3.x_release |
libaf3.2.z.so | vendor/hys/laphone/camera/ispalg/isp_lib/libs/32 |
libaf3.2_le.z.so | vendor/hys/laphone/camera/ispalg/isp_lib/libs/32 |
libaftrigger.z.so | vendor/hys/laphone/camera/ispalg/isp_lib/libs/32 |
libalsc3.2.z.so | vendor/hys/laphone/camera/ispalg/isp_lib/libs/32/oh_libalsc3.2 |
libatm.z.so | vendor/hys/laphone/camera/ispalg/isp_lib/libs/32/oh_libatm_release |
libawb3.2.z.so | vendor/hys/laphone/camera/ispalg/isp_lib/libs/32/oh_libawb3.2 |
libdeflicker.z.so | vendor/hys/laphone/camera/ispalg/isp_lib/libs/32/oh_libdeflicker_release |
libflash.z.so | vendor/hys/laphone/camera/ispalg/isp_lib/libs/32/oh_libflash_release |
libpdalgo.z.so | vendor/hys/laphone/camera/ispalg/isp_lib/libs/32 |
libae3.x.z.so | vendor/hys/laphone/camera/ispalg/isp_lib/libs/64 |
libaf3.2.z.so | vendor/hys/laphone/camera/ispalg/isp_lib/libs/64 |
libaf3.2_le.z.so | vendor/hys/laphone/camera/ispalg/isp_lib/libs/64 |
libaftrigger.z.so | vendor/hys/laphone/camera/ispalg/isp_lib/libs/64 |
libalsc3.2.z.so | vendor/hys/laphone/camera/ispalg/isp_lib/libs/64 |
libatm.z.so | vendor/hys/laphone/camera/ispalg/isp_lib/libs/64 |
libawb3.2.z.so | vendor/hys/laphone/camera/ispalg/isp_lib/libs/64 |
libdeflicker.z.so | vendor/hys/laphone/camera/ispalg/isp_lib/libs/64 |
libflash.z.so | vendor/hys/laphone/camera/ispalg/isp_lib/libs/64 |
libpdalgo.z.so | vendor/hys/laphone/camera/ispalg/isp_lib/libs/64 |
libjpeg_hw_sprd.z.so | device/soc/sprd/uis7885/hardware/camera/lib |
libomx_avcdec_hw_sprd.z.so | device/soc/sprd/uis7885/hardware/omx_il/components/video/avc/dec/hw/lib64 |
libomx_avcenc_hw_sprd.z.so | device/soc/sprd/uis7885/hardware/omx_il/components/video/avc/dec/hw/lib64 |
libasnsupl.z.so | device/soc/sprd/uis7885/hardware/location/lib64 |
libgnssmgt.z.so | device/soc/sprd/uis7885/hardware/location/lib64 |
libgps.default.z.so | device/soc/sprd/uis7885/hardware/location/lib64 |
liblcsagent.z.so | device/soc/sprd/uis7885/hardware/location/lib64 |
liblcscp.z.so | device/soc/sprd/uis7885/hardware/location/lib64 |
liblcsmgt.z.so | device/soc/sprd/uis7885/hardware/location/lib64 |
liblcsmos.z.so | device/soc/sprd/uis7885/hardware/location/lib64 |
liblcspkcs15.z.so | device/soc/sprd/uis7885/hardware/location/lib64 |
liblcssc.z.so | device/soc/sprd/uis7885/hardware/location/lib64 |
liblcswbxml2.z.so | device/soc/sprd/uis7885/hardware/location/lib64 |
libsupl.z.so | device/soc/sprd/uis7885/hardware/location/lib64 |
QogirN6Pro_CH.bin | device/board/hys/laphone/pac/ImageFiles |
liballocator.z.so | device/soc/sprd/uis7885/hardware/gpu/lib64 |
libGLES_mali.z.so | device/soc/sprd/uis7885/hardware/gpu/lib64 |
libmapper.z.so | device/soc/sprd/uis7885/hardware/gpu/lib64 |
cp_diskserver.bin | vendor/hys/laphone/modem/bin |
libmodem_utils.z.so | vendor/hys/laphone/modem/lib64 |
libatci.z.so | vendor/hys/laphone/telephony/sprd_ril |
librilcore.z.so | vendor/hys/laphone/telephony/sprd_ril |
libril-impl.z.so | vendor/hys/laphone/telephony/sprd_ril |
libril-private.z.so | vendor/hys/laphone/telephony/sprd_ril |
librilutils.z.so | vendor/hys/laphone/telephony/sprd_ril |
modem_control.bin | vendor/hys/laphone/modem/bin |
modem_ch_info.xml | vendor/hys/laphone/modem/etc |
modem_cp_info.xml | vendor/hys/laphone/modem/etc |
modem_ril.ini | vendor/hys/laphone/modem/etc |
modem_sp_info.xml | vendor/hys/laphone/modem/etc |
sml-sign.bin | device/board/hys/laphone/pac/ImageFiles |
附录2:OpenHarmony编译环境搭建
官方文档:
https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/get-code/sourcecode-acquire.md
https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/subsystems/subsys-build-all.md
三方文档:
https://forums.openharmony.cn/forum.php?mod=viewthread&tid=897&page=1#pid2144&login=from_csdn
更多推荐
所有评论(0)