gilius2k15
Posts: 67
Joined: Thu Jul 18, 2019 8:42 am

Re: Bootable 64-bit Gentoo image for the RPi4 released (Xfce4 desktop)

Tue Aug 27, 2019 9:26 pm

Does 4K video work in H.265 or H.264 or any other formats? How about HDMI audio?

Mrsell
Posts: 5
Joined: Wed Aug 28, 2019 3:05 am

Re: Bootable 64-bit Gentoo image for the RPi4 released (Xfce4 desktop)

Wed Aug 28, 2019 3:08 am

Thanks for this, unfortunately I am not able to connect to wifi altho I changed the region to us.

User avatar
sakaki
Posts: 548
Joined: Sun Jul 16, 2017 1:11 pm

Re: Bootable 64-bit Gentoo image for the RPi4 released (Xfce4 desktop)

Wed Aug 28, 2019 9:14 am

gilius2k15 wrote:
Tue Aug 27, 2019 9:26 pm
Does 4K video work in H.265 or H.264 or any other formats? How about HDMI audio?
HDMI audio works reasonably well. H/W decode (via v4l2m2m) works for lower-res videos, but not sure it works on 4K yet. Something to look at next, once core functionality stabilized.
Best, sakaki

Mrsell
Posts: 5
Joined: Wed Aug 28, 2019 3:05 am

Re: Bootable 64-bit Gentoo image for the RPi4 released (Xfce4 desktop)

Wed Aug 28, 2019 8:47 pm

Is there any steps I may have missed that the wifi doesn't work? I had no issue connecting via Debian 10, does anyone else have this issue?

User avatar
sakaki
Posts: 548
Joined: Sun Jul 16, 2017 1:11 pm

Re: Bootable 64-bit Gentoo image for the RPi4 released (Xfce4 desktop)

Wed Aug 28, 2019 9:18 pm

Mrsell wrote:
Wed Aug 28, 2019 8:47 pm
Is there any steps I may have missed that the wifi doesn't work? I had no issue connecting via Debian 10, does anyone else have this issue?
Sorry to hear you are experiencing problems with this ><

There is a known issue with the version of the 64-bit kernel used on the image and WiFi - and also a fix available to the regulatory domain setup in the RPi config app.

As such, you can try updating these packages and then rebooting, to see if this improves things.

To do do, make sure you have at least wired connectivity and then open a console and:

Code: Select all

demouser@pi64 ~ $ sudo emaint sync --repo genpi64
demouser@pi64 ~ $ sudo emerge -v1u bcm2711-kernel-bis-bin pyconfig_gen

Let the emerge run to completion and then reboot.

Any better? PS Are you trying to connect to a regular or 5G band? In which country?

Edit: you stated it was US above, apologies.
Once the above update has been done, edit the file /etc/modprobe.d/rpi3-wifi-regdom.conf and make sure the setting there is also "US", matching that in /etc/conf.d/rpi3-wifi-regdom (i.e., make sure both files have "US", not "GB" - you will need to be root, or use sudo, to edit them). Then reboot.

Best, sakaki
Last edited by sakaki on Wed Aug 28, 2019 10:10 pm, edited 1 time in total.

Mrsell
Posts: 5
Joined: Wed Aug 28, 2019 3:05 am

Re: Bootable 64-bit Gentoo image for the RPi4 released (Xfce4 desktop)

Wed Aug 28, 2019 10:05 pm

Thank you so much for this, I will try these steps as soon as I get home, your assistance with this is most appreciated, thank you.

gilius2k15
Posts: 67
Joined: Thu Jul 18, 2019 8:42 am

Re: Bootable 64-bit Gentoo image for the RPi4 released (Xfce4 desktop)

Wed Aug 28, 2019 10:24 pm

Looking very good so far... many thanks!

Mrsell
Posts: 5
Joined: Wed Aug 28, 2019 3:05 am

Re: Bootable 64-bit Gentoo image for the RPi4 released (Xfce4 desktop)

Wed Aug 28, 2019 11:44 pm

Thanks again it works, I tested the wifi before editing of the 2 files I mentioned expecting it not to work untill I changed both to us but it worked, thanks again, everything up and running.

User avatar
sakaki
Posts: 548
Joined: Sun Jul 16, 2017 1:11 pm

Re: Bootable 64-bit Gentoo image for the RPi4 released (Xfce4 desktop)

Wed Aug 28, 2019 11:55 pm

Mrsell wrote:
Wed Aug 28, 2019 11:44 pm
Thanks again it works, I tested the wifi before editing of the 2 files I mentioned expecting it not to work untill I changed both to us but it worked, thanks again, everything up and running.
Fantastic, thanks for testing this ^-^

I'll be releasing a v1.5.1 bugfix release shortly (hopefully in the next couple of days) including these new kernels (plus some other changes), and will also publish full instructions of how to upgrade from v1.5.0 -> v1.5.1 at that point.

Best, sakaki

Mrsell
Posts: 5
Joined: Wed Aug 28, 2019 3:05 am

Re: Bootable 64-bit Gentoo image for the RPi4 released (Xfce4 desktop)

Thu Aug 29, 2019 12:01 am

Looking forward to your work!

andrum99
Posts: 1220
Joined: Fri Jul 20, 2012 2:41 pm

Re: Bootable 64-bit Gentoo image for the RPi4 released (Xfce4 desktop)

Thu Oct 17, 2019 8:14 pm

I have a question - once I have your latest Gentoo running on my Pi 4 4GB, what do I need to do to add ZFS filesystem support? I'm guessing it's easier than trying to bolt it on the side of the official Raspbian release.

User avatar
sakaki
Posts: 548
Joined: Sun Jul 16, 2017 1:11 pm

Re: Bootable 64-bit Gentoo image for the RPi4 released (Xfce4 desktop)

Fri Oct 18, 2019 10:30 am

andrum99 wrote:
Thu Oct 17, 2019 8:14 pm
I have a question - once I have your latest Gentoo running on my Pi 4 4GB, what do I need to do to add ZFS filesystem support? I'm guessing it's easier than trying to bolt it on the side of the official Raspbian release.
You need to build a kernel module and a set of userland support tools (as detailed e.g. here). The only issue for the former is that currently it has to be done the old school way, as per my instructions here (for WireGuard) (basically I need to create a kernel source package instance automatically upon each weekly kernel autobuild, to allow the Gentoo ebuilds for the ZFS and WireGuard kernel modules to be used, and that's not something I've done yet ><). But it's totally possible.

hth, sakaki

Maxpanos
Posts: 1
Joined: Fri Oct 18, 2019 6:19 pm

Re: Bootable 64-bit Gentoo image for the RPi4 released (Xfce4 desktop)

Fri Oct 18, 2019 6:34 pm

Greetings Sakaki and thank you for your hard work. Two simple questions for you but for me was a hell ride.

I would like to install vmware workstation. Is it doable?

If not i would be happy how i can install kvm. I know that rpi4 its not a beast but i would like to test some things.

Its my first time using Gentoo and i am struggling to understand how install things. I tried myself but with no luck :(

User avatar
sakaki
Posts: 548
Joined: Sun Jul 16, 2017 1:11 pm

Re: Bootable 64-bit Gentoo image for the RPi4 released (Xfce4 desktop)

Sat Oct 19, 2019 11:58 am

Maxpanos wrote:
Fri Oct 18, 2019 6:34 pm
I would like to install vmware workstation. Is it doable?

If not i would be happy how i can install kvm. I know that rpi4 its not a beast but i would like to test some things.
Not sure about the status of (native) vmware on arm64, sorry ><. I'm sure some others can jump in to assist...

KVM-based virtualization is supported out of the box on the Gentoo image however; see my notes on the project's open wiki, here and here.

Screenshot (showing, per the instructions just linked, an Ubuntu Server 18.04.1 LTS cloud image, running under KVM (and booted on TianoCore UEFI) on Gentoo):

Image

(NB the above was taken on an RPi3B+, where the resources to run a 2nd virtualized OS, particularly with a GUI, are very tight: on e.g. a 4GiB RPi4B, you have much more headroom).
Maxpanos wrote:
Fri Oct 18, 2019 6:34 pm
Its my first time using Gentoo and i am struggling to understand how install things. I tried myself but with no luck :(
Gentoo's package management approach is quite different from e.g. that of apt. You can read more about it e.g. in my notes here.

hth, sakaki

User avatar
Gavinmc42
Posts: 4527
Joined: Wed Aug 28, 2013 3:31 am

Re: Bootable 64-bit Gentoo image for the RPi4 released (Xfce4 desktop)

Thu Nov 07, 2019 5:56 am

Sakaki, I used a Pi3 to genup 1.5.1 running on a bootable SSD.
Took all night, those old 3's are slow ;)
But not as slow as waiting for USB boot on Pi4 :lol:

So now I have a updated Gentoo64 USB3 240GB SSD but it only boots on Pi3's.
How do I now make a uSD from this SSD to boot a Pi4 from the uSD and use the SSD files?

Just copy the boot partition to a uSD and change ?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
Gavinmc42
Posts: 4527
Joined: Wed Aug 28, 2013 3:31 am

Re: Bootable 64-bit Gentoo image for the RPi4 released (Xfce4 desktop)

Fri Nov 08, 2019 1:41 am

Suspect an USB3 issue for SSD problems.

Unknown VL805 eeprom code.
A "sudo rpi-eeprom-update -a" seems to have got my Pi4 up to date.

Will need to check the USB3 to Sata chip in the external SSD dock to see if it a quirky one.
https://www.raspberrypi.org/forums/view ... y#p1521358

Starting to see why USB boot on Pi4's could be months away.

Edit - use this to check what eeprom version are being used "sudo rpi-eeprom-update"
/etc/default/rpi-eeprom-update will contain this normally - FIRMWARE_RELEASE_STATUS="critical"
edit "critical" to "beta" to get the newest beta versions.

https://github.com/raspberrypi/rpi-eeprom

This is mostly netboot changes at the moment but a netbooting version of Gentoo64 might be interesting.
A Graphics teaching net booting Gentoo64 with Blender for Artists or electronics version with Arduino etc.

So can my Gentoo64 3B+ with USB booting 240GB SSD be a server host for netbooting Pi4's yet?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
sakaki
Posts: 548
Joined: Sun Jul 16, 2017 1:11 pm

Re: Bootable 64-bit Gentoo image for the RPi4 released (Xfce4 desktop)

Fri Nov 08, 2019 1:55 pm

Gavinmc42 wrote:
Thu Nov 07, 2019 5:56 am
Sakaki, I used a Pi3 to genup 1.5.1 running on a bootable SSD.
Took all night, those old 3's are slow ;)
But not as slow as waiting for USB boot on Pi4 :lol:

So now I have a updated Gentoo64 USB3 240GB SSD but it only boots on Pi3's.
How do I now make a uSD from this SSD to boot a Pi4 from the uSD and use the SSD files?

Just copy the boot partition to a uSD and change ?
Easiest thing is to create a uSD with Raspbian Lite on there (as this will have a different PARTUUID setup from the Gentoo image). Then copy all files (recursively) from the SSD's boot partition onto the uSD's boot (overwriting). Insert both uSD and SSD into your Pi4, and boot.

Once up, edit /etc/fstab so that the /boot partition used is on the uSD, not the SSD. Edit this file so the non-commented lines read:

Code: Select all

/dev/mmcblk0p1	        /boot		vfat    defaults          0       2
PARTUUID=7a0c8bb0-02	/		ext4    defaults,noatime  0       1
/var/cache/swap/swap1   none		swap	sw		  0	  0
Then reboot.

Remember, if you do use this setup, that the SSD's boot partition's filesystem will not be kept up to date (as changes to the kernel etc. will be written to the uSD card instead - which is of course what you want while 'hybrid' booting in this fashion), so when 'true' USB-boot comes along in future, you'll need to copy the files back to the SSD's partition 1, from the uSD card's partition 1, and restore the original line in /etc/fstab, before trying to boot standalone.

hth, sakaki

User avatar
Gavinmc42
Posts: 4527
Joined: Wed Aug 28, 2013 3:31 am

Re: Bootable 64-bit Gentoo image for the RPi4 released (Xfce4 desktop)

Sat Nov 09, 2019 12:31 am

Sasaki, I did it backwards ;)
Copied the SSD boot to a 512MB uSD , that way root is already pointed to the SSD.

It booted fine but I think I have a quirky USB3 to SSD chip.
It got to a certain stage and stopped.
Unplugged the USB/SSD and it went further and then stopped again.

Going to check what USB chips are known to work and look for an adapter.
dmesg reports this, will check my other USB to sata chips.
What chip/brand are you using?

Anyway, tested rpi-eeprom-update on gentoo64, it works fine.

Code: Select all

[ 2981.525589] usb 2-1: new SuperSpeed Gen 1 USB device number 2 using xhci_hcd
[ 2981.547174] usb 2-1: New USB device found, idVendor=152d, idProduct=0578, bcdDevice= 1.00
[ 2981.547194] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2981.547206] usb 2-1: Product: USB3.0 HDD DOCK
[ 2981.547217] usb 2-1: Manufacturer: JMicron
[ 2981.547227] usb 2-1: SerialNumber: 0000AB123519
[ 2981.596049] scsi host0: uas
[ 2981.600367] scsi 0:0:0:0: Direct-Access     Crucial_ CT240M500SSD1    8101 PQ: 0 ANSI: 6
[ 2981.605342] sd 0:0:0:0: [sda] 468862128 512-byte logical blocks: (240 GB/224 GiB)
[ 2981.605360] sd 0:0:0:0: [sda] 4096-byte physical blocks
[ 2981.605719] sd 0:0:0:0: [sda] Write Protect is off
[ 2981.605736] sd 0:0:0:0: [sda] Mode Sense: 53 00 00 08
[ 2981.606394] sd 0:0:0:0: [sda] Disabling FUA
[ 2981.606413] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 2981.607608] sd 0:0:0:0: [sda] Optimal transfer size 33553920 bytes not a multiple of physical block size (4096 bytes)
[ 2982.204086]  sda: sda1 sda2
[ 2982.206738] sd 0:0:0:0: [sda] Attached SCSI disk
Edit - Booting from uSD halts at "checking local file system" when the USB3/SSD dock is plugged in.
Probably USB driver issues?
This a bit of a pain as I cannot leave it plugged in as a second drive.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
sakaki
Posts: 548
Joined: Sun Jul 16, 2017 1:11 pm

Re: Bootable 64-bit Gentoo image for the RPi4 released (Xfce4 desktop)

Sat Nov 09, 2019 1:46 pm

One quick thing you could try is to do the hybrid (uSD bootfs/SSD rootfs) boot with the SSD plugged into one of the USB2 ports on the RPi4B. If this works OK, then it is probably a compatibility/driver issue (rather than an fstab issue or similar). The other would be to try a Raspbian boot using a similar hybrid setup using e.g. RonR's usb-boot script (and the USB3 port) (and if that works, do the same but with a 64-bit kernel Raspbian, by setting arm_64bit=1 in the uSD card's config.txt - assuming it is an up-to-date image you are working with).

Those tests will help to narrow down where the issue resides. "Pure" USB-boot is also in development now of course:
jamesh wrote:
Thu Oct 31, 2019 10:57 am
Bootloader guy is now working fully on USB boot. No timescales as yet.
hth, sakaki

User avatar
Gavinmc42
Posts: 4527
Joined: Wed Aug 28, 2013 3:31 am

Re: Bootable 64-bit Gentoo image for the RPi4 released (Xfce4 desktop)

Sun Nov 10, 2019 12:30 am

Having the SSD Dock plugged into a USB2 port worked, booted from uSD and did not halt.
I don't think it is fstab etc as it boots and runs on Pi3's fine.
Also when SSD Dock is plugged into USB2 there is no delay when using the Disks tool in Accessories.

On USB3 it can take 10's of secs for the drive to appear and sometime 2nd partition shows as blank.
I thought I had formatting issues and reformatted the SSDs many times.
Turns out they were fine as Pi3's had no issues.

Yep has to be USB3/driver/VL805?
Time to try other USB/Sata chips while Pi guy solves things.
Might need to spend more money, could be a reason that Dock was very cheap ;)
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

euu
Posts: 2
Joined: Sat Jun 13, 2020 1:34 am

Re: Bootable 64-bit Gentoo image for the RPi4 released (Xfce4 desktop)

Sat Jun 13, 2020 2:04 am

Hi Sakaki,

I'm a seasoned Gentoo user on my desktop, where I build everything from source, kernel, packages, not using any pre-built binaries. Just ordered my Raspberry Pi 8GB, supposed to get it about end of July when it becomes available in Canada.

In the meantime I'm trying to get informed so I stumbled upon this thread and was happy because I'm not very keen to use Raspbian, Manjaro or other distributions. Saw that -march and -mtune are stated, nice! Still, have a few questions:

1. Is there any overlay needed to build Gentoo packages on RPi4? Or just using the standard tree?
2. I noticed that your image is using OpenRC. Have you tried systemd? (If not, I will!)
3. Also noticed that samba is disabled. Wondering if I can still install and use the client for accessing a share on my desktop. Or would you better suggest NFS?
3. Is it it doable to boot from an USB SSD?

Thanks,
Eugen

User avatar
sakaki
Posts: 548
Joined: Sun Jul 16, 2017 1:11 pm

Re: Bootable 64-bit Gentoo image for the RPi4 released (Xfce4 desktop)

Sun Jun 14, 2020 11:35 pm

euu,

To your questions:
  1. You don't need a custom overlay to get a simple build going - see e.g. https://wiki.gentoo.org/wiki/Raspberry_ ... it_Install for the RPi3 (Neddy has a matching RPi4 page on his personal subwiki too; mostly it's the same), but many packages aren't yet keyworded for arm64 in the main tree, some additional drivers are needed for full functionality etc. hence my use of a custom profile and so on. You should be able to reverse engineer what you need from my overlay.
  2. I have booted CLI systemd images on the RPi, but some of the packages in my overlay still have init files but no systemd units - feel free to fire off some PRs to fix this ^-^.
  3. Samba is bundled, on the image, just not enabled (for security); to enable it, see e.g. this post.
  4. With the recent firmware, boot from USB should be supported on the RPi4 (it works on the RPi3); haven't tested this yet. Be aware that some USB3 adaptors requires quirks to work as a rootfs device correctly (a quick search of this forum will yield more info)
This sticky thread on the Gentoo forums, the (long) Gentoo thread on this forum, and the gentoo-on-rpi-64bit project's wiki should provide some useful pointers, if you get stuck on anything. Also my binhost (at https://isshoni.org/pi64pie/) and Neddy's (at http://bloodnoc.org/~roy/BINHOSTS/gcc-10.x/armv8a/) can help with 'first cut' versions of large packages. Also you may find my kernel autobuilds (here e.g) of use.

hth and good luck! Any specific issues just post (Gentoo sticky thread above probably best place) and help shouldn't be long coming ^-^

sakaki

euu
Posts: 2
Joined: Sat Jun 13, 2020 1:34 am

Re: Bootable 64-bit Gentoo image for the RPi4 released (Xfce4 desktop)

Tue Jun 16, 2020 1:35 am

Thanks a lot. Can't wait to get my hands dirty!

User avatar
Gavinmc42
Posts: 4527
Joined: Wed Aug 28, 2013 3:31 am

Re: Bootable 64-bit Gentoo image for the RPi4 released (Xfce4 desktop)

Tue Jun 16, 2020 4:36 am

With the recent firmware, boot from USB should be supported on the RPi4 (it works on the RPi3); haven't tested this yet.
Tested USB booting Raspberry Pi OS 5.4.44, it works fine once bootloader is updated.
I have updated Gentoo64 to 5.4.44 but only on an uSD, not copied it to a USB drive yet.

Sakaki, is there a way to copy the Gentoo64 uSD to USB stick/drive?
Have my Gentoo64 on a 128GB uSD but only 64GB USB stick.

Will try smaller Gentoo64 USB stick first.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

geev03
Posts: 174
Joined: Thu Jun 07, 2012 12:40 pm
Location: London, UK

Re: Bootable 64-bit Gentoo image for the RPi4 released (Xfce4 desktop)

Tue Jun 16, 2020 6:00 pm

Code: Select all

demouser@pi64 ~ $ neofetch
         -/oyddmdhs+:.                demouser@pi64 
     -odNMMMMMMMMNNmhy+-`             ------------- 
   -yNMMMMMMMMMMMNNNmmdhy+-           OS: Gentoo Base System release 2.7 aarch6 
 `omMMMMMMMMMMMMNmdmmmmddhhy/`        Host: Raspberry Pi 4 Model B Rev 1.4 
 omMMMMMMMMMMMNhhyyyohmdddhhhdo`      Kernel: 5.4.45-v8-d00cdd80abb2-p4-bis+ 
.ydMMMMMMMMMMdhs++so/smdddhhhhdm+`    Uptime: 10 mins 
 oyhdmNMMMMMMMNdyooydmddddhhhhyhNd.   Packages: 1222 (emerge) 
  :oyhhdNNMMMMMMMNNNmmdddhhhhhyymMh   Shell: bash 5.0.17 
    .:+sydNMMMMMNNNmmmdddhhhhhhmMmy   Resolution: 1920x1080, 1024x768 
       /mMMMMMMNNNmmmdddhhhhhmMNhs:   DE: Xfce 
    `oNMMMMMMMNNNmmmddddhhdmMNhs+`    WM: Xfwm4 
  `sNMMMMMMMMNNNmmmdddddmNMmhs/.      WM Theme: Moheli 
 /NMMMMMMMMNNNNmmmdddmNMNdso:`        Theme: Adwaita [GTK2/3] 
+MMMMMMMNNNNNmmmmdmNMNdso/-           Icons: Adwaita [GTK2/3] 
yMMNNNNNNNmmmmmNNMmhs+/-`             Terminal: xfce4-terminal 
/hMMNNNNNNNNMNdhs++/-`                Terminal Font: Monospace 12 
`/ohdmmddhys+++/:.`                   CPU: BCM2835 (4) @ 1.500GHz 
  `-//////:--.                        Memory: 1385MiB / 7635MiB 

                                                              
                                                              


demouser@pi64 ~ $ 
Encountered few problems with 'hw-probe' ....

Code: Select all

demouser@pi64 ~ $ sudo -i
pi64 ~ # emerge --ask sys-apps/hw-probe

....
....
Local copy of remote index is up-to-date and will be used.

These are the packages that would be merged, in order:

Calculating dependencies... done!

!!! All ebuilds that could satisfy "sys-apps/hw-probe" have been masked.
!!! One of the following masked packages is required to complete your request:
- sys-apps/hw-probe-1.5::gentoo (masked by: missing keyword)

For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.

pi64 ~ # 

After following the steps for 'masked items' , the following probe came through, https://linux-hardware.org/?probe=db18eac4ef

Return to “Gentoo”