Not able to build using the BPI BSP

Hi,

I am trying to build Uboot for BPIM4 but getting the below error:

NOTICE: new build.sh default select BPI-M4-720P and pack all boards supported boards: BPI-M4-720P

BPI-M4-720P configured. Now run make This tool support following building mode(s):

1. Build all, uboot and kernel and pack to download images.
2. Build uboot only.
3. Build kernel only.
4. kernel configure.
5. Pack the builds to target download image, this step must execute after u-boot,
   kernel and rootfs build out
6. Create bsp update packages for BPI SD Images
7. Update local build to SD with BPI Image flashed
8. Clean all build.

Now building…

make -C u-boot-rtk rtd1395_bananapi_defconfig CROSS_COMPILE=/Experiment/armv8/bpim4/BPI-M4-bsp/toolchains/asdk64-4.9.3-a53-EL-3.10-g2.19-a64nt-150615/bin/aarch64-linux-
make[1]: Entering directory '/Experiment/armv8/bpim4/BPI-M4-bsp/u-boot-rtk'
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
In file included from scripts/kconfig/zconf.tab.c:2534:
scripts/kconfig/confdata.c: In function ‘conf_write’:
scripts/kconfig/confdata.c:765:19: warning: ‘%s’ directive writing likely 7 or more bytes into a region of size between 1 and 4097 [-Wformat-overflow=]
  765 |  sprintf(newname, "%s%s", dirname, basename);
      |                   ^~~~~~
scripts/kconfig/confdata.c:765:19: note: assuming directive output of 7 bytes
In file included from /usr/include/stdio.h:867,
                 from scripts/kconfig/zconf.tab.c:84:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 1 or more bytes (assuming 4104) into a destination of size 4097
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from scripts/kconfig/zconf.tab.c:2534:
scripts/kconfig/confdata.c:768:20: warning: ‘.tmpconfig.’ directive writing 11 bytes into a region of size between 1 and 4097 [-Wformat-overflow=]
  768 |   sprintf(tmpname, "%s.tmpconfig.%d", dirname, (int)getpid());
      |                    ^~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from scripts/kconfig/zconf.tab.c:84:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 13 and 4119 bytes into a destination of size 4097
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#
make[1]: Leaving directory '/Experiment/armv8/bpim4/BPI-M4-bsp/u-boot-rtk'
make -C u-boot-rtk CROSS_COMPILE=/Experiment/armv8/bpim4/BPI-M4-bsp/toolchains/asdk64-4.9.3-a53-EL-3.10-g2.19-a64nt-150615/bin/aarch64-linux- BUILD_BOOTCODE_ONLY=true
make[1]: Entering directory '/Experiment/armv8/bpim4/BPI-M4-bsp/u-boot-rtk'
/Experiment/armv8/bpim4/BPI-M4-bsp/toolchains/asdk64-4.9.3-a53-EL-3.10-g2.19-a64nt-150615//bin/aarch64-linux-xgcc: No such file or directory
/Experiment/armv8/bpim4/BPI-M4-bsp/toolchains/asdk64-4.9.3-a53-EL-3.10-g2.19-a64nt-150615//bin/aarch64-linux-xgcc: No such file or directory
dirname: missing operand
Try 'dirname --help' for more information.
scripts/kconfig/conf --silentoldconfig Kconfig
  CHK     include/config.h
  UPD     include/config.h
  GEN     include/autoconf.mk
/Experiment/armv8/bpim4/BPI-M4-bsp/toolchains/asdk64-4.9.3-a53-EL-3.10-g2.19-a64nt-150615//bin/aarch64-linux-xgcc: No such file or directory
  GEN     include/autoconf.mk.dep
/Experiment/armv8/bpim4/BPI-M4-bsp/toolchains/asdk64-4.9.3-a53-EL-3.10-g2.19-a64nt-150615//bin/aarch64-linux-xgcc: No such file or directory
/Experiment/armv8/bpim4/BPI-M4-bsp/toolchains/asdk64-4.9.3-a53-EL-3.10-g2.19-a64nt-150615//bin/aarch64-linux-xgcc: No such file or directory
/Experiment/armv8/bpim4/BPI-M4-bsp/toolchains/asdk64-4.9.3-a53-EL-3.10-g2.19-a64nt-150615//bin/aarch64-linux-xgcc: No such file or directory
dirname: missing operand
Try 'dirname --help' for more information.
  CHK     include/config/uboot.release
  UPD     include/config/uboot.release
  CHK     include/generated/version_autogenerated.h
/Experiment/armv8/bpim4/BPI-M4-bsp/toolchains/asdk64-4.9.3-a53-EL-3.10-g2.19-a64nt-150615//bin/aarch64-linux-xgcc: No such file or directory
execv: No such file or directory
  UPD     include/generated/version_autogenerated.h
  CHK     include/generated/timestamp_autogenerated.h
  UPD     include/generated/timestamp_autogenerated.h
  CC      lib/asm-offsets.s
/Experiment/armv8/bpim4/BPI-M4-bsp/toolchains/asdk64-4.9.3-a53-EL-3.10-g2.19-a64nt-150615//bin/aarch64-linux-xgcc: No such file or directory
fixdep: error opening depfile: lib/.asm-offsets.s.d: No such file or directory
make[2]: *** [Kbuild:44: lib/asm-offsets.s] Error 2
make[1]: *** [Makefile:1437: prepare0] Error 2
make[1]: Leaving directory '/Experiment/armv8/bpim4/BPI-M4-bsp/u-boot-rtk'
make: *** [Makefile:32: u-boot] Error 2

Build machine details:
Ubuntu 20.04.1 LTS \n \l

Pls let me know if any other information is needed.

Check toolchain exist or not, which OS running? or try the docker image in the REAME.md

Thanks for the reply.

I am using Ubuntu 20.04.1 LTS

**Toolchain exists:**
    /Experiment/armv8/bpim4/BPI-M4-bsp/toolchains/asdk64-4.9.3-a53-EL-3.10-g2.19-a64nt-150615/bin
    [kasi@amd:01:18 PM:.../asdk64-4.9.3-a53-EL-3.10-g2.19-a64nt-150615/bin:]$
    [kasi@amd:01:18 PM:.../asdk64-4.9.3-a53-EL-3.10-g2.19-a64nt-150615/bin:]$ls
    aarch64-linux-addr2line  aarch64-linux-gcc            aarch64-linux-ld.bfd   aarch64-linux-sstrip    asdk64-linux-ar       asdk64-linux-gcc-ar         asdk64-linux-lstrip   asdk64-linux-strings  new
    aarch64-linux-ar         aarch64-linux-gcc-ar         aarch64-linux-lstrip   aarch64-linux-strings   asdk64-linux-as       asdk64-linux-gcc-nm         asdk64-linux-nm       asdk64-linux-strip
    aarch64-linux-as         aarch64-linux-gcc-nm         aarch64-linux-nm       aarch64-linux-strip     asdk64-linux-c++      asdk64-linux-gcc-ranlib     asdk64-linux-objcopy  asdk64-linux-wrapper
    aarch64-linux-c++        aarch64-linux-gcc-ranlib     aarch64-linux-objcopy  aarch64-linux-wrapper   asdk64-linux-c++filt  asdk64-linux-gcov           asdk64-linux-objdump  catimg
    aarch64-linux-c++filt    aarch64-linux-gcov           aarch64-linux-objdump  aarch64-linux-xc++      asdk64-linux-config   asdk64-linux-gdb            asdk64-linux-ranlib   img2bin
    aarch64-linux-config     aarch64-linux-gdb            aarch64-linux-ranlib   aarch64-linux-xg++      asdk64-linux-cpp      asdk64-linux-gnu-gcc-4.9.3  asdk64-linux-readelf  imgpad
    aarch64-linux-cpp        aarch64-linux-gnu-gcc-4.9.3  aarch64-linux-readelf  aarch64-linux-xgcc      asdk64-linux-elfedit  asdk64-linux-gprof          asdk64-linux-relink   lxobjHex
    aarch64-linux-elfedit    aarch64-linux-gprof          aarch64-linux-relink   aarch64-linux-xld       asdk64-linux-g++      asdk64-linux-ld             asdk64-linux-size     lxobjHex-cygnus
    aarch64-linux-g++        aarch64-linux-ld             aarch64-linux-size     asdk64-linux-addr2line  asdk64-linux-gcc      asdk64-linux-ld.bfd         asdk64-linux-sstrip   lxobjHexElf
    [kasi@amd:01:18 PM:.../asdk64-4.9.3-a53-EL-3.10-g2.19-a64nt-150615/bin:]$

May be the reason is ubuntu 20, try the docker image to avoid build env issue.