Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Architectures & Platforms Gentoo on ARM
  • Search

media-server project: Raspberry Pi 4, SATA-HDDs and gentoo?

Gentoo on all things ARM. Both 32 bit and 64 bit.
Tell about your hardware and CHOST.
Problems with crossdev targeting ARM hardware go here too.
Post Reply
  • Print view
Advanced search
7 posts • Page 1 of 1
Author
Message
Lebkoungcity
Apprentice
Apprentice
User avatar
Posts: 230
Joined: Sun Nov 16, 2008 2:34 pm
Location: near Lebkoungcity (='Gingerbreadcity' =Nuremberg)

media-server project: Raspberry Pi 4, SATA-HDDs and gentoo?

  • Quote

Post by Lebkoungcity » Wed Feb 10, 2021 2:14 pm

tl;dr:
main questions are:
- What is an up-to-date way to get gentoo (64-bit) on a Raspberry Pi 4 (8 GB)? (I've done it several times on x86 and amd64 but I'm not quite sure which way to take with the Raspberry Pi. Is Sakaki's image still usable to have starting point?)
- How to connect two 3.5" HDDs to the Raspberry Pi 4? (without an extra casing for the HDD and want to avoid buggy chipsets)
Hello :)

I wonder if my idea is reasonable and I'd like to read some opinions on it. And since I've always read the best qualified answers on IT-topics I put my question here.

What I have in my mind is a Raspberry Pi 4 8GB that should act as a network file server for media-files and some files I can access from my devices in my network. It should also provide those media-files and netflix through kodi to my TV via HDMI. Maybe I also want to be able to play audio-files directly from the Raspberry Pi on my old and trusty stereo amp (analog, featuring only RCA connectors) but that has no top priority. I want to put it all together in the empty casing of a defect stereo component (e.g. a amp - it would already have openings for air to circulate in and out) to place it into the stack of my hi-fi system. (Maybe I also add a little touch-screen as display to play music without the need some other screen?)
And of course I'd like my favorite OS on it :D


On the hardware side my list contains at least:
- 1 Raspberry Pi 4 8 GB (to have as much RAM as possible for compiling)
- 1 set of matching heat spreaders
- 1 SD-Card
- 2 converter USB3-SATA (I have no idea what to take - price ranges from ~8,-€ to more than 60,-€ and I don't know which chipsets are buggy - or even what connector uses which chipset...)
- 2 3.5" HDDs, each 3 TB (I would get them slightly used and for some reason I like this rotating rust)
- 1 hardware clock (I want the Raspberry Pi to keep the time when I switch power off)
- 1 power supply unit like this built-in-industrial-power-supply-module
- power chords as needed to supply the Raspberry Pi and the HDDs separately (e.g. for the Raspberry Pi: USB-C-type-cable with open endings)
- all other chords as needed
- 1 defect stereo component (Is it possible to take a metal casing or would it block WiFi & Bluetooth too much? Could I attach external antenna to the Raspberry Pi?)
- Bluetooth keyboard with integrated touchpad

Maybe later I would add:
- 1 fan when I see that the temperature in the casing is too high
- some kind of power-unit with rechargeable batteries that sends the signal to halt the Raspberry Pi when power is cut off and give it enough power & time to complete the shutdown (to make it safe when someone switches off the master switch)
- 1 kind of "soundcard" (e.g. on one of the USB2-ports, in case the quality of the built in audio of the Raspberry Pi is not good enough)
- 1 touch-display that fits in the front of the case (to make it usable without the need of some other screen)


On the software side there's:
- gentoo (I discovered Sakaki's image and then found she left the project for personal reasons. - Which way to get gentoo on the little fellow is recommended? Is this image still a good starting point from which I could go on and have a 'normal' gentoo just with the flavour of Raspberry Pi? Is this still valid: viewtopic-t-1125523.html?)
- distcc and stuff to have my amd64 helping to compile (I've done that so the amd64 helps my x86-Pentium-M)
- kodi (hopefully it's possible to use the netflix-plugin)
- one of those light DEs and some everyday-applications e.g. file manager, browser,... (I'll find my way on this part :wink: )
- I'd like to have as much on the HDD and use the SD-card just to boot (later, when the system is set-up)
- 1 HDD should be used and its content should be copied over to the other HDD regularly as a backup (e.g. via a weekly cronjob each night from Saturday to Sunday)


What do you think of this?


Cheers :)
Andy
"The most dangerous world view is the world view of the ones who haven't viewed the world."
Alexander von Humboldt (1769-1859)
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56085
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Wed Feb 10, 2021 5:42 pm

Lebkoungcity,

Netflix requires widevine to do the DRM (Digital Restrictions Management) its an evil binary only thing and its not available for armv8-a.
That's 64 bit Raspberry Pi.

Choose armv8-a or widevine. You can't have both.

As you want 3.5" rotating rust, you will need both 5v and 12v power. 3.5" HDD use 12v for the spin motors.
It would be possible to use a 5v to 12v DC to DC converter, if you wanted, or a 12v to 5v DC to DC converter.

Do not bother with heat spreaders. There are several passive cooling solutions. Its available is different colours with or without a fan.
My example sat on my desk keeps the CPU below 60C even working hard.

ffmpeg as provided in Gentoo does not yet support mmal, for hardware decoding on the Pi. There are patches because Sakaki applied them to her older ffmpeg.

That's all the bad news.

On the good news front, with rotating rust, any USB3 to SATA converter will ho an long as it can provide the 12v for the motors.
Such devices will all be provided with external PSUs. 2.5" drives are 5v only, so the the 12v supply goes away.
The Pi can provide 1.2A for all connected USB devices. That's not enough for two 2.5" drives, so you are back to messing with the power arrangements anyway.
Don't do RAID over USB.

Installing wise, there are current stage3 tarballs autobuilt but there is as yet, no arm64 handbook. Its mostly the same as the amd64 handbook but there is no boot loader.
Use the Raspberry Pi Foundation provide firmware git repo.
As you can't chroot in, you can't emerge anything. Can't is too strong a word. You can chroot into arm64 on amd64 with the help of qemu-static.
To add services to runlevels, make symlinks in /etc/runlevels. That will get you started so that you can ssh in over wired ethernet.

I can't answer to the effects of your metal box on wifi and bluotooth. You need to test that.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
Lebkoungcity
Apprentice
Apprentice
User avatar
Posts: 230
Joined: Sun Nov 16, 2008 2:34 pm
Location: near Lebkoungcity (='Gingerbreadcity' =Nuremberg)

  • Quote

Post by Lebkoungcity » Wed Feb 10, 2021 9:23 pm

NeddySeagoon,

oh, then it'll be 32bits and this is to download I guess: "Stage 3 ARMv7a | HardFP | openrc"? (I prefer openrc)
Maybe some day in the future there's another chance to install gentoo for armv8-a :wink:

So I'll take the 32bit-route and follow this path: https://wiki.gentoo.org/wiki/Raspberry_Pi/ and that: https://wiki.gentoo.org/wiki/Raspberry_ ... tall_Guide

Are there relevant differences regarding performance between ARMv7a and ARMv8a on a Raspberry Pi 4? Or is it similar to using a 32bit-OS ('x86') on a amd64? Probably...


For hardware decoding, I think that ffmpeg missing mmal is that part I've read about somewhere else but they didn't get into this that deep. Just said that it would not use the capabilities the hardware would provide because of missing codecs and that it's done with software within the CPU.
So then that's a point that can't be taken out and I'll have to live with it. (But maybe some day... :wink: )


Thanks for the hint with those passive cooling units! Massive alloy should do the job just fine - and keep the dust away from the board itself :)


Oh, sorry for this 5V/12V-mess! I didn't take care when I took this power supply unit as an example! I knew I couldn't use these 3.5" HDDs directly because they needed 5V and 12V. And that the current they would draw was too much without an extra power supply. I just like the idea to have one 'big' power supply for all and not three 240V-converters. The downside is just that I have to provide the appropriate connections inside the casing. (And I know what line current means regarding security!)
I'm glad to hear that any converter should work (as long as it's extra-powered)!
And no RAID over USB - just something like plain "cp -a" or "rsync" or such alike :wink:


I should have searched the net before asking: It's not possible to connect an external antenna to the Raspberyy Pi 4 without soldering (and legal complications). So either I test it with a metal casing or I take one made of plastics - but I take care of this later when the system itself is functional.


So thank you very much!
Now I feel confident this project is doable :)

Cheers,
Andy
"The most dangerous world view is the world view of the ones who haven't viewed the world."
Alexander von Humboldt (1769-1859)
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56085
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Wed Feb 10, 2021 9:48 pm

Lebkoungcity,

For Pi3 and Pi4 benchmarks, find all posts by roylongbottom on the forums.
If you must keep a Ferrari just to drive to the corner shop :) consider running a 64 bit kernel and 32 bit userland. Then you get to use all 8G of RAM on the 8G Pi.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
Lebkoungcity
Apprentice
Apprentice
User avatar
Posts: 230
Joined: Sun Nov 16, 2008 2:34 pm
Location: near Lebkoungcity (='Gingerbreadcity' =Nuremberg)

  • Quote

Post by Lebkoungcity » Wed Feb 10, 2021 10:22 pm

NeddySeagoon,

oh, I forgot about this memory barrier with 32bits! :oops:

Hmmm... OK, and here's one of my personal barriers: How would I mix a 64bit-kernel and 32bit-userland? I feel quite illiterate...

Or is my use-case of that kind that 4GB RAM are more than enough? Most packages should do fine with 4 GB RAM and /var/tmp/portage should be on the HDD when the setup is finished. (And I don't plan to emerge qtwebengine on the Raspberry Pi :wink:)
"The most dangerous world view is the world view of the ones who haven't viewed the world."
Alexander von Humboldt (1769-1859)
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56085
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Wed Feb 10, 2021 10:40 pm

Lebkoungcity,

You don't have to do anything special. The default 64 bit kernel Foundation kernel works with a 32 bit usersand.
There is no multilib, so mixing 32 bit and 64 bit applications in the same userland is not possible.
Well, you can cheat a little. A statically linked wrong bitness package should work but that's not generally useful.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
Lebkoungcity
Apprentice
Apprentice
User avatar
Posts: 230
Joined: Sun Nov 16, 2008 2:34 pm
Location: near Lebkoungcity (='Gingerbreadcity' =Nuremberg)

  • Quote

Post by Lebkoungcity » Wed Feb 10, 2021 11:53 pm

NeddySeagoon,

oh dear I feel like I felt in those days when I heard about this strange kind of linux that did all those things differently than the others called 'gentoo' for the first time and took some time to read about it... :lol:
Or when I wanted to use a smartphone and had to learn that there's vocabulary with slightly different meaning than what I was used to, e.g. 'ROM'. (The first thing I did with the device I bought on eBay was to put lineageOS on it.)


Now just for those ignorant beings like me:
You mean I could do a 'normal' 32bit-installation like described in the wiki and later I can replace the 32bit-kernel with the 64bit-kernel?
I just took a look here: https://github.com/raspberrypi/firmware/ but I fail to identify which one is 32bit or 64bit... Or is this controlled only through a setting in a file called 'config.txt' in /boot if it's 32bit or 64bit? That feels strange...

And as it's gentoo: Is it that I emerge sys-boot/raspberrypi-firmware with 'arm64' instead of 'arm' to get a 64bit-kernel in a 32bit-userland:
ACCEPT_KEYWORDS="~amr64" emerge -av sys-boot/raspberrypi-firmware
No, I don't think so, this feels wrong.


Anyway, thanks a lot! It's a pleasure to talk to you :D
"The most dangerous world view is the world view of the ones who haven't viewed the world."
Alexander von Humboldt (1769-1859)
Top
Post Reply
  • Print view

7 posts • Page 1 of 1

Return to “Gentoo on ARM”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic