编译环境建议:

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.sovendor/hys/laphone/camera/ispalg/isp_lib/libs/32/oh_libae3.x_release
libaf3.2.z.sovendor/hys/laphone/camera/ispalg/isp_lib/libs/32
libaf3.2_le.z.sovendor/hys/laphone/camera/ispalg/isp_lib/libs/32
libaftrigger.z.sovendor/hys/laphone/camera/ispalg/isp_lib/libs/32
libalsc3.2.z.sovendor/hys/laphone/camera/ispalg/isp_lib/libs/32/oh_libalsc3.2
libatm.z.sovendor/hys/laphone/camera/ispalg/isp_lib/libs/32/oh_libatm_release
libawb3.2.z.sovendor/hys/laphone/camera/ispalg/isp_lib/libs/32/oh_libawb3.2
libdeflicker.z.sovendor/hys/laphone/camera/ispalg/isp_lib/libs/32/oh_libdeflicker_release
libflash.z.sovendor/hys/laphone/camera/ispalg/isp_lib/libs/32/oh_libflash_release
libpdalgo.z.sovendor/hys/laphone/camera/ispalg/isp_lib/libs/32
libae3.x.z.sovendor/hys/laphone/camera/ispalg/isp_lib/libs/64
libaf3.2.z.sovendor/hys/laphone/camera/ispalg/isp_lib/libs/64
libaf3.2_le.z.sovendor/hys/laphone/camera/ispalg/isp_lib/libs/64
libaftrigger.z.sovendor/hys/laphone/camera/ispalg/isp_lib/libs/64
libalsc3.2.z.sovendor/hys/laphone/camera/ispalg/isp_lib/libs/64
libatm.z.sovendor/hys/laphone/camera/ispalg/isp_lib/libs/64
libawb3.2.z.sovendor/hys/laphone/camera/ispalg/isp_lib/libs/64
libdeflicker.z.sovendor/hys/laphone/camera/ispalg/isp_lib/libs/64
libflash.z.sovendor/hys/laphone/camera/ispalg/isp_lib/libs/64
libpdalgo.z.sovendor/hys/laphone/camera/ispalg/isp_lib/libs/64
libjpeg_hw_sprd.z.sodevice/soc/sprd/uis7885/hardware/camera/lib
libomx_avcdec_hw_sprd.z.sodevice/soc/sprd/uis7885/hardware/omx_il/components/video/avc/dec/hw/lib64
libomx_avcenc_hw_sprd.z.sodevice/soc/sprd/uis7885/hardware/omx_il/components/video/avc/dec/hw/lib64
libasnsupl.z.sodevice/soc/sprd/uis7885/hardware/location/lib64
libgnssmgt.z.sodevice/soc/sprd/uis7885/hardware/location/lib64
libgps.default.z.sodevice/soc/sprd/uis7885/hardware/location/lib64
liblcsagent.z.sodevice/soc/sprd/uis7885/hardware/location/lib64
liblcscp.z.sodevice/soc/sprd/uis7885/hardware/location/lib64
liblcsmgt.z.sodevice/soc/sprd/uis7885/hardware/location/lib64
liblcsmos.z.sodevice/soc/sprd/uis7885/hardware/location/lib64
liblcspkcs15.z.sodevice/soc/sprd/uis7885/hardware/location/lib64
liblcssc.z.sodevice/soc/sprd/uis7885/hardware/location/lib64
liblcswbxml2.z.sodevice/soc/sprd/uis7885/hardware/location/lib64
libsupl.z.sodevice/soc/sprd/uis7885/hardware/location/lib64
QogirN6Pro_CH.bindevice/board/hys/laphone/pac/ImageFiles
liballocator.z.sodevice/soc/sprd/uis7885/hardware/gpu/lib64
libGLES_mali.z.sodevice/soc/sprd/uis7885/hardware/gpu/lib64
libmapper.z.sodevice/soc/sprd/uis7885/hardware/gpu/lib64
cp_diskserver.binvendor/hys/laphone/modem/bin
libmodem_utils.z.sovendor/hys/laphone/modem/lib64
libatci.z.sovendor/hys/laphone/telephony/sprd_ril
librilcore.z.sovendor/hys/laphone/telephony/sprd_ril
libril-impl.z.sovendor/hys/laphone/telephony/sprd_ril
libril-private.z.sovendor/hys/laphone/telephony/sprd_ril
librilutils.z.sovendor/hys/laphone/telephony/sprd_ril
modem_control.binvendor/hys/laphone/modem/bin
modem_ch_info.xmlvendor/hys/laphone/modem/etc
modem_cp_info.xmlvendor/hys/laphone/modem/etc
modem_ril.inivendor/hys/laphone/modem/etc
modem_sp_info.xmlvendor/hys/laphone/modem/etc
sml-sign.bindevice/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://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-pkg-install-package.md

三方文档:

https://forums.openharmony.cn/forum.php?mod=viewthread&tid=897&page=1#pid2144&login=from_csdn

Logo

社区规范:仅讨论OpenHarmony相关问题。

更多推荐