我从下面的位置下载了mdadm源代码 https://www.kernel.org/pub/linux/utils/raid/mdadm/
在/ system / extras / mdadm
复制这些文件并且,为mdadm的可执行二进制文件添加了Android.mk文件。
但是,我在编译时看到了以下错误:
target thumb C: mdadm <= system/extras/mdadm/sg_io.c
**arm-linux-androideabi-gcc: fatal error: cannot specify -o with -c, -S or -E with multiple files**
compilation terminated.
make: *** [out/target/product/<prod_name>/obj/EXECUTABLES/mdadm_intermediates/sg_io.o] Error 1
解决此问题的任何指示。提前谢谢。
我的Android.mk文件看起来像
LOCAL_PATH:= $(致电my-dir)
mdadm_src_files:= Build.c mdopen.c mdmon.c monitor.c \
managemon.c util.c maps.c mdstat.c \
sysfs.c policy.c lib.c Kill.c sg_io.c \
dlink.c super0.c super1.c super-intel.c \
super-mbr.c super-gpt.c super-ddf.c sha1.c \
crc32.c msg.c bitmap.c xmalloc.c platform-intel.c \
probe_roms.c config.c Manage.c Assemble.c Create.c Detail.c \
Examine.c Grow.c Monitor.c Query.c Incremental.c Dump.c
包括$(CLEAR_VARS)
LOCAL_SRC_FILES:= $(mdadm_src_files)
LOCAL_MODULE:= mdadm
LOCAL_SHARED_LIBRARIES:= libc
LOCAL_C_INCLUDES + = $(LOCAL_PATH)/../../../ kernel / include /
LOCAL_C_INCLUDES + = $(LOCAL_PATH)/../../../内核/拱/臂/包括/ ASM / *
包括$(BUILD_EXECUTABLE)