Firefly开源社区

打印 上一主题 下一主题

[技术讨论] Core 3568J 移植openHarmony Release3.1出现的问题

52

积分

0

威望

0

贡献

技术小白

积分
52

Core 3568J 移植openHarmony Release3.1出现的问题

发表于 2022-6-14 11:28:15      浏览:6484 | 回复:3        打印      只看该作者   [复制链接] 楼主
  • 固件类型: 自行编译的固件
  • SDK包名称: openHarmony Relase3.1
  • SDK更新到哪个COMMIT: 0000-00-00 00:00:00
  • SDK修改内容: openHarmony Relase3.1
  • Log日志: openHarmony_log.tar.gz
问题描述及复现步骤:
1,首先参考了“https://dev.t-firefly.com/thread-117090-1-1.html”,按照这个思路及作者的意见,运行内核一直出错。错误信息如下
  1. Warning: Something odd, no /lib/modules/4.19.232 in initramfs.
  2. done.
  3. mount: mounting /run on /root/run failed: No such file or directory
  4. run-init: /sbin/init: No such file or directory
  5. Target filesystem doesn't have requested /sbin/init.
  6. run-init: /sbin/init: No such file or directory
  7. run-init: /etc/init: Permission denied
  8. [ 5.222574] [pid=1][INIT][INFO] [init.c:225)] DISABLE_INIT_TWO_STAGES not defined
  9. [ 5.222798] [pid=1][INIT][ERROR] [init.c:175)] Failed get fstab.required
  10. [ 5.222907] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004
  11. [ 5.222907]
  12. [ 5.224703] CPU: 3 PID: 1 Comm: init Not tainted 4.19.232 #1
  13. [ 5.225200] Hardware name: AIO-3568J HDMI (Linux) (DT)
  14. [ 5.225653] Call trace:
  15. [ 5.225891] dump_backtrace+0x0/0x188
  16. [ 5.226220] show_stack+0x24/0x30
  17. [ 5.226526] dump_stack+0x8c/0xb4
  18. [ 5.226832] panic+0x138/0x2b0
  19. [ 5.227117] do_exit+0x1a4/0x884
  20. [ 5.227410] __arm64_sys_exit_group+0x0/0x24
  21. [ 5.227795] get_signal+0x694/0x698
  22. [ 5.228111] do_signal+0x9c/0x238
  23. [ 5.228414] do_notify_resume+0xc8/0x114
  24. [ 5.228764] work_pending+0x8/0x10
  25. [ 5.229072] SMP: stopping secondary CPUs
  26. [ 5.229475] PMU CRU:
  27. [ 5.229684] 00000000: 00006064 00001481 00000000 00000007 00007f00 00000000 00000000 00000000
  28. [ 5.230437] 00000020: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  29. [ 5.231190] 00000040: 00002063 00001481 00000000 00000007 00007f00 00000000 00000000 00000000
  30. [ 5.231942] 00000060: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
复制代码
说是缺少了ramdisk.img文件。


2,更换思路,将linux sdk的关于Core rk3568J移植到openHarmony 3.1 Release里面,以下是移植内容
2.1 先编译润和的rk3568
2.1.1 修改配置ramdisk
  1. productdefine/common/device/rk3568.json

  2. "enable_ramdisk": false,
复制代码

2.1.1 编译
./build.sh --product-name rk3568 –ccache
镜像文件生成目录:out/rk3568/packages/phone/images

2.2 拷贝Core rk3568J 相关文件
     依赖的设备树
2.3 修改make-ohos.sh(out/kernel/src_tmp/linux-5.10/make-ohos.sh
     添加编译支持 AIOJ-RK3568

2.4 编译(可以考虑同时更换开机画面)
  1. ./make-ohos.sh AIOJ-RK3568
复制代码
重新生成 boot_linu.img和resource.img


3.烧录
3.1 拷贝镜像文件:out/rk3568/packages/phone/images/目录下
MiniLoaderAll.bin,parameter.txt,system.img,uboot.img,userdata.img,vendor.img
3.2 拷贝内核文件:out/kernel/src_tmp/linux-5.10/目录下
boot_linu.img,resource.img
3.3 使用烧录工具进行烧录

4,启动
启动没有问题,看着也挺多错误的。
  1. <blockquote>[ 7572.608901] audit: type=1400 audit(1501931174.927:2163): avc:  denied  { ioctl } for  pid=1611 comm="dmesg" path="/dev/console" dev="tmpfs" ino=167 ioctlcmd=0x5413 scontext=u:r:sh:s0 tcontext=u:object_1
复制代码
5,问题描述(希望大侠帮忙看看怎么解决)
5.1 HDMI无法显示
从日志上,从DRM 到 HDMI 好像没啥问题,但是就是显示不出来,偶尔会显示出开机logo和进入,但是大部分还是无法显示界面。
HDMI的I2C正常的,不知道问题出在哪里,我加了一些日志
  1. [ 0.623956] [huzghost]drivers/gpu/drm/rockchip/rockchip_drm_drv.c:rockchip_drm_init, num sub :8
  2. [ 0.624940] rockchip-vop2 fe040000.vop: Adding to iommu group 7
  3. [ 0.625144] [huzghost]drivers/gpu/drm/rockchip/rockchip_vop2_reg.c:vop2_probe, vop2_component_ops
  4. [ 0.630582] rockchip-vop2 fe040000.vop: [drm:vop2_bind] vp0 assign plane mask: 0x3f, primary plane phy id: 4
  5. [ 0.630642] rockchip-vop2 fe040000.vop: [drm:vop2_bind] vp1 assign plane mask: 0x0, primary plane phy id: -1
  6. [ 0.630657] rockchip-vop2 fe040000.vop: [drm:vop2_bind] vp2 assign plane mask: 0x0, primary plane phy id: -1
  7. [ 0.630686] [huzghost@126.com] vop2_bind, vop2_create_crtc
  8. [ 0.630889] [drm] failed to init overlay plane Cluster0-win0
  9. [ 0.630903] [drm] failed to init overlay plane Cluster0-win1
  10. [ 0.630910] [drm] failed to init overlay plane Cluster1-win0
  11. [ 0.630916] [drm] failed to init overlay plane Cluster1-win1
  12. [ 0.631103] [huzghost]drivers/gpu/drm/rockchip/rockchip_drm_vop2.c:vop2_wb_connector_init
  13. [ 0.631145] rockchip-drm display-subsystem: bound fe040000.vop (ops 0xffffffc0110426d8)
  14. [ 0.631161] [huzghost], drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c:dw_hdmi_rockchip_bind
  15. [ 0.631425] dwhdmi-rockchip hdmi: Detected HDMI TX controller v2.11a with HDCP (DWC HDMI 2.0 TX PHY)
  16. [ 0.632053] dwhdmi-rockchip hdmi: registered DesignWare HDMI I2C bus driver
  17. [ 0.632447] rockchip-drm display-subsystem: bound hdmi (ops 0xffffffc0110460c0)
  18. [ 0.632950] [huzghost]drivers/gpu/drm/drm_fb_helper.c:__drm_fb_helper_initial_config_and_unlock, width = 16384, height = 16384
  19. [ 0.632962] [huzghost],drivers/gpu/drm/drm_probe_helper.c:drm_helper_probe_single_connector_modes[CONNECTOR:126:HDMI-A-1]
  20. [ 0.633001] [huzghost]drivers/gpu/drm/drm_fb_helper.c:drm_fb_helper_single_fb_probe, crtc_count=0, fb_width=-1, fb_height = -1
复制代码


5.2 网络有权限问题
网络正常,能用PC ping通开发板,但是开发板无法ping的PC,看错误是权限问题,这个不知道怎么解决, 有大侠了解吗
5.2.1 ipconfig -a 显示正常
5.2.2 设置ip
ifconfig eth0 192.168.50.249 netmask 255.255.255.0
  1. # ifconfig eth1 192.168.50.249 netmask 192.168.50.205
  2. [ 7979.372997] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
  3. [ 7979.375028] rk_gmac-dwmac fe2a0000.ethernet eth1: PHY [stmmac-0:00] driver [Generic PHY] (irq=POLL)
  4. [ 7979.376536] rockchip-cpuinfo cpuinfo: failed to get id cell: -517
  5. [ 7979.380506] dwmac4: Master AXI performs any burst length
  6. [ 7979.380580] rk_gmac-dwmac fe2a0000.ethernet eth1: No Safety Features support found
  7. [ 7979.380621] rk_gmac-dwmac fe2a0000.ethernet eth1: IEEE 1588-2008 Advanced Timestamp supported
  8. [ 7979.381466] rk_gmac-dwmac fe2a0000.ethernet eth1: registered PTP clock
  9. [ 7979.383406] rk_gmac-dwmac fe2a0000.ethernet eth1: configuring for phy/rgmii link mode
  10. [ 7979.384644] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
  11. ifconfig: ioctl 891c: Invalid argument
  12. [ 7979.385012] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
  13. #
复制代码
查看ip 已经设置成功

5.2.4 ping 就会出现如下错误,有权限问题,这就完全不懂了。
  1. # ping 192.168.50.205
  2. ing: socket SOCK_DGRAM 1: Permission denied[
  3. 8133.973893] audKietr:n etly pbeug workaround (as root):
  4. echo 0 9999999 > /proc/sys/net/ipv4/ping_g=1roup_range
  5. 400 audit(1501931736.294:2210): avc: denied { create } for pid=1653 comm="ping" scontext=u:r:sh:s0 tcontext=u:r:sh:s0 tclass=icmp_socket permissive=1
  6. #
复制代码

audit(1501931736.294:2210): avc: denied { create } for pid=1653 comm="ping" scontext=u:r:sh:s0 tcontext=u:r:sh:s0 tclass=icmp_socket permissive=1 这个东西,看到出现很多次,开机的时候也会出现,说是跟 selinux有关,audit的相关错误内容如下:
  1. [ 8.602058] audit: type=1400 audit(1501923610.920:3): avc: denied { write } for pid=1 comm="init" path="/dev/kmsg" dev="tmpfs" ino=3 scontext=u:r:kernel:s0 tcontext=u:object_r:tmpfs:s0 tclass=chr_fi1
  2. [ 8.602380] audit: type=1400 audit(1501923610.920:4): avc: denied { search } for pid=1 comm="init" name="/" dev="mmcblk0p5" ino=2 scontext=u:r:kernel:s0 tcontext=u:object_r:rootfs:s0 tclass=dir perm1
  3. [ 8.602439] audit: type=1400 audit(1501923610.920:5): avc: denied { search } for pid=1 comm="init" name="/" dev="proc" ino=1 scontext=u:r:kernel:s0 tcontext=u:object_r:proc_file:s0 tclass=dir permis1
  4. [ 8.602482] audit: type=1400 audit(1501923610.920:6): avc: denied { read } for pid=1 comm="init" name="thread-self" dev="proc" ino=4026531842 scontext=u:r:kernel:s0 tcontext=u:object_r:proc_file:s0 1
  5. [ 8.602681] audit: type=1400 audit(1501923610.920:7): avc: denied { search } for pid=1 comm="init" name="1" dev="proc" ino=1514 scontext=u:r:kernel:s0 tcontext=u:r:kernel:s0 tclass=dir permissive=1
  6. [ 8.603027] audit: type=1400 audit(1501923610.920:8): avc: denied { read write } for pid=1 comm="init" name="current" dev="proc" ino=1527 scontext=u:r:kernel:s0 tcontext=u:r:kernel:s0 tclass=file pe1
  7. [ 8.603086] audit: type=1400 audit(1501923610.920:9): avc: denied { open } for pid=1 comm="init" path="/proc/1/task/1/attr/current" dev="proc" ino=1527 scontext=u:r:kernel:s0 tcontext=u:r:kernel:s0 1
  8. [ 8.603129] audit: type=1400 audit(1501923610.920:10): avc: denied { setcurrent } for pid=1 comm="init" scontext=u:r:kernel:s0 tcontext=u:r:kernel:s0 tclass=process permissive=1
  9. [ 8.603417] audit: type=1400 audit(1501923610.920:11): avc: denied { dyntransition } for pid=1 comm="init" scontext=u:r:kernel:s0 tcontext=u:r:init:s0 tclass=process permissive=1
复制代码

不知道这种信息,需要怎么处理,不太懂这方面。


5.3 其它的功能暂时还没去弄,这几天一直在处理上面2个问题。也一直没解决






openHarmony_log.tar.gz

50.77 KB, 下载次数: 1, 下载积分: 灯泡 -1 , 经验 -1

回复

使用道具 举报

696

积分

0

威望

0

贡献

技术大神

Rank: 3Rank: 3

积分
696
发表于 2022-6-14 14:20:08        只看该作者  沙发
本帖最后由 Firefly_Javier 于 2022-6-14 15:37 编辑

AIOJ-RK3568这个板子最近会开始支持的
回复

使用道具 举报

52

积分

0

威望

0

贡献

技术小白

积分
52
发表于 2022-6-14 14:55:24        只看该作者  板凳
Firefly_Javier 发表于 2022-6-14 14:20
AIOJ-RK3568这个板子这两天会支持的

感觉整个openHarmony运行起来,有很多权限问题,是不是跟selinux有关?
回复

使用道具 举报

696

积分

0

威望

0

贡献

技术大神

Rank: 3Rank: 3

积分
696
发表于 2022-6-14 15:36:55        只看该作者  地板
本帖最后由 Firefly_Javier 于 2022-6-14 15:42 编辑
ChikoHu 发表于 2022-6-14 14:55
感觉整个openHarmony运行起来,有很多权限问题,是不是跟selinux有关?

还要研究下,我这边确实复现了同样的问题,HDMI显示问题,ping权限问题。但是在hdc_std上是可以正常ping的,这个要研究下。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表