简体   繁体   中英

Must I cross-compile modules if the kernel is cross-compiled?

I have a cross-compiled Linux kernel, and it works fine on my Raspberry Pi 2. However, when I later compile modules on Raspberry Pi itself, error is reported.

After googling, the reason of this problem seems due to the cross-compiling which makes some tools located in linux/scripts/ are not suitable for arm architecture but X86.

I am not sure that whether it is necessary to compile modules on PC if the kernel is cross-compiled. If not, how could I transfer these tools to Pi?

No . That would be unusual and you should expect issues if you try to do that.

Compile the modules where you compiled the kernel (since then you already have the toolchains, and there's much less chance of something breaking due to different versions).

If you cross-compiled the kernel on PC, do the same with modules. If you natively compiled the kernel on RPI, do the same with modules.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM