[FFH]AI camera hi3516DV300 开发板 环境搭建烧录 重要问题记录 原创

会飞的晨风君
发布于 2022-4-18 14:11
浏览
1收藏

问题解决记录 ssh connect refused clang(ohos错误) java 网口烧录配置

安装ubuntu并配置有关设备编译环境

  1. 按照正常流程配置ubuntu环境 参考Wait_Aurora同学安装Ubuntu到移动介质并设置好UEFI引导的文章
  2. 在进行远程ssh挂载时,三次出现ssh connect refused情况 在其他电脑中也可以复现,猜测原因是ubuntu本身自带的ssh服务与vmware外的ssh服务需要进行参数和规则修正,需要检查的项目包括
    • 目标主机的ssh server端程序是否安装、服务是否启动,是否在侦听22端口
    • 本机是否设置了iptables规则,禁止了ssh的连入/连出;
	sudo iptables -L
*SSH分客户端openssh-client和openssh-server

如果你只是想登陆别的机器的SSH只需要安装openssh-client(ubuntu有默认安装,如果没有则sudo apt-get install openssh-client),如果要使本机开放SSH服务就需要安装openssh-server:

sudo apt-get install openssh-server

然后确认sshserver是否启动了:

ps -e |grep ssh
# 重启服务
sudo /etc/init.d/ssh stop
sudo /etc/init.d/ssh start

编译时错误

报错信息如下

[OHOS ERROR] [344/2670] ACTION //foundation/multimedia/medialibrary_standard/frameworks/innerkitsimpl/medialibrary_data_ability:medialibrary_dynamic_hap(//build/toolchain/ohos:ohos_clang_arm)
[OHOS ERROR] FAILED: obj/foundation/multimedia/medialibrary_standard/frameworks/innerkitsimpl/medialibrary_data_ability/Media_Library.hap 
[OHOS ERROR] /usr/bin/env ../../build/scripts/hapbuilder.py --depfile gen/foundation/multimedia/medialibrary_standard/frameworks/innerkitsimpl/medialibrary_data_ability/medialibrary_dynamic_hap.d --hap-profile ../../foundation/multimedia/medialibrary_standard/frameworks/innerkitsimpl/medialibrary_data_ability/config.json --hapsigner ../../prebuilts/signcenter/hapsigntool/hapsigntoolv2.jar --hap-packing-tool ../../developtools/packing_tool/jar/app_packing_tool.jar --hap-path obj/foundation/multimedia/medialibrary_standard/frameworks/innerkitsimpl/medialibrary_data_ability/Media_Library.hap --packaged-resources obj/foundation/multimedia/medialibrary_standard/frameworks/innerkitsimpl/medialibrary_data_ability/medialibrary_dynamic_hap/resources.zip --packaged-js-assets obj/foundation/multimedia/medialibrary_standard/frameworks/innerkitsimpl/medialibrary_data_ability/medialibrary_dynamic_hap/js_assets.zip --assets=@FileArg\(gen/foundation/multimedia/medialibrary_standard/frameworks/innerkitsimpl/medialibrary_data_ability/medialibrary_dynamic_hap.metadata:root:assets\) --private-key-path OpenHarmony\ Application\ Release --sign-algo SHA256withECDSA --certificate-profile ../../foundation/multimedia/medialibrary_standard/frameworks/innerkitsimpl/signature/medialib.p7b --keyalias 123456 --keystore-path ../../prebuilts/signcenter/key/OpenHarmony.p12 --keystorepasswd 123456 --certificate-file ../../prebuilts/signcenter/certificates/OpenHarmonyApplication.pem --dso=@FileArg\(obj/foundation/multimedia/medialibrary_standard/frameworks/innerkitsimpl/medialibrary_data_ability/medialibrary_data_ability_module_info.json:source\)
[OHOS ERROR] Traceback (most recent call last):
[OHOS ERROR]   File "../../build/scripts/hapbuilder.py", line 200, in <module>
[OHOS ERROR]     sys.exit(main(sys.argv[1:]))
[OHOS ERROR]   File "../../build/scripts/hapbuilder.py", line 185, in main
[OHOS ERROR]     build_utils.call_and_write_depfile_if_stale(
[OHOS ERROR]   File "/home/dylan/harmonyos/openharmony/build/scripts/util/build_utils.py", line 709, in call_and_write_depfile_if_stale
[OHOS ERROR]     md5_check.call_and_record_if_stale(on_stale_md5,
[OHOS ERROR]   File "/home/dylan/harmonyos/openharmony/build/scripts/util/md5_check.py", line 121, in call_and_record_if_stale
[OHOS ERROR]     function(*args)
[OHOS ERROR]   File "/home/dylan/harmonyos/openharmony/build/scripts/util/build_utils.py", line 699, in on_stale_md5
[OHOS ERROR]     function(*args)
[OHOS ERROR]   File "../../build/scripts/hapbuilder.py", line 186, in <lambda>
[OHOS ERROR]     lambda: create_hap(options, options.hap_path),
[OHOS ERROR]   File "../../build/scripts/hapbuilder.py", line 124, in create_hap
[OHOS ERROR]     build_utils.check_output(packing_cmd)
[OHOS ERROR]   File "/home/dylan/harmonyos/openharmony/build/scripts/util/build_utils.py", line 226, in check_output
[OHOS ERROR]     child = subprocess.Popen(args,
[OHOS ERROR]   File "/home/dylan/harmonyos/openharmony/prebuilts/python/linux-x86/3.8.5/lib/python3.8/subprocess.py", line 854, in __init__
[OHOS ERROR]     self._execute_child(args, executable, preexec_fn, close_fds,
[OHOS ERROR]   File "/home/dylan/harmonyos/openharmony/prebuilts/python/linux-x86/3.8.5/lib/python3.8/subprocess.py", line 1702, in _execute_child
[OHOS ERROR]     raise child_exception_type(errno_num, err_msg, err_filename)
[OHOS ERROR] FileNotFoundError: [Errno 2] No such file or directory: 'java'
  1. 在报错中可以看到clang配置有问题,似乎缺少依赖,于是查询“clang-error-while-loading-shared-libraries-libtinfo-so-5“
    找到安装该库的方案
 sudo apt install libncurses5
  1. 在报错中可以看到java 环境配置又问题,参考网上众多ubuntu安装java 的教程进行配置。
  2. 在漫长的等待后编译完成

烧录问题

烧录步骤1 按照指导手册中进行串口烧录,速度极低,在同情况下更换为usb烧录,驱动不能识别,最终购买交换机+usb转wan口进行网口下载

网口下载的操作具体细节

  1. 网口设置
    [FFH]AI camera hi3516DV300 开发板 环境搭建烧录 重要问题记录-鸿蒙开发者社区
  2. 控制面板中进入以太网设置,设置特定地址和IP,以及DNS
    [FFH]AI camera hi3516DV300 开发板 环境搭建烧录 重要问题记录-鸿蒙开发者社区
    [FFH]AI camera hi3516DV300 开发板 环境搭建烧录 重要问题记录-鸿蒙开发者社区
  3. 参考设置如下
IP地址为:192.168.1.5
子网:255.255.255.0
默认网关:192.168.1.1

按照生成的分区表进行下载

烧录问题的一些测试解决方案和备注

在接新硬件时应当注意在虚拟机环境中选择挂载到主机
重新刷新uboot需要找对位置不要写错镜像导致问题。

©著作权归作者所有,如需转载,请注明出处,否则将追究法律责任
5
收藏 1
回复
举报
回复
    相关推荐