Build u-boot too many warnings

When i compile u-boot from

CC v6

$ cc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 6.3.0-18' --with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-6 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 6.3.0 20170516 (Debian 6.3.0-18) 

Build log.

$ ./ 
new default select BPI-R2-720P and pack all boards
supported boards:

BPI-R2-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. update files for SD
	7. Clean all build.
Please choose a mode(1-7): 2

 Now building...

make -C u-boot-mt mt7623_evb_config CROSS_COMPILE=arm-linux-gnueabihf- -j2
make[1]: Entering directory '/home/francois/BPI-R2-bsp/u-boot-mt'
Configuring for mt7623_evb board...
make[1]: Leaving directory '/home/francois/BPI-R2-bsp/u-boot-mt'
make -C u-boot-mt all CROSS_COMPILE=arm-linux-gnueabihf- -j2
make[1]: Entering directory '/home/francois/BPI-R2-bsp/u-boot-mt'
  GEN     include/
  GEN     include/
  CHK     include/config/uboot.release
  CHK     include/generated/version_autogenerated.h
  UPD     include/config/uboot.release
  CHK     include/generated/timestamp_autogenerated.h
  UPD     include/generated/version_autogenerated.h
  UPD     include/generated/timestamp_autogenerated.h
  HOSTCC  scripts/basic/fixdep
  CC      lib/asm-offsets.s
  GEN     include/generated/generic-asm-offsets.h
  HOSTCC  tools/img2srec
  HOSTCC  tools/gen_eth_addr
  HOSTCC  tools/aisimage.o
  HOSTCC  tools/crc32.o
  HOSTCC  tools/default_image.o
  HOSTCC  tools/dumpimage.o
  HOSTCC  tools/fdt.o
  HOSTCC  tools/fdt_ro.o
  HOSTCC  tools/fdt_rw.o
  HOSTCC  tools/fdt_strerror.o
  HOSTCC  tools/fdt_wip.o
  HOSTCC  tools/fit_image.o
  HOSTCC  tools/image-fit.o
  HOSTCC  tools/image-host.o
  HOSTCC  tools/image.o
  HOSTCC  tools/imagetool.o
  HOSTCC  tools/imximage.o
  HOSTCC  tools/kwbimage.o
  HOSTCC  tools/md5.o
  HOSTCC  tools/mkenvimage.o
  HOSTCC  tools/mkimage.o
  HOSTCC  tools/mxsimage.o
  HOSTCC  tools/omapimage.o
  HOSTCC  tools/os_support.o
  HOSTCC  tools/pblimage.o
  HOSTCC  tools/sha1.o
  HOSTCC  tools/ublimage.o
  HOSTCC  tools/proftool
  HOSTLD  tools/mkenvimage
  HOSTLD  tools/dumpimage
  HOSTLD  tools/mkimage
  LD      arch/arm/cpu/built-in.o
  CC      arch/arm/cpu/armv7/cache_v7.o
  AS      arch/arm/cpu/armv7/mt7623/lowlevel_init.o
  CC      arch/arm/cpu/armv7/cpu.o
  CC      arch/arm/cpu/armv7/mt7623/init.o
  CC      arch/arm/cpu/armv7/syslib.o
  CC      arch/arm/cpu/armv7/mt7623/reset.o
  LD      arch/arm/cpu/armv7/mt7623/built-in.o
  AS      arch/arm/cpu/armv7/start.o
  LD      arch/arm/cpu/armv7/built-in.o
  AS      arch/arm/lib/crt0.o
  CC      board/mediatek/common/mtk_cmd.o
board/mediatek/common/mtk_cmd.c: In function ‘do_read_mtk_image_blks’:
board/mediatek/common/mtk_cmd.c:162:40: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘long unsigned int’ [-Wformat=]
      printf("[%s]Bad Magic Number = 0x%x\n",
board/mediatek/common/mtk_cmd.c:172:40: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘long unsigned int’ [-Wformat=]
     printf("[%s]Good Magic Number = 0x%x\n",
board/mediatek/common/mtk_cmd.c:174:37: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘long unsigned int’ [-Wformat=]
     printf("[%s]Good Data size = 0x%x\n",
board/mediatek/common/mtk_cmd.c:176:30: warning: format ‘%s’ expects argument of type ‘char *’, but argument 3 has type ‘long unsigned int’ [-Wformat=]
     printf("[%s]Good name = %s\n",
board/mediatek/common/mtk_cmd.c:180:31: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘long unsigned int’ [-Wformat=]
     printf("[%s]img_size = 0x%x\n", __func__, img_size);
board/mediatek/common/mtk_cmd.c:140:21: warning: unused variable ‘img_hdr’ [-Wunused-variable]
     image_header_t *img_hdr = (image_header_t *)load_addr;
board/mediatek/common/mtk_cmd.c: In function ‘do_serious_image_check’:
board/mediatek/common/mtk_cmd.c:225:33: warning: unused variable ‘len’ [-Wunused-variable]
  __u32 chksum = 0, chksum2 = 0, len = 0;
board/mediatek/common/mtk_cmd.c:225:20: warning: unused variable ‘chksum2’ [-Wunused-variable]
  __u32 chksum = 0, chksum2 = 0, len = 0;
board/mediatek/common/mtk_cmd.c:225:8: warning: unused variable ‘chksum’ [-Wunused-variable]
  __u32 chksum = 0, chksum2 = 0, len = 0;
board/mediatek/common/mtk_cmd.c:223:17: warning: unused variable ‘header’ [-Wunused-variable]
  image_header_t header;
board/mediatek/common/mtk_cmd.c: In function ‘do_backup_message’:
board/mediatek/common/mtk_cmd.c:262:1: warning: control reaches end of non-void function [-Wreturn-type]
board/mediatek/common/mtk_cmd.c: In function ‘do_reco_message’:
board/mediatek/common/mtk_cmd.c:268:1: warning: control reaches end of non-void function [-Wreturn-type]
  LD      board/mediatek/common/built-in.o
  AS      arch/arm/lib/relocate.o
  CC      arch/arm/lib/board.o
arch/arm/lib/board.c:517:0: warning: "MCUSYS_CFGREG_BASE" redefined
 #define MCUSYS_CFGREG_BASE           0x10200000
In file included from /home/francois/BPI-R2-bsp/u-boot-mt/include/configs/mt7623_evb.h:22:0,
                 from /home/francois/BPI-R2-bsp/u-boot-mt/include/config.h:10,
                 from /home/francois/BPI-R2-bsp/u-boot-mt/include/common.h:18,
                 from arch/arm/lib/board.c:25:
/home/francois/BPI-R2-bsp/u-boot-mt/arch/arm/include/asm/arch/mt_reg_base.h:21:0: note: this is the location of the previous definition
 #define MCUSYS_CFGREG_BASE  (IO_PHYS + 0x00200000)

fixed some of these in my forked repo:

some of them are redefinitions of constants which must be checked to be the same value

maybe it is a good idea to start with a newer uboot-version

VERSION = 2014

is the existing version (makefile) from sinovoips repo…it’s nearly 4 years ago

maybe most drivers are included and sata-support may be easier. but i have no knowledge to start a new uboot-config :slight_smile: is there anyone who knows something about how to start? i assume i must also include the dtb which is compiled with/in kernel. can kernel-drivers be used or only driver inside uboot?

official uboot-source:;a=shortlog;h=refs/heads/master

@garywang is it enough to add folder and file to the new uboot-tree and using the configfile it seems that a full kernel is included in uboot, but how to include it? the documentation is a bit strange (where is the start)

the actual uboot (2018-1) seems to have no support for the mt7623, have anybody the knowledge to add it (maybe from uboot on sinovoips github)?

how can i configure hmdi-output in existing uboot and booting the kernel?