[U-Boot] error in the make: bad value in the asm-offsets.c file

Chris Packham judge.packham at gmail.com
Wed Nov 7 22:00:08 UTC 2018


Hi Ian, Sarah,

On Thu, 8 Nov 2018, 6:09 AM Ian Kane <ikane at codeblue.com wrote:

> Sarah,
>
> It looks to me from the attached image that the error is related to an
> expected, but missing value for the -march flag.
> To me, I'd expect to see "-march=ARMv5 switch" instead of "-march=
> switch".  Make note of the empty space in the second.
>
> However I defer to anyone else more knowledgeable on the subject, I'm very
> new user of the project myself.
>

Yes you are on the right track.

>
> Best regards,
> - Ian
> ________________________________________
> From: U-Boot <u-boot-bounces at lists.denx.de> on behalf of Sarah Wicker
> <S.Wicker at PRIMES.de>
> Sent: Wednesday, November 7, 2018 11:19 AM
> To: u-boot at lists.denx.de
> Subject: [U-Boot] error in the make: bad value in the asm-offsets.c  file
>
> Good Morning,
> i am trying to compile u-boot on my pc  to use it for a ZedBoard from
> Xilinx.
> I cloned the repository u-boot-xlnx using this link:
> https://github.com/Xilinx/u-boot-xlnx.git
> Made the first make to build the U-boot for a ZedBoard, it works well.
> Asked for the second make and i received the message that in the file
> asm-offsets.c:1:0: error: bad value (armv5) for -march=switch
> I opened the file but couldn't see were was this value
>
> [cid:image001.jpg at 01D476BE.1BC339F0]
>
> For information i am trying to compile on a virtual machine using
> Debian9.5.0
>
> I thank you in advance for your help
>

The problem is more than likely that you are using the host compiler, which
is probably x86 and doesn know how to generate output for arm. To compile
for an embedded target you need a suitable cross compiler. For debian i
believe there is a packaged arm compiler so it should just be a matter of

sudo apt install gcc-arm-linux-gnueabi
export CROSS_COMPILE=gcc-arm-linux-gnueabi
make ZedBoard_defconfig
make

The lastest u-boot does require a fairly up to date gcc for arm. I'm not
sure what debian ship. But if you get errors about the cross compiler being
too old you might need to grab a more recent compiler from
https://www.kernel.org/pub/tools/crosstool/ or the excellent
https://toolchains.bootlin.com/


More information about the U-Boot mailing list