|
【技术讨论】
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”,按照这个思路及作者的意见,运行内核一直出错。错误信息如下
- Warning: Something odd, no /lib/modules/4.19.232 in initramfs.
- done.
- mount: mounting /run on /root/run failed: No such file or directory
- run-init: /sbin/init: No such file or directory
- Target filesystem doesn't have requested /sbin/init.
- run-init: /sbin/init: No such file or directory
- run-init: /etc/init: Permission denied
- [ 5.222574] [pid=1][INIT][INFO] [init.c:225)] DISABLE_INIT_TWO_STAGES not defined
- [ 5.222798] [pid=1][INIT][ERROR] [init.c:175)] Failed get fstab.required
- [ 5.222907] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004
- [ 5.222907]
- [ 5.224703] CPU: 3 PID: 1 Comm: init Not tainted 4.19.232 #1
- [ 5.225200] Hardware name: AIO-3568J HDMI (Linux) (DT)
- [ 5.225653] Call trace:
- [ 5.225891] dump_backtrace+0x0/0x188
- [ 5.226220] show_stack+0x24/0x30
- [ 5.226526] dump_stack+0x8c/0xb4
- [ 5.226832] panic+0x138/0x2b0
- [ 5.227117] do_exit+0x1a4/0x884
- [ 5.227410] __arm64_sys_exit_group+0x0/0x24
- [ 5.227795] get_signal+0x694/0x698
- [ 5.228111] do_signal+0x9c/0x238
- [ 5.228414] do_notify_resume+0xc8/0x114
- [ 5.228764] work_pending+0x8/0x10
- [ 5.229072] SMP: stopping secondary CPUs
- [ 5.229475] PMU CRU:
- [ 5.229684] 00000000: 00006064 00001481 00000000 00000007 00007f00 00000000 00000000 00000000
- [ 5.230437] 00000020: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
- [ 5.231190] 00000040: 00002063 00001481 00000000 00000007 00007f00 00000000 00000000 00000000
- [ 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
- productdefine/common/device/rk3568.json
- "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 编译(可以考虑同时更换开机画面)
- ./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,启动
启动没有问题,看着也挺多错误的。
- <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正常的,不知道问题出在哪里,我加了一些日志
- [ 0.623956] [huzghost]drivers/gpu/drm/rockchip/rockchip_drm_drv.c:rockchip_drm_init, num sub :8
- [ 0.624940] rockchip-vop2 fe040000.vop: Adding to iommu group 7
- [ 0.625144] [huzghost]drivers/gpu/drm/rockchip/rockchip_vop2_reg.c:vop2_probe, vop2_component_ops
- [ 0.630582] rockchip-vop2 fe040000.vop: [drm:vop2_bind] vp0 assign plane mask: 0x3f, primary plane phy id: 4
- [ 0.630642] rockchip-vop2 fe040000.vop: [drm:vop2_bind] vp1 assign plane mask: 0x0, primary plane phy id: -1
- [ 0.630657] rockchip-vop2 fe040000.vop: [drm:vop2_bind] vp2 assign plane mask: 0x0, primary plane phy id: -1
- [ 0.630686] [huzghost@126.com] vop2_bind, vop2_create_crtc
- [ 0.630889] [drm] failed to init overlay plane Cluster0-win0
- [ 0.630903] [drm] failed to init overlay plane Cluster0-win1
- [ 0.630910] [drm] failed to init overlay plane Cluster1-win0
- [ 0.630916] [drm] failed to init overlay plane Cluster1-win1
- [ 0.631103] [huzghost]drivers/gpu/drm/rockchip/rockchip_drm_vop2.c:vop2_wb_connector_init
- [ 0.631145] rockchip-drm display-subsystem: bound fe040000.vop (ops 0xffffffc0110426d8)
- [ 0.631161] [huzghost], drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c:dw_hdmi_rockchip_bind
- [ 0.631425] dwhdmi-rockchip hdmi: Detected HDMI TX controller v2.11a with HDCP (DWC HDMI 2.0 TX PHY)
- [ 0.632053] dwhdmi-rockchip hdmi: registered DesignWare HDMI I2C bus driver
- [ 0.632447] rockchip-drm display-subsystem: bound hdmi (ops 0xffffffc0110460c0)
- [ 0.632950] [huzghost]drivers/gpu/drm/drm_fb_helper.c:__drm_fb_helper_initial_config_and_unlock, width = 16384, height = 16384
- [ 0.632962] [huzghost],drivers/gpu/drm/drm_probe_helper.c:drm_helper_probe_single_connector_modes[CONNECTOR:126:HDMI-A-1]
- [ 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
- # ifconfig eth1 192.168.50.249 netmask 192.168.50.205
- [ 7979.372997] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
- [ 7979.375028] rk_gmac-dwmac fe2a0000.ethernet eth1: PHY [stmmac-0:00] driver [Generic PHY] (irq=POLL)
- [ 7979.376536] rockchip-cpuinfo cpuinfo: failed to get id cell: -517
- [ 7979.380506] dwmac4: Master AXI performs any burst length
- [ 7979.380580] rk_gmac-dwmac fe2a0000.ethernet eth1: No Safety Features support found
- [ 7979.380621] rk_gmac-dwmac fe2a0000.ethernet eth1: IEEE 1588-2008 Advanced Timestamp supported
- [ 7979.381466] rk_gmac-dwmac fe2a0000.ethernet eth1: registered PTP clock
- [ 7979.383406] rk_gmac-dwmac fe2a0000.ethernet eth1: configuring for phy/rgmii link mode
- [ 7979.384644] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
- ifconfig: ioctl 891c: Invalid argument
- [ 7979.385012] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
- #
复制代码 查看ip 已经设置成功
5.2.4 ping 就会出现如下错误,有权限问题,这就完全不懂了。
- # ping 192.168.50.205
- ing: socket SOCK_DGRAM 1: Permission denied[
- 8133.973893] audKietr:n etly pbeug workaround (as root):
- echo 0 9999999 > /proc/sys/net/ipv4/ping_g=1roup_range
- 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
- #
复制代码
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的相关错误内容如下:
- [ 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
- [ 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
- [ 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
- [ 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
- [ 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
- [ 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
- [ 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.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
- [ 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个问题。也一直没解决
|
|