[lx2160ardb_rev2] can't install corresponding linux-headers

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

[lx2160ardb_rev2] can't install corresponding linux-headers

跳至解决方案
6,478 次查看
tsungmin_wang
Contributor III

Hi,

I want to compile a package, but it needs to install linux-headers-`uname -r`.

I build linux from LSDK-20.04-V5.4 and its kernel version is 5.4.3-dirty.

 

I can only found these versions "5.4.0 , 5.3.0 , 5.0.0 , 4.18.0 , 4.15.0" using "apt search linux-headers".

How should I do to install "linux-headers-5.4.3-dirty" or I can compile this package by flexbuild?

0 项奖励
回复
1 解答
6,444 次查看
yipingwang
NXP TechSupport
NXP TechSupport

In LSDK 20.12, usr/src/linux-headers-5.4.47/ exist in Ubuntu main rootfs filesystem.

 

You could download this rootfs filesystem with the following command.

wget https://www.nxp.com/lgfiles/sdk/lsdk2012/rootfs_lsdk2012_ubuntu_main_arm64.tgz

在原帖中查看解决方案

0 项奖励
回复
6 回复数
6,471 次查看
yipingwang
NXP TechSupport
NXP TechSupport

You could install Linux Kernel header 5.4 with the following command

apt-get install linux-headers-5.4

0 项奖励
回复
6,467 次查看
tsungmin_wang
Contributor III

Hi,

I use linux-headers-5.4.0-58-generic to compile.

When I run modprobe

"

Package: version magic '5.4.0-58-generic SMP mod_unload aarch64' should be '5.4.47 SMP preempt mod_unload modversions aarch64'

modprobe: ERROR: could not insert 'Package': Exec format error

"

 

 

0 项奖励
回复
6,462 次查看
yipingwang
NXP TechSupport
NXP TechSupport

Would you please provide detailed procedure on the target board?

0 项奖励
回复
6,456 次查看
tsungmin_wang
Contributor III

Hi,

There are a Package.c and a Makefile. 

I only run "make" in the directory.

 

I build a newer kernel version (LSDK-20.12-V5.4to lx2160ardb_rev2, same problem.

# uname -a
Linux localhost 5.4.47 #1 SMP PREEMPT Wed Dec 16 11:11:48 CST 2020 aarch64 aarch64 aarch64 GNU/Linux

0 项奖励
回复
6,445 次查看
yipingwang
NXP TechSupport
NXP TechSupport

In LSDK 20.12, usr/src/linux-headers-5.4.47/ exist in Ubuntu main rootfs filesystem.

 

You could download this rootfs filesystem with the following command.

wget https://www.nxp.com/lgfiles/sdk/lsdk2012/rootfs_lsdk2012_ubuntu_main_arm64.tgz

0 项奖励
回复
6,439 次查看
tsungmin_wang
Contributor III

Hi,

I will try it.

But I use another method to build, I found that the source, flexbuild/packages/linux/linux/, includes what I need.

So, I put the .c files to flexbuild/packages/linux/linux/drivers/usb

And modify Kconfig and Makefile to fit what the driver needs.

 

After enabling the option in "flex-builder -c linux:custom -a arm64" and rebuild kernel "flex-builder -c linux -a arm64"

The driver is compiled and built in to the kernel. Thx.

 

 

0 项奖励
回复