Edit Info Other
Login

RaspberryPi"

Differences between revisions 1 and 16 (spanning 15 versions)
Revision 1 as of 2021-01-31 08:26:42
Size: 1648
Comment:
Revision 16 as of 2022-05-11 18:00:54
Size: 4824
Editor: DamianWrobel
Comment: Small improvements.
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was renamed from Howto/RaspberryPI
Line 3: Line 4:
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 8Gio of RAM. It's recommended to use the 32bit version over the 64bit.
For graphics usage, it's really recommended to have a Raspberry Pi 4 which default to the vc4/v3d driver.
This documentation is about using Raspberry Pi Foundation [[https://github.com/raspberrypi/linux|downstream kernel]] and components from Fedora userspace.
The Workstation flavor is recommended for the Raspberry Pi 4 B/400 with >=4GB RAM platform. The Server flavor is usable on starting from Raspberry Pi 3 B/B+.
Line 8: Line 7:
It's possible to use a Fedora official image as a base, then later install additional repositories. 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 36 files with the following modifications:
 || component || Repositories || comment ||
 || kernel || [[https://github.com/dwrobel/kernel|spec]] / [[https://copr.fedorainfracloud.org/coprs/dwrobel/kernel-rpi/|copr]] || Downstream kernel ||
 || bcm434xx-firmware || [[https://github.com/dwrobel/bcm434xx-firmware|spec]] / [[https://copr.fedorainfracloud.org/coprs/dwrobel/bcm434xx-firmware-rpi/|copr]] || ||
 || bcm283x-firmware || [[https://github.com/dwrobel/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 (f36) ==
The location of pre-generated images for Fedora 36 can be found below:
|| Flavor || aarch64 ||
|| Server || [[https://ufile.io/c6n3zb9t|image]] / [[https://ufile.io/c4rpjloz|checksum]] ||
|| Workstation || [[https://ufile.io/1y6cx8g3|image]] / [[https://ufile.io/tx17t1zi|checksum]] ||

== Pre-built images (f35) ==
The location of pre-generated images for Fedora 35 can be found below:
|| Flavor || armv7hl || aarch64 ||
|| Server || [[https://ufile.io/xwct0pos|image]] / [[https://ufile.io/tcyz1s9r|checksum]] || [[https://ufile.io/6teewe5w|image]] / [[https://ufile.io/2iab9mrg|checksum]] ||
|| Workstation || [[https://ufile.io/c5cz2v4m|image]] / [[https://ufile.io/3kscqxbm|checksum]] || [[https://ufile.io/mxsod6xj|image]] / [[https://ufile.io/pbnfyvbq|checksum]] ||
Line 11: Line 32:
== Using downstream kernel on Fedora ==
* For Fedora 32+ and CentOS 8:
== Updating Raspberry Pi 4 bootloader EEPROM ==

Follow the gist available at: [[https://gist.github.com/dwrobel/266ad5d4e59b05ea26d8bb6725118578|https://gist.github.com/dwrobel/266ad5d4e59b05ea26d8bb6725118578]].


== 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.
Line 14: Line 45:
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
sudo growpart -u on /dev/mmcblk0 2
sudo btrfs filesystem resize max /
Line 19: Line 49:
== Using RPM Fusion RPI Repositories on Fedora ==
* For Fedora 32 and later:
=== Sysctl (RPi 3 only) ===
Line 22: Line 51:
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
# set vm.min_free_kbytes for rpi
cat>/etc/sysctl.d/98-rpi.conf<<EOF
vm.min_free_kbytes = 16384
EOF
Line 26: Line 57:
== Known issues ==
Line 27: Line 59:
== Using dedicated RPI Images ==
* https://bintray.com/dwrobel/fda-images
* https://pagure.io/fork/dwrobel/fedora-kickstarts
=== uboot-tools prevents clean update of kernel packages ===
The "/usr/lib/kernel/install.d/10-devicetree.install" script from uboot-tools package prevents older kernel packages from being removed cleanly during update:
{{{
  Erasing : kernel-core-5.10.35-1.rpi.fc33.armv7hl
  warning: file /lib/modules/5.10.35-1.rpi.fc33.armv7hl/modules.builtin.alias.bin: remove failed: No such file or directory
}}}
To mitigate it run the following command:
{{{
$ echo "FIRMWAREDT=True" | sudo tee /etc/u-boot.conf
}}}
Line 31: Line 70:
=== CMA memory allocation issue with graphics on the Pi3 using vc4 ===
 The best is to disable vc4 (will be unaccelerated).
Line 32: Line 73:
== Known issue ==
 * There is a CMA memory allocation issue with graphics on the Pi3 using vc4, best is to disable vc4 (will be un-accelerated).
Line 37: Line 76:
 * You can report to our bugzilla, see [[ReportingBugs]]

About this Howto

This documentation is about using Raspberry Pi Foundation downstream kernel and components from Fedora userspace. The Workstation flavor is recommended for the Raspberry Pi 4 B/400 with >=4GB RAM platform. The Server flavor is usable on starting from Raspberry Pi 3 B/B+.

Kickstart files

Kickstart files are located at https://pagure.io/fork/dwrobel/fedora-kickstarts repository and are based on the original Fedora 36 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 (f36)

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

Flavor

aarch64

Server

image / checksum

Workstation

image / checksum

Pre-built images (f35)

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

Flavor

armv7hl

aarch64

Server

image / checksum

image / checksum

Workstation

image / checksum

image / checksum

Updating Raspberry Pi 4 bootloader EEPROM

Follow the gist available at: https://gist.github.com/dwrobel/266ad5d4e59b05ea26d8bb6725118578.

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 (RPi 3 only)

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

Known issues

uboot-tools prevents clean update of kernel packages

The "/usr/lib/kernel/install.d/10-devicetree.install" script from uboot-tools package prevents older kernel packages from being removed cleanly during update:

  Erasing          : kernel-core-5.10.35-1.rpi.fc33.armv7hl
  warning: file /lib/modules/5.10.35-1.rpi.fc33.armv7hl/modules.builtin.alias.bin: remove failed: No such file or directory

To mitigate it run the following command:

$ echo "FIRMWAREDT=True" | sudo tee /etc/u-boot.conf

CMA memory allocation issue with graphics on the Pi3 using vc4

  • The best is to disable vc4 (will be unaccelerated).

Bug Report


CategoryHowto

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