code_exec
Posts: 191
Joined: Sun Sep 30, 2018 12:25 pm

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

Tue Dec 04, 2018 9:54 am

gilius wrote:
Tue Nov 27, 2018 6:52 am
I tried Fedora 28 and 29 - both don't work on my B+
29 didn't reach the gui
28 started a frozen gui
Use one of the spins such as XFCE which use lighter desktop environments.
Ubuntu 18.04 LTS desktop images for the Raspberry Pi 3.

https://github.com/CodeExecution/Ubuntu-ARM64-RPi

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

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

Mon Dec 24, 2018 4:19 am

Slight delay with the 1.3.1 image release, unfortunately. I've had to update the kernel due to an issue leading to the wrong (i.e. upstream rather than downstream) versions of the MMC drivers being used (thanks to GitHub user burnbabyburn for bringing this to my attention, and providing a PR to fix it). I've switched the image to using the patched kernel, and it seems to work OK, but I'm going to give it a few more days burn-in before release. Everything in userland is frozen, so it should be out shortly.

Best, sakaki ><

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

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

Fri Dec 28, 2018 5:16 pm

Hello,

I've just posted a v1.3.1 release of my bootable 64-bit Gentoo image for the RPi3 (model B and B+) on GitHub (here, includes full download instructions).

A changelog from the prior release image (with upgrade instructions) may be viewed here, but in summary:
  • Added the full-scale www-client/chromium web browser (in addition to www-client/firefox, which remains supported and included on the image). Note that the version on the image (71.0.3578.62-r2) uses a slightly modified ebuild, which adds the openh264 USE flag, and is built with "-proprietary-codecs -openh264" USE (this removes all the (patent encumbered) h264 code from the application, so it may be lawfully distributed in binary form). You can rebuild it yourself with modified USE flags yourself if you wish, of course.
  • The minimum supported microSD card capacity has been increased to 16GB (up from 8GB). In reality, with recent versions of the image 8GB cards were only really useful for a quick tryout; they were too small to properly genup etc., and 16GB cards are now readily available and relatively inexpensive. The initial (uncompressed) image size is now 11,328MiB (of which the root partition is 11,264MiB (11GiB), which will be autoexpanded to fill any additional free space on first boot of course), so this provides reasonable headroom. The current image is ~1.32GiB in compressed form.
  • Added the pyconfig_gen utility, for easy (GUI-based) update of (a subset of the features contained in) the /boot/config.txt file on the RPi3. This utility is autostarted on first boot for each user. Changes made to the /boot/config.txt file using this application are subject to ratification on reboot; if the user does not explicitly accept them before a short time limit expires, an automatic reboot under the prior, 'last known good' config is performed. This prevents users locking themselves out by specifying (e.g.) an HDMI mode that is unsupported by their display (as an additional precaution against this particular case, only modes reported as being supported by the currently connected display are presented for selection in the GUI). Currently, only a small (but hopefully, useful) subset of the options available may be edited via this application, but this will be increased in future. It is still possible to directly edit /boot/config.txt - the app ignores keys it does not manage. Tool screenshot may be seen here.
  • As a bonus side-effect of the above, the PyQt5 framework - including the Qt5 Designer GUI editor - has been added to the image.
  • Added an Xfce4 startup service, xfce-extra/xfce4-noblank, to prevent the user's xscreensaver blanking the display when notionally 'off', since this can cause problems with some displays (under vc4-{f,}kms-v3d graphics drivers, at least) where the display cannot be powered back up once blanked in this manner (by regular mouse or keyboard activity, anyhow). Installs an /etc/xdg/autostart/xfce4-noblank.desktop entry.
  • Updated the kernel to sys-kernel/bcmrpi3-kernel-bis-bin-4.14.90.20181222 (and the boot firmware to sys-boot/rpi3-64bit-firmware-1.20181112).
  • Various minor ebuild tidy-ups.
  • All packages brought up-to-date against the Gentoo tree, as of 26 November 2018.
A variant image for the Pi-Top v1 (an RPi3-based DIY laptop) is also included.

Here's a screenshot of the (vanilla) image in use, on an RPi3B+:

Image

Have fun ^-^

And, as always, any problems or comments, please post either in this thread, or in the project's (sticky) thread on the Gentoo forums (here).

PS: the isshoni.org binhost (and mirror) has been frozen vs the Gentoo tree since around a month ago, while this image has been in prep. Now the image is released, the autobuild process will be allowed to run again, so there should be an updated Portage tree plus updated binary package set available shortly, and the normal weekly-cadence service will resume thereafter. Apologies for any disruption this has caused ><

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

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

Wed Jan 09, 2019 8:40 pm

If you'd like to try out .NET applications on your gentoo-on-rpi3-64bit system, you may be interested to know I've just pushed a build of dev-lang/mono-4.8.0.524 to the binhost (mono is a an open source implementation of Microsoft's .NET Framework).

To emerge it (assuming you're starting from a reasonably up-to-date version of the image), just issue:

Code: Select all

[email protected] ~ $ emaint sync --repo rpi3
[email protected] ~ $ emerge -av dev-lang/mono
This is a binary package, so shouldn't take too long to install.

Then you can try it. The bundled C# compiler is called mcs. So for a simple 'hello world' (following this post):

Code: Select all

[email protected] ~ $ mkdir HelloWorld && cd HelloWorld
[email protected] ~/HelloWorld $ nano -w HelloWorld.cs
Put the following text in that file:

Code: Select all

using System;

public class HelloWorld
{
    public static void Main()
    {
        Console.WriteLine("Hello World!");
    }
}
Save, and exit nano. Then:

Code: Select all

[email protected] ~/HelloWorld $ TERM=xterm mcs HelloWorld.cs
(The TERM=xterm is to ensure you don't get hit by bug 6752; haven't got the 5.x series to build on aarch64 yet)

You should now have a HelloWorld.exe .NET program. To run it:

Code: Select all

[email protected] ~/HelloWorld $ TERM=xterm mono HelloWorld.exe
Hello World!
best,

sakaki

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

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

Thu Jan 10, 2019 2:30 am

.NET? wow.
Ok, now I want to know how you fit everything on your SD card.
What is your Pi setup?
My 32GB card is getting full and with so much stuff now working in Gentoo64 I need to upgrade storage.

Is there a simple way to assign the home demouser folder to USB stick?

I am trying to get Pony lang to compile but it needs LLVM version 3.9.1 and we have 7.0.0.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

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

Thu Jan 10, 2019 5:39 am

Sakaki, got a message trying to emerge mono.

"Unable to find kernel sources at /usr/src/linux" ...
see http://bugs.gentoo.org/261869

Type "mcs" and I get "Unhandled Exception:......
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

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

Thu Jan 10, 2019 12:16 pm

Gavinmc42 wrote:
Thu Jan 10, 2019 5:39 am
Sakaki, got a message trying to emerge mono.

"Unable to find kernel sources at /usr/src/linux" ...
see http://bugs.gentoo.org/261869

Type "mcs" and I get "Unhandled Exception:......
The first message, about kernel sources, is a warning, not an error. The image, as shipped, uses a binary kernel package, so there are (by default) no sources at /usr/src/linux for the ebuild to check. It is a fairly common thing to see on Gentoo. The ebuild is trying, per bug 261869, to ensure your kernel has CONFIG_SYSVIPC enabled, as this is a build requirement. Fortunately, the kernel shipped with the image does have this set. The ebuild assumes you know what you are doing in this situation, outputs the message, and keeps going. The dev-lang/mono package did install successfully on your system - as otherwise there would be no "mcs" binary for you to experience your second issue with ^-^.

And as to that second issue (the exception), it is actually just due to mono not recognizing your terminal type (due to an underlying terminfo issue). It is the bug 6752 I mentioned in the above post. To work around it, either run mcs and mono in a vanilla xterm (Applications -> System -> XTerm) or, as suggested in my post above (and in the #6752 bug thread) prefix the command with "TERM=xterm". So, instead of

Code: Select all

[email protected] ~ $ mcs Foo.cs
[email protected] ~ $ mono Foo.exe
you would instead use:

Code: Select all

[email protected] ~ $ TERM=xterm mcs Foo.cs
[email protected] ~ $ TERM=xterm mono Foo.exe
If typing the TERM=xterm prefix gets annoying, you can always alias mcs and mono (and any other affected executables). To do so, as explained e.g. here, you could put the following at the bottom of your ~/.bashrc:

Code: Select all

alias mcs='TERM=xterm mcs'
alias mono='TERM=xterm mono'
Open a new terminal, and you should find that you can now simply type:

Code: Select all

[email protected] ~ $ mcs Foo.cs
[email protected] ~ $ mono Foo.exe
and everything should work (provided you have a Foo.cs of course!)
Gavinmc42 wrote: Ok, now I want to know how you fit everything on your SD card.
What is your Pi setup?
My 32GB card is getting full and with so much stuff now working in Gentoo64 I need to upgrade storage.
Mostly now for emerges etc. I work on a QEMU binfmt_misc aarch64 chroot on a PC workstation. As explained in my wiki article about it (here), this allows me to have a large tmpfs-based /var/tmp/portage, and sufficient memory that swapping is not necessary during builds. Root (and boot) for the build system is on a 250GB Samsung SSD connected via a Sabrent USB adaptor - when building on a PC this can take advantage of the USB3 interface speed. For odd packages that won't build in this way, I simply boot the same image on a regular RPi3B+, and, where possible, distribute the build using distcc (as explained here ff.)

For testing, I currently write the image to a 64GB Sandisk Extreme Pro class A2 microSD card, pretty happy with the speed of this.
Gavinmc42 wrote: Is there a simple way to assign the home demouser folder to USB stick?
You can do this simply by recursively copying the contents of (e.g.) /home to an ext4 partition on the USB drive, and then adding an entry to /etc/fstab to automount it on boot, and finally clearing the old /home to save space. Make sure to use UUID-based partition naming in /etc/fstab for robustness. See e.g. this post and this wiki entry.

hth, sakaki

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

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

Fri Jan 11, 2019 6:48 am

Hi Sakaki,

I found the pre-built binaries for Clang/LLVM 3.9.1.
It looks like AArch64 has pre-builts start at version 3.5.

Is there a way that emerge can be used to install multiple ebuild versions?
To build Pony I have to set the compiler to 3.9.1, but I don't want to uninstalled 7.0.0

Distcc looks interesting, your wiki now has lots of useful info.
Thanks again for your help.

Regards
Gavin
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

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

Fri Jan 11, 2019 1:56 pm

Gavinmc42 wrote:
Fri Jan 11, 2019 6:48 am
I found the pre-built binaries for Clang/LLVM 3.9.1.
It looks like AArch64 has pre-builts start at version 3.5.

Is there a way that emerge can be used to install multiple ebuild versions?
To build Pony I have to set the compiler to 3.9.1, but I don't want to uninstalled 7.0.0
Yes, you can, using a nice Portage feature called slotting. Not all packages support this, but, where they do, it is (usually, in the absence of masking conflicts) possible to have multiple versions of the same software installed simultaneously on your system. See e.g. here for further details. And fortunately, LLVM/Clang is slotted on Gentoo; you can see this if you use the (bundled) eix tool on your gentoo-on-rpi3-64bit system:

Code: Select all

[email protected] ~ $ eix --exact sys-devel/llvm
[I] sys-devel/llvm
     Available versions:  
     (0)    ~*3.4.2-r100(0/3.4) ~*3.5.2-r100(0/3.5) ~*3.6.2-r100(0/3.6) ~*3.7.1-r3(0/3.7.1) ~*3.9.1-r1(0/3.9.1)
     (4)    (~)4.0.1-r1
     (5)    (~)5.0.2
     (6)    6.0.1^t{tbz2} [M](~)6.0.1-r2^t
     (7)    (~)7.0.1^t{tbz2} **7.0.9999^t
     (8)    **9999^t
       {clang debug default-compiler-rt default-libcxx doc exegesis gold libedit +libffi lldb multitarget ncurses ocaml python +sanitize +static-analyzer test xar xml ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32" ELIBC="musl" KERNEL="Darwin FreeBSD linux" LLVM_TARGETS="AArch64 AMDGPU ARM AVR BPF Hexagon Lanai MSP430 Mips NVPTX Nios2 PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore" PYTHON_TARGETS="python2_7" VIDEO_CARDS="radeon"}
     Installed versions:  6.0.1(6)^t{tbz2}(18:01:22 10/01/19)(libffi ncurses xml -debug -doc -gold -libedit -test -xar ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="-32 -64 -x32" KERNEL="-Darwin" LLVM_TARGETS="AArch64 BPF -AMDGPU -ARM -Hexagon -Lanai -MSP430 -Mips -NVPTX -PowerPC -Sparc -SystemZ -X86 -XCore")
     Homepage:            https://llvm.org/
     Description:         Low Level Virtual Machine
(Your output may vary slightly as to versions etc)

Those parenthesized leading numbers on each line are the (major) slots, so you could have e.g. llvm v4 thru v7 installed simultaneously if you wanted (the same is true for Clang, use "eix --exact sys-devel/clang" to check).

However, as Neddy notes here, (multi-)slotting for Clang/LLVM is only available from v4 onwards - while the version you say you need (3.9.1) is available, it's only available in the default (0) slot (see the eix output above), and cannot be simultaneously installed with other versions, which is a bit annoying.

But all is not lost: looking at the above eix output, you can see that binary packages are available (the 'tbz2' tag tells you this) on the binhost for slots 6 and 7 (and a slot 7 instance is currently installed). Might pony be buildable with one of these versions of LLVM?

Well, looking at the pony README (here), we see that stefantalpalaru maintains an overlay (user repository of ebuilds) with a pony-0.25.0 ebuild in there. Looking at the relevant ebuild in that repo, we can see the following dependencies listed:

Code: Select all

RDEPEND="dev-libs/libpcre2
	dev-libs/openssl:=
	>=sys-devel/llvm-3.9.1:=
	<sys-devel/llvm-7.0.0:=
	sys-libs/ncurses:=
	sys-libs/zlib
	vim-syntax? ( app-vim/pony-syntax )"
DEPEND="${RDEPEND}
	virtual/pkgconfig"
That's encouraging, looks like stefantalpalaru claims it will build for 3.9.1 <= version < 7.0.0, so 6.0.1 (for which a binary package is available, per the above eix output) should work.

At this stage, it would be possible to use this ebuild to install pony, by:
  • emerging app-portage/layman (an overlay management tool), if not already installed
  • adding stefantalpalaru's overlay (via "layman -a stefantalpalaru")
  • masking all packages in it, so there are no conflicts with the base system (see e.g. my notes on overlay hygiene here)
  • unmasking the package you want (dev-lang/pony-0.25.0)
  • adding a package.accept_keywords entry for pony (the ebuild doesn't keyword ~arm64)
  • emerging dev-lang/pony
There are quite a few steps to do that however, so I've copied across stefantalpalaru's ebuild into the rpi3 overlay already used by the image, and keyworded it. So, you can just follow the instructions below to install it.

Installing dev-lang/pony on a gentoo-on-rpi3-64bit System

I assume you're working from a reasonably up-to-date version of the image in what follows, ideally 1.3.1.

Open a terminal and issue:

Code: Select all

[email protected] ~ $ sudo emaint sync --repo rpi3
to pick up the pony ebuild (and other changes), then:

Code: Select all

[email protected] ~ $ sudo emerge -av dev-lang/pony

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

Calculating dependencies... done!
[binary  NS    ] sys-devel/llvm-6.0.1:6::gentoo [7.0.1:7::gentoo] USE="libffi ncurses xml -debug -doc -gold -libedit -test -xar" LLVM_TARGETS="(AArch64) BPF -AMDGPU -ARM -Hexagon -Lanai -MSP430 -Mips -NVPTX -PowerPC -Sparc -SystemZ -X86 -XCore" 18,611 KiB
[ebuild  N     ] dev-lang/pony-0.25.0::rpi3  USE="-test (-vim-syntax)" 1,346 KiB

Total: 2 packages (1 new, 1 in new slot, 1 binary), Size of downloads: 19,957 KiB

Would you like to merge these packages? [Yes/No] 
As you can see (your output may vary slightly from the above), this is proposing to install llvm-6.0.1 from a binary into a new slot ("[binary NS]"). So you get to keep version 7 of LLVM! Start the above merge, by pressing Enter at the prompt. Once the slot-6 LLVM is installed, it will then build dev-lang/pony from source ("[ebuild N]") using it, but this shouldn't take too long (20 minutes or so - I'll look at adding a binary package for pony itself to the binhost at some point).

Once installed, if you run "eix --exact sys-devel/llvm", you should now see you have two versions of LLVM (in major slots 6 and 7, corresponding to the respective package major version numbers) installed side-by-side. Warning: features like this can make it hard to leave Gentoo once you start getting used to them ^-^

OK, so now you should be able to try out pony! Issue:

Code: Select all

[email protected] ~ $ mkdir hello && cd hello
[email protected] ~/hello $ nano -w main.pony
And put in that file (following this example):

Code: Select all

actor Main
  new create(env: Env) =>
    env.out.print("Hello, world!")
Save, and exit nano. Now build it using ponyc:

Code: Select all

[email protected] ~/hello $ ponyc
Building builtin -> /usr/lib/pony/0.25.0/packages/builtin
Building . -> /home/demouser/hello
Generating
 Reachability
 Selector painting
 Data prototypes
 Data types
 Function prototypes
 Functions
 Descriptors
Optimising
Writing ./hello.o
Linking ./hello
And run the resulting executable:

Code: Select all

[email protected] ~/hello $ ./hello
Hello, world!
Yay!

hth, sakaki

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

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

Sat Jan 12, 2019 9:25 am

Thanks Sakaki, your instructions worked perfectly.

Could be a reason why they say 3.9.1.
The first examples I tried after HelloWorld were Mandelbrot and OpenGL-app from the wiki.

Not the only one with LLVM6 and Mandelbrot issues
https://github.com/ponylang/ponyc/issues/2918

I may just wait until 7.0.1 is sorted
https://github.com/ponylang/ponyc/pull/2976

Learning a new language on a new OS and debugging compilers might just be a bit much for me.
Not sure, but you might have been the first to get ponyc compiled on an Aarch64 Pi in any OS?

That's the thing with bleeding edge, you never know how close you are until you fall over it :D
That's also the fun with Pi's, pushing the boundaries.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

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

Sat Jan 12, 2019 7:28 pm

Gavinmc42,

so it looks as if using llvm:6 for this was a bit optimistic. I've just revbumped the pony-0.25.0 ebuild (so it now restricts the max LLVM slot to 5), built the package, and pushed the resulting binaries to the binhost (so as a result, sys-devel/llvm-5.0.2 is now available as a binary package too).

Built this way (i.e., under llvm:5), pony seems to compile the mandelbrot example ok. Steps to install and try it out for yourself:

Code: Select all

[email protected] ~ $ sudo emaint sync --repo rpi3
[email protected] ~ $ sudo emerge -avu dev-lang/pony
This will update pony to 0.25.0-r1 via a binary, pulling in the (also binary) llvm-5.0.2 in the process (your 'other' LLVMs in slots 6 and 7 will not be deleted). Once done, download the mandelbrot test program:

Code: Select all

[email protected] ~ $ mkdir mandelbrot && cd mandelbrot
[email protected] ~/mandelbrot $ wget -c https://raw.githubusercontent.com/ponylang/ponyc/0.25.0/examples/mandelbrot/mandelbrot.pony
And compile it:

Code: Select all

[email protected] ~/mandelbrot $ ponyc
Building builtin -> /usr/lib/pony/0.25.0/packages/builtin
Building . -> /home/demouser/mandelbrot
Building cli -> /usr/lib/pony/0.25.0/packages/cli
Building collections -> /usr/lib/pony/0.25.0/packages/collections
Building ponytest -> /usr/lib/pony/0.25.0/packages/ponytest
Building time -> /usr/lib/pony/0.25.0/packages/time
Building collections/persistent -> /usr/lib/pony/0.25.0/packages/collections/persistent
Building random -> /usr/lib/pony/0.25.0/packages/random
Building buffered -> /usr/lib/pony/0.25.0/packages/buffered
Building files -> /usr/lib/pony/0.25.0/packages/files
Building term -> /usr/lib/pony/0.25.0/packages/term
Building promises -> /usr/lib/pony/0.25.0/packages/promises
Building strings -> /usr/lib/pony/0.25.0/packages/strings
Building signals -> /usr/lib/pony/0.25.0/packages/signals
Building capsicum -> /usr/lib/pony/0.25.0/packages/capsicum
Generating
 Reachability
 Selector painting
 Data prototypes
 Data types
 Function prototypes
 Functions
 Descriptors
Optimising
Writing ./mandelbrot.o
Linking ./mandelbrot

Now you can try running it, with the default parameters, saving the output bitmap to out.dat:

Code: Select all

[email protected] ~/mandelbrot $ time ./mandelbrot --output=out.dat

real	0m17.197s
user	0m57.406s
sys	0m0.258s

[email protected] ~/mandelbrot $ file out.dat
out.dat: Netpbm image data, size = 16000 x 16000, rawbits, bitmap
Warning! That's a huge bitmap - if you try loading it (on your RPi3 anyhow) into a program like Ristretto, it'll create a full-colour-depth canvas to hold it (even though the original is only 1 bit per pixel), run out of memory, and quit. So, to convert it into something more viewable on your RPi3, rescale the image (and convert to a png), using imagemagick's convert tool (available as a binary package):

Code: Select all

[email protected] ~/mandelbrot $ sudo emerge -av virtual/imagemagick-tools
[email protected] ~/mandelbrot $ time convert out.dat -resize 4000x4000 -depth 4 -colorspace Gray out.png

real	4m2.034s
user	1m31.596s
sys	0m15.878s
Conversion took longer than generation ^-^

You could of course build a smaller image in the first place (using e.g. the --width option to ./mandelbrot), but you may have wanted the original parameters for benchmarking etc., which is why I left it as above.

You can now view the resulting png, in e.g. gimp:

Code: Select all

[email protected] ~/mandelbrot $ gimp out.png &>/dev/null&
Screenshot on one of my testing boxes:

Image

hth, sakaki

PS: www-client/firefox-64.0.2 is now out of basic testing and pushed to the binhost. To get it:

Code: Select all

[email protected] ~ $ emaint sync --repo rpi3
[email protected] ~ $ emerge -avu www-client/firefox

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

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

Sun Jan 13, 2019 4:33 am

Thanks again Sakaki,
You are like my own personal Gentoo Sensei.

My next requirement for a Gentoo64 Pi development OS was Arduino.
The IDE installed fine but the avr/arm cross compilers keep popping up errors.

missing /usr/bin/avr-g+=: no such file or directory
Arduino SAM boards- "Tool bossac is not available for your operating system"
Arduino SAMD boards- "Tool arduinoOTA is not available for your operating system"
Arduino nRF52- "Tool openocd is not available"

Getting the hang of emerge so openocd is now being installed, maybe ;)
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

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

Mon Jan 14, 2019 12:27 am

Gavinmc42 wrote:missing /usr/bin/avr-g+=: no such file or directory
Been a while, but IIRC, you need to build a cross-toolchain separately from the dev-embedded/arduino IDE, via crossdev. A good reference is:
https://wiki.gentoo.org/wiki/Arduino#Pr ... _toolchain

hth, sakaki

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

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

Tue Jan 15, 2019 12:37 am

All,

A binary package for www-client/chromium-72.0.3626.28-r2 has just been pushed to the binhost.

To get it (assuming you are on a reasonably modern version of gentoo-on-rpi3-64bit), just issue:

Code: Select all

[email protected] ~ $ sudo emaint sync --repo rpi3
[email protected] ~ $ emerge -avu www-client/chromium
Seems to work reasonably well in basic testing. Please let me know of any issues.

Best, sakaki

PS some notes about the slightly-tweaked ebuild for this package (wrt the main tree, needed to get an arm64 compile) may be read here.

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

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

Tue Jan 15, 2019 11:58 am

Both the new Firefox and Chromium seem to be fine up to 10 tabs, Chromium now using less memory?
Swap and zram changes improves things?

WebGLsamples Aquarium still the ultimate stress test.
I think they fail cleaner than the last time I tested, Gentoo still runs, last time i needed to pull power?

What else stress tests Browsers?
What needs to done for Aarch64 Gentoo to be declared stable?
Seems to me it is mostly OpenGL driver issues and low number of ebuilds?

Busy learning about compilers and paths, lots of manual reading, google not much help yet as Aarch64 is so new.
Some automatic install scripts have issues with anything not x86 and cross compiling means learning the build systems ;)
The Free Pascal cross build tools seem simpler than the C/C++ ones.
Nearly got command line fpc working, once that's going then the Lazarus IDE is next

Since lots of languages like Rust/Pony are based on the LLVM tools perhaps check that first for cross compiling tools to Arm, Avr etc.
Wonder if anyone has cross compiled examples/demos on Aarch64 to x86?

Geany works well as a simple generic language editor/IDE
Time to try Codeblocks? Is it x86 only?
I have read Netbeans has a plugin for C++, so that's another IDE to try :D
Wonder if Visual Studio Code will run on Aarch64? It's mostly nodejs based?
I am going to avoid Eclipse for as long as possible :lol:
Might have go Vim/Emacs for Aarch64 :o
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

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

Tue Jan 15, 2019 1:22 pm

Gavinmc42 wrote:
Tue Jan 15, 2019 11:58 am
Both the new Firefox and Chromium seem to be fine up to 10 tabs, Chromium now using less memory?
Swap and zram changes improves things?

WebGLsamples Aquarium still the ultimate stress test.
I think they fail cleaner than the last time I tested, Gentoo still runs, last time i needed to pull power?
The aquarium test runs OK for me, doesn't crash on Chromium-72 even with 30,000 webgl fish ^-^ Not the world's fastest frame rate though (I think it is about 2s / frame on vc4-fkms-v3d, 256MiB CMA):

Image

But the cube mapping test runs at a respectable 5fps:

Image

Chromium does appear to use less memory per tab now than for the 5x/6x releases, yes. Additionally, the use of zswap (not zram incidentally, see e.g. this post for details of the differences) helps; mostly tbh when you are running e.g. the browser and another large app, like libreoffice, at the same time, and, say, alt-tabbing between them (a not unrealistic scenario).

best, sakaki

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

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

Wed Jan 16, 2019 1:09 am

Yep zswap whatever that is, seems to help :D
If I read that explanation right, as well as being faster it could save some uSD card wear too?

I got up to 3fps for Aquarium, which is pretty amazing as it did not crash Gentoo.
If you think about it, this could be WebGL code (OpenGLES) converted to OpenGL and then Eric's driver converts it back to OpenGLES?
What do these Pi version browsers do?
Are they doing in all in software using 4 cores plus NEON with no hardware acceleration?
I know Android can run these WebGL demos a bit faster, so still room for tweaking.

Are these two browser versions WASM aware?
Both are usable now, YouTube tests next?
Android does have a separate standalone YouTube viewer, are they available for Pi Aarch64?

Stress test - give it to a kid, if they don't complain, it is good enough ;)
Hmm, cannot play Android games, drawback or bonus for parents?
Android emulation layer?
If people can do x86 emulation why not Android on Gentoo64?
So much still to learn.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

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

Thu Jan 17, 2019 6:25 pm

Gavinmc42 wrote:
Wed Jan 16, 2019 1:09 am
Yep zswap whatever that is, seems to help :D
If I read that explanation right, as well as being faster it could save some uSD card wear too?
Yes, as in many cases it avoids hitting the backing-store swapfile at all. Not a magic bullet though - if your about-to-be-swapped-out pages are incompressible, it'll add a bit of overhead, and it evicts decompressed swap pages to backing store when the in-memory cache is exhausted. But overall, I find it useful to have turned on.
Gavinmc42 wrote:
Wed Jan 16, 2019 1:09 am
Are these two browser versions WASM aware?
Both browsers have some core WebAssembly support, yes, although Chromium-72 seems to have the edge over Firefox-64. I tried e.g. the WasmBoy[1] benchmark (using the Tobu Tobu Girl open-source ROM), and Chromium hit around 40fps, while Firefox was around 30fps:

Image

Also interesting, the comparative baseline {Java,Type}script variant in Firefox was just awful, at around 2fps. Not sure why that is, something to look into; it appears to be just using one CPU core when running the benchmark, wheras Chromium has all 4 going; perhaps something I have messed up in about:config ><)

Also, post-MVP WASM browser integration is still work in progress. See for example this overview by Lin Clark et al (one of the nicest bits of technical writing I have ever read, incidentally):

Image

hth, sakaki

PS I've just pushed dev-lang/rust-1.31.1 to the binhost (this package now installs cargo also). To update, simply:

Code: Select all

[email protected] ~ $ sudo emaint sync --repo rpi3
[email protected] ~ $ sudo emerge -av1u virtual/rust virtual/cargo


[1] WasmBoy is a Game Boy / Game Boy Color Emulator written for Web Assembly using AssemblyScript (repo on GitHub here). It has a nice "versus-Typescript" benchmarking tool.

Return to “Gentoo”