about *.ko into SD card

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

about *.ko into SD card

3,256 Views
zhaoyanling
Contributor III

Dear expert,

I have downloaded the linux source code BSP 17.0 and BSP 18.0 for S32V234, and I installed the VSDK version 1_1_0 and VSDK version 1_2_0. I disked the SD card and installed files into SD card, and it can work well.

but when I compiled the *.ko driverthere are following cases:

1, BSP 17.0 + s32v234_sdk_1_1_0, I compiled the *.ko with Ubuntu 14.04,and these *.ko files are copied int to root folder of SD card, but when I run commond: insmod oal_cma.ko, the error is shown as following fig_1:

[  32.908157] oal_cma: version magic ‘4.1.26-rt29+g0df2715 SMP preempt mod_unload aarch64’ should be ‘4.14.34-rt27+g5b7d979 SMP mod_unload aarch64’

Insmod Errorcould not insert module ./oal_cma.ko:  Invalid module format.

fig_1.png 

2, BSP 18.0 + s32v234_sdk_1_2_0, I compiled the *.ko with Ubuntu 14.04,and these *.ko files are copied int to root folder of SD card, but when I run commond: insmod oal_cma.ko, the error is shown as following fig_2:

[  22.309899] oal_cma: version magic ‘4.14.34-rt27+g5b7d979 SMP preempt mod_unload aarch64’ should be ‘4.14.34-rt27+g5b7d979 SMP mod_unload aarch64’

Insmod Errorcould not insert module ./oal_cma.ko:  Invalid module format.

 fig_2.png

3, I use *.ko files which is included when s32v234_sdk_1_2_0 is installed, and these *.ko files are copied int to root folder of SD card, when I run commond: insmod oal_cma.ko, there is no error , only give the following hint:

Insmod: ERROR: could not insert module ./oal_cma.ko: File exists.

fig_3.png

Could you help me again? How can I solve the error of item 1 and item 2? And about item 3, in SD card ,where is the oal_cma.ko which is automatically loaded?

Thank you very much for your kind help!

 

0 Kudos
4 Replies

2,874 Views
jiri_kral
NXP Employee
NXP Employee

Hi,

1,2 - you built your kernel module with different kernel version than is on your EVB. That's why you got the version magic error.

3. the kernel module is already loaded. You can use rmod command. In case that rmod is not present on your system, just move oal_cma.ko to different folder and reboot your EVB. 

Anyway, why you need the custom oal_cma.ko kernel module? It is not typical use case. 

Jiri  

0 Kudos

2,874 Views
zhaoyanling
Contributor III

Hello Jiri Kral,

Thanks very much for your reply.

My development board is s32v234_sbc, not s32v234_evb.

1、How can I know the kernel version of my DEV board?

2、How can I change the kernel version of my DEV board?

By the way, in SD card , I install the Linux file system with Linux source BSP 18.0 for s32v234.And I debug the demos as the docunment <VisionSDK_UserGuide.pdf>, which shows the oal_cma.ko is needed, the details are shown as following:

doc_showing.bmp

0 Kudos

2,874 Views
jiri_kral
NXP Employee
NXP Employee

Hi, 

uname -r command prints kernel version

Best way how to get started with your EVB and linux is use linux OS image provided by VSDK. I'm not sure if you are using it - here is way how to setup your SD card: 

https://community.nxp.com/docs/DOC-335023 

With the OS image from VSDK - there are all required modules already loaded. You can list modules with lsmod command. In VSDK OS image are modules stored in /s32v234 direcotory. 

Jiri

0 Kudos

2,874 Views
zhaoyanling
Contributor III

Hi Jiri Kral

I successfully prepared the SD card as the document:How to...

I  try to run ICC codes on SD card.

After I compiled successfully and I got the following files:simple_icc_mod.ko, icc_sample, binary.img

I did as document: M4_boot(Icc_demo). But when I insert SD card into DEV board, and run:

#./insert_module.sh

there are some errors, shown as the following, I don’t understand what’s the different between “SMP preempt mod_unloade” and “SMP mod_unload”?  and why is the simple_icc_mod.ko invalid module format? How can I fix the error?

By the way, simple_icc_mod.ko is not included in VSDK OS image automatically, so I have to insert it manually.And the kernel version of SD card is shown as following: 4.14.34-rt27+g5b7d979.

jiri.kral@nxp.com‌@

0 Kudos