Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Questions about Gentoo (or GenPi64) @ Raspberry Pi 5
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
Gladdle
Guru
Guru


Joined: 27 Jul 2008
Posts: 306
Location: Cleebronn, Germany

PostPosted: Thu Oct 19, 2023 1:37 pm    Post subject: Questions about Gentoo (or GenPi64) @ Raspberry Pi 5 Reply with quote

Hi there, my Raspberry Pi 4 is broken, the network adapter is (physically) dead. So i want to have the new Raspberry Pi 5 in the next few days, but i have serval questions about installing Gentoo on that. I only want to have a home Server without a monitor, so the HDMI and graphic chip doesn't matter for me! Gentoo is fast as hell and i love this distribution so i want to have it on my home server.

NeddySeagoon wrote:
There is no 32 bit to 64 bit upgrade path. It's a reinstall.
Running a 32 bit userland on top of a 64 bit kernel works.
ARM does not have multilib, so if you go all 64 bit, 32 bit apps will not run.

I found that post on the forum here, and i need the oracle jre for some reasons, but there is a version for 64bit. And if i don't want to play old games there is no reason to use 32bit, or am i wrong?

Can i use the GenPi64 Project and modifiy the /etc/portage/make.conf makeopts for the new processor, then reinstall the whole system? Or shall i wait until a RasPi5 Version is releaised? What about the M.2 Adapter, have i make a new kernel with that driver or maybe that could be a problem?
Or maybe anyone got some useful informations for me for this project?
Sorry for my bad english, it's not my native language but i hope you all understand what i mean.
Back to top
View user's profile Send private message
pingtoo
l33t
l33t


Joined: 10 Sep 2021
Posts: 786
Location: Richmond Hill, Canada

PostPosted: Thu Oct 19, 2023 8:29 pm    Post subject: Reply with quote

Gladdle,

If you are looking a ready made Gentoo for RPI5 you will be disappointed. I have not found such thing yet.

However if you take apart of the entire OS into smaller chunk you may be easier to get to you ideal setting.

So my recommendation,
  1. Use Raspberry Pi OS kernel and its DTB.
  2. Load current Gentoo stage3 for ARM64
  3. Optional setup a cross build system on a more powerful machine for optimised stage3


Kernel is really just Linux mainline + Rasperry Pi patches for hardware, if you want Gentoo's patches it can come later once you have known working environment.

Rootfs, get current ARM64 stage3, it is targeted for generic ARMv8-a. Once you have a working Gentoo (either on RPI5 or crossdev) you can create new targeted to ARMv8,2+dotprod

GenPi64 is kind of outdated binary, if you load it you most likely want to bring it up to date which is for sure recompile everything. (And most likely several iterations)

GenPi64 kernel may not work for RPI5, because it will not have right driver for RP1 (the southern chip)[/list]
Back to top
View user's profile Send private message
flysideways
Guru
Guru


Joined: 29 Jan 2005
Posts: 368

PostPosted: Wed Oct 25, 2023 4:40 pm    Post subject: Reply with quote

I'm in no hurry at the moment, there are 8gb Pi 4's available again. I have two on the way for a couple of PiHut Aluminum Armour cases that I bought a long time ago, still in the boxes needing Pi's.

I have no desire for an active cooling solution. I'd be happy with an updated Aluminum Armour case with all of the features of the Pi 4 version.

I am interested to see what NVME solutions come about.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 53562
Location: 56N 3W

PostPosted: Wed Oct 25, 2023 6:58 pm    Post subject: Reply with quote

Gladdle,

In anticipation of getting a Pi5 by the end of the month, I wrote Raspberry PI Install Guide
I've tested most of it (once) on a Pi4 I had to reinstall after its SSD had to be repurposed.

The main aim was to get a system up without needing to chroot. It does that,
It was also supposed to be Pi model independent. The only thing to change for one Pi model to another is the stage3 that you require.

The Pi5 should run Pi4 code but a few optimisations will be missing. They are only a rebuild away.

Sakakis original GenPi64 is dead. The one you linked should be OK but it won't be Pi5 optimised yet.
Hence, use the Gentoo stage3 on top of the foundation binary kernel and GPU code.

I want passive cooiling, PoE and NVMe.
With single lane PCIe 2, NVMe isn't going to be any better than SATA, speed wise.
The selling point is that it fits inside the case.

I'm intending adding Pi5 code to my binhost once i can test it.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.


Last edited by NeddySeagoon on Fri Oct 27, 2023 7:11 pm; edited 1 time in total
Back to top
View user's profile Send private message
flysideways
Guru
Guru


Joined: 29 Jan 2005
Posts: 368

PostPosted: Fri Oct 27, 2023 7:04 pm    Post subject: Reply with quote

@Neddy, I went to go look at your latest contribution, the link has a bit of extra text.

Code:
https://wiki.gentoo.org/wiki/User:NeddySeagoon/Raspberry_PI_Install_Guide[/url


I'm guessing you meant https://wiki.gentoo.org/wiki/User:NeddySeagoon/Raspberry_PI_Install_Guide

Off to go read it now.

Thanks!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 53562
Location: 56N 3W

PostPosted: Fri Oct 27, 2023 7:12 pm    Post subject: Reply with quote

flysideways,

Thanks. I've fixed and tested the link now.

Feedback welcome.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
flysideways
Guru
Guru


Joined: 29 Jan 2005
Posts: 368

PostPosted: Fri Oct 27, 2023 7:48 pm    Post subject: Reply with quote

Very good read and quite the time saver compared to how I got started with Gentoo on my Pi's.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 53562
Location: 56N 3W

PostPosted: Sat Oct 28, 2023 12:05 pm    Post subject: Reply with quote

Team,

I've tried to clear up some /dev/sda and /dev/mmcblk0 confusion pointed out by my first user feedback. Thank you.
The page is updated.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
antonellocaroli
Guru
Guru


Joined: 11 Aug 2016
Posts: 494

PostPosted: Sun Oct 29, 2023 5:44 am    Post subject: Reply with quote

@NeddySeagoon I currently use for rpi4 as CFLAGS
Code:
march=armv8-a+crc+simd -mtune=cortex-a72 -ftree-vectorize -O3 -pipe -fomit-frame-pointer


what changes with rpi5?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 53562
Location: 56N 3W

PostPosted: Mon Oct 30, 2023 3:14 pm    Post subject: Reply with quote

antonellocaroli,

The Pi5 is armv8.2+crypto. Its a cortex-a76 CPU.

I don't have a Pi5 yet. Digging around and asking on IRC, I've discovered
make.conf:
# Pi 5 is armv8.2-a+crypto
#           armv8-a : Armv8-A : +fp, +simd
#           armv8.1-a : Armv8.1-A : armv8-a, +crc, +lse, +rdma
#           armv8.2-a : Armv8.2-A : armv8.1-a

#  thats armv8-a+fp+simd+crc+lse+rdma+crypto
#  Feature   crypto  implies  aes,  sha2,  and  simd,  which  implies  fp.
# which expands to ...including implied features ...
# armv8-a+fp+simd+crc+lse+rdma+crypto+aes+sha2+simd

# From a real Pi 5 :)
# Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimdd

# What does the Hawk support?

#COMMON_FLAGS="-O2 -pipe"
COMMON_FLAGS="-mcpu=cortex-a76+crypto -O2 -pipe"


That's from my RPi5 KVM build system.

The Pi4 KVM build system uses
Code:
COMMON_FLAGS="-mcpu=cortex-a72+crc -mtune=cortex-a72 -ftree-vectorize -O2 -pipe -fomit-frame-pointer -flto"

Its got a lot more RAM than a Pi, so I don't mind -flto.
The Pi cache is tiny, so -O2 rather than -O3.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
antonellocaroli
Guru
Guru


Joined: 11 Aug 2016
Posts: 494

PostPosted: Fri Nov 10, 2023 2:56 am    Post subject: Reply with quote

@NeddySeagoon

I got the Rpi5 and it's already running, for CFLAGS I set it up like this:

Code:
CFLAGS="-march=armv8.2-a+crc+crypto -mcpu=cortex-a76+crc+crypto -mtune=cortex-a76 -ftree-vectorize -O2 -pipe -fomit-frame-pointer"


should be OK?

Code:
gcc -### -E - -march=native 2>&1 | sed -r '/cc1/!d;s/(")|(^.* - )|( -mno-[^\ ]+)//g'
-mlittle-endian -mabi=lp64 -mcpu=cortex-a76+crc+crypto -dumpbase -
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 53562
Location: 56N 3W

PostPosted: Fri Nov 10, 2023 5:04 pm    Post subject: Reply with quote

antonellocaroli,

That looks about right. From my understanding of
Code:
man gcc
+crc is redundant but harmless.

What does resolve-march-native produce on a Pi 5?
You need version 3.0.0 or later as version 2.2.0 failed on my arm64 systems.

I still don't have my Pi 5 :(
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
antonellocaroli
Guru
Guru


Joined: 11 Aug 2016
Posts: 494

PostPosted: Fri Nov 10, 2023 5:27 pm    Post subject: Reply with quote

NeddySeagoon wrote:

What does resolve-march-native produce on a Pi 5?


Code:
resolve-march-native
-mcpu=cortex-a76+crc+crypto


Now I was playing around with the kernel configuration, and I saw a different entry in bcm2712_defconfig

Code:
CONFIG_ARM64_16K_PAGES=y"


that when I compile for rpi3 and rpi4 always at 64bit
I had set to
Code:
CONFIG_ARM64_4K_PAGES=y


I don't actually know which setting is better...
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