Getting error in IPCF

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Getting error in IPCF

883 次查看
ashwini2024
Contributor II

root@s32g399ardb3:/usr/lib/lxc# cd rootfs
root@s32g399ardb3:/usr/lib/lxc/rootfs# ls
README  ipc-shm-dev.ko  ipc-shm-sample.ko
root@s32g399ardb3:/usr/lib/lxc/rootfs# ./ipc-shm-dev.ko
-sh: ./ipc-shm-dev.ko: cannot execute binary file: Exec format error
root@s32g399ardb3:/usr/lib/lxc/rootfs# insmod /lib/modules/`uname -r`/extra/ipc-shm-dev.ko
insmod: ERROR: could not load module /lib/modules/6.6.12-rt20-g649905a72693-dirty/extra/ipc-shm-dev.ko: No such file or directory
root@s32g399ardb3:/usr/lib/lxc/rootfs# insmod ipc-shm-dev.ko
[  247.213335] Invalid ELF header magic: != ELF
insmod: ERROR: could not insert module ipc-shm-dev.ko: Invalid module format
root@s32g399ardb3:/usr/lib/lxc/rootfs# insmod ipc-shm-sample.ko                                                                                                                                            
[  280.353533] module ipc_shm_sample: .gnu.linkonce.this_module section size must match the kernel's built struct module size at run time
insmod: ERROR: could not insert module ipc-shm-sample.ko: Invalid module format
root@s32g399ardb3:/usr/lib/lxc/rootfs# [  316.576628] EXT4-fs (mmcblk0p2): error count since last fsck: 307
[  316.582351] EXT4-fs (mmcblk0p2): initial error at time 1651167745: ext4_validate_block_bitmap:421
[  316.591183] EXT4-fs (mmcblk0p2): last error at time 1718268511: ext4_lookup:1855: inode 60435
^C^C
root@s32g399ardb3:/usr/lib/lxc/rootfs# logout

 

Auto Linux BSP 40.0 s32g399ardb3 ttyLF0

 

s32g399ardb3 login: root
Last login: Thu Jun 13 08:48:36 UTC 2024 on ttyLF0
root@s32g399ardb3:~# file /lib/modules/6.6.12-rt20-g649905a72693-dirty/extra/ipc-shm-dev.ko
/lib/modules/6.6.12-rt20-g649905a72693-dirty/extra/ipc-shm-dev.ko: cannot open `/lib/modules/6.6.12-rt20-g649905a72693-dirty/extra/ipc-shm-dev.ko' (No such file or directory)
root@s32g399ardb3:~# file /lib/modules/6.6.12-rt20-g649905a72693-dirty/ipc-shm-dev.ko
/lib/modules/6.6.12-rt20-g649905a72693-dirty/ipc-shm-dev.ko: ELF 64-bit LSB relocatable, ARM aarch64, version 1 (SYSV), BuildID[sha1]=1c4514d4a9208259f43e2f9e5247c13965d0a8be, with debug_info, not stripd
root@s32g399ardb3:~# insmod /lib/modules/6.6.12-rt20-g649905a72693-dirty/ipc-shm-dev.ko
[ 1084.389200] module ipc_shm_dev: .gnu.linkonce.this_module section size must match the kernel's built struct module size at run time
insmod: ERROR: could not insert module /lib/modules/6.6.12-rt20-g649905a72693-dirty/ipc-shm-dev.ko: Invalid module format
root@s32g399ardb3:~# insmod /lib/modules/6.6.12-rt20-g649905a72693-dirty/ipc-shm-dev.ko
[ 1664.001059] module ipc_shm_dev: .gnu.linkonce.this_module section size must match the kernel's built struct module size at run time
insmod: ERROR: could not insert module /lib/modules/6.6.12-rt20-g649905a72693-dirty/ipc-shm-dev.ko: Invalid module format
root@s32g399ardb3:~# file /lib/modules/6.6.12-rt20-g649905a72693-dirty/ipc-shm-dev.ko
/lib/modules/6.6.12-rt20-g649905a72693-dirty/ipc-shm-dev.ko: ELF 64-bit LSB relocatable, ARM aarch64, version 1 (SYSV), BuildID[sha1]=1c4514d4a9208259f43e2f9e5247c13965d0a8be, with debug_info, not stripd
root@s32g399ardb3:~# insmod ipc-shm-sample.ko                                                                                                                
insmod: ERROR: could not load module ipc-shm-sample.ko: No such file or directory

0 项奖励
回复
5 回复数

718 次查看
chenyin_h
NXP Employee
NXP Employee

Hello, @ashwini2024 

Thanks for the reply.

By default, the IPCF modules for running on A53 side are already built and put in the rootfs of the pre-built images, when flashing the default pre-built images to the SD card to boot the system, the IPCF modules could be found on the board.

 

In the BSP40 pre-built rootfs, the IPCF modules are built from IPCF 4.9 by default, means that if you are using IPCF4.9 on M core side, then on A53 side, you may not need to build the IPCF modules yourself, but using the default one in the rootfs.

 

Since you are working with IPCF4.10, from A53 side, you may have to compile the IPCF 4.10 modules manually, then copy the modules built to the rootfs and insmod them.

 

Best Regards

Chenyin

0 项奖励
回复

780 次查看
chenyin_h
NXP Employee
NXP Employee

Hello, @ashwini2024 

Thanks for the feedback.

From the logs, seems the modules and kernel are not matched, I suggest re-build the modules first(point to the kernel sources that will use), then rebuild the kernel, boot the board with the newly built kernel image and IPCF modules, then to have a try.

Note that do not use the default IPCF modules from the pre-built images, since it is 4.9, not 4.10.

 

Best Regards

Chenyin

0 项奖励
回复

778 次查看
ashwini2024
Contributor II

do not use the default IPCF modules from the pre-built images, since it is 4.9, not 4.10. What does this mean ? can u give an explanation on the same? What am i supposed to use if not the pre built images?

 

 

0 项奖励
回复

854 次查看
chenyin_h
NXP Employee
NXP Employee

Thanks for the questions.

May I know which version BSP you are using for the test? How the modules generated? By Yocto or built yourselves?

 

Best Regards

Chenyin

0 项奖励
回复

813 次查看
ashwini2024
Contributor II

bsp 40.0 i am buiding manually the sample package from github link is :https://github.com/nxp-auto-linux/ipc-shm/tree/release/SW32G_IPCF_4.10.0_D2405/sample

0 项奖励
回复