Reputation: 1857
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!
Upvotes: 0
Views: 3035
Reputation: 1991
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:
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 [email protected] '(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 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 [email protected]:/ /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
Upvotes: 1