您尚未登录。

楼主 #1 2019-04-06 10:24:09

Hu187
会员
注册时间: 2019-02-18
已发帖子: 39
积分: 39

V3s—uboot编译报错

ff@ff:~/Documents/V3s_/u-boot$ arm-linux-gnueabihf-gcc -v
Using built-in specs.
COLLECT_GCC=arm-linux-gnueabihf-gcc
COLLECT_LTO_WRAPPER=/opt/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/bin/../libexec/gcc/arm-linux-gnueabihf/7.4.1/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: '/home/tcwg-buildslave/workspace/tcwg-make-release_0/snapshots/gcc.git~linaro-7.4-2019.02/configure' SHELL=/bin/bash --with-mpc=/home/tcwg-buildslave/workspace/tcwg-make-release_0/_build/builds/destdir/x86_64-unknown-linux-gnu --with-mpfr=/home/tcwg-buildslave/workspace/tcwg-make-release_0/_build/builds/destdir/x86_64-unknown-linux-gnu --with-gmp=/home/tcwg-buildslave/workspace/tcwg-make-release_0/_build/builds/destdir/x86_64-unknown-linux-gnu --with-gnu-as --with-gnu-ld --disable-libmudflap --enable-lto --enable-shared --without-included-gettext --enable-nls --with-system-zlib --disable-sjlj-exceptions --enable-gnu-unique-object --enable-linker-build-id --disable-libstdcxx-pch --enable-c99 --enable-clocale=gnu --enable-libstdcxx-debug --enable-long-long --with-cloog=no --with-ppl=no --with-isl=no --disable-multilib --with-float=hard --with-fpu=vfpv3-d16 --with-mode=thumb --with-tune=cortex-a9 --with-arch=armv7-a --enable-threads=posix --enable-multiarch --enable-libstdcxx-time=yes --enable-gnu-indirect-function --with-build-sysroot=/home/tcwg-buildslave/workspace/tcwg-make-release_0/_build/sysroots/arm-linux-gnueabihf --with-sysroot=/home/tcwg-buildslave/workspace/tcwg-make-release_0/_build/builds/destdir/x86_64-unknown-linux-gnu/arm-linux-gnueabihf/libc --enable-checking=release --disable-bootstrap --enable-languages=c,c++,fortran,lto --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --target=arm-linux-gnueabihf --prefix=/home/tcwg-buildslave/workspace/tcwg-make-release_0/_build/builds/destdir/x86_64-unknown-linux-gnu
Thread model: posix
gcc version 7.4.1 20181213 [linaro-7.4-2019.02 revision 56ec6f6b99cc167ff0c2f8e1a2eed33b1edc85d4] (Linaro GCC 7.4-2019.02)

/******************************************************************************************************************************************/
ff@ff:~/Documents/V3s_/u-boot$ time make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- 2>&1 | tee build.log
scripts/kconfig/conf  --silentoldconfig Kconfig
  CHK     include/config.h
  CFG     u-boot.cfg
  GEN     include/autoconf.mk
  GEN     include/autoconf.mk.dep
  CFG     spl/u-boot.cfg
  GEN     spl/include/autoconf.mk
  CHK     include/config/uboot.release
  CHK     include/generated/version_autogenerated.h
  CHK     include/generated/timestamp_autogenerated.h
  UPD     include/generated/timestamp_autogenerated.h
  CHK     include/generated/generic-asm-offsets.h
  CHK     include/generated/asm-offsets.h
  HOSTCC  tools/mkenvimage.o
  HOSTLD  tools/mkenvimage
  HOSTCC  tools/fit_image.o
  HOSTCC  tools/image-host.o
  HOSTCC  tools/dumpimage.o
  HOSTLD  tools/dumpimage
  HOSTCC  tools/mkimage.o
  HOSTLD  tools/mkimage
  CC      cmd/bootm.o
cmd/bootm.c: In function 'do_imls_nor':
cmd/bootm.c:327:7: error: 'CONFIG_SYS_MAX_FLASH_BANKS' undeclared (first use in this function); did you mean 'CONFIG_SYS_MAX_FLASH_SECT'?
   i < CONFIG_SYS_MAX_FLASH_BANKS; ++i, ++info) {
       ^~~~~~~~~~~~~~~~~~~~~~~~~~
       CONFIG_SYS_MAX_FLASH_SECT
cmd/bootm.c:327:7: note: each undeclared identifier is reported only once for each function it appears in
scripts/Makefile.build:280: recipe for target 'cmd/bootm.o' failed
make[1]: *** [cmd/bootm.o] Error 1
Makefile:1206: recipe for target 'cmd' failed
make: *** [cmd] Error 2

real    0m1.858s
user    0m1.455s
sys     0m0.408s
出现这么个问题,最后cmd错误编译失败
配置时开启了flash bank选项
是个W256的flash
新手一脸茫然  被水淹没 不知所措
请求帮助

离线

#2 2019-04-06 10:26:06

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,342
积分: 9202

Re: V3s—uboot编译报错

不改配置正常吗?





离线

楼主 #3 2019-04-06 11:04:59

Hu187
会员
注册时间: 2019-02-18
已发帖子: 39
积分: 39

Re: V3s—uboot编译报错

晕哥 说:

不改配置正常吗?

还是报错

离线

楼主 #4 2019-04-06 11:06:30

Hu187
会员
注册时间: 2019-02-18
已发帖子: 39
积分: 39

Re: V3s—uboot编译报错

晕哥 说:

不改配置正常吗?


直接time make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- 2>&1 | tee build.log就是这样
ff@ff:~/Documents/u-boot$ time make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- 2>&1 | tee build.log
scripts/kconfig/conf  --silentoldconfig Kconfig

*** Error during update of the configuration.

scripts/kconfig/Makefile:46: recipe for target 'silentoldconfig' failed
make[2]: *** [silentoldconfig] Error 1
Makefile:478: recipe for target 'silentoldconfig' failed
make[1]: *** [silentoldconfig] Error 2
make: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/uboot.release'.  Stop.

real    0m0.246s
user    0m0.192s
sys     0m0.059s

离线

楼主 #5 2019-04-06 11:11:55

Hu187
会员
注册时间: 2019-02-18
已发帖子: 39
积分: 39

Re: V3s—uboot编译报错

晕哥 说:

不改配置正常吗?

root用户

root@ff:/home/ff/Documents/u-boot# time make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- 2>&1 | tee build.log
make: arm-linux-gnueabihf-gcc: Command not found
/bin/sh: 1: arm-linux-gnueabihf-gcc: not found
dirname: missing operand
Try 'dirname --help' for more information.
scripts/kconfig/conf  --silentoldconfig Kconfig
warning: (ARCH_SUNXI && TDX_CFG_BLOCK && TDX_CFG_BLOCK && TDX_CFG_BLOCK && TDX_CFG_BLOCK && TDX_CFG_BLOCK && TDX_CFG_BLOCK && ARCH_UNIPHIER_LD20 && TDX_CFG_BLOCK && TDX_CFG_BLOCK) selects OF_BOARD_SETUP which has unmet direct dependencies (OF_LIBFDT)
warning: (ARCH_SUNXI) selects SPL_STACK_R which has unmet direct dependencies (SPL)
warning: (ARCH_SUNXI) selects SPL_SYS_MALLOC_SIMPLE which has unmet direct dependencies (SPL)
warning: (ARCH_SUNXI && TDX_CFG_BLOCK && TDX_CFG_BLOCK && TDX_CFG_BLOCK && TDX_CFG_BLOCK && TDX_CFG_BLOCK && TDX_CFG_BLOCK && ARCH_UNIPHIER_LD20 && TDX_CFG_BLOCK && TDX_CFG_BLOCK) selects OF_BOARD_SETUP which has unmet direct dependencies (OF_LIBFDT)
warning: (ARCH_SUNXI) selects SPL_STACK_R which has unmet direct dependencies (SPL)
warning: (ARCH_SUNXI) selects SPL_SYS_MALLOC_SIMPLE which has unmet direct dependencies (SPL)
  CHK     include/config.h
  CFG     u-boot.cfg
/bin/sh: 1: arm-linux-gnueabihf-gcc: not found
scripts/Makefile.autoconf:79: recipe for target 'u-boot.cfg' failed
make[1]: *** [u-boot.cfg] Error 1
make: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/uboot.release'.  Stop.

real    0m0.227s
user    0m0.192s
sys     0m0.030s

离线

#6 2019-04-06 11:24:29

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,342
积分: 9202

Re: V3s—uboot编译报错

https://whycan.cn/t_561.html


按这个流程试一试





离线

楼主 #7 2019-04-06 14:31:41

Hu187
会员
注册时间: 2019-02-18
已发帖子: 39
积分: 39

Re: V3s—uboot编译报错

晕哥 说:

https://whycan.cn/t_561.html


按这个流程试一试

cmd/bootm.c: In function 'do_imls_nor':
cmd/bootm.c:327:7: error: 'CONFIG_SYS_MAX_FLASH_BANKS' undeclared (first use in this function); did you mean 'CONFIG_SYS_MAX_FLASH_SECT'?
   i < CONFIG_SYS_MAX_FLASH_BANKS; ++i, ++info) {
       ^~~~~~~~~~~~~~~~~~~~~~~~~~
       CONFIG_SYS_MAX_FLASH_SECT
cmd/bootm.c:327:7: note: each undeclared identifier is reported only once for each function it appears in
scripts/Makefile.build:280: recipe for target 'cmd/bootm.o' failed
make[1]: *** [cmd/bootm.o] Error 1
make[1]: *** Waiting for unfinished jobs....
还是同样的错误

离线

#8 2019-04-06 14:50:56

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,342
积分: 9202

Re: V3s—uboot编译报错

按这个流程不会出问题,你的电脑系统是什么什么?





离线

楼主 #9 2019-04-06 17:28:33

Hu187
会员
注册时间: 2019-02-18
已发帖子: 39
积分: 39

Re: V3s—uboot编译报错

晕哥 说:

按这个流程不会出问题,你的电脑系统是什么什么?

Ubuntu18.04_server_amd64

离线

#10 2019-04-06 17:29:56

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,342
积分: 9202

Re: V3s—uboot编译报错

Hu187 说:
晕哥 说:

按这个流程不会出问题,你的电脑系统是什么什么?

Ubuntu18.04_server_amd64

可以把你的大概流程说一下吗?





离线

楼主 #11 2019-04-06 17:34:17

Hu187
会员
注册时间: 2019-02-18
已发帖子: 39
积分: 39

Re: V3s—uboot编译报错

晕哥 说:

按这个流程不会出问题,你的电脑系统是什么什么?

drivers/mtd/spi/spi_flash.c:1114:12: error: redefinition of 'write_bar'
static int write_bar(struct spi_flash *flash, u32 offset)
            ^~~~~~~~~
drivers/mtd/spi/spi_flash.c:116:12: note: previous definition of 'write_bar' was here
static int write_bar(struct spi_flash *flash, u32 offset)
            ^~~~~~~~~
drivers/mtd/spi/spi_flash.c:1114:12: warning: 'write_bar' defined but not used [-Wunused-function]
static int write_bar(struct spi_flash *flash, u32 offset)
            ^~~~~~~~~
scripts/Makefile.build:280: recipe for target 'drivers/mtd/spi/spi_flash.o' failed
make[1]: *** [drivers/mtd/spi/spi_flash.o] Error 1
make[1]: *** Waiting for unfinished jobs....

离线

楼主 #12 2019-04-06 17:42:12

Hu187
会员
注册时间: 2019-02-18
已发帖子: 39
积分: 39

Re: V3s—uboot编译报错

晕哥 说:
Hu187 说:
晕哥 说:

按这个流程不会出问题,你的电脑系统是什么什么?

Ubuntu18.04_server_amd64

可以把你的大概流程说一下吗?


以下为详细操作日志
/*****************************************************************************************************************************************/
ff@ff:~$ cd ./Documents/u-boot/
ff@ff:~/Documents/u-boot$ ls
Kbuild    MAINTAINERS  api    build.log  config.mk  doc      examples  lib   scripts          tools
Kconfig   Makefile     arch   cmd        configs    drivers  fs        net   snapshot.commit
Licenses  README       board  common     disk       dts      include   post  test
ff@ff:~/Documents/u-boot$ ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make LicheePi_Zero_defconfig
#
# configuration written to .config
#
ff@ff:~/Documents/u-boot$ ARCH=arm make menuconfig //激活大容量flalsh支持 设置cpu主频到1.2GHz
scripts/kconfig/mconf  Kconfig
configuration written to .config

*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.

ff@ff:~/Documents/u-boot$ ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make -j8
scripts/kconfig/conf  --silentoldconfig Kconfig

*** Error during update of the configuration.

scripts/kconfig/Makefile:46: recipe for target 'silentoldconfig' failed
make[2]: *** [silentoldconfig] Error 1
Makefile:478: recipe for target 'silentoldconfig' failed
make[1]: *** [silentoldconfig] Error 2
make: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/uboot.release'.  Stop.
ff@ff:~/Documents/u-boot$

离线

楼主 #13 2019-04-06 17:47:40

Hu187
会员
注册时间: 2019-02-18
已发帖子: 39
积分: 39

Re: V3s—uboot编译报错

Hu187 说:
晕哥 说:

按这个流程不会出问题,你的电脑系统是什么什么?

drivers/mtd/spi/spi_flash.c:1114:12: error: redefinition of 'write_bar'
static int write_bar(struct spi_flash *flash, u32 offset)
            ^~~~~~~~~
drivers/mtd/spi/spi_flash.c:116:12: note: previous definition of 'write_bar' was here
static int write_bar(struct spi_flash *flash, u32 offset)
            ^~~~~~~~~
drivers/mtd/spi/spi_flash.c:1114:12: warning: 'write_bar' defined but not used [-Wunused-function]
static int write_bar(struct spi_flash *flash, u32 offset)
            ^~~~~~~~~
scripts/Makefile.build:280: recipe for target 'drivers/mtd/spi/spi_flash.o' failed
make[1]: *** [drivers/mtd/spi/spi_flash.o] Error 1
make[1]: *** Waiting for unfinished jobs....

superuser编译打印输出片段:
drivers/spi/sunxi_spi.c: In function ‘sunxi_spi_claim_bus’:
drivers/spi/sunxi_spi.c:179:15: warning: unused variable ‘pin_func’ [-Wunused-variable]
  unsigned int pin_func = SUNXI_GPC_SPI0;
               ^~~~~~~~
  LD      drivers/video/built-in.o
  CC      common/edid.o
  LD      drivers/built-in.o
  CC      drivers/usb/common/common.o
  LD      drivers/usb/dwc3/built-in.o
common/edid.c: In function ‘edid_print_dtd’:
common/edid.c:242:15: warning: ‘*’ in boolean context, suggest ‘&&’ instead [-Wint-in-bool-context]
   if (v_total * h_total)
       ~~~~~~~~^~~~~~~~~
此时成功生成。bin文件

离线

#14 2019-04-06 17:52:41

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,342
积分: 9202

Re: V3s—uboot编译报错

执行初始化配置文件之后:

ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make LicheePi_Zero_defconfig

立即编译:

ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make

能成功吗?





离线

楼主 #15 2019-04-06 17:54:35

Hu187
会员
注册时间: 2019-02-18
已发帖子: 39
积分: 39

Re: V3s—uboot编译报错

晕哥 说:

执行初始化配置文件之后:

ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make LicheePi_Zero_defconfig

立即编译:

ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make

能成功吗?


成功

离线

楼主 #16 2019-04-06 17:56:33

Hu187
会员
注册时间: 2019-02-18
已发帖子: 39
积分: 39

Re: V3s—uboot编译报错

晕哥 说:

执行初始化配置文件之后:

ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make LicheePi_Zero_defconfig

立即编译:

ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make

能成功吗?

但此时只能用到16MB

离线

楼主 #17 2019-04-06 17:59:34

Hu187
会员
注册时间: 2019-02-18
已发帖子: 39
积分: 39

Re: V3s—uboot编译报错

Hu187 说:
晕哥 说:

执行初始化配置文件之后:

ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make LicheePi_Zero_defconfig

立即编译:

ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make

能成功吗?


成功

又调整了几下 编译中有警告 但最终生成了。bin

非常感谢 。改天烧进去试试

离线

#18 2019-04-06 18:03:45

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,342
积分: 9202

Re: V3s—uboot编译报错

https://www.kancloud.cn/lichee/lpi0/425605

u-boot 只要开启 CONFIG_SPI_FLASH_BAR 就可以访问整个 32M 空间.

如果你的 dtb, zImage 空间没有超过 16M 区域, 可以什么都不用改.





离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn