Forums

Skip to content

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

Raspberry Pi 3 - 64-bit 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
72 posts
  • Previous
  • 1
  • 2
  • 3
Author
Message
vanjo9800
Tux's lil' helper
Tux's lil' helper
Posts: 76
Joined: Mon Mar 16, 2015 8:23 pm

  • Quote

Post by vanjo9800 » Tue May 17, 2016 9:57 pm

Ok,

thank you for your guide into U-Boot. I solved it in a very similar way. When I opened with vim the boot.scr.uimg I saw the boot commands. i copied them in a separate file and added the systemd command to them. Then using this tutorial generated a new boot.scr.uimg and now I boot successfully with systemd for 10 seconds.

The guide which I used to generate the new boot.scr.uimg: http://elinux.org/RPi_U-Boot#boot.scr.uimg

Now, I want to ask you two main things.
1) How can I monitor the CPU temperature of the Pi 3?
2) How can I change the CPU frequency?

Thank you in advance!!!
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56080
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Wed May 18, 2016 6:11 pm

vanjo9800,

Code: Select all

# cat /sys/class/thermal/thermal_zone0/temp
37552
Divide by 1000 for deg C, so that's 37.552 C.

Code: Select all

# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
1200000[/code is the CPU frequency in kHz, so thats 1.2GHz.
The normal CPU governors in the kernel should work to change the CPU frequency. However, I think you only have a choice of 600MHz or 1.2GHz.
I use the 'On Demand' frequency governor everywhere but my Pi always seems to run at 1.2GHz.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
vanjo9800
Tux's lil' helper
Tux's lil' helper
Posts: 76
Joined: Mon Mar 16, 2015 8:23 pm

  • Quote

Post by vanjo9800 » Wed May 18, 2016 6:36 pm

Yeah, I know that I can do it this way with the Rapsberry Pi B+. However, with the Pi 3, I do not have a directory thermal under /sys/class. Also I do not have a directory cpufreq under /sys/devices/system/cpu/cpu0.

What kernel modules am I missing?
Top
vanjo9800
Tux's lil' helper
Tux's lil' helper
Posts: 76
Joined: Mon Mar 16, 2015 8:23 pm

  • Quote

Post by vanjo9800 » Thu May 19, 2016 5:47 pm

So, I found out that I have another problem. The Raspberry Pi 3 cannot shut down properly. It goes all way up to the end and a message

Code: Select all

Reboot failed ---- System halted]
is displayed. The red LED stays red as if the Raspberry is still working.

Do you experience the same problem?
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56080
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Thu May 19, 2016 5:55 pm

vanjo9800,

Do you have /sys mounted al all?

None of the Pi's can respond to the -r or -h options to shutdown as there is no software power off, nor reset.

The Red light on the Pi3 is a power light.It indicates that the board is powered up.
When it flashes, it indicates the power supply voltage is low. That's all done in the LED driver.

The green LED may or may not indicate activity. in the basic 64 bit set up, its just ignored.
If you can get the 32 bit defaults to work, it indicates SD card accesses.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
vanjo9800
Tux's lil' helper
Tux's lil' helper
Posts: 76
Joined: Mon Mar 16, 2015 8:23 pm

  • Quote

Post by vanjo9800 » Thu May 19, 2016 7:06 pm

Yes, I have /sys mounted with some things in it, but not with the things I need. Also, for the reboot problem, on Pi B+, when I type reboot, the system reboots. That is what I meant with my previous questions. Can it be like that with the Pi 3 also?
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56080
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Thu May 19, 2016 8:42 pm

vanjo9800,

Probably. The Pi 2 and Pi 3 are very similar. Try the official 32 bit build on the Pi 3.
If that works, the 64 bit build can be made to do in too.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
vanjo9800
Tux's lil' helper
Tux's lil' helper
Posts: 76
Joined: Mon Mar 16, 2015 8:23 pm

  • Quote

Post by vanjo9800 » Fri May 20, 2016 2:35 pm

All these things work on the Pi 3 when I run Raspbian on it. I think I use a wrong kernel, or a wrong kernel configuration. The kernel I use is from zeldin (https://github.com/zeldin/linux.git) and the configuration is the default one, provided from zeldin.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56080
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Fri May 20, 2016 8:06 pm

vanjo9800,

I started out with the zeldin kernel but I've moved to

Code: Select all

https://github.com/Electron752/linux
I've not compared them.

I don't use the default config either. I've switched off a lot of options I thought I didn't need.
Now I have a few packages asking for some of them. Still I don't build kernels on the Pi.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
vanjo9800
Tux's lil' helper
Tux's lil' helper
Posts: 76
Joined: Mon Mar 16, 2015 8:23 pm

  • Quote

Post by vanjo9800 » Mon May 23, 2016 5:28 pm

NeddySeagoon,

I downloaded the Electron752's kernel and started building it by simple typing

Code: Select all

make bcmrpi3_defconfig
on the Pi 3 (I have previously compiled my kernel on the Pi).

And I receive error messages like these:

Code: Select all

drivers/vfio/Kconfig:51:warning: ignoring unsupported character '/'
drivers/vfio/Kconfig:51:warning: ignoring unsupported character '/'
drivers/vfio/Kconfig:51:warning: ignoring unsupported character ' '
virt/lib/Kconfig:2: syntax error
...
virt/kvm/Kconfig:23:warning: ignoring unsupported character ''
...
scripts/kconfig/Makefile:108: recipe for target 'bcmrpi3_defconfig' failed
make[1]: *** [bcmrpi3_defconfig] Error 1
Makefile:537: recipe for target 'bcmrpi3_defconfig' failed
make: *** [bcmrpi3_defconfig] Error 2
What could be a possible reason for them?
Is it a problem with GCC or something like this? From what I read, I learned that there are symbols which should not be there, but how am I able to fix this?

Thank you in advance!!!
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56080
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Mon May 23, 2016 5:37 pm

vanjo9800,

Post

Code: Select all

emerge --info
from the Pi please.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
vanjo9800
Tux's lil' helper
Tux's lil' helper
Posts: 76
Joined: Mon Mar 16, 2015 8:23 pm

  • Quote

Post by vanjo9800 » Mon May 23, 2016 5:42 pm

Here it comes,

Code: Select all

Portage 2.2.28 (python 3.4.3-final-0, default/linux/arm64/13.0, gcc-5.3.0, glibc-2.23-r2, 4.5.0+ aarch64)
=================================================================
System uname: Linux-4.5.0+-aarch64-with-gentoo-2.2
KiB Mem:      874388 total,    658444 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Wed, 11 May 2016 07:30:01 +0000
sh bash 4.3_p42-r2
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
distcc 3.2rc1 aarch64-unknown-linux-gnu [disabled]
app-shells/bash:          4.3_p42-r2::gentoo
dev-lang/perl:            5.22.1::gentoo
dev-lang/python:          2.7.11-r2::gentoo, 3.4.3-r7::gentoo
dev-util/cmake:           3.5.2::gentoo
dev-util/pkgconfig:       0.29.1::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.20.5::gentoo
sys-apps/sandbox:         2.10-r2::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r2::gentoo
sys-devel/automake:       1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            5.3.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.5::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

ACCEPT_KEYWORDS="arm64 ~arm64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="aarch64-unknown-linux-gnu"
CFLAGS="-O2"
CHOST="aarch64-unknown-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox u
sersync xattr"
FFLAGS="-O2"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages/"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="acl arm64 berkdb bzip2 cli cracklib crypt cxx dri fortran gdbm iconv ipv6 modules multilib ncurses nls nptl openmp pam pcre readline seccomp session ssl systemd tcpd unicode xattr zlib" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_bas
ic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_con
fig logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memor
y rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard
 mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON
_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="fbdev dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos a
ccount"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56080
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Mon May 23, 2016 6:13 pm

vanjo9800,

That looks OK. You are using gcc-5.3.0. I don't build kernels on the Pi.
When you build your kernel on the Pi, does the red light flicker?
That indicates the Pi is working so hard the external power supply cannot keep the 5v above the lower limit.
Mine flickers as I run it from a USB hub that has a 2.4A charger for mobile devices.
It hasn't caused me any issues - yet.

Things to do. Try another PSU.
Do another git pull. Nothing should change.
Look at the code at

Code: Select all

drivers/vfio/Kconfig:51:warning: ignoring unsupported character '/'
That's line 51 or close to, in drivers/vfio/Kconfig.
I have

Code: Select all

source "drivers/vfio/pci/Kconfig"
source "drivers/vfio/platform/Kconfig"
source "virt/lib/Kconfig"
and line 51 is the last line of the file.

Do you use the SDCard?
That's a can of worms. I use an external USB HDD.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
vanjo9800
Tux's lil' helper
Tux's lil' helper
Posts: 76
Joined: Mon Mar 16, 2015 8:23 pm

  • Quote

Post by vanjo9800 » Mon May 23, 2016 8:21 pm

Ok, I will try doing these things to see if there is any change. Just to make the sample things clear:

I clone the kernel like this:

Code: Select all

git clone --depth=1 https://github.com/Electron752/linux
Then I do the following (Enter the directory first):

Code: Select all

make bcmrpi3_defconfig
make -j4
make modules_install
cp arch/arm64/boot/Image /boot/Image
cp arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dtb /boot/bcm2837-rpi-3-b.dtb
And then I reboot and can adjust some kernel configurations.
And that's it.

Sorry for asking such stupid questions, but many times my mistakes are hidden in the simple things, not in the hard ones. :)

Thank you in advance!!!
Top
vanjo9800
Tux's lil' helper
Tux's lil' helper
Posts: 76
Joined: Mon Mar 16, 2015 8:23 pm

  • Quote

Post by vanjo9800 » Tue May 24, 2016 12:42 pm

Ok, so after I downloaded it again, it worked. The kernel is running and it runs very smoothly. All of the previous issue were fixed. I can now access CPU temperature and frequency. I can even reboot successfully. Now I only have to remove some features of the kernel because I do not need most of them.
Thank you very much for the support NeddySeagoon!!!
Top
quixoticdon
n00b
n00b
Posts: 2
Joined: Sun May 29, 2016 1:44 am

  • Quote

Post by quixoticdon » Sun May 29, 2016 1:47 am

Can someone image a microsd card of a working gentoo 64bit for the RPI with systemd?

I've been trying to get a working cross compiling environment set up on OSX but it's been a challenge.

Would be nice if I could just dd an image onto the SD card and have a basic 64 bit gentoo setup ready to use.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56080
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sun May 29, 2016 10:36 am

quixoticdon,

Welcome to Gentoo.

I won't ever use systemd but that's another discussion. You can have a copy of my /boot and root with OpenRC if you want.
If you intend to run it from the SDCard, the boot loader will need to be updated as I have root on rotating rust at sda1
The SD card is very slow compared to an external HDD, even with the Pi Foundations optimised SD driver.

Its not quite an image but it should be easy to get going.

If you already have Gentoo, crossdev will build you a cross toolchain.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
quixoticdon
n00b
n00b
Posts: 2
Joined: Sun May 29, 2016 1:44 am

  • Quote

Post by quixoticdon » Tue May 31, 2016 3:43 pm

Ah I'm working off a raspbian 64 bit image someone posted on their forums. So I have raspbian on my SD card, and in the middle of a stage 3 on a usb stick.

Right now, wondering whether I should just copy the 4.5 kernel they have over, or whether to try to compile one myself. Can you just compile the raspberrypi-sources with an aarch64 GCC to get a working kernel? Or do you need to use one of the git sources like the zeldin or electron752 kernels for 64-bit mode?

Also working on setting up gentoo on an old machine. Got crossdev set up, but haven't figured out distcc yet.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56080
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Tue May 31, 2016 5:13 pm

quixoticdon,

You need zeldin or electron752 for 64 bit. I used zeldin to start with and moved to electron752.
The official kernel does not have a 64 bit *.dtb. At least, it didn't.

I understand that newer firmware is 64 bit aware, so uboot is no longer needed.
I've not tested that.

If the crossdev toolchain works, cross distcc is the easy bit.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
antonlacon
Apprentice
Apprentice
Posts: 257
Joined: Sun Jun 27, 2004 1:36 am

  • Quote

Post by antonlacon » Thu Jun 02, 2016 10:29 am

NeddySeagoon wrote:

Code: Select all

# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
1200000[/code is the CPU frequency in kHz, so thats 1.2GHz.
The normal CPU governors in the kernel should work to change the CPU frequency. However, I think you only have a choice of 600MHz or 1.2GHz.
I use the 'On Demand' frequency governor everywhere but my Pi always seems to run at 1.2GHz.
Minimum cpu frequency needs to be set in config.txt with arm_freq_min. At least on the original RPi, I can set this to 100 and it will scale down that far. I believe it only gets two choices to step between, the min and the max.
Top
vanjo9800
Tux's lil' helper
Tux's lil' helper
Posts: 76
Joined: Mon Mar 16, 2015 8:23 pm

  • Quote

Post by vanjo9800 » Sat Jun 04, 2016 9:45 am

Hello again, NeddySeagoon,

After configuring Gentoo 64-bit, I started thinking about installing a GUI. So I wanted to try wayland because I know it is better than X and the RPI would give a bigger performance with it. So I tried to install weston the normal way, but I faced a problem -> one of its dependencies was raspberrypi-userland, which as you mentioned earlier was some 32-bit firmware. So how can I have a 64-bit GUI, or this is impossible for now.

Also are there some news considering the WiFi of the Pi 3?

Thank you in advance!!!
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56080
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sat Jun 04, 2016 10:08 am

vanjo9800,

turbo-framebuffer is as good as it gets for now.
That's the Xorg framebuffer driver with some ARM specific speedups.
The down side is that its not in the tree, at least it wasn't when I looked last.

Ordinary framebuffer works to.

I've not done much with wireless as its only a curiosity for me. My interest is mostly in adding ~arm64 keywords.
That's a gentle introduction to git and ebuilds for me.

At full screen 1920x1080, glxgears, which is not a benchmark, gets 6Hz with turbo-framebuffer
sdlmame builds and starts but at 6Hz, I don't have the heart to test it with a real ROM.

-- edit --

There is the vc4 open source hardware accelerated driver for the Broadcom Video Core 4 graphics engine in the Pi.
I doubt that it works in 64 bit mode as the VC4 interface to the ARM needs to be 32 bit.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
Post Reply
  • Print view

72 posts
  • Previous
  • 1
  • 2
  • 3

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