[U-Boot] Make error in U-boot branch v2015.10-rc5

Chris Packham judge.packham at gmail.com
Fri Apr 20 22:26:50 UTC 2018


On Fri, 20 Apr 2018, 10:55 PM Arunashis Ghose, <hindol96 at outlook.com> wrote:

> Hi,
>
> Thanks for reading this email and I would be grateful if you have time to
> help me fix the issue.
>
> I am very much new to U-boot world and trying to build U-boot in my
> machine for a particular board - 'Marvel Armada 38x'. While I was trying to
> compile the u-boot fork for Marvel (in github), I got following error:
>

You may want to take a look at the db-88f6820-gp, db-88f6820-amc or
clearfog boards. These are in both the Marvell fork and in u-boot proper.


> ---------------------------------------------------------------------------
> **** [Building U-BOOT]    *****
>
> cc1: error: bad value (armv7-a) for -march= switch
> cc1: error: bad value (armv7-a) for -march= switch
> lib/asm-offsets.c:1:0: error: bad value (armv7-a) for -march= switch
>  /*
>  ^
> Makefile:716: recipe for target 'lib/asm-offsets.s' failed
> make: *** [lib/asm-offsets.s] Error 1
> make: *** Waiting for unfinished jobs....
>
>  *** Error: Build failed
> ---------------------------------------------------------------------------
>
> I couldn't figure out what is causing it and a way to fix it.
>
> Then I thought I would try to build u-boot original. I checked out the
> branch v2015.10-rc5 of u-boot and tried to build it for board - 'bananapro'
> (a random choice). I got a similar error:
>
> ---------------------------------------------------------------------------
> $ make Bananapro_config
>   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
> #
> $ make all
> scripts/kconfig/conf  --silentoldconfig Kconfig
>   CHK     include/config.h
>   UPD     include/config.h
>   GEN     include/autoconf.mk
>   GEN     include/autoconf.mk.dep
>   GEN     spl/include/autoconf.mk
>   CHK     include/config/uboot.release
>   UPD     include/config/uboot.release
>   CHK     include/generated/version_autogenerated.h
>   UPD     include/generated/version_autogenerated.h
>   CHK     include/generated/timestamp_autogenerated.h
>   UPD     include/generated/timestamp_autogenerated.h
>   CC      lib/asm-offsets.s
> lib/asm-offsets.c:1:0: error: bad value (armv5) for -march= switch
>  /*
>  ^
> Kbuild:43: recipe for target 'lib/asm-offsets.s' failed
> make[1]: *** [lib/asm-offsets.s] Error 1
> Makefile:1251: recipe for target 'prepare0' failed
> make: *** [prepare0] Error 2
> ---------------------------------------------------------------------------
>
> Can anyone give me a clue? Thanks a lot.
>

You need to tell the build to use a cross compiler. I.e

export CROSS_COMPILE=arm-linux-gnueabi-
make db-88f6820-gp_defconfig
make

You'll need a reasonably new version of gcc to compile u-boot for arm (for
size reasons mostly). Depending on your distro there might be a package you
can install otherwise there is the excellent service from bootlin (formerly
free-electrons)

https://toolchains.bootlin.com/

The Linux kernel community also publish cross toolchains for various
architectures

https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/7.3.0/

I believe it's possible to use u-boot's buildman tool to install these but
I'm traveling at the moment so I can't look up the details on that.

_______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot
>


More information about the U-Boot mailing list