Cross Compiling Linux Arm Kernel with new driver module

六眼飞鱼酱① 提交于 2019-12-02 03:53:15
vinay hunachyal

You have done two mistake in kernel building procedure.

1)before make menuconfig

you need to have a .config file should exit in source-code.

How u can get it

1) make ARCH=arm board_defconfig

check your default config in /arch/arm/configs

e.g make ARCH=arm versatile_defconfig

this will write default configuration to .config

2)if you dont know your default configuration you can get it in target board Filesystem.

it will be in /proc/config.gz copy to your host untar it and copy as .config in top source-code. or it may present in /boot/config.x.x.x

if dont follow above step make ARCH=arm menuconfig this will copy host x86 config file from /boot/config-x.x.x which will be wrong config file

Once above step is done then next step make ARCH=arm menuconfig here enable your driver.

2nd mistake is make ARCH=arm CROSS_COMPILE=/home/z3/bin/arm- modules_install

This will install modules in /lib/modules of x86 host machine.

so follow below one

make ARCH=arm CROSS_COMPILE=(path to arm) uImage modules

create a directory to install your dynamic loadable modules

make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- modules_install INSTALL_MOD_PATH=<path to install modules>

Then you need to copy modules to your target.

For more details you can refer this Just black screen after running Qemu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!