View previous topic :: View next topic |
Author |
Message |
Yamakuzure Advocate
Joined: 21 Jun 2006 Posts: 2305 Location: Adendorf, Germany
|
Posted: Fri Mar 27, 2015 12:00 pm Post subject: |
|
|
aahjnnot wrote: | Has anyone managed to compile Firefox or Chromium for the Pi 2? I'm running KDE on mine with a surprising level of success, but Konqueror is a fairly restrictive web browser. Unfortunately, both Chromium and Firefox fail to build for me.
I've posted a question in the Portage forum but no-one has yet responded. I've since discovered this thread and it's possible that there's greater architecture expertise here than there. | From my Raspberry Pi 2, connected via SSH (I have no HDMI to DVI cable, yet): Code: | sed-rpi2 ~ # uname -a
Linux sed-rpi2 3.18.9-v7+ #5 SMP PREEMPT Mon Mar 16 10:43:45 CET 2015 armv7l BCM2709 GNU/Linux
sed-rpi2 ~ # eix -c -I "(firefox|libreoffice)"
[I] app-office/libreoffice (4.4.1.2@22.03.2015): LibreOffice, a full office productivity suite
[I] app-office/libreoffice-l10n (4.4.1.2@18.03.2015): Translations for the Libreoffice suite
[I] www-client/firefox (36.0.1@23.03.2015): Firefox Web Browser
3 Treffer. | However, firefox did *not* build out of the box!
The first problem with 36.0.1 was, that 'skia' wasn't enabled by default, so I added "enable-skia" to the general rules. This should have been fixed in 36.0.4.
The second problem was, that in mozilla-release/ff/media/libvpx the mfloat-abi was set to "softfp". hardcoded. That fails because the responding gnu stubs are missing.
I couldn't help, but I simply had a screen session with a second console open, and when emerge broke, I got the corresponding lines using: Code: | grep "mfloat-abi=softfp" /var/tmp/portage/www-client/firefox-36.0.1/temp/build.log | , copied the lines for files I didn't have compiled, yet, removed the "mfloat-abi=softfp" and then compiled by hand. A "chown portage:portage *" did the rest.
Afterwards I would just continue the build using: Code: | $ rm /var/tmp/portage/www-client/firefox-36.0.1/temp/build.log
$ ebuild /usr/portage/www-client/firefox/firefox-36.0.1.ebuild install |
That was veeeery annoying. I had kwrite open to copy the lines into. It helped with keeping track what was done and what wasn't. _________________ Edited 220,176 times by Yamakuzure |
|
Back to top |
|
|
Yamakuzure Advocate
Joined: 21 Jun 2006 Posts: 2305 Location: Adendorf, Germany
|
Posted: Fri Mar 27, 2015 12:31 pm Post subject: |
|
|
UncleVan wrote: | garlicbread wrote: | For anyone else building a kernel on the rpi2
the trick is to not use imagetool-uncompressed.py, it was originally a requirement for older bootloaders for the rpi, but for newer bootloaders it's no longer needed. With Noobs it actually stops the kernel from running
...
|
Yes, I can confirm this. Also, I don't configure with bcmXXX_defconfig. Instead, take the original Raspbian config "/proc/config.gz" and "make oldconfig" over it in the git sources - garanteed to succeed | Or use the bcm2709_defconfig and then configure the kernel with menuconfig. You can drop a lot of stuff and it is a good idea to enable SMP, so more than just one core gets utilized. Add ZRAM and install zram-init from mv overlay. Then add four swap devices (one for each core). I did not have any problems compiling and installing both qtwebkits, which means something on a 1GB machine.
my config with zram: Code: | ~ # grep -P "^[^#]" /etc/conf.d/zram-init
load_on_start="yes"
unload_on_stop="yes"
num_devices="4"
type0="swap"
size0="384"
maxs0="1"
algo0="lz4"
flag0=""
type1="swap"
size1="374"
maxs1="1"
algo1="lz4"
flag1=""
type2="swap"
size2="384"
maxs2="1"
algo2="lz4"
flag2=""
type3="swap"
size3="384"
maxs3="1"
algo3="lz4"
flag3=""
~ # grep swap /etc/fstab
/dev/mmcblk0p2 none swap sw 0 0
/dev/zram0 none swap sw,pri=16383,nofail 0 0
/dev/zram1 none swap sw,pri=16383,nofail 0 0
/dev/zram2 none swap sw,pri=16383,nofail 0 0
/dev/zram3 none swap sw,pri=16383,nofail 0 0
~ # cat /proc/swaps
Filename Type Size Used Priority
/dev/mmcblk0p2 partition 1582100 0 -1
/dev/zram0 partition 393212 2080 16383
/dev/zram1 partition 382972 2088 16383
/dev/zram2 partition 393212 2068 16383
/dev/zram3 partition 393212 2076 16383 |
using squash_mount from mv overlay for /usr/portage, /var/db and /var/lib/layman seemed to speed things up a bit. (I am using lzo compression.) And ccache helped a lot of course. _________________ Edited 220,176 times by Yamakuzure |
|
Back to top |
|
|
atemv n00b
Joined: 09 Aug 2014 Posts: 63
|
Posted: Sat Mar 28, 2015 3:26 am Post subject: |
|
|
A bit more secure way to cross compile is to use the toolchain binaries provided by the Raspberry Pi developers. For me it works well, however I only have an rpi1 with a Raspbian target OS
You can get it with:
Code: | git clone https://github.com/raspberrypi/tools |
and add it to your $PATH variable
on 32 bit host system
export PATH=${PATH}:tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin
on 64 bit host system
export PATH=${PATH}:tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin |
|
Back to top |
|
|
Yamakuzure Advocate
Joined: 21 Jun 2006 Posts: 2305 Location: Adendorf, Germany
|
Posted: Mon Mar 30, 2015 10:18 am Post subject: |
|
|
atemv wrote: | A bit more secure way to cross compile is to use the toolchain binaries provided by the Raspberry Pi developers. | That wouldn't work with gentoo on the RP2 with using distcc, would it? _________________ Edited 220,176 times by Yamakuzure |
|
Back to top |
|
|
BillyD Guru
Joined: 05 May 2002 Posts: 323 Location: Australia
|
Posted: Sat Jun 13, 2015 9:52 pm Post subject: |
|
|
el_Salmon wrote: | Does anyone could prepare a minimal Gentoo image for Raspberry Pi 2? I cannot use my keyboard with the Raspbian kernel (but it works fine with Raspbian or Ubuntu). |
I was having this problem as well, but copying the modules directory in it's entirety to /lib solved this. For anyone that is a little confused (as I was) you need to copy firmware/modules from the git repository into /lib on your sd card. So you'll end up with a /lib/modules directory on the SD card. _________________ We used to have hominid cousins that were vegetarian. The palæontological record suggests that our ancestors killed them and ate them. |
|
Back to top |
|
|
Yamakuzure Advocate
Joined: 21 Jun 2006 Posts: 2305 Location: Adendorf, Germany
|
Posted: Mon Jun 15, 2015 8:00 am Post subject: |
|
|
BillyD wrote: | el_Salmon wrote: | Does anyone could prepare a minimal Gentoo image for Raspberry Pi 2? I cannot use my keyboard with the Raspbian kernel (but it works fine with Raspbian or Ubuntu). |
I was having this problem as well, but copying the modules directory in it's entirety to /lib solved this. For anyone that is a little confused (as I was) you need to copy firmware/modules from the git repository into /lib on your sd card. So you'll end up with a /lib/modules directory on the SD card. | I never tried the raspian kernel, as it is still for the RPi 1, right?
However, compiling from the official sources works well.
See here: Code: | sed-rpi2 linux # git remote -v
origin https://github.com/raspberrypi/linux (fetch)
origin https://github.com/raspberrypi/linux (push)
sed-rpi2 linux # git branch
* rpi-3.18.y
sed-rpi2 linux # uname -a
Linux sed-rpi2 3.18.10-v7+ #1 SMP PREEMPT Fri Mar 27 12:19:53 CET 2015 armv7l BCM2709 GNU/Linux | Note to self, I should upgrade.
However, ccache + distccd + zram work quite nice: Code: | sed-rpi2 ~ # eix -c -I "(libreoffice|firefox)"
[I] app-office/libreoffice (4.4.3.2@12.06.2015): LibreOffice, a full office productivity suite
[I] app-office/libreoffice-l10n (4.4.3.2@10.06.2015): Translations for the Libreoffice suite
[U] www-client/firefox (36.0.1@23.03.2015 -> (~)38.0.1^d): Firefox Web Browser
3 Treffer. | Oh? I need to update firefox.
I'll time the update and will edit this post so you can see how long emerging firefox on a Raspberry PI 2 with distcc enabled takes.
Edit: Here is the result of emerging firefox on my Raspberry PI 2: Code: | sed-rpi2 ~ # time emerge firefox
These are the packages that would be merged, in order:
Calculating dependencies ....... .. . ... done!
[ebuild N ~] media-libs/libvpx-1.4.0:0/2::gentoo USE="(-altivec) -doc postproc -static-libs {-test} threads" 0 KiB
[ebuild R ] dev-db/sqlite-3.8.10.1:3::gentoo USE="-debug -doc -icu readline secure-delete* -static-libs -tcl {-test} -tools" 0 KiB
[ebuild U ~] dev-libs/nss-3.19.1::gentoo [3.17.4::gentoo] USE="cacert nss-pem -utils" 0 KiB
[ebuild U ~] www-client/firefox-38.0.1::gentoo [36.0.1::gentoo] USE="-bindist* -custom-cflags -custom-optimization dbus -debug gmp-autoupdate -gstreamer (-hardened) jemalloc3%* jit minimal (-pgo) -pulseaudio (-selinux) startup-notification system-cairo* system-icu* system-jpeg* system-libvpx* system-sqlite* {-test} -wifi" LINGUAS="-af -ar -as -ast -be -bg -bn_BD -bn_IN -br -bs -ca -cs -cy -da de -el en_GB -en_ZA -eo -es_AR -es_CL -es_ES -es_MX -et -eu -fa -fi -fr -fy_NL -ga_IE -gd -gl -gu_IN -he -hi_IN -hr -hu -hy_AM -id -is -it -ja -kk -km -kn -ko -lt -lv -mai -mk -ml -mr -nb_NO -nl -nn_NO -or -pa_IN -pl -pt_BR -pt_PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv_SE -ta -te -th -tr -uk -vi -xh -zh_CN -zh_TW" 0 KiB
Total: 4 packages (2 upgrades, 1 new, 1 reinstall), Size of downloads: 0 KiB
>>> Verifying ebuild manifests
>>> Running pre-merge checks for www-client/firefox-38.0.1
* Checking for at least 4 GiB disk space at "/var/tmp/portage/www-client/firefox-38.0.1/temp" ... [ ok ]
>>> Emerging (1 of 4) media-libs/libvpx-1.4.0::gentoo
>>> Emerging (2 of 4) dev-db/sqlite-3.8.10.1::gentoo
>>> Installing (1 of 4) media-libs/libvpx-1.4.0::gentoo
>>> Installing (2 of 4) dev-db/sqlite-3.8.10.1::gentoo
>>> Emerging (3 of 4) dev-libs/nss-3.19.1::gentoo
>>> Installing (3 of 4) dev-libs/nss-3.19.1::gentoo
>>> Emerging (4 of 4) www-client/firefox-38.0.1::gentoo
>>> Installing (4 of 4) www-client/firefox-38.0.1::gentoo
>>> Recording www-client/firefox in "world" favorites file...
>>> Jobs: 4 of 4 complete Load avg: 1.91, 1.98, 2.73
* Messages for package www-client/firefox-38.0.1:
* You are enabling official branding. You may not redistribute this build
* to any users on your network or the internet. Doing so puts yourself into
* a legal problem with Mozilla Foundation
* You can disable it by emerging firefox _with_ the bindist USE-flag
>>> Auto-cleaning packages...
>>> No outdated packages were found on your system.
* GNU info directory index is up-to-date.
real 146m59.465s
user 206m40.530s
sys 33m3.170s |
_________________ Edited 220,176 times by Yamakuzure |
|
Back to top |
|
|
el_Salmon Guru
Joined: 15 Dec 2003 Posts: 339 Location: Around 2.4GHz
|
Posted: Mon Jun 22, 2015 7:06 pm Post subject: |
|
|
garlicbread wrote: | I've managed to get some distance installing gentoo onto the rpi2 using a usb harddisk and a raspian sd card without qemu or cross compiling
https://github.com/grbd/GBD.Rpi2.Gentoo
|
Finally I've installed Gentoo following that guide. I will keep the Raspbian kernel. Thank's to the author. _________________ Linux Proud User: HP Pavilion 15-an002ns laptop (KDE Neon), Xiaomi Mi Air 12 (KDE Neon), Raspberry Pi 3 (Nextcloudpi), Docooler MS9 Pro (LibreElec) |
|
Back to top |
|
|
cyrius n00b
Joined: 27 Jan 2007 Posts: 70 Location: France
|
Posted: Wed Jul 22, 2015 10:09 am Post subject: |
|
|
I've managed to install gentoo on raspberry pi 2. This thread was very useful. Cross building via distcc is very useful until no python or perl test was used in ebuild. The core part is done.
The /var directory is linked to an aoe device.
Thanks to this thread : http://community.arm.com/groups/tools/blog/2013/04/15/arm-cortex-a-processors-and-gcc-command-lines , i've added -ffast-math in CFLAGS to use full functionnality of neon-vpf4 gcc's flag.
I'm looking now for a sweet windows manager. After looking for on the web, i've decided to use LXDE which seems to be an adequate compromise.
For the video optimisation part, i've found thoses links :
http://dri.freedesktop.org/wiki/VC4/
It's seems that a special driver is maintained for the raspberry kernel. This is experimental but functionnal.
The modified raspberry's kernel git link is also provided in this url.
Does someone already tried it ?
My next step will be to do an initramfs to full migrate the system on an aoe device to avoid the sd card usage.
My goal is to use rdesktop-vrdp (which i'll compile from source on arm) from Virtual box project to run virtual rich environnement on raspberry.
Does someone also tried this approach ? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54663 Location: 56N 3W
|
Posted: Tue Mar 01, 2016 7:26 pm Post subject: |
|
|
For Pi 3 see Gentoo on Raspberry Pi 3
I suspect we will need a 32/64 bit split for Raspberry Pi 3 but at the time of writing, there is no 64 bit port for it.[/topic] _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
EvadingGrid n00b
Joined: 04 Apr 2013 Posts: 13
|
Posted: Wed Apr 06, 2016 12:51 pm Post subject: |
|
|
cyrius wrote: | I've managed to install gentoo on raspberry pi 2. This thread was very useful. Cross building via distcc is very useful until no python or perl test was used in ebuild. The core part is done.
The /var directory is linked to an aoe device.
Thanks to this thread : http://community.arm.com/groups/tools/blog/2013/04/15/arm-cortex-a-processors-and-gcc-command-lines , i've added -ffast-math in CFLAGS to use full functionnality of neon-vpf4 gcc's flag.
I'm looking now for a sweet windows manager. After looking for on the web, i've decided to use LXDE which seems to be an adequate compromise.
For the video optimisation part, i've found thoses links :
http://dri.freedesktop.org/wiki/VC4/
It's seems that a special driver is maintained for the raspberry kernel. This is experimental but functionnal.
The modified raspberry's kernel git link is also provided in this url.
Does someone already tried it ?
My next step will be to do an initramfs to full migrate the system on an aoe device to avoid the sd card usage.
My goal is to use rdesktop-vrdp (which i'll compile from source on arm) from Virtual box project to run virtual rich environnement on raspberry.
Does someone also tried this approach ? |
Yes, to get NEON functional -ffast-math is needed.
I should warn that although I have it enabled by default, it will break some things like dev-db/sqlite
Its easy enough to do a quick edit, and run it through again. |
|
Back to top |
|
|
kolcon Tux's lil' helper
Joined: 21 Sep 2007 Posts: 96 Location: Europe, CZ
|
Posted: Sun Apr 17, 2016 10:00 am Post subject: |
|
|
anybody care to post working minimal sd card image for pi 2/3 ? |
|
Back to top |
|
|
EvadingGrid n00b
Joined: 04 Apr 2013 Posts: 13
|
Posted: Mon Apr 18, 2016 10:12 am Post subject: |
|
|
kolcon wrote: | anybody care to post working minimal sd card image for pi 2/3 ? |
IMHO - use a USB Hardrive and leave Raspbian + NOOBS on the SD Card.
You get Raspbian as the ultimate rescue disk.
You can re-use the Raspbian Kernel + Modules.
See Here : Stage-3 for Raspberry 2/3 ( stage3-armv7a_neonvfpv4_hardfp-2016mmdd.tar.bz2 )
http://www.ukginger.net/Gentoo2/index.html
IF you have not got a USB Drive, then you are going to burn holes in your SD Card real quick...
Compiling will kick in the SWAP file, as 1 GB of RAM is not enough, even if you only allocate the min 16 Gb RAM for Video. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|