busybox error: ‘MTD_FILE_MODE_RAW’解决办法

编译busybox-1.26.2时出错:

miscutils/nandwrite.c: In function ‘nandwrite_main’:

miscutils/nandwrite.c:151:3: error: ‘MTD_FILE_MODE_RAW’ undeclared (first use in this function)
miscutils/nandwrite.c:151:3: note: each undeclared identifier is reported only once for each function it appears in


网上查了下,说是mtd/mtd-abi.h里面有定义。于是定位到我的工具链的该文件:

sudo updatedb

sudo locate mtd-abi.h


cat /查找结果的工具链路径/include/mtd/mtd-abi.h
发现有定义
 /*
  * Read/write file modes for access to MTD
  */
 enum mtd_file_modes {
         MTD_MODE_NORMAL = MTD_OTP_OFF,
         MTD_MODE_OTP_FACTORY = MTD_OTP_FACTORY,
         MTD_MODE_OTP_USER = MTD_OTP_USER,
         MTD_MODE_RAW,

 };


修改busybox nandwrite.c:151 ‘MTD_FILE_MODE_RAW’ -> ‘MTD_MODE_RAW’

你可能感兴趣的:(busybox)