简体   繁体   中英

How to install cross-compiled linux modules to ARM board

I know how to corss-compile Linux kernel and modules on an x86 host for an ARM board.

However, I'm wondering if I can install the corss-compiled linux modules onto the ARM board?

I don't want to cherry-pick each module and copy it to the board. I'm wondering if there is some command, like make modules_install in x86 that can install the cross-compiled linux modules into the target ARM board?

Thank you very much!

You can compile/build a single module but you need a all dependent Linux module. So tell me how you will resolve this dependency.

For Building/compiling a single module. once We need to build all Linux module. Then comment or remove " make distclean ". make distclean (does not work on ALL programs but most) will remove ALL files made by ./configure and ALL files made by make. So if you will remove make distclean . It will build only modified module.

you can not build single module in ARM. you will get dependency error. For resolving these kind to error you will have to add other Linux module.

I know I'm a few years late, but as I was just wondering myself if an easy built-in solution would exist for this, I think a solution may still be interesting.

I know 2 possibilities to do it:

Use a temporary folder

As 0andriy suggested, create a temporary folder, install modules in it, then copy to its real destination. For the copy, we have to do a trick to prevent symlink from being copied as full folder content:

mkdir /tmp/dist
make modules_install INSTALL_MOD_PATH=/tmp/dist/
cd /tmp/dist
tar cfp - * | ssh root@distant.board '(cd / && tar xfp - )'

Note : if you did not run make modules_install as root , you will have to chown -R root:root /tmp/dist before the copy.

Use sshfs

Use sshfs to mount distant board locally.

If you don't have sshfs , install it first. If on Debian or derivative:

apt-get install sshfs

Then, mount the distant board on a local folder:

mkdir /mnt/dist
sshfs root@distant.board:/ /mnt/dist

There you are. You can now access the distant file system in /mnt/dist . So to install modules:

make modules_install INSTALL_MOD_PATH=/mnt/dist/

When finished working on your board, unmount the folder:

umount /mnt/dist

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