【问题标题】:'input in flex scanner failed' error occur when compile uboot编译 uboot 时出现“flex 扫描仪中的输入失败”错误
【发布时间】:2020-03-02 21:41:16
【问题描述】:

我在尝试构建 uboot 代码时遇到“flex 扫描仪中的输入失败”错误。 这是整个控制台日志:

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$

我通过在以下 sn-p 中添加 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 */

请帮我解决这个问题。

【问题讨论】:

    标签: c u-boot


    【解决方案1】:

    没关系。这都是因为一个错误。

    当我为自定义板添加一个新文件夹时,我在某个地方添加了相应的源 Kconfig 行。 错误地,我添加了新的板文件夹路径而不是新的 Kconfig 文件路径。

    粗心大意

    【讨论】:

      猜你喜欢
      • 2018-11-25
      • 1970-01-01
      • 1970-01-01
      • 2019-11-08
      • 1970-01-01
      • 1970-01-01
      • 2018-03-21
      • 2019-03-07
      • 1970-01-01
      相关资源
      最近更新 更多