按照licheepi zero的“spi系统杂谈”里的内容,下载了支持spi的uboot,结果打开图形化的配置(make ARCH=arm menuconfig)都不能成功,信息如下:
./scripts/kconfig/lxdialog/check-lxdialog.sh: 行 3: $'\r': 未找到命令
./scripts/kconfig/lxdialog/check-lxdialog.sh: 行 5: 未预期的符号 `$'\r'' 附近有语法错误
'/scripts/kconfig/lxdialog/check-lxdialog.sh: 行 5: `ldflags()
./scripts/kconfig/check.sh: 行 14: 语法错误: 未预期的文件结尾
./scripts/kconfig/lxdialog/check-lxdialog.sh: 行 3: $'\r': 未找到命令
./scripts/kconfig/lxdialog/check-lxdialog.sh: 行 5: 未预期的符号 `$'\r'' 附近有语法错误
'/scripts/kconfig/lxdialog/check-lxdialog.sh: 行 5: `ldflags()
./scripts/kconfig/check.sh: 行 14: 语法错误: 未预期的文件结尾
./scripts/kconfig/lxdialog/check-lxdialog.sh: 行 3: $'\r': 未找到命令
./scripts/kconfig/lxdialog/check-lxdialog.sh: 行 5: 未预期的符号 `$'\r'' 附近有语法错误
'/scripts/kconfig/lxdialog/check-lxdialog.sh: 行 5: `ldflags()
./scripts/kconfig/check.sh: 行 14: 语法错误: 未预期的文件结尾
./scripts/kconfig/lxdialog/check-lxdialog.sh: 行 3: $'\r': 未找到命令
./scripts/kconfig/lxdialog/check-lxdialog.sh: 行 5: 未预期的符号 `$'\r'' 附近有语法错误
'/scripts/kconfig/lxdialog/check-lxdialog.sh: 行 5: `ldflags()
./scripts/kconfig/check.sh: 行 14: 语法错误: 未预期的文件结尾
HOSTCC scripts/kconfig/mconf.o
In file included from scripts/kconfig/mconf.c:23:0:
scripts/kconfig/lxdialog/dialog.h:26:10: error: #include expects "FILENAME" or <FILENAME>
#include CURSES_LOC
^~~~~~~~~~
scripts/kconfig/lxdialog/dialog.h:91:2: error: unknown type name ‘chtype’
chtype atr; /* Color attribute */
^~~~~~
scripts/kconfig/lxdialog/dialog.h:188:16: error: unknown type name ‘WINDOW’
int on_key_esc(WINDOW *win);
^~~~~~
scripts/kconfig/lxdialog/dialog.h:209:17: error: unknown type name ‘WINDOW’
void attr_clear(WINDOW * win, int height, int width, chtype attr);
^~~~~~
scripts/kconfig/lxdialog/dialog.h:209:54: error: unknown type name ‘chtype’; did you mean ‘idtype_t’?
void attr_clear(WINDOW * win, int height, int width, chtype attr);
^~~~~~
idtype_t
scripts/kconfig/lxdialog/dialog.h:211:21: error: unknown type name ‘WINDOW’
void print_autowrap(WINDOW * win, const char *prompt, int width, int y, int x);
^~~~~~
scripts/kconfig/lxdialog/dialog.h:212:19: error: unknown type name ‘WINDOW’
void print_button(WINDOW * win, const char *label, int y, int x, int selected);
^~~~~~
scripts/kconfig/lxdialog/dialog.h:213:18: error: unknown type name ‘WINDOW’
void print_title(WINDOW *dialog, const char *title, int width);
^~~~~~
scripts/kconfig/lxdialog/dialog.h:214:15: error: unknown type name ‘WINDOW’
void draw_box(WINDOW * win, int y, int x, int height, int width, chtype box,
^~~~~~
scripts/kconfig/lxdialog/dialog.h:214:66: error: unknown type name ‘chtype’; did you mean ‘idtype_t’?
void draw_box(WINDOW * win, int y, int x, int height, int width, chtype box,
^~~~~~
idtype_t
scripts/kconfig/lxdialog/dialog.h:215:8: error: unknown type name ‘chtype’; did you mean ‘idtype_t’?
chtype border);
^~~~~~
idtype_t
scripts/kconfig/lxdialog/dialog.h:216:18: error: unknown type name ‘WINDOW’
void draw_shadow(WINDOW * win, int y, int x, int height, int width);
^~~~~~
scripts/kconfig/mconf.c: In function ‘conf’:
scripts/kconfig/lxdialog/dialog.h:85:29: error: ‘KEY_MAX’ undeclared (first use in this function); did you mean ‘TMP_MAX’?
#define ERRDISPLAYTOOSMALL (KEY_MAX + 1)
^
scripts/kconfig/mconf.c:671:45: note: in expansion of macro ‘ERRDISPLAYTOOSMALL’
if (res == 1 || res == KEY_ESC || res == -ERRDISPLAYTOOSMALL)
^~~~~~~~~~~~~~~~~~
scripts/kconfig/lxdialog/dialog.h:85:29: note: each undeclared identifier is reported only once for each function it appears in
#define ERRDISPLAYTOOSMALL (KEY_MAX + 1)
^
scripts/kconfig/mconf.c:671:45: note: in expansion of macro ‘ERRDISPLAYTOOSMALL’
if (res == 1 || res == KEY_ESC || res == -ERRDISPLAYTOOSMALL)
^~~~~~~~~~~~~~~~~~
scripts/kconfig/mconf.c: In function ‘show_help’:
scripts/kconfig/mconf.c:793:19: warning: implicit declaration of function ‘getmaxx’; did you mean ‘gettext’? [-Wimplicit-function-declaration]
help.max_width = getmaxx(stdscr) - 10;
^~~~~~~
gettext
scripts/kconfig/mconf.c:793:27: error: ‘stdscr’ undeclared (first use in this function); did you mean ‘stderr’?
help.max_width = getmaxx(stdscr) - 10;
^~~~~~
stderr
In file included from scripts/kconfig/mconf.c:23:0:
scripts/kconfig/mconf.c: In function ‘conf_choice’:
scripts/kconfig/lxdialog/dialog.h:85:29: error: ‘KEY_MAX’ undeclared (first use in this function); did you mean ‘TMP_MAX’?
#define ERRDISPLAYTOOSMALL (KEY_MAX + 1)
^
scripts/kconfig/mconf.c:855:9: note: in expansion of macro ‘ERRDISPLAYTOOSMALL’
case -ERRDISPLAYTOOSMALL:
^~~~~~~~~~~~~~~~~~
scripts/Makefile.host:116: recipe for target 'scripts/kconfig/mconf.o' failed
make[1]: *** [scripts/kconfig/mconf.o] Error 1
Makefile:478: recipe for target 'menuconfig' failed
make: *** [menuconfig] Error 2
离线
多谢晕哥!不过最后发现不是这个问题,是我下载的时候有些文件挂掉了,重新下载又好了,呵呵
sudo apt-get install -y libncurses5-dev swig libpython-dev
把依赖包装上.
离线
不过编译的时候又错误了,晕啊
In file included from include/common.h:165:0,
from arch/arm/cpu/armv8/generic_timer.c:8:
arch/arm/cpu/armv8/generic_timer.c: At top level:
./arch/arm/include/asm/global_data.h:100:58: error: invalid register name for ‘gd’
#define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("x18")
^
arch/arm/cpu/armv8/generic_timer.c:12:1: note: in expansion of macro ‘DECLARE_GLOBAL_DATA_PTR’
DECLARE_GLOBAL_DATA_PTR;
^~~~~~~~~~~~~~~~~~~~~~~
scripts/Makefile.build:280: recipe for target 'arch/arm/cpu/armv8/generic_timer.o' failed
make[1]: *** [arch/arm/cpu/armv8/generic_timer.o] Error 1
Makefile:1206: recipe for target 'arch/arm/cpu/armv8' failed
make: *** [arch/arm/cpu/armv8] Error 2
real 0m5.739s
user 0m4.531s
sys 0m0.932s
还有这种操作 ;(
离线
果然全都是坑,不过最后还是编译过了,哈哈
离线