解决busybox编译错误

busybox版本为

busybox1.19.3

miscutils/ubi_tools.c: In function 'ubi_tools_main':
miscutils/ubi_tools.c:133: error: 'UBI_DEV_NUM_AUTO' undeclared (first use in this function)
miscutils/ubi_tools.c:133: error: (Each undeclared identifier is reported only once
miscutils/ubi_tools.c:133: error: for each function it appears in.)
miscutils/ubi_tools.c:153: error: storage size of 'req' isn't known
miscutils/ubi_tools.c:161: error: 'UBI_IOCATT' undeclared (first use in this function)
miscutils/ubi_tools.c:153: warning: unused variable 'req'
miscutils/ubi_tools.c:167: error: 'UBI_IOCDET' undeclared (first use in this function)
make[1]: *** [miscutils/ubi_tools.o] Error 1

解决方法:

核心问题就是无法找到mtd/ubi-user.h头文件,这是一个Linux下新支持的UBI文件系统,

需要手工加入。从Linux2.6.38的include\mtd\ubi-user.h拷贝到busybox下的include\mtd下,

如果busybox下的include没有mtd文件夹,那就先建立一个mtd文件夹,然后复制了。这样做了之后,编译就OK了

你可能感兴趣的:(linux)