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

Updated 64-bit Gentoo Image for RPi3 Released (now also for RPI3B+)

Sun Jul 16, 2017 1:50 pm

Hello,

if you would like to try running Gentoo in 64-bit mode on your Raspberry Pi 3, you might like to have a look at the updated bootable image I've just released, on GitHub, here.

You can burn the image (~821MiB compressed) to a microSD card (>=8GB), then boot your RPi3 from it directly (the root partition will be automatically resized to fill the card on first boot). Full instructions for download and use are provided on the project's GitHub page.

The image contains a complete (OpenRC-based) Gentoo system (including a full Portage tree, up-to-date as of 9 July 2017) - so you can run emerge operations immediately - and has a reasonably populated userland (Xfce v4.12, LibreOffice v5.3.4.2, Firefox v53.0.3, Thunderbird v52.2.0, VLC v2.2.6, GIMP v2.9.4 etc.) so that you can get productive without having to compile anything first (unless you want to, of course ^-^). Just download, xzcat to a microSD card, and boot!

WiFi and Bluetooth both work, as does sound (via onboard headphone jack, and over HDMI). VC4 acceleration is supported via the mixed-mode vc4-fkms-v3d device-tree overlay / kernel module / Mesa driver, and performance seems reasonable (glxgears 400-1200fps, real-time video playback). The kernel on the image is 4.10.17-v8 from raspberrypi/linux, in pure bcmrpi3_defconfig form.

As of version 1.1.0 of the image, a weekly-autobuild binhost, custom Gentoo profile, and binary kernel package have been provided, making it relatively painless to keep your system up-to-date. Here's a screenshot:

Image

There's also a (sticky) thread about this image on the Gentoo forums, here.

Have fun ^-^

sakaki

PS this is an updated version of the image that RoyLongbottom used for his 64-bit benchmarks (see this post). For those with significant amounts of work invested in the 1.0.2 image, manual upgrade instructions are also available, here.

Olle2
Posts: 9
Joined: Wed Jan 04, 2017 7:59 am

Re: Updated 64-bit Gentoo Image for RPi3 Released

Tue Jul 18, 2017 6:10 am

Thanks! Great work. And now I have to read Gentoo documents... some at least ;) I posted in
http://murga-linux.com/puppy/viewtopic. ... 128#961128 as well.
Still having fun!
"Forty-two," said Deep Thought, with infinite majesty and calm.”

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

Re: Updated 64-bit Gentoo Image for RPi3 Released

Fri Aug 04, 2017 2:09 pm

Olle2 wrote: Thanks! Great work.
Thanks ^-^

Pi-Top Variant Bootable 64-Bit Gentoo Image Released

If you have a Pi-Top (an RPi3-based DIY laptop), I've just released a variant of the gentoo-on-rpi3-64bit bootable image for this. Here's a pic of it in use:

Image

The variant has all the features of the standard image (described above), but also, courtesy of rricharz's work, contains: There's a 64-bit version of Gordon Henderson's handy wiringpi library (and gpio utility) included on the image too (my ebuild for this may be found here), as the above drivers need it to operate.

Full details of how to download and use the variant image (and the vanilla RPi3 version too, of course) are available on the project's page on GitHub, here. As with the standard version, it boots to an Xfce4 desktop; there's nothing to configure or compile if you just want to play around with it.

Have fun ^-^

sakaki

procount
Posts: 1053
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: Updated 64-bit Gentoo Image for RPi3 Released

Mon Aug 21, 2017 12:04 am

Both of these 64-bit versions of Gentoo (for the RPi3 and for the PiTop) are now easily installed via PINN.
Thanks to sakaki for helping accomplish this.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

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

Re: Updated 64-bit Gentoo Image for RPi3 Released

Wed Apr 04, 2018 1:59 pm

Version 1.2.1 of this bootable 64-bit Gentoo image is now available on GitHub (here).

The RPi3 B+ is now fully supported (and the RPi3 B remains supported too, of course). All packages have been brought up to date against the Gentoo tree as of 31 March 2018 (so e.g. Firefox Quantum is included, which is quite a lot faster than the old browser).

I believe the image will also be available shortly via PINN, courtesy of procount.

procount
Posts: 1053
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: Updated 64-bit Gentoo Image for RPi3 Released

Wed Apr 04, 2018 9:22 pm

Gentoo64 v1.2.1 is now available for install through PINN.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

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

Re: Updated 64-bit Gentoo Image for RPi3 Released

Sun Apr 15, 2018 2:28 pm

Updated screenshot from v1.2.1, running on an RPi3 B+:

Image

jahboater
Posts: 2477
Joined: Wed Feb 04, 2015 6:38 pm

Re: Updated 64-bit Gentoo Image for RPi3 Released

Sun Apr 15, 2018 5:10 pm

sakaki wrote:
Wed Apr 04, 2018 1:59 pm
Version 1.2.1 of this bootable 64-bit Gentoo image is now available on GitHub (here).
Wow! Thank you so much for this!
Works perfectly.

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

Re: Updated 64-bit Gentoo Image for RPi3 Released

Mon Apr 16, 2018 8:39 am

So used to Raspi-config ;)

To make it friendlier to new Gentoo users an easier way to change region settings would be nice.
I went to edit some files and find my keyboard is set to UK ;)
Lucky that can be changed from Desktop setting manager as it makes it easier to edit the rest of the files.
WiFi is important to set before using it.

The X11 is running Mesa recompiled for Aarch64.
So that means the 32bit userland apps like raspistill/vid won't work?
Can 3 cores run in Aarch64 and the last core run in Aarch32 and talk to these 32bit apps?

Alternatively raspiraw does not use the VC4 ISP so it could be compiled in 64 bit and then all the camera stuff tweaked in NEON.
Not for normal camera use ie jpeg/h.264 but for computer vision.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

Re: Updated 64-bit Gentoo Image for RPi3 Released

Mon Apr 16, 2018 11:52 am

Gavinmc42 wrote: To make it friendlier to new Gentoo users an easier way to change region settings would be nice.
I went to edit some files and find my keyboard is set to UK ;)
Yes, the settings are all UK initially, as noted in the readme; keyboard and other locale stuff can be changed via the GUI, but I do need to build a little app to prompt for the WiFi regulatory domain using a drop-down list, and present that on first boot, with the WiFi locked until it is specified. At the moment, you can set the domain (per the release instructions and readme) via /etc/conf.d/rpi3-wifi-regdom, but the process should be simplified. On my list for the next release.
Gavinmc42 wrote: Can 3 cores run in Aarch64 and the last core run in Aarch32 and talk to these 32bit apps?
The Gentoo build is a 'pure' aarch64 system, however running 32-bit apps against a 64-bit kernel in ARM v8 is possible, but requires (afaik) a full, separate 32-bit userspace to run it from (well, not exactly a full copy, but a transitive closure of all the target application's library dependencies in 32-bit must be supplied). Not very hard to set this up actually (you could try it yourself in a chroot with e.g. an untarred Raspbian 32-bit root fs, if you didn't want to mess with load paths), but out of scope for me / the gentoo-on-rpi3-64bit project at this point in time (sorry!)
Gavinmc42 wrote: So that means the 32bit userland apps like raspistill/vid won't work?
Also (and this may have changed since the last time I checked, if so I'd really like to know so I can add it in!), some features on the RPi3 which require MMAX or OpenMax IL are unavailable currently when booted in 64-bit mode, regardless of whether the particular userspace client is 32-bit or 64-bit.

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

Re: Updated 64-bit Gentoo Image for RPi3 Released

Tue Apr 17, 2018 1:35 am

And without an Aarch64 OS no one can test or write an interface to the VC4 ;)
So OMXplayer won't work either? no big deal.

I did notice the browser is written in Rust which means Neddyseagoon? got the 64 bit Rust compiler working?
This looks to be using some multicore code from Mozilla's servo engine?
Wonder how many tabs can be open, Raspbian Chromium gets flaky at about 6 tabs.
Er lots, got past 30 tabs and lost count :lol:

Hmm, Rust only 1.23.0, might have to Rustup, some AVR support in new version.
"Ying tong yiddle I po! Had to look up why Roy's handle was familiar, Harry Secombe ;)
LLVM 6installed too :)

I have been waiting nearly 2 years for a Aarch64bit Rust, nope only 1 year, just seemed longer ;)
viewtopic.php?p=1236772
Wonder if Redox can be built on Pi's now? :o

Would be interesting to try some Rust examples on 32 and 64 bit Pi's now.
https://github.com/PistonDevelopers/conrod

No Go language installed?
https://blog.alexellis.io/go-comes-to-64bit-arm/
Once Go works, Docker follows?

Was playing with Gentoo on Pi all weekend and all last night, apart from keyboard/mouse input lags it kept running fine.
In the same time I had to reset my Linux box twice( it is on last legs) ;)

Not sure why key/mouse locks up screen for seconds but once that is fixed Gentoo is looking very usable.
Not stable but very close :D
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

Re: Updated 64-bit Gentoo Image for RPi3 Released

Tue Apr 17, 2018 1:09 pm

Great instructions on Sakaki's github, much easier than trying to find out how to do things on Gentoo's webpages.

Upgraded SDcard version to 4.14.33 and it seems much better than the USB boot stick version, more responsive to mouse/keyboard
https://github.com/sakaki-/bcmrpi3-kernel
4.14.34 did not autoupdate by using .... emerge -av bcmrpi3-kernel-bin
The wget...tar instructions work.

Everything is better when booting from uSD card :D
I suspect the new USB hub chip/s has issues when used as a boot drive.
Ok upgraded USB stick to 4.14.34 and still got laggy response.

Raspberry Pi github 3 hours ago ;)
It's worth mentioning that USB booting is still officially considered an experimental feature, isn't it?
Ok time to get some new/better uSDcards, only got 1 of 4 16GB working now :(

Not recommended to USB stick boot Gentoo Aarch64 on 3B+ yet ;)
Checked old Pi3B it is also slow and laggy with same USB stick.
Ok SD card is much faster and not laggy.

Next test, try different USB stick, perhaps not elcheapo versions?

Conclusion, do what Sakaki says and get a GOOD uSD card.
Gentoo is now very pleasant to use :D
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

Re: Updated 64-bit Gentoo Image for RPi3 Released

Tue Apr 17, 2018 6:53 pm

Gavinmc42 wrote:
Tue Apr 17, 2018 1:35 am
I did notice the browser is written in Rust which means Neddyseagoon? got the 64 bit Rust compiler working?
This looks to be using some multicore code from Mozilla's servo engine?
Wonder how many tabs can be open, Raspbian Chromium gets flaky at about 6 tabs.
Er lots, got past 30 tabs and lost count :lol:

Hmm, Rust only 1.23.0, might have to Rustup, some AVR support in new version.
Yes, NeddySeagoon was the first to get arm64 rust running on Gentoo. It is now keyworded in the main Gentoo tree, and rust-1.23.0 ships with the image, so e.g.:

Code: Select all

demouser@pi64 ~ $ rustc --version
rustc 1.23.0-dev
should work on your machine, without any further installation.

It's literally the most painful package on the whole image to build, as it needs its own LLVM (which builds in a non-distcc-able way) after which rust bootstraps itself, also in an non-distributable way. The whole thing uses about 3GiB of swap and takes literally days on an RPi3B+. The buildserver is working on rust-1.25.0 now, when it's done I'll release it (with cargo and friends) and you'll be able to upgrade (relatively painlessly from the resulting binary packages) ^-^
Gavinmc42 wrote:
Tue Apr 17, 2018 1:35 am
No Go language installed?
https://blog.alexellis.io/go-comes-to-64bit-arm/
Once Go works, Docker follows?
go is keyworded for ~arm64 on Gentoo, so I guess it can be built OK. I'll have a look at adding it to the maintained autobuild list, once rust finishes.
Gavinmc42 wrote: Upgraded SDcard version to 4.14.33 and it seems much better than the USB boot stick version, more responsive to mouse/keyboard
https://github.com/sakaki-/bcmrpi3-kernel
4.14.34 did not autoupdate by using .... emerge -av bcmrpi3-kernel-bin
The wget...tar instructions work.
That's because I only mark certain, tested versions as suitable for upgrade via this file. You can always manually install as you have done, or enable automatic upgrade always to the most recent available 4.14 version, by placing the following into /etc/portage/package.unmask/bcmrpi3-kernel-bin:

Code: Select all

# always upgrade to most recent 4.14 version available
=sys-kernel/bcmrpi3-kernel-bin-4.14*
Gavinmc42 wrote: Gentoo is now very pleasant to use :D
Yay!

One last thing, I realized I might have been a bit "denvercoder9" with my comment:
Sakaki wrote: The Gentoo build is a 'pure' aarch64 system, however running 32-bit apps against a 64-bit kernel in ARM v8 is possible, but requires (afaik) a full, separate 32-bit userspace to run it from (well, not exactly a full copy, but a transitive closure of all the target application's library dependencies in 32-bit must be supplied). Not very hard to set this up actually (you could try it yourself in a chroot with e.g. an untarred Raspbian 32-bit root fs, if you didn't want to mess with load paths), but out of scope for me / the gentoo-on-rpi3-64bit project at this point in time (sorry!)
So, today I have tested and written up new wiki entry, showing how to install a 32-bit Raspbian chroot on your gentoo-on-rpi3-64bit system, then, using this, install 32-bit apps (using apt-get) from Raspbian, and run them alongside 64-bit Gentoo apps on your (64-bit) desktop. The example app I use in the tutorial is Lazarus (seemed appropriate somehow ^-^). Here's a screenshot of 32-bit Raspbian Lazarus running on an 64-bit Gentoo RPi3 B+:

Image

As not everyone might be aware you can do this sort of thing on ARMv8, I'll post another note to that effect on this forum now.

Best, sakaki

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

Re: Updated 64-bit Gentoo Image for RPi3 Released

Tue Apr 17, 2018 10:01 pm

Thanks Sakaki, yet another comprehensive" how to" wiki.

Makes me wonder what other 32bit things can run in Aarch64.
Think I may need 32GB SD cards :lol:

Is swap drive running from USB when Gentoo boots from USB?
Just wondering if that is causing the lagging?
Raspbian boots slower but runs ok from USB.
Others use various USB drives, harddrives/SSD etc.

Gentoo64 is shaping up to be useful development OS, that means more storage ;)
Might have to try combo, SD plus USB drive

Thanks again
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

Re: Updated 64-bit Gentoo Image for RPi3 Released

Tue Apr 17, 2018 11:16 pm

Gavinmc42 wrote:
Tue Apr 17, 2018 10:01 pm
Is swap drive running from USB when Gentoo boots from USB?
Just wondering if that is causing the lagging?
Yes, the image runs ships with a 512MiB swapfile on the root partition, for simplicity, so root on USB implies swap on USB. If running lots of open apps, and your storage is slow, you may experience a lag while the target app swaps some pages back in (probably what was happening there). Depending on your setup, a different swap configuration may produce better results.

You could also try setting:

Code: Select all

pi64 ~ # sysctl -w vm.swappiness=10
pi64 ~ # sysctl -w vm.vfs_cache_pressure=50
to see if that improves things.

You can get an ordered list of swap usage by app, by e.g. running the following script (as root, or using sudo):

Code: Select all

#!/bin/bash

    # find-out-what-is-using-your-swap.sh
    # -- Get current swap usage for all running processes
    # --
    # -- rev.0.3, 2012-09-03, Jan Smid          - alignment and intendation, sorting
    # -- rev.0.2, 2012-08-09, Mikko Rantalainen - pipe the output to "sort -nk3" to get sorted output
    # -- rev.0.1, 2011-05-27, Erik Ljungstrom   - initial version


SCRIPT_NAME=`basename $0`;
SORT="kb";                 # {pid|kB|name} as first parameter, [default: kb]
[ "$1" != "" ] && { SORT="$1"; }

[ ! -x `which mktemp` ] && { echo "ERROR: mktemp is not available!"; exit; }
MKTEMP=`which mktemp`;
TMP=`${MKTEMP} -d`;
[ ! -d "${TMP}" ] && { echo "ERROR: unable to create temp dir!"; exit; }

>${TMP}/${SCRIPT_NAME}.pid;
>${TMP}/${SCRIPT_NAME}.kb;
>${TMP}/${SCRIPT_NAME}.name;

SUM=0;
OVERALL=0;
    echo "${OVERALL}" > ${TMP}/${SCRIPT_NAME}.overal;

for DIR in `find /proc/ -maxdepth 1 -type d -regex "^/proc/[0-9]+"`;
do
    PID=`echo $DIR | cut -d / -f 3`
    PROGNAME=`ps -p $PID -o comm --no-headers`

    for SWAP in `grep Swap $DIR/smaps 2>/dev/null| awk '{ print $2 }'`
    do
        let SUM=$SUM+$SWAP
    done

    if (( $SUM > 0 ));
    then
        echo -n ".";
        echo -e "${PID}\t${SUM}\t${PROGNAME}" >> ${TMP}/${SCRIPT_NAME}.pid;
        echo -e "${SUM}\t${PID}\t${PROGNAME}" >> ${TMP}/${SCRIPT_NAME}.kb;
        echo -e "${PROGNAME}\t${SUM}\t${PID}" >> ${TMP}/${SCRIPT_NAME}.name;
    fi
    let OVERALL=$OVERALL+$SUM
    SUM=0
done
echo "${OVERALL}" > ${TMP}/${SCRIPT_NAME}.overal;
echo;
echo "Overall swap used: ${OVERALL} kB";
echo "========================================";
case "${SORT}" in
    name )
        echo -e "name\tkB\tpid";
        echo "========================================";
        cat ${TMP}/${SCRIPT_NAME}.name|sort -r;
        ;;

    kb )
        echo -e "kB\tpid\tname";
        echo "========================================";
        cat ${TMP}/${SCRIPT_NAME}.kb|sort -rh;
        ;;

    pid | * )
        echo -e "pid\tkB\tname";
        echo "========================================";
        cat ${TMP}/${SCRIPT_NAME}.pid|sort -rh;
        ;;
esac
rm -fR "${TMP}/";
Remember that everything else equal, 64-bit apps will tend to have a larger object code footprint than 32-bit ones.

There's a difference in the kernel too BTW, my autobuild for versions >= 4.14.33 are built with optimized KBUILD_CFLAGS (see this post), and anecdotally feel a bit 'snappier' to use (whereas the kernel shipped with the v1.2.1 image is a vanilla aarch64 build).

hth, sakaki

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

Re: Updated 64-bit Gentoo Image for RPi3 Released (now also for RPI3B+)

Wed Apr 18, 2018 12:24 am

Thanks Sakaki, yet another helpful and complete answer :D

With Ethernet up to 300Mbs via USB LAN7515 I am thinking a USB boot drive may not be a good idea.
Likewise a USB swap drive could slow things down as everything has to go via that single USB port on the SoC.

Other options is Gert's IDE via SMI, SPI memory etc.
Because I want to develop IoT code on Pi I don't need to run the code on the same Pi, that leaves the GPIO header free for more memory.
Swap file in SPI SRAM/FRAM?

In theory the GPIO header and SMI can talk direct to parallel NAND flash and at a faster rate than the SPI based SD cards.
Google time, has it been done?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

sdnick484
Posts: 1
Joined: Fri Apr 20, 2018 5:35 am

Re: Updated 64-bit Gentoo Image for RPi3 Released (now also for RPI3B+)

Fri Apr 20, 2018 5:39 am

Just wanted to say thanks for the folks making this Gentoo build happen. Been using Gentoo as my primary OS since doing a Stage 1 of 2004.3 back in college, and had always wanted to give it a go on a RPi. Finally picked up a Pi 3B and Gentoo 64 is running great.

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

Re: Updated 64-bit Gentoo Image for RPi3 Released (now also for RPI3B+)

Fri Apr 20, 2018 12:43 pm

Got the Arm Compute Library for 64bit NEON fun and games, needs something called scons 2.3 or above.
Apt-get install works on Debian.
Starting to think there is only three OS's in the world Windows/OS X/Debian.

https://community.arm.com/graphics/b/bl ... te-library
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

Re: Updated 64-bit Gentoo Image for RPi3 Released (now also for RPI3B+)

Fri Apr 20, 2018 6:40 pm

Gavinmc42 wrote:
Fri Apr 20, 2018 12:43 pm
Got the Arm Compute Library for 64bit NEON fun and games, needs something called scons 2.3 or above.
Apt-get install works on Debian.
Starting to think there is only three OS's in the world Windows/OS X/Debian.

https://community.arm.com/graphics/b/bl ... te-library
scons is a Python build utility. It is available as a binary package on the binhost. So you can just do:

Code: Select all

demouser@pi64 ~ $ sudo emerge -av dev-util/scons
to install it. Then, you can easily download and build the latest version of the library from source, via GitHub:

Code: Select all

demouser@pi64 ~ $ wget -c https://github.com/ARM-software/ComputeLibrary/archive/v18.03.tar.gz
demouser@pi64 ~ $ tar -xzf v18.03.tar.gz
demouser@pi64 ~ $ cd ComputeLibrary-18.03
demouser@pi64 ~/ComputeLibrary-18.03 $ nice -n 19 scons Werror=1 -j2 neon=1 opencl=0 gles_compute=1 arch="arm64-v8a" build=native extra_cxx_flags="-mtune=cortex-a53"
(I recommend -j2 rather than -j4, and maximum niceness, as in the above, to keep your desktop responsive during the build, and to prevent overswapping - this is a memory hungry compile). Allow 1-2 hours for it to build. (Of course if you have distcc backing, or are running from a console prompt without a GUI, you can be more aggressive with these parameters)

Building your own copy gives the advantage of being able to optimize the code directly for the cortex-a53, and also to use the gles_compute shader support, which you should be able to exploit given the image uses vc4-fkms-v3d / Mesa.

Once completed, you can try running the some of the examples, e.g.:

Code: Select all

demouser@pi64 ~/ComputeLibrary-18.03 $ LD_LIBRARY_PATH=build build/examples/neon_convolution
This download and build process could easily be turned into a ebuild incidentally.
I'll have a look at doing that, some point I get a bit of spare time ^-^

hth, sakaki

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

Re: Updated 64-bit Gentoo Image for RPi3 Released (now also for RPI3B+)

Sat Apr 21, 2018 3:43 am

Allow 1-2 hours for it to build
With times like that it just re-enforces why I use Free Pascal ;)
At least it is not overnight like buildroot :o

Thanks Sakaki, more useful posting.
Watching the screen scrolling up now.
Those Opengles-3.1 examples probably won't work?

I think I might have to get some more Pi3B+ and setup a compiler farm.
Got so much 64bit stuff I want to try now.
What setup do you use?

Pi3B+ can get 300Mbs over Ethernet, is that faster than SD/USD drive speeds?
Network storage instead on local?
Hmm network swap file, nope probably better to go headless?
No GPU (16MB) memory and use the saved memory as swap?

Going to be interesting to see if Aarch64 is much better than 32bit for these ARM Compute examples.
Not many benchmarks yet with this new Pi3B+ in Aarch64.
Oh, forgot, no temperature display in the panel applets, I used to watch that in the Pi3B's, good indicator of stress.
Throttle freq display?

Might try the VC4 OpenCL stuff now.
viewtopic.php?f=67&t=194952
I did notice LLVM 6 is installed, perhaps get SPIRV-LLVM working too.

Next thing -Vulkan? :lol:
Aarch64 - just doubled what I have to learn, probably take another 6 years.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

Re: Updated 64-bit Gentoo Image for RPi3 Released (now also for RPI3B+)

Sat Apr 21, 2018 1:57 pm

(I recommend -j2 rather than -j4, and maximum niceness, as in the above, to keep your desktop responsive during the build
Crashed and burned, went out after a hour, had error when I got back.
But if it compiled the Compute library and ran for an hour+, then it will probably compile parts of it.

Did you get yours to compile?
If so I will need to configure my systems the same way.

Need to build up better system and perhaps headless version, lucky I get my Pi's in pairs, time to open other box.
Got 120GB SSD that might work but Etcher does not recognise it as removable -- yet ;) .
Using my fastest 32GB Lexar USB stick at the moment, le d blinking away when nothing is happening.
It indicates to me lot of stuff going on.

SD cards have new rating A1 scheme.
Never paid attention to that before but apparently it is for apps on phone etc
When running apps from SD cards in Smartphones it can handle the small read and writes.
This means I probably need to upgrade a few phones and tablets around here too.

What is CONFIGURATION FILES UPDATE TOOLS?
4 config files in '/etc/portage' need updating.
Where is the emerge man page hiding?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

Re: Updated 64-bit Gentoo Image for RPi3 Released (now also for RPI3B+)

Sat Apr 21, 2018 2:06 pm

Pi has gone into upgrade mode - 1 of 59 jobs.
Just guessing but is this the once a week updating, midnight Saturday nights?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

Re: Updated 64-bit Gentoo Image for RPi3 Released (now also for RPI3B+)

Sat Apr 21, 2018 4:10 pm

Gavinmc42 wrote:
Sat Apr 21, 2018 2:06 pm
Pi has gone into upgrade mode - 1 of 59 jobs.
Just guessing but is this the once a week updating, midnight Saturday nights?
Yes, this is a cron.weekly genup job. If you want to turn it off, see these instructions in the readme. The way things are set up, it should really only be trying to upgrade things for which pre-built binary packages exist on the binhost (unless you have been doing a lot of USE flag changes etc. locally!) so the upgrade time isn't usually onerous (1-2 hours or so) even when big things like gcc or libreoffice are getting revbumped.
Gavinmc42 wrote: Crashed and burned, went out after a hour, had error when I got back.
But if it compiled the Compute library and ran for an hour+, then it will probably compile parts of it.

Did you get yours to compile?

Yes, the ARM Compute Library compiled fine for me with the flags given, and I was also able to run the example neon program I posted above without error.
You could try it again with -j1 (I was building on a headless box).

Speaking of which:

To disable the graphical desktop, do:

Code: Select all

pi64 ~ # rc-update del xdm default
Then edit the file /boot/config.txt, and comment out the following line, so it reads:

Code: Select all

#dtoverlay=vc4-fkms-v3d,cma-256
And reboot. You will now have a much more memory-efficient system (but no desktop, just a textual login (or use ssh)!)

If you ever want to revert it, uncomment the line in /boot/config.txt again, and issue:

Code: Select all

pi64 ~ # rc-update add xdm default
And reboot. You desktop will be back ^-^
Gavinmc42 wrote: I think I might have to get some more Pi3B+ and setup a compiler farm.
Got so much 64bit stuff I want to try now.
What setup do you use?
I use swap and root on the SD card, and an overlay mount for /var/tmp/portage (where all the build action happens) on USB stick, in an attempt to maximize bandwidth (separate busses). Also, the RPi3B+ is set up as a distcc client, with a crossdev PC as the server. I have notes on how to set this up in the project's wiki.
Gavinmc42 wrote: Pi3B+ can get 300Mbs over Ethernet, is that faster than SD/USD drive speeds?
Network storage instead on local?
Hmm network swap file, nope probably better to go headless?
Funnily enough I did try swap over NFS onto an exported ramdisk of a PC on the same network. I actually had good success with this approach before, with another embedded board which had a (real) Gigabit Ethernet, but lousy on-board storage. It did create an additional point of failure and NFS wasn't perhaps the ideal transport, but I have to say it was pretty quick.

Unfortunately, with the RPi3B+, you don't get close to GBit speeds in reality, and it's worse if anything else is hanging off that USB2 bus, so in my tests at least using local storage for swap was faster (of course in an ideal world you don't want to hit swap at all, but this can't always be avoided with large compiles, because not everything will distribute, the memory/cpu load is non-constant over the make so it isn't sensible just to go -j1 always etc.)
Gavinmc42 wrote: What is CONFIGURATION FILES UPDATE TOOLS?
4 config files in '/etc/portage' need updating.
Portage does not directly overwrite configuration files on an update. Instead, it writes a 'shadow' copy, and expects you to decide what to do about each one. There's a tool, called dispatch-conf, that you run (as root) to do this. I have some notes about using it here.
Gavinmc42 wrote: Oh, forgot, no temperature display in the panel applets, I used to watch that in the Pi3B's, good indicator of stress.
Throttle freq display?
There's an Xfce4 CPU frequency applet plugin that will show the current frequency per core (it's bundled with the image). If you right-click on the top panel bar you can add it. It's not very pretty ><

Even less prettily, you could view temperature (number is deg C * 1000) and CPU frequency by core (in Hz) with something like:

Code: Select all

watch -n 5 cat /sys/class/thermal/thermal_zone0/temp /sys/devices/system/cpu/cpu[0-3]/cpufreq/cpuinfo_cur_freq
hth, sakaki

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

Re: Updated 64-bit Gentoo Image for RPi3 Released (now also for RPI3B+)

Sun Apr 22, 2018 1:03 am

Thanks again for a comprehensive answer ;)

I have no idea why Gentoo has not called Aarch64 stable yet?
I have nearly no idea what I am doing and I have yet to break it, that means stable to me :lol:
That Porthole/portage stuff is not beginner friendly, click the wrong thing and a 1-2hour rebuild starts.

Found the CPU freq applet this morning.
Just realised I have two old Pi3B's now sitting idle.
I can set them up for headless compiling, once I get more power supplies and more A1 rated SD cards.

Is Midnight Commander in the ebuilds?
It is my default remote SSH file manager/editor.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

Re: Updated 64-bit Gentoo Image for RPi3 Released (now also for RPI3B+)

Sun Apr 22, 2018 2:44 am

Ok, now running headless and MC is in apps-misc/mc.
Lots more memory free now and I am coming to terms with emerge.

Thanks for all the help Sakaki in making the transition to Gentoo painless.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Return to “Gentoo”

Who is online

Users browsing this forum: No registered users and 1 guest