• Lv0
    粉丝5

积分196 / 贡献0

提问31答案被采纳6文章2

作者动态

rv1126移植init初始阶段出现undefined instruction

shixiaocheng 显示全部楼层 发表于 2024-10-21 09:17:10
【问题描述】
问题现象和发生的背景

移植OH4.0至rv1126时,在init阶段出现崩溃,想请问这大概是什么问题,如何解决?内核是使用原厂内核,gcc编译。

相关的代码,截图,日志信息

fakename.png

```
..4:14:09:215 [ 1.867989] [pid=1][Init][INFO][init.c:273]boot job boot-service:service-1-000 start.
..4:14:09:215 [ 1.868042] [pid=1][Init][INFO][init_service_manager.c:1088]Start service hdf_devmgr
..4:14:09:216 [ 1.868151] [pid=104][Init][INFO][init_service_socket.c:142]CreateSocket hilogControl success
..4:14:09:216 [ 1.868374] [pid=104][Init][INFO][init_service_socket.c:142]CreateSocket hilogOutput success
..4:14:09:216 [ 1.869065] [pid=1][Init][INFO][init_common_service.c:567]Service hdf_devmgr(pid 105) started
..4:14:09:216 [ 1.869498] [pid=1][Init][INFO][init_service_manager.c:1088]Start service device_manager
..4:14:09:217 [ 1.870156] [pid=1][Init][INFO][init_common_service.c:567]Service device_manager(pid 106) started
..4:14:09:217 [ 1.874977] [pid=1][Init][INFO][init_common_service.c:567]Service appspawn(pid 110) started
..4:14:09:217 [ 1.875436] [pid=1][Init][INFO][init_service_manager.c:1088]Start service samgr
..4:14:09:217 [ 1.876988] [pid=1][Init][INFO][init_common_service.c:567]Service samgr(pid 112) started
..4:14:09:218 [ 1.878911] [pid=109][Init][ERROR][init_common_cmds.c:342]Create directory '/data/log' failed, err=30.
..4:14:09:218 [ 1.878927] [pid=1][Init][INFO][init_service_manager.c:1088]Start service storage_manager
..4:14:09:239 [ 1.879027] [pid=109][Init][ERROR][init_common_cmds.c:342]Create directory '/data/log/hiview' failed, err=2.
..4:14:09:239 [ 1.879120] [pid=109][Init][ERROR][init_common_cmds.c:342]Create directory '/data/log/hiview/temp' failed, err=2.
..4:14:09:241 [ 1.879208] [pid=109][Init][ERROR][init_common_cmds.c:342]Create directory '/data/log/faultlog/' failed, err=2.
..4:14:09:241 [ 1.879270] [pid=109][Init][ERROR][init_common_cmds.c:342]Create directory '/data/log/faultlog/temp/' failed, err=2.
..4:14:09:241 [ 1.879424] [pid=109][Init][ERROR][init_common_cmds.c:342]Create directory '/data/log/bbox/' failed, err=2.
..4:14:09:242 [ 1.887502] [pid=1][Init][ERROR][init_common_cmds.c:377]Failed to change mode " /sys/kernel/tracing/events/cgroup/enable " to 0666, err=2
..4:14:09:242 [ 1.887843] [pid=1][Init][ERROR][init_common_cmds.c:377]Failed to change mode " /sys/kernel/tracing/events/cpufreq_interactive/enable " to 0666, err=2
..4:14:09:242 [ 1.887937] [pid=1][Init][ERROR][init_common_cmds.c:377]Failed to change mode " /sys/kernel/tracing/events/dma_fence/enable " to 0666, err=2
..4:14:09:242 [ 1.888012] [pid=1][Init][ERROR][init_common_cmds.c:377]Failed to change mode " /sys/kernel/tracing/events/fence/enable " to 0666, err=2
..4:14:09:242 [ 1.888088] [pid=1][Init][ERROR][init_common_cmds.c:377]Failed to change mode " /sys/kernel/tracing/events/i2c/enable " to 0666, err=2
..4:14:09:243 [ 1.888163] [pid=1][Init][ERROR][init_common_cmds.c:377]Failed to change mode " /sys/kernel/tracing/events/i2c/i2c_read/enable " to 0666, err=2
..4:14:09:243 [ 1.889115] [pid=1][Init][ERROR][init_common_cmds.c:377]Failed to change mode " /sys/kernel/tracing/events/i2c/i2c_write/enable " to 0666, err=2
..4:14:09:243 [ 1.896154] [pid=1][Init][ERROR][init_common_cmds.c:323]Failed to change owner for /config/hmdfs, err 2.
..4:14:09:243 [ 1.896324] [pid=1][Init][ERROR][init_common_cmds.c:323]Failed to change owner for /config/sharefs, err 2.
..4:14:09:244 [ 1.896500] [pid=1][Init][INFO][fscrypt_control.c:400]Fscrypt have not enabled
..4:14:09:244 [ 1.896537] [pid=1][Init][INFO][init_service_manager.c:1088]Start service wifi_hal_service
..4:14:09:244 [ 1.897059] [pid=1][Init][INFO][init_common_service.c:567]Service wifi_hal_service(pid 119) started
..4:14:09:244 [ 1.897786] [pid=1][Init][INFO][init.c:278]boot job post-init finish diff 17531 us.
..4:14:09:245 [ 1.897956] [pid=1][Init][INFO][init.c:273]boot job late-fs start.
..4:14:09:245 [ 1.898369] [pid=1][Init][ERROR][init_common_cmds.c:377]Failed to change mode " /sys/kernel/debug/tracing " to 0755, err=2
..4:14:09:245 [ 1.898614] [pid=1][Init][INFO][init.c:278]boot job late-fs finish diff 650 us.
..4:14:09:246 [ 1.898717] [pid=1][Init][INFO][init.c:273]boot job post-fs-data start.
..4:14:09:247 [ 1.898769] [pid=1][BEGET][INFO][fstab.c:430]LoadFscryptPolicy start
..4:14:09:247 [ 1.899629] [pid=1][Init][INFO][init_cmds.c:107]Sync exec: /system/bin/sdc
..4:14:09:248 [ 1.921007] binder: 105:105 transaction failed 29189/-22, size 0-0 line 3115
..4:14:09:248 [ 1.941672] binder: 105:105 transaction failed 29189/-22, size 0-0 line 3115
..4:14:09:248 [ 1.962133] binder: 105:105 transaction failed 29189/-22, size 0-0 line 3115
..4:14:09:248 [ 1.982515] binder: 105:105 transaction failed 29189/-22, size 0-0 line 3115
..4:14:09:249 [ 2.002888] binder: 105:105 transaction failed 29189/-22, size 0-0 line 3115
..4:14:09:249 [ 2.017828] sa_main (106): undefined instruction: pc=db9a543b
..4:14:09:249 [ 2.017918] CPU: 3 PID: 106 Comm: sa_main Not tainted 4.19.111 #1
..4:14:09:249 [ 2.017941] Hardware name: Generic DT based system
..4:14:09:250 [ 2.017965] PC is at 0xa62b5e48
..4:14:09:250 [ 2.017984] LR is at 0xa62c3f29
..4:14:09:250 [ 2.018002] pc : [<a62b5e48>] lr : [<a62c3f29>] psr: 600f0010
..4:14:09:251 [ 2.018021] sp : ae9b8ad0 ip : a6311f7c fp : ae9b8d80
..4:14:09:251 [ 2.018038] r10: 00000002 r9 : a6f38658 r8 : 00000004
..4:14:09:251 [ 2.018056] r7 : ae9b8b58 r6 : a6316478 r5 : a6316488 r4 : ae9b8b54
..4:14:09:251 [ 2.018074] r3 : 00000008 r2 : a631660c r1 : 00000000 r0 : 00000000
..4:14:09:251 [ 2.018094] Flags: nZCv IRQs on FIQs on Mode USER_32 ISA ARM Segment user
..4:14:09:252 [ 2.018143] Control: 10c5387d Table: 2731006a DAC: 00000055
..4:14:09:252 [ 2.018174] Code: f2000c40 e12fff1e f3000c40 e12fff1e (f2a00e00)
..4:14:09:252 [ 2.018235] sa_main (106): undefined instruction: pc=cb60d6e5
..4:14:09:252 [ 2.018263] CPU: 3 PID: 106 Comm: sa_main Not tainted 4.19.111 #1
..4:14:09:253 [ 2.018282] Hardware name: Generic DT based system
..4:14:09:253 [ 2.018304] PC is at 0xa62b5e30
..4:14:09:253 [ 2.018324] LR is at 0xa62c3f21
..4:14:09:253 [ 2.018343] pc : [<a62b5e30>] lr : [<a62c3f21>] psr: 600f0010
..4:14:09:253 [ 2.018382] sp : ae9b8ad0 ip : a6311f70 fp : ae9b8d80
..4:14:09:254 [ 2.018401] r10: 00000002 r9 : a6f38658 r8 : 00000004
..4:14:09:254 [ 2.018420] r7 : ae9b8b58 r6 : a6316478 r5 : a6316488 r4 : ae9b8b54
..4:14:09:254 [ 2.018438] r3 : 00000008 r2 : a631660c r1 : 00000000 r0 : 00000000
..4:14:09:254 [ 2.018458] Flags: nZCv IRQs on FIQs on Mode USER_32 ISA ARM Segment user
```
我尝试过的解决方法和结果


我想要达到的结果


【运行环境】
硬件:
ROM版本:
DevEvoStudio版本:
SDK版本:

您尚未登录,无法参与评论,登录后可以:
参与开源共建问题交流
认同或收藏高质量问答
获取积分成为开源共建先驱

精彩评论3

深开鸿_王石

沙发 发表于 2024-10-22 09:22:23
sa_main编译不对吧,看看sa_main是不是编译的和你内核选的架构不一样还是咋了

shixiaocheng

发表于 2024-10-23 11:37  IP属地: 福建省厦门市

回复 深开鸿_王石: 好像是openssl这里的问题

shixiaocheng

发表于 2024-10-23 11:38  IP属地: 福建省厦门市

回复 深开鸿_王石: 架构是armv7a,没有问题

【2 条回复】

Copyright   ©2023  OpenHarmony开发者论坛  京ICP备2020036654号-3 |技术支持 Discuz!

返回顶部