[SOLVED] Odroid-xu4: make u-boot error bad value (‘armv5’) for ‘-march=’ switch

Post Reply
hoangnh
Posts: 3
Joined: Sat Apr 06, 2019 8:33 pm
languages_spoken: english
ODROIDs: Odroid XU4
Has thanked: 0
Been thanked: 0
Contact:

[SOLVED] Odroid-xu4: make u-boot error bad value (‘armv5’) for ‘-march=’ switch

Unread post by hoangnh » Sat Apr 06, 2019 11:36 pm

I'm using Ubuntu 18.04.2, Intel core i5 to make u-boot
Follow instructions in link https://wiki.odroid.com/odroid-xu4/soft ... t_mainline, every steps from beginning are working fine until
when I execute command: sudo make
the error happens :

cc1: error: bad value (‘armv5’) for ‘-march=’ switch
cc1: note: valid arguments to ‘-march=’ switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 bonnell atom silvermont slm knl x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 btver1 btver2
Kbuild:43: recipe for target 'lib/asm-offsets.s' failed
make[1]: *** [lib/asm-offsets.s] Error 1
Makefile:1287: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2
Last edited by hoangnh on Sun Apr 07, 2019 1:51 pm, edited 5 times in total.

hoangnh
Posts: 3
Joined: Sat Apr 06, 2019 8:33 pm
languages_spoken: english
ODROIDs: Odroid XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid-xu4: make u-boot error bad value (‘armv5’) for ‘-march=’ switch

Unread post by hoangnh » Sat Apr 06, 2019 11:40 pm

The environment had been set :
export CROSS_COMPILE=arm-linux-gnueabihf-
export ARCH=arm

But the error still happens. Please hep me.

User avatar
meveric
Posts: 9911
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, N2
Has thanked: 1 time
Been thanked: 11 times
Contact:

Re: Odroid-xu4: make u-boot error bad value (‘armv5’) for ‘-march=’ switch

Unread post by meveric » Sun Apr 07, 2019 12:57 am

hoangnh wrote:
Sat Apr 06, 2019 11:36 pm
cc1: note: valid arguments to ‘-march=’ switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 bonnell atom silvermont slm knl x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 btver1 btver2
This part shows it uses gcc of your x86_64 environment and not the buildroot environment, as these are x86_64 architectures listed here and not arm architectures.
So it's not using the cross-compiler toolchain.

I also suggest not to use sudo make as sudo makes you run things as root and it could be whatever you setup for your user as environment variables is not used cause of this, as it's now using root and no longer your user.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

hoangnh
Posts: 3
Joined: Sat Apr 06, 2019 8:33 pm
languages_spoken: english
ODROIDs: Odroid XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid-xu4: make u-boot error bad value (‘armv5’) for ‘-march=’ switch

Unread post by hoangnh » Sun Apr 07, 2019 1:51 pm

It worked. Thank you :D .

Post Reply

Return to “Ubuntu”

Who is online

Users browsing this forum: No registered users and 1 guest