15

I am compiling u-boot for beagle bone black as per the steps mentioned on this link

http://eewiki.net/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-Bootloader:U-Boot

and getting the following error.

cc1: error: bad value (armv5) for -march= switch

can anyone help me in finding the reason for this error? I guess this is because of gcc not supporting armv7-a still not sure.

thanks, sumit

sawdust
  • 16,103
  • 3
  • 40
  • 50
user2910111
  • 342
  • 2
  • 3
  • 11

1 Answers1

11

If you type the exact command shown on eewiki.net page, there would be a problem if you do not have env var CC set. I prefer the following, it assumes you have reasonably current install of arm-linux-gnueabi-gcc as your cross toolchain (adjust if you have something different)

export CROSS_COMPILE=arm-linux-gnueabi-
export ARCH=arm
make am335x_evm_config
make
Joe Kul
  • 2,454
  • 16
  • 16
  • I had the same problem only when running the line: make ARCH=arm CROSS_COMPILE=${CC} I tried your suggestion but got another error: arm-linux-gnueabi-gcc not found Could you please give me any suggestions on why this happens? – Happy Sep 18 '18 at 22:04
  • Happened to me when u-boot wasn't with the right ownership. Chown solved it :) – Tomer Petel Sep 29 '22 at 07:33