Linux Kernel for LSDK 21.08: lkmod don't install

cancel
Showing results for 
Search instead for 
Did you mean: 

Linux Kernel for LSDK 21.08: lkmod don't install

Jump to solution
226 Views
Kassany
Contributor II

Hello everyone! This is my first post in the NXP community.

I've been trying for some time to build some crypto modules on the LX2160ARDB and having trouble compiling and installing the module after compilation.

I had difficulty compiling because of fixdep and modpost even though cross-compiling was built on X86_64. This was later fixed by compiling directly on the board!

Having solved the issue above another issue is found installing with "sudo make install" it tells me "modules_install: missing 'System.map" and insmod reports invalid parameters.

When trying to put the cryptodev module into the modules folder manually the dmesg reports several conflicts and errors.

[11239.510466] cryptodev: Unknown symbol get_user_pages_remote (err -22)
[11239.510483] cryptodev: disagrees about version of symbol kmem_cache_alloc
[11239.510485] cryptodev: Unknown symbol kmem_cache_alloc (err -22)
[11239.510536] cryptodev: disagrees about version of symbol kmalloc_caches
[11239.510538] cryptodev: Unknown symbol kmalloc_caches (err -22)
[11370.492845] cryptodev: disagrees about version of symbol __put_page
[11370.492850] cryptodev: Unknown symbol __put_page (err -22)
[11370.492858] cryptodev: disagrees about version of symbol vmemmap
[11370.492860] cryptodev: Unknown symbol vmemmap (err -22)
[11370.492900] cryptodev: disagrees about version of symbol get_user_pages_remote
[11370.492901] cryptodev: Unknown symbol get_user_pages_remote (err -22)
[11370.492917] cryptodev: disagrees about version of symbol kmem_cache_alloc
[11370.492919] cryptodev: Unknown symbol kmem_cache_alloc (err -22)
[11370.492969] cryptodev: disagrees about version of symbol kmalloc_caches
[11370.492971] cryptodev: Unknown symbol kmalloc_caches (err -22)
[11383.666562] cryptodev: disagrees about version of symbol __put_page
[11383.666568] cryptodev: Unknown symbol __put_page (err -22)
[11383.666575] cryptodev: disagrees about version of symbol vmemmap
[11383.666577] cryptodev: Unknown symbol vmemmap (err -22)
[11383.666616] cryptodev: disagrees about version of symbol get_user_pages_remote
[11383.666618] cryptodev: Unknown symbol get_user_pages_remote (err -22)
[11383.666636] cryptodev: disagrees about version of symbol kmem_cache_alloc
[11383.666637] cryptodev: Unknown symbol kmem_cache_alloc (err -22)
[11383.666686] cryptodev: disagrees about version of symbol kmalloc_caches
[11383.666688] cryptodev: Unknown symbol kmalloc_caches (err -22)



Tested with LSDK21.08 - ubuntu 20.04 and the kernel tested was LK 5.4.47 also LK 5.10.35. Both with the same problem!

BR,

Matheus C. França
Tags (4)
1 Solution
173 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please refer to my following procedure to build cryptodev,ko on the target board with LSDK 21.08 software environment.

Download LSDK 21.08 pre-built images and deploy to the target board.

$ wget https://www.nxp.com/lgfiles/sdk/lsdk2108/boot_LS_arm64_lts_5.10.tgz

$ wget https://www.nxp.com/lgfiles/sdk/lsdk2108/rootfs_lsdk2108_ubuntu_main_arm64.tgz

Copy Linux Kernel source code flexbuild_lsdk2108/components/linux/linux to the target board in /usr/src and rename linux source code folder as "linux-headers-5.10.35".

Go to /usr/src/linux-headers-5.10.35 folder, run the following commands.

# make oldconfig && make prepare

# make ARCH=arm64 modules

Go to / folder, download cryptodev-linux source code.

# git clone https://source.codeaurora.org/external/qoriq/qoriq-components/cryptodev-linux

# git checkout -b cryptodev-linux-1.12 cryptodev-linux-1.12

Build and insert module cryptodev.ko without any problem.

# cd cryptodev-linux

# make

# insmod cryptodev.ko

 

View solution in original post

0 Kudos
1 Reply
174 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please refer to my following procedure to build cryptodev,ko on the target board with LSDK 21.08 software environment.

Download LSDK 21.08 pre-built images and deploy to the target board.

$ wget https://www.nxp.com/lgfiles/sdk/lsdk2108/boot_LS_arm64_lts_5.10.tgz

$ wget https://www.nxp.com/lgfiles/sdk/lsdk2108/rootfs_lsdk2108_ubuntu_main_arm64.tgz

Copy Linux Kernel source code flexbuild_lsdk2108/components/linux/linux to the target board in /usr/src and rename linux source code folder as "linux-headers-5.10.35".

Go to /usr/src/linux-headers-5.10.35 folder, run the following commands.

# make oldconfig && make prepare

# make ARCH=arm64 modules

Go to / folder, download cryptodev-linux source code.

# git clone https://source.codeaurora.org/external/qoriq/qoriq-components/cryptodev-linux

# git checkout -b cryptodev-linux-1.12 cryptodev-linux-1.12

Build and insert module cryptodev.ko without any problem.

# cd cryptodev-linux

# make

# insmod cryptodev.ko

 

0 Kudos