make -C /home/luyuan/linux_cc M=/home/luyuan/Learn_Drives/1_chardevbase modules make[1]: Entering directory '/home/luyuan/linux_cc' scripts/Makefile.build:263: target '/home/luyuan/Learn_Drives/1_chardevbase/test1dev.ko' doesn't match the target pattern CC [M] /home/luyuan/Learn_Drives/1_chardevbase/test1dev.ko arm-linux-gnueabihf-gcc: fatal error: no input files compilation terminated. scripts/Makefile.build:264: recipe for target '/home/luyuan/Learn_Drives/1_chardevbase/test1dev.ko' failed make[2]: *** [/home/luyuan/Learn_Drives/1_chardevbase/test1dev.ko] Error 1 Makefile:1384: recipe for target '_module_/home/luyuan/Learn_Drives/1_chardevbase' failed make[1]: *** [_module_/home/luyuan/Learn_Drives/1_chardevbase] Error 2 make[1]: Leaving directory '/home/luyuan/linux_cc' Makefile:14: recipe for target 'kernel_modules' failed make: *** [kernel_modules] Error 2
时间: 2023-09-18 10:11:26 浏览: 54
这是一个make命令的输出,它用于编译和构建一个项目。根据输出,可以看到编译过程中遇到了一些错误。
首先,输出显示了一个错误信息:"target '/home/luyuan/Learn_Drives/1_chardevbase/test1dev.ko' doesn't match the target pattern"。这可能是因为Makefile中的目标模式与实际的目标文件不匹配,导致无法生成目标文件。
接下来,输出显示了一个致命错误:"arm-linux-gnueabihf-gcc: fatal error: no input files"。这是由于没有指定输入文件导致的,编译器无法找到需要编译的源文件。
最后,输出显示了两个错误信息:"recipe for target '/home/luyuan/Learn_Drives/1_chardevbase/test1dev.ko' failed"和"recipe for target '_module_/home/luyuan/Learn_Drives/1_chardevbase' failed"。这表明在构建目标文件时出现了错误。
要解决这些错误,你可以检查Makefile中的目标模式是否正确,并确保所有需要编译的源文件都正确地指定为输入文件。此外,还应该检查相关的依赖关系和路径设置,确保编译过程中的所有文件都能够正确找到并链接。
相关问题
make -C /home/luyuan/liunx_kenenl/liunx M=/home/luyuan/Learn_Drives/1_chardevbase modules make[1]: Entering directory '/home/luyuan/liunx_kenenl/liunx' make[2]: *** No rule to make target '/home/luyuan/Learn_Drives/1_chardevbase/test1dev.c', needed by '/home/luyuan/Learn_Drives/1_chardevbase/test1dev.o'。 停止。 Makefile:1384: recipe for target '_module_/home/luyuan/Learn_Drives/1_chardevbase' failed make[1]: *** [_module_/home/luyuan/Learn_Drives/1_chardevbase] Error 2 make[1]: Leaving directory '/home/luyuan/liunx_kenenl/liunx' Makefile:8: recipe for target 'kernel_modules' failed make: *** [kernel_modules] Error 2
这个错误是由于找不到目标文件所致。根据错误信息,看起来缺少了`test1dev.c`文件。请确保该文件存在于`/home/luyuan/Learn_Drives/1_chardevbase/`路径中,并且文件名正确拼写。如果文件确实存在,可能需要检查Makefile文件中的规则,确保正确指定了源文件和目标文件。
storcli /c0 show |grep -i "Physical Drives = "
您可以使用以下命令来获取当前 `Physical Drives` 的值:
```shell
storcli /c0 show | grep -i "Physical Drives = "
```
该命令将会显示控制器 `c0` 中的物理驱动器数量。请注意,您需要确保已经安装了 `storcli` 工具,并且控制器 `c0` 是存在的。