Edit Info Other
Login

RaspberryPi"

Differences between revisions 8 and 10 (spanning 2 versions)
Revision 8 as of 2021-04-11 19:34:59
Size: 2051
Comment:
Revision 10 as of 2021-04-28 16:33:48
Size: 4357
Editor: DamianWrobel
Comment: Update for Fedora 34
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
Unless using a Raspberry Pi 4 with 8Gio of RAM. It's recommended to use the 32bit version over the 64bit. Unless using a Raspberry Pi 4 with 4G of RAM. It's recommended to use the 32bit version over the 64bit (especially for the Workstation flavor).
Line 9: Line 9:
It's possible to use a Fedora official image as a base, then install additional repositories and adjust configuration. Or use the dedicated images. == Kickstart files ==
Kickstart files are located at [[https://pagure.io/fork/dwrobel/fedora-kickstarts||fedora-kickstarts]] repository and are based on the original
Fedora 34 files with the following modifications:
 || component || Repositories || comment ||
 || kernel || [[https://github.com/fedberry/kernel|spec]] / [[https://copr.fedorainfracloud.org/coprs/dwrobel/kernel-rpi/|copr]] || Downstream kernel ||
 || bcm434xx-firmware || [[https://github.com/fedberry/bcm434xx-firmware|spec]] / [[https://copr.fedorainfracloud.org/coprs/dwrobel/bcm434xx-firmware-rpi/|copr]] || ||
 || bcm283x-firmware || [[https://github.com/fedberry/bcm283x-firmware|spec]] / [[https://copr.fedorainfracloud.org/coprs/dwrobel/bcm283x-firmware-rpi/|copr]] || ||
 || pykickstart || [[https://github.com/pykickstart/pykickstart/pull/275|PR]] / [[https://copr.fedorainfracloud.org/coprs/dwrobel/pykickstart/|copr]] || Adds --priority=<priority> ||
 || livecd-tools || [[https://github.com/livecd-tools/livecd-tools/pull/134|PR]] / [[https://copr.fedorainfracloud.org/coprs/dwrobel/livecd-tools/|copr]] || Adds support for repository 'priority' configuration ||

The modifications in livecd-tools and pykickstart allows to generate image with selected downstream kernel (despite it has lower version) over the upstream one. On a system, all aforementioned repositories are installed with '''priority=50''' option to instruct 'dnf' to choose packages from this repository, rather then Fedora default.

== Pre-built images ==
The location of pre-generated images for Fedora 34 can be found below:
|| Flavor || armv7hl || aarch64 ||
|| Server || [[https://ufile.io/wrl7a4da|image]] / [[https://ufile.io/owge1viq|checksum]] || [[https://ufile.io/r6rgxgly|image]] / [[https://ufile.io/so323qhp|checksum]] ||
|| Workstation || [[https://ufile.io/otlgmdid|image]] / [[https://ufile.io/uk0xfn57|checksum]] || [[https://ufile.io/124nh3c9|image]] / [[https://ufile.io/8039e7wa|checksum]] ||
Line 12: Line 28:
== Using downstream kernel on Fedora ==
 * For Fedora 32+ and CentOS 8: (available as aarch64 only)
{{{
sudo dnf copr enable dwrobel/kernel-rpi
sudo dnf install kernel #you might need to mention the extact kernel to use
sudo dnf install kernel-rpi4 # for the raspberry-pi 4
}}}

== Using RPM Fusion RPI Repositories on Fedora ==
 * For Fedora 32 and later: (available as armv7hl and aarch64).
== Raspberry Pi specific RPM Fusion RPI Repositories on Fedora ==
Line 28: Line 35:
== Using dedicated RPI Images ==
 * https://bintray.com/dwrobel/fda-images
 * https://pagure.io/fork/dwrobel/fedora-kickstarts

Line 35: Line 37:
git clone https://github.com/raspberrypi/rpi-eeprom.git
cd rpi-eeprom
Line 40: Line 44:
=== Booting from external USB drive ===
Write the image to the external drive, then mount the filesystem and change '''root=/dev/mmcblk0p2''' to '''root=/dev/sda2''' in the '''/boot/efi/cmdline.txt'''.

=== Resizing filesystem ===
After booting the system, please consider to resize the filesystem.
The following example assumes system booted from internal SD card.
{{{
sudo growpart -u on /dev/mmcblk0 2
sudo btrfs filesystem resize max /
}}}
Line 41: Line 56:
{{{
Line 45: Line 61:
}}}

About this Howto

This documentation is about using Raspberry Pi Foundation "downstream kernel" and components on a Fedora (or CentOS) userspace. As with Fedora, this process is compatible with Raspberry Pi 2 and later model (No original Raspberry Pi or Pi Zero support is planned). Unless using a Raspberry Pi 4 with 4G of RAM. It's recommended to use the 32bit version over the 64bit (especially for the Workstation flavor). For graphics usage, it's really recommended to have a Raspberry Pi 4 which default to the vc4/v3d driver.

Kickstart files

Kickstart files are located at https://pagure.io/fork/dwrobel/fedora-kickstarts repository and are based on the original Fedora 34 files with the following modifications:

  • component

    Repositories

    comment

    kernel

    spec / copr

    Downstream kernel

    bcm434xx-firmware

    spec / copr

    bcm283x-firmware

    spec / copr

    pykickstart

    PR / copr

    Adds --priority=<priority>

    livecd-tools

    PR / copr

    Adds support for repository 'priority' configuration

The modifications in livecd-tools and pykickstart allows to generate image with selected downstream kernel (despite it has lower version) over the upstream one. On a system, all aforementioned repositories are installed with priority=50 option to instruct 'dnf' to choose packages from this repository, rather then Fedora default.

Pre-built images

The location of pre-generated images for Fedora 34 can be found below:

Flavor

armv7hl

aarch64

Server

image / checksum

image / checksum

Workstation

image / checksum

image / checksum

Raspberry Pi specific RPM Fusion RPI Repositories on Fedora

sudo dnf config-manager --add-repo=https://mirrors.rpmfusion.org/free/fedora/rpi/rpmfusion-rpi.repo
sudo dnf install raspberrypi-vc-utils raspberrypi-vc-libs

Updating the eeprom on RPI4

git clone https://github.com/raspberrypi/rpi-eeprom.git
cd rpi-eeprom
sudo ./rpi-eeprom-update 

Configurations

Booting from external USB drive

Write the image to the external drive, then mount the filesystem and change root=/dev/mmcblk0p2 to root=/dev/sda2 in the /boot/efi/cmdline.txt.

Resizing filesystem

After booting the system, please consider to resize the filesystem. The following example assumes system booted from internal SD card.

sudo growpart -u on /dev/mmcblk0 2
sudo btrfs filesystem resize max /

Sysctl

# set vm.min_free_kbytes for rpi
cat>/etc/sysctl.d/98-rpi.conf<<EOF
vm.min_free_kbytes = 16384
EOF

Known issues

  • There is a CMA memory allocation issue with graphics on the Pi3 using vc4, best is to disable vc4 (will be un-accelerated).

Bug Report


CategoryHowto

Howto/RaspberryPi (last edited 2024-04-24 07:23:36 by DamianWrobel)