当我试图构建uboot代码时,我遇到了"flex scanner中的输入失败"错误。这是整个控制台日志:
gan.liu@ubuntu:~/work/PROCESSOR_SDK_VISION_03_06_00_00/ti_components/os_tools/linux/u-boot/u-boot$ make ARCH=mips CROSS_COMPILE=/opt/tda/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- dra7xx_evm_vision_config V=1
make -f ./scripts/Makefile.build obj=scripts/basic
rm -f .tmp_quiet_recordmcount
make -f ./scripts/Makefile.build obj=scripts/kconfig dra7xx_evm_vision_config
scripts/kconfig/conf --defconfig=arch/../configs/dra7xx_evm_vision_defconfig Kconfig
input in flex scanner failed
make[1]: *** [dra7xx_evm_vision_defconfig] Error 2
make: *** [dra7xx_evm_vision_config] Error 2
gan.liu@ubuntu:~/work/PROCESSOR_SDK_VISION_03_06_00_00/ti_components/os_tools/linux/u-boot/u-boot$ make ARCH=mips CROSS_COMPILE=/opt/tda/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- dra7xx_evm_vision_config V=1
make -f ./scripts/Makefile.build obj=scripts/basic
rm -f .tmp_quiet_recordmcount
make -f ./scripts/Makefile.build obj=scripts/kconfig dra7xx_evm_vision_config
cc -Wp,-MD,scripts/kconfig/.zconf.tab.o.d -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -I/usr/include/ncursesw -DCURSES_LOC="<ncurses.h>" -DLOCALE -Iscripts/kconfig -c -o scripts/kconfig/zconf.tab.o scripts/kconfig/zconf.tab.c
cc -o scripts/kconfig/conf scripts/kconfig/conf.o scripts/kconfig/zconf.tab.o
scripts/kconfig/conf --defconfig=arch/../configs/dra7xx_evm_vision_defconfig Kconfig
**errno: 21.**
input in flex scanner failed
make[1]: *** [dra7xx_evm_vision_defconfig] Error 2
make: *** [dra7xx_evm_vision_config] Error 2
gan.liu@ubuntu:~/work/PROCESSOR_SDK_VISION_03_06_00_00/ti_components/os_tools/linux/u-boot/u-boot$
我通过在以下代码段中添加printf来获得"errno:21"信息:
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
* is returned in "result".
*/
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size)
errno=0;
while ( (result = read( fileno(zconfin), (char *) buf, max_size )) < 0 )
{
if( errno != EINTR)
{
printf("errno: %d.n", errno);
YY_FATAL_ERROR( "input in flex scanner failed" );
break;
}
errno=0;
clearerr(zconfin);
}
#endif
错误代码"21"代表
#define EISDIR 21 /* Is a directory */
请帮我解决这个问题。
没关系。这都是因为一个错误。
当我为自定义板添加一个新的foler时,我在一些地方添加了相应的源Kconfig行。由于错误,我添加了新的板文件夹路径,而不是新的Kconfig文件路径。
该死的粗心