Install kernel modules error"No rule to make target'modules_install'. stop"

Hi,

when I build the kernel ,I get the error logs;


make: *** No rule to make target 'modules_install'.  Stop.

build steps as follow:


1:$ TEGRA_KERNEL_OUT=/home/kernel_out

2:$ xport CROSS_COMPILE=/opt/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-

3:$ export LOCALVERSION=-tegra

4:$ cd kernel/kernel-4.9/

5:$ mkdir -p $TEGRA_KERNEL_OUT

6:$ make ARCH=arm64 O=$TEGRA_KERNEL_OUT tegra_defconfig

7:$ make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j4

Here, I have built the kernel successfully,And I try to install the Image to rootf;I do follow steps:


1:root@VM-12-5-ubuntu:~# tar -xjf Jetson-210_Linux_R32.7.1_aarch64.tbz2

2:root@VM-12-5-ubuntu:~# cd Linux_for_Tgera/rootfs

3:root@VM-12-5-ubuntu:~/Linux_for_Tegra/rootfs# sudo tar -jxpf ../../Tegra_Linux_Sample-Root-Filesystem_R32.7.1_aarch64.tbz2

4:root@VM-12-5-ubuntu:~/Linux_for_Tegra/rootfs# cd ..

5:root@VM-12-5-ubuntu:~/Linux_for_Tegra# sudo ./apply_binaries.sh

6:root@VM-12-5-ubuntu:~/Linux_for_Tegra# cp /home/kernel_out/arch/arm64/boot/Image   kernel/Image

7:root@VM-12-5-ubuntu:~/Linux_for_Tegra# cp -r /home/kernel_out/arch/arm64/boot/dts/*  kernel/dtb/

8:root@VM-12-5-ubuntu:~/Linux_for_Tegra# sudo make ARCH=arm64 O=$TEGRA_KERNEL_OUT modules_install ~/Linux_for_Tegra/rootfs/

When I execute the final step ,I get the error log:


make: *** No rule to make target 'modules_install'.  Stop.

I do not know how to solve this probems…

I Fix it

Could you share what the cause and how to fix? Thanks

Was the above a typographic error, or the cause? I’m guessing it was a typographic error, and that it was something else about running in the VM.

I made a very low level mistake,I should execute the command
sudo make ARCH=arm64 O=$TEGRA_KERNEL_OUT modules_install ~/Linux_for_Tegra/rootfs/
in the "kernel_out " directory rather ran other directories…hahaha

Cool! Thanks for your sharing.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.