Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to rice RPi's ARM1176JZF-S
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
necktwi
Apprentice
Apprentice


Joined: 24 Aug 2018
Posts: 168

PostPosted: Sat Nov 03, 2018 4:48 pm    Post subject: How to rice RPi's ARM1176JZF-S Reply with quote

How to rice Broadcom BCM2835 @700MHz ARM11 ARM1176JZF-S

currently I've set CFLAGS="-O2 -pipe -march=armv6j -mfpu=vfp -mfloat-abi=hard"
Back to top
View user's profile Send private message
erm67
l33t
l33t


Joined: 01 Nov 2005
Posts: 653
Location: EU

PostPosted: Sun Nov 04, 2018 10:43 pm    Post subject: Reply with quote

You can try

Code:
cat /proc/cpuinfo


to see the CPU features

and, since you have a recent gcc,

Code:
gcc -march=native -Q --help=target -v - </dev/null


Code:
gcc -mcpu=native -Q --help=target -v - </dev/null


to see what options are detected by gcc and maybe improve them, detection still isn't perfect on arm.

Usually using -mcpu is more powerful than using -march
_________________
Ok boomer
True ignorance is not the absence of knowledge, but the refusal to acquire it.
Ab esse ad posse valet, a posse ad esse non valet consequentia

My fediverse account: @erm67@erm67.dynu.net
Back to top
View user's profile Send private message
Etal
Veteran
Veteran


Joined: 15 Jul 2005
Posts: 1931

PostPosted: Mon Nov 05, 2018 1:00 am    Post subject: Reply with quote

You can do:
Code:
-mcpu=arm1176jzf-s

_________________
“And even in authoritarian countries, information networks are helping people discover new facts and making governments more accountable.”– Hillary Clinton, Jan. 21, 2010
Back to top
View user's profile Send private message
necktwi
Apprentice
Apprentice


Joined: 24 Aug 2018
Posts: 168

PostPosted: Wed Nov 07, 2018 12:52 pm    Post subject: Reply with quote

If i stick in -mcpu=arm1176jzf-s in CFLAGS then emerge says
-mcpu=arm1176jzf-s conflicts with -march=armv6j

Code:
gcc -march=native -Q --help=target -v - </dev/null

says -march=armv6zk

to rice, should I set -mcpu=arm1176jz-s and -march=armv6zk? or is it same as setting -march=native -mcpu=native or not mentioning -march and -mcpu defaults to native or rpi?

I understand that -mcpu and -march are necessary on crossdev to rice.
Back to top
View user's profile Send private message
erm67
l33t
l33t


Joined: 01 Nov 2005
Posts: 653
Location: EU

PostPosted: Wed Nov 07, 2018 8:06 pm    Post subject: Reply with quote

necktwi wrote:
If i stick in -mcpu=arm1176jzf-s in CFLAGS then emerge says
-mcpu=arm1176jzf-s conflicts with -march=armv6j

Code:
gcc -march=native -Q --help=target -v - </dev/null

says -march=armv6zk

to rice, should I set -mcpu=arm1176jz-s and -march=armv6zk? or is it same as setting -march=native -mcpu=native or not mentioning -march and -mcpu defaults to native or rpi?

I understand that -mcpu and -march are necessary on crossdev to rice.


try setting all 3, it shouldn't hurt

-mcpu=arm1176jz-s -march=armv6zk -mtune=arm1176jz-s

Hopefully gcc's native autodetection works for your cpu ...
_________________
Ok boomer
True ignorance is not the absence of knowledge, but the refusal to acquire it.
Ab esse ad posse valet, a posse ad esse non valet consequentia

My fediverse account: @erm67@erm67.dynu.net
Back to top
View user's profile Send private message
necktwi
Apprentice
Apprentice


Joined: 24 Aug 2018
Posts: 168

PostPosted: Thu Nov 08, 2018 3:31 am    Post subject: Reply with quote

But my cpu is arm1176jzf-s, not arm1176jz-s. but
Code:
gcc -mcpu=native -Q --help=target -v - </dev/null
says -mcpu=arm1176jz-s.

what should i use? arm1176jzf-s or arm1176jz-s?
Back to top
View user's profile Send private message
erm67
l33t
l33t


Joined: 01 Nov 2005
Posts: 653
Location: EU

PostPosted: Thu Nov 08, 2018 1:21 pm    Post subject: Reply with quote

Apparently the 'f' means the CPU has a math coprocessor (FPU), what is the output of
cat /proc/cpuinfo?

If fp or vfp are listed as feautures than probaly gcc is right.
_________________
Ok boomer
True ignorance is not the absence of knowledge, but the refusal to acquire it.
Ab esse ad posse valet, a posse ad esse non valet consequentia

My fediverse account: @erm67@erm67.dynu.net
Back to top
View user's profile Send private message
necktwi
Apprentice
Apprentice


Joined: 24 Aug 2018
Posts: 168

PostPosted: Thu Nov 08, 2018 1:25 pm    Post subject: Reply with quote

Code:

(RPi1B2):~ # cat /proc/cpuinfo
processor       : 0
model name      : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS        : 697.95
Features        : half thumb fastmult vfp edsp java tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xb76
CPU revision    : 7

Hardware        : BCM2835
Revision        : 000e
Serial          : 00000000a674e968


so i should use -mcpu=arm1176jz-s as gcc mis-derived? though my processor is arm1176jzf-s?
Back to top
View user's profile Send private message
erm67
l33t
l33t


Joined: 01 Nov 2005
Posts: 653
Location: EU

PostPosted: Thu Nov 08, 2018 2:51 pm    Post subject: Reply with quote

I told you -march native isn't working correctly on ARM :lol: :lol: :lol:
Use the right one, unless of course -mcpu=arm1176jz-s+fp exists and is the same as arm1176jzf-s, gcc turns on most features by default
_________________
Ok boomer
True ignorance is not the absence of knowledge, but the refusal to acquire it.
Ab esse ad posse valet, a posse ad esse non valet consequentia

My fediverse account: @erm67@erm67.dynu.net
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum