Difference between revisions of "Raspberry Pi"

From Funtoo
Jump to: navigation, search
(Stage 3: Added missing p argument)
m (Edit config.txt: enable 64bit mode)
 
(30 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
Funtoo Linux now has builds that are specifically optimized for the following systems, in addition to 'generic' optimized ARM builds:
 +
 +
* [[Raspberry Pi (Version 1)]] - Raspberry Pi 1 Model B, Model A, Model B+, Model A+, Compute Module, Raspberry Pi Zero.
 +
* [[Raspberry Pi (Version 2)]] - Raspberry Pi 2 Model B (Broadcom BCM2836, released Feb 2015.)
 +
* [[Raspberry Pi (Version 3)]] - Raspberry Pi 2 Model B version 1.2 (Oct 2016) and Raspberry Pi 3 Model B.
 +
* [[ODROID-XU4]] board from ODROID.
 +
* [[Arm64_generic]] Raspberry Pi 4
 +
 
{{fancywarning|Please, follow http://www.funtoo.org/Funtoo_Linux_Installation_on_ARM.}}
 
{{fancywarning|Please, follow http://www.funtoo.org/Funtoo_Linux_Installation_on_ARM.}}
  
Line 6: Line 14:
  
 
This document contains notes about getting Funtoo Linux up-and-running on the Raspberry Pi. Most information is already available on other documents, so this document mostly explains how to get the information needed to perform the installation.
 
This document contains notes about getting Funtoo Linux up-and-running on the Raspberry Pi. Most information is already available on other documents, so this document mostly explains how to get the information needed to perform the installation.
 
Please read [[Funtoo Linux Installation on ARM]] for general information about installing Funtoo Linux on ARM architecture.
 
 
  
 
== Installation ==
 
== Installation ==
Line 18: Line 23:
 
=== Stage 3 ===
 
=== Stage 3 ===
  
Funtoo Linux Stage 3 tarballs for Raspberry Pi can be found on [http://ftp.osuosl.org/pub/funtoo/funtoo-current/arm-32bit/armv6j_hardfp/].
+
Funtoo Linux Stage 3 tarballs for Raspberry Pi B or B+ (armv6j) can be found on [https://build.funtoo.org/funtoo-current/arm-32bit/armv6j_hardfp/].
 +
 
 +
Funtoo Linux Stage 3 tarballs for Raspberry Pi 2 (armv7) can be found on [https://build.funtoo.org/funtoo-current/arm-32bit/armv7a_neonvfpv4_hardfp/].
 +
 
  
 
Extracting the tarball is done using <tt>tar xpf</tt> instead of <tt>tar xpjf</tt>.
 
Extracting the tarball is done using <tt>tar xpf</tt> instead of <tt>tar xpjf</tt>.
 +
 +
=== Get the firmware and the kernel image of the official kernel raspberry pi project ===
 +
 +
==== Install Kernel Linux and modules ====
 +
 +
The Raspberry Pi Foundation maintains a Linux kernel tree that can run on the Raspberry Pi (hardware), including a pre-compiled version we use here. follow the steps below:
 +
 +
Mount the partition that will hold your rootfs of the SD card and extract the stage3 you have downloaded.
 +
 +
{{console|body=
 +
###i## mkdir /mnt/funtoo
 +
###i## mount /dev/sdcard-device-px /mnt/funtoo
 +
}}
 +
 +
Get firmware and kernel:
 +
 +
{{console|body=
 +
###i## cd /tmp/
 +
###i## git clone --depth 1 git://github.com/raspberrypi/firmware/
 +
###i## cp -r firmware/boot/* /mnt/funtoo/boot/
 +
###i## cp -r firmware/modules /mnt/funtoo/lib/
 +
}}
 +
 +
=== Edit cmdline.txt ===
 +
{{console|body=
 +
###i## nano /mnt/funtoo/boot/cmdline.txt
 +
}}
 +
 +
Create the line with the boot kernel parameters with the following content:
 +
 +
{{file|name=/mnt/funtoo/boot/cmdline.txt|desc=Stifler's Mom|body=
 +
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/sdcard-device-px rootfstype=ext4 elevator=deadline rootwait
 +
}}
 +
 +
=== Edit config.txt ===
 +
Create the line with the boot kernel parameters:
 +
 +
{{console|body=
 +
###i## nano /mnt/funtoo/boot/config.txt
 +
}}
 +
 +
To Raspberry Pi B and B+ (armv6j) use '''kernel.img''':
 +
 +
<pre>
 +
kernel=kernel.img
 +
disable_overscan=0
 +
</pre>
 +
 +
To Raspberry Pi 2 (armv7) use '''kernel7.img''':
 +
 +
<pre>
 +
kernel=kernel7.img
 +
disable_overscan=0
 +
</pre>
 +
 +
To Raspberry Pi 4 (armv8) use '''kernel8.img''':
 +
 +
<pre>
 +
arm_64bit=1
 +
kernel=kernel8.img
 +
disable_overscan=0
 +
</pre>
 +
 +
=== Disable console s0 ===
 +
 +
Comment out the s0 console (serial) for fix message in dmesg: "INIT: Id" s0 "respawning too fast".
 +
 +
{{console|body=
 +
###i##vi /mnt/funtoo/etc/inittab
 +
}}
 +
 +
# SERIAL CONSOLES
 +
#s0:12345:respawn:/sbin/agetty 9600 ttyS0 vt100
 +
#s1:12345:respawn:/sbin/agetty 9600 ttyS1 vt100
 +
 +
=== Raspberry Pi Userland ===
 +
 +
Get Raspberry Pi userspace tools and libraries (VCGENCMD).
 +
 +
Please read [[Raspberry Pi Userland (VCGENCMD)]] for general information about installing VCGENCMD on Funtoo Linux on ARMv6j architecture.
 +
  
 
=== Portage ===
 
=== Portage ===
  
Funtoo Linux Portage tarballs can be found on [http://ftp.osuosl.org/pub/funtoo/funtoo-current/snapshots/].
+
Update your portage treeː
 +
 
 +
<console>
 +
# ##i##ego --sync
 +
</console>
 +
 
 +
=== Video FB ===
  
Extracting the tarball is done using <tt>tar xf</tt> instead of <tt>tar xjf</tt>.
+
Please set '''-video_cards_omapfb''' on USE (make.conf) to solve many problems on emerge <tt>x11-base/xorg-drivers</tt>
  
 
=== Enabling networking on boot ===
 
=== Enabling networking on boot ===
 +
 +
==== Raspberry Pi 3 WiFi ====
 +
 +
If you have a Raspberry Pi 3, you will need to create the directory {{f|/lib/firmware/brcm}} and copy all the files located at https://github.com/RPi-Distro/firmware-nonfree/tree/master/brcm80211/brcm into this directory. This will provide the necessary binary firmware for WiFi to function at boot time.
 +
 +
{{Note|It is recommended that you {{c|emerge wireless-tools}} and use the {{c|iwconfig}} command to see if ''Power Management'' is set to ''on''. If so, use the command {{c|iwconfig wlan0 power off}} in a local startup script to disable wireless power management. This will solve intermittent connectivity issues (WiFi going in/out) over WiFi.}}
  
 
Please consult [[Funtoo Linux Networking]] for information regarding network configuration.
 
Please consult [[Funtoo Linux Networking]] for information regarding network configuration.
Line 34: Line 135:
 
=== Select profile ===
 
=== Select profile ===
  
Funtoo Linux has a different profile than Gentoo. Correct ''arch'' and ''build'' will be already set. It is possible to change ''flavor'' or add ''mix-ins'' using eselect.
+
Funtoo Linux has a different profile than Gentoo. Correct ''arch'' , ''subarch'' and ''build'' will be already set. More information can be found by typing {{c|epro show}}. For more information, see [[Funtoo Profiles]].
  
More information can be found on [[Funtoo 1.0 Profile]].
 
  
<console>
+
[[Category:Raspberry Pi]]
# ##i##eselect profile list
 
Currently available arch profiles:
 
[1]  funtoo/1.0/linux-gnu/arch/arm-32bit/armv7a_hardfp
 
[2]  funtoo/1.0/linux-gnu/arch/arm-32bit/armv6j_hardfp *
 
Currently available build profiles: 
 
[3]  funtoo/1.0/linux-gnu/build/stable 
 
[4]  funtoo/1.0/linux-gnu/build/current * 
 
[5]  funtoo/1.0/linux-gnu/build/experimental
 
Currently available flavor profiles:
 
[6]   funtoo/1.0/linux-gnu/flavor/minimal 
 
[7]  funtoo/1.0/linux-gnu/flavor/core * 
 
[8]  funtoo/1.0/linux-gnu/flavor/desktop 
 
[9]  funtoo/1.0/linux-gnu/flavor/workstation
 
Currently available mix-ins profiles: 
 
[10]  funtoo/1.0/linux-gnu/mix-ins/audio 
 
[11]  funtoo/1.0/linux-gnu/mix-ins/console-extras 
 
[12]  funtoo/1.0/linux-gnu/mix-ins/dvd 
 
[13]  funtoo/1.0/linux-gnu/mix-ins/gnome 
 
[14]  funtoo/1.0/linux-gnu/mix-ins/kde 
 
[15]  funtoo/1.0/linux-gnu/mix-ins/media 
 
[16]  funtoo/1.0/linux-gnu/mix-ins/print 
 
[17]  funtoo/1.0/linux-gnu/mix-ins/python3-only 
 
[18]  funtoo/1.0/linux-gnu/mix-ins/rhel5-compat 
 
[19]  funtoo/1.0/linux-gnu/mix-ins/server-db 
 
[20]  funtoo/1.0/linux-gnu/mix-ins/server-mail 
 
[21]  funtoo/1.0/linux-gnu/mix-ins/server-web 
 
[22]  funtoo/1.0/linux-gnu/mix-ins/X 
 
[23] funtoo/1.0/linux-gnu/mix-ins/xfce
 
</console>
 

Latest revision as of 09:38, November 13, 2020

Funtoo Linux now has builds that are specifically optimized for the following systems, in addition to 'generic' optimized ARM builds:

In above mentioned guide installation is more detailed

The Raspberry Pi is an ARM device (BCM2835, ARMv6).

This document contains notes about getting Funtoo Linux up-and-running on the Raspberry Pi. Most information is already available on other documents, so this document mostly explains how to get the information needed to perform the installation.

Installation

Gentoo Linux's wiki already provide a complete installation manual for Gentoo Linux. To avoid duplicating information, only parts that are different for Funtoo Linux will be highlighted here.

Gentoo's Raspberry Pi Quick Install Guide

Stage 3

Funtoo Linux Stage 3 tarballs for Raspberry Pi B or B+ (armv6j) can be found on [1].

Funtoo Linux Stage 3 tarballs for Raspberry Pi 2 (armv7) can be found on [2].


Extracting the tarball is done using tar xpf instead of tar xpjf.

Get the firmware and the kernel image of the official kernel raspberry pi project

Install Kernel Linux and modules

The Raspberry Pi Foundation maintains a Linux kernel tree that can run on the Raspberry Pi (hardware), including a pre-compiled version we use here. follow the steps below:

Mount the partition that will hold your rootfs of the SD card and extract the stage3 you have downloaded.

root # mkdir /mnt/funtoo
root # mount /dev/sdcard-device-px /mnt/funtoo

Get firmware and kernel:

root # cd /tmp/
root # git clone --depth 1 git://github.com/raspberrypi/firmware/
root # cp -r firmware/boot/* /mnt/funtoo/boot/
root # cp -r firmware/modules /mnt/funtoo/lib/

Edit cmdline.txt

root # nano /mnt/funtoo/boot/cmdline.txt

Create the line with the boot kernel parameters with the following content:

   /mnt/funtoo/boot/cmdline.txt - Stifler's Mom
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/sdcard-device-px rootfstype=ext4 elevator=deadline rootwait

Edit config.txt

Create the line with the boot kernel parameters:

root # nano /mnt/funtoo/boot/config.txt

To Raspberry Pi B and B+ (armv6j) use kernel.img:

kernel=kernel.img
disable_overscan=0

To Raspberry Pi 2 (armv7) use kernel7.img:

kernel=kernel7.img
disable_overscan=0

To Raspberry Pi 4 (armv8) use kernel8.img:

arm_64bit=1
kernel=kernel8.img
disable_overscan=0

Disable console s0

Comment out the s0 console (serial) for fix message in dmesg: "INIT: Id" s0 "respawning too fast".

root #vi /mnt/funtoo/etc/inittab
# SERIAL CONSOLES
#s0:12345:respawn:/sbin/agetty 9600 ttyS0 vt100
#s1:12345:respawn:/sbin/agetty 9600 ttyS1 vt100

Raspberry Pi Userland

Get Raspberry Pi userspace tools and libraries (VCGENCMD).

Please read Raspberry Pi Userland (VCGENCMD) for general information about installing VCGENCMD on Funtoo Linux on ARMv6j architecture.


Portage

Update your portage treeː

root # ego --sync

Video FB

Please set -video_cards_omapfb on USE (make.conf) to solve many problems on emerge x11-base/xorg-drivers

Enabling networking on boot

Raspberry Pi 3 WiFi

If you have a Raspberry Pi 3, you will need to create the directory /lib/firmware/brcm and copy all the files located at https://github.com/RPi-Distro/firmware-nonfree/tree/master/brcm80211/brcm into this directory. This will provide the necessary binary firmware for WiFi to function at boot time.

   Note

It is recommended that you emerge wireless-tools and use the iwconfig command to see if Power Management is set to on. If so, use the command iwconfig wlan0 power off in a local startup script to disable wireless power management. This will solve intermittent connectivity issues (WiFi going in/out) over WiFi.

Please consult Funtoo Linux Networking for information regarding network configuration.

Select profile

Funtoo Linux has a different profile than Gentoo. Correct arch , subarch and build will be already set. More information can be found by typing epro show. For more information, see Funtoo Profiles.