I have done below procedure but failures occurs
root@caravel:/home/ram/Desktop/u-boot-2017.01# sudo apt-get install gcc-arm-linux-gnueabi
Reading package lists... Done
Building dependency tree
Reading state information... Done
gcc-arm-linux-gnueabi is already the newest version.
The following packages were automatically installed and are no longer required:
libntdb1 linux-image-extra-3.19.0-39-generic python-ntdb
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@caravel:/home/ram/Desktop/u-boot-2017.01# export ARCH=arm
root@caravel:/home/ram/Desktop/u-boot-2017.01# export CROSS_COMPILE=arm-linux-gnueabi-
root@caravel:/home/ram/Desktop/u-boot-2017.01# echo $CROSS_COMPILE
arm-linux-gnueabi-
root@caravel:/home/ram/Desktop/u-boot-2017.01# echo $ARCH
arm
root@caravel:/home/ram/Desktop/u-boot-2017.01# ls configs/rpi_*
configs/rpi_2_defconfig configs/rpi_3_32b_defconfig configs/rpi_3_defconfig configs/rpi_defconfig
root@caravel:/home/ram/Desktop/u-boot-2017.01# make rpi_3_defconfig
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
HOSTLD scripts/kconfig/conf
#
# configuration written to .config
#
root@caravel:/home/ram/Desktop/u-boot-2017.01# make -j4
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/config.h
UPD include/config.h
CFG u-boot.cfg
GEN include/autoconf.mk.dep
cc1: warning: unknown register name: x18 [enabled by default]
cc1: warning: unknown register name: x18 [enabled by default]
GEN include/autoconf.mk
arm-linux-gnueabi-gcc: error: unrecognized argument in option ‘-march=armv8-a’
arm-linux-gnueabi-gcc: note: valid arguments to ‘-march=’ are: armv2 armv2a armv3 armv3m armv4 armv4t armv5 armv5e armv5t armv5te armv6 armv6-m armv6j armv6k armv6s-m armv6t2 armv6z armv6zk armv7 armv7-a armv7-m armv7-r armv7e-m ep9312 iwmmxt iwmmxt2 native
CHK include/config/uboot.release
CHK include/generated/timestamp_autogenerated.h
UPD include/generated/timestamp_autogenerated.h
UPD include/config/uboot.release
CHK include/generated/version_autogenerated.h
UPD include/generated/version_autogenerated.h
CC lib/asm-offsets.s
CC arch/arm/lib/asm-offsets.s
arm-linux-gnueabi-gcc: error: unrecognized argument in option ‘-march=armv8-a’
arm-linux-gnueabi-gcc: note: valid arguments to ‘-march=’ are: armv2 armv2a armv3 armv3m armv4 armv4t armv5 armv5e armv5t armv5te armv6 armv6-m armv6j armv6k armv6s-m armv6t2 armv6z armv6zk armv7 armv7-a armv7-m armv7-r armv7e-m ep9312 iwmmxt iwmmxt2 native
arm-linux-gnueabi-gcc: error: unrecognized argument in option ‘-march=armv8-a’
arm-linux-gnueabi-gcc: note: valid arguments to ‘-march=’ are: armv2 armv2a armv3 armv3m armv4 armv4t armv5 armv5e armv5t armv5te armv6 armv6-m armv6j armv6k armv6s-m armv6t2 armv6z armv6zk armv7 armv7-a armv7-m armv7-r armv7e-m ep9312 iwmmxt iwmmxt2 native
make[1]: *** [lib/asm-offsets.s] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [arch/arm/lib/asm-offsets.s] Error 1
make: *** [prepare0] Error 2