Sync from SUSE:SLFO:Main raspberrypi-firmware revision 05acb0beb45ceb909bb9d8fb13b110bc
This commit is contained in:
commit
e98e7caf29
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
5
_multibuild
Normal file
5
_multibuild
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<multibuild>
|
||||||
|
<package>raspberrypi-firmware-config</package>
|
||||||
|
<package>raspberrypi-firmware-config-camera</package>
|
||||||
|
</multibuild>
|
||||||
|
|
97
config.txt
Normal file
97
config.txt
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
# Get more options/information on http://elinux.org/RPiconfig
|
||||||
|
# or on https://www.raspberrypi.com/documentation/computers/configuration.html
|
||||||
|
#
|
||||||
|
# !!!!! This file will get overwritten by updates. Please use !!!!!
|
||||||
|
# !!!!! extraconfig.txt if you want to set additional !!!!!
|
||||||
|
# !!!!! configuration options or add dt overlays. !!!!!
|
||||||
|
|
||||||
|
# Our kernels are located on a Linux partition. Chainload U-Boot to load them.
|
||||||
|
kernel=u-boot.bin
|
||||||
|
|
||||||
|
# Default gpu_mem value is 76 for 1GB (or greater) and 64 for less. Min 16 - Max 512 MB
|
||||||
|
# See: https://www.raspberrypi.com/documentation/computers/config_txt.html#gpu_mem
|
||||||
|
# We don't need that much memory reserved for it, because we drive most hardware
|
||||||
|
# from Linux, not the VPU OS
|
||||||
|
gpu_mem=32
|
||||||
|
|
||||||
|
# start_x is used to enable the camera module (and must be set here - boo#1192047)
|
||||||
|
# and requires to install raspberrypi-firmware-extra or raspberrypi-firmware-extra-pi4
|
||||||
|
# start_x=1
|
||||||
|
# gpu_mem needs to be increased when start_x is used, 128 is the minimum there
|
||||||
|
# gpu_mem=128
|
||||||
|
|
||||||
|
# Turbo mode: 0 = enable dynamic freq/voltage - 1 = always max
|
||||||
|
force_turbo=0
|
||||||
|
# Start in turbo mode for 30 seconds or until cpufreq sets a frequency
|
||||||
|
initial_turbo=30
|
||||||
|
|
||||||
|
# DO NOT overvoltage manually to not void warranty!
|
||||||
|
over_voltage=0
|
||||||
|
|
||||||
|
# Fix mini UART input frequency, and setup/enable up the UART.
|
||||||
|
enable_uart=1
|
||||||
|
|
||||||
|
# Disable warning overlays as they don't work well together with linux's graphical output
|
||||||
|
avoid_warnings=1
|
||||||
|
|
||||||
|
# This overlay fixes divergences between the RPi device tree and what
|
||||||
|
# upstream provides
|
||||||
|
dtoverlay=upstream
|
||||||
|
|
||||||
|
# overscan is only needed on old TV sets and if analog gear is in the chain (e.g. DPI)
|
||||||
|
disable_overscan=1
|
||||||
|
|
||||||
|
# u-boot expects RPi's UART to have a compatible string not supported anymore in
|
||||||
|
# linux upstream, while this is fixed, make sure the name shows up in the
|
||||||
|
# device-tree. This is only needed for RPi, RPi2 and RPi0, but applied
|
||||||
|
# generally so as to avoid complexity.
|
||||||
|
dtoverlay=uboot-bcm2835-pl011
|
||||||
|
|
||||||
|
# Enables Bluetooth over the PL011 UART. Users wanting to disable it should add
|
||||||
|
# 'dtoverlay=disable-bt' in 'extraconfig.txt'.
|
||||||
|
dtoverlay=enable-bt
|
||||||
|
|
||||||
|
# Add minimal SMBIOS info
|
||||||
|
dtoverlay=smbios
|
||||||
|
|
||||||
|
[pi1]
|
||||||
|
|
||||||
|
# Max ARM freq (default 700 MHz)
|
||||||
|
arm_freq=840
|
||||||
|
|
||||||
|
# Max core (GPU) freq (default 250 MHz)
|
||||||
|
core_freq=375
|
||||||
|
|
||||||
|
# SDRAM freq (default 400)
|
||||||
|
sdram_freq=400
|
||||||
|
|
||||||
|
[pi3]
|
||||||
|
|
||||||
|
# These are not applied automatically? Needed to use respective upstream drivers.
|
||||||
|
dtoverlay=vc4-kms-v3d,cma-default
|
||||||
|
dtoverlay=dwc2
|
||||||
|
|
||||||
|
[pi4]
|
||||||
|
|
||||||
|
armstub=armstub8-rpi4.bin
|
||||||
|
# Note that the 7" DSI panel isn't supported at the moment through VC4, users
|
||||||
|
# can still use it through efifb by adding 'dtoverlay=disable-vc4' in
|
||||||
|
# 'extraconfig.txt'.
|
||||||
|
dtoverlay=vc4-kms-v3d-pi4,cma-default
|
||||||
|
dtoverlay=disable-v3d
|
||||||
|
|
||||||
|
[cm4]
|
||||||
|
|
||||||
|
# The USB interface is disabled to save power by default on CM4. Enable it
|
||||||
|
# to ease the installation process. For more information see:
|
||||||
|
# https://datasheets.raspberrypi.org/cm4/cm4-datasheet.pdf
|
||||||
|
dtoverlay=dwc2
|
||||||
|
|
||||||
|
[all]
|
||||||
|
|
||||||
|
# Allow u-boot to set arm_control
|
||||||
|
include ubootconfig.txt
|
||||||
|
|
||||||
|
# Allow user overrides of config options
|
||||||
|
include extraconfig.txt
|
||||||
|
|
32
get-from-git.sh
Normal file
32
get-from-git.sh
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# this is a huge hunk of stuff, so reuse the local repo if possible
|
||||||
|
if [ -d firmware/.git ]; then
|
||||||
|
cd firmware
|
||||||
|
git pull
|
||||||
|
cd ..
|
||||||
|
else
|
||||||
|
set -e
|
||||||
|
git clone --depth 1 https://github.com/raspberrypi/firmware.git
|
||||||
|
set +e
|
||||||
|
fi
|
||||||
|
|
||||||
|
TOPDIR=$(pwd)
|
||||||
|
SOURCES="README.md boot/LICENCE.broadcom boot/*.elf boot/*.bin boot/*.dat"
|
||||||
|
cd firmware
|
||||||
|
LINE=$(git log --format=format:"%h %ai" -- ${SOURCES}|head -n 1)
|
||||||
|
set -- $LINE
|
||||||
|
REV=$1
|
||||||
|
DATE=$2
|
||||||
|
VER=${DATE//-/.}
|
||||||
|
set -e
|
||||||
|
git archive --prefix=raspberrypi-firmware-$VER/ -o $TOPDIR/raspberrypi-firmware-${VER}.tar master -- ${SOURCES}
|
||||||
|
cd $TOPDIR
|
||||||
|
osc rm -f raspberrypi-firmware-*.tar.bz2 || true
|
||||||
|
bzip2 --force raspberrypi-firmware-${VER}.tar
|
||||||
|
osc add raspberrypi-firmware-${VER}.tar.bz2
|
||||||
|
for f in raspberrypi-firmware.spec raspberrypi-firmware-config.spec; do
|
||||||
|
sed -i "s/^Version:.*/Version: $VER/" $f
|
||||||
|
done
|
||||||
|
osc vc raspberrypi-firmware -m "Update to $REV ($DATE)"
|
||||||
|
sh pre_checkin.sh
|
7
pre_checkin.sh
Normal file
7
pre_checkin.sh
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
ln -f raspberrypi-firmware.changes raspberrypi-firmware-config.changes
|
||||||
|
ln -f raspberrypi-firmware.changes raspberrypi-firmware-config-camera.changes
|
||||||
|
cp raspberrypi-firmware-config.spec raspberrypi-firmware-config-camera.spec
|
||||||
|
sed -i "s/Name: raspberrypi-firmware-config/Name: raspberrypi-firmware-config-camera/" raspberrypi-firmware-config-camera.spec
|
||||||
|
osc service localrun format_spec_file
|
BIN
raspberrypi-firmware-2023.04.25.tar.bz2
(Stored with Git LFS)
Normal file
BIN
raspberrypi-firmware-2023.04.25.tar.bz2
(Stored with Git LFS)
Normal file
Binary file not shown.
1522
raspberrypi-firmware-config-camera.changes
Normal file
1522
raspberrypi-firmware-config-camera.changes
Normal file
File diff suppressed because it is too large
Load Diff
82
raspberrypi-firmware-config-camera.spec
Normal file
82
raspberrypi-firmware-config-camera.spec
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
#
|
||||||
|
# spec file for package raspberrypi-firmware-config-camera
|
||||||
|
#
|
||||||
|
# Copyright (c) 2023 SUSE LLC
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
Name: raspberrypi-firmware-config-camera
|
||||||
|
Version: 2023.04.25
|
||||||
|
Release: 0
|
||||||
|
Summary: Configuration for the Raspberry Pi firmware loader
|
||||||
|
License: MIT
|
||||||
|
Group: System/Boot
|
||||||
|
URL: https://github.com/raspberrypi/firmware/
|
||||||
|
Source: config.txt
|
||||||
|
BuildRequires: raspberrypi-firmware
|
||||||
|
Requires: raspberrypi-firmware = %{version}
|
||||||
|
Supplements: modalias(of:NfirmwareT*Craspberrypi%2Cbcm2835-firmwareC*)
|
||||||
|
Conflicts: kernel < 4.12.14
|
||||||
|
%if "%{name}" == "raspberrypi-firmware-config-camera"
|
||||||
|
Conflicts: raspberrypi-firmware-config
|
||||||
|
Requires: (raspberrypi-firmware-extra or raspberrypi-firmware-extra-pi4)
|
||||||
|
%else
|
||||||
|
Conflicts: raspberrypi-firmware-config-camera
|
||||||
|
%endif
|
||||||
|
Provides: raspberrypi-firmware-branding-openSUSE = %{version}
|
||||||
|
Obsoletes: raspberrypi-firmware-branding-openSUSE < %{version}
|
||||||
|
Provides: raspberrypi-firmware-config = %{version}
|
||||||
|
Provides: raspberrypi-firmware-config-rpi = %{version}
|
||||||
|
Obsoletes: raspberrypi-firmware-config-rpi < %{version}
|
||||||
|
Provides: raspberrypi-firmware-config-rpi0w = %{version}
|
||||||
|
Obsoletes: raspberrypi-firmware-config-rpi0w < %{version}
|
||||||
|
Provides: raspberrypi-firmware-config-rpi2 = %{version}
|
||||||
|
Obsoletes: raspberrypi-firmware-config-rpi2 < %{version}
|
||||||
|
Provides: raspberrypi-firmware-config-rpi3 = %{version}
|
||||||
|
Obsoletes: raspberrypi-firmware-config-rpi3 < %{version}
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description
|
||||||
|
This package configures the Raspberry Pi boot process.
|
||||||
|
2 flavors are available:
|
||||||
|
* raspberrypi-firmware-config - the default config
|
||||||
|
* raspberrypi-firmware-config-camera - the config which enables
|
||||||
|
start_x=1 and increase gpu_mem to be able to use a camera module
|
||||||
|
|
||||||
|
Note: config.txt should not be used to set manually params (gpu_mem, etc.)
|
||||||
|
please create extraconfig.txt instead.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
|
||||||
|
%build
|
||||||
|
|
||||||
|
%install
|
||||||
|
install -D -p -m 0644 %{SOURCE0} %{buildroot}/boot/vc/config.txt
|
||||||
|
%if "%{name}" == "raspberrypi-firmware-config-camera"
|
||||||
|
sed -i "s/gpu_mem=32/# gpu_mem=32/" %{buildroot}/boot/vc/config.txt
|
||||||
|
sed -i "s/# start_x=1/start_x=1/" %{buildroot}/boot/vc/config.txt
|
||||||
|
sed -i "s/# gpu_mem=128/gpu_mem=128/" %{buildroot}/boot/vc/config.txt
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%post
|
||||||
|
if mountpoint -q /boot/efi && [ ! -L /boot/efi ]; then
|
||||||
|
[ -f /boot/efi/config.txt ] && cp /boot/efi/config.txt /boot/efi/config.txt.rpmsave
|
||||||
|
cp /boot/vc/config.txt /boot/efi/config.txt
|
||||||
|
fi
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%config /boot/vc/config.txt
|
||||||
|
|
||||||
|
%changelog
|
1522
raspberrypi-firmware-config.changes
Normal file
1522
raspberrypi-firmware-config.changes
Normal file
File diff suppressed because it is too large
Load Diff
82
raspberrypi-firmware-config.spec
Normal file
82
raspberrypi-firmware-config.spec
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
#
|
||||||
|
# spec file for package raspberrypi-firmware-config
|
||||||
|
#
|
||||||
|
# Copyright (c) 2023 SUSE LLC
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
Name: raspberrypi-firmware-config
|
||||||
|
Version: 2023.04.25
|
||||||
|
Release: 0
|
||||||
|
Summary: Configuration for the Raspberry Pi firmware loader
|
||||||
|
License: MIT
|
||||||
|
Group: System/Boot
|
||||||
|
URL: https://github.com/raspberrypi/firmware/
|
||||||
|
Source: config.txt
|
||||||
|
BuildRequires: raspberrypi-firmware
|
||||||
|
Requires: raspberrypi-firmware = %{version}
|
||||||
|
Supplements: modalias(of:NfirmwareT*Craspberrypi%2Cbcm2835-firmwareC*)
|
||||||
|
Conflicts: kernel < 4.12.14
|
||||||
|
%if "%{name}" == "raspberrypi-firmware-config-camera"
|
||||||
|
Conflicts: raspberrypi-firmware-config
|
||||||
|
Requires: (raspberrypi-firmware-extra or raspberrypi-firmware-extra-pi4)
|
||||||
|
%else
|
||||||
|
Conflicts: raspberrypi-firmware-config-camera
|
||||||
|
%endif
|
||||||
|
Provides: raspberrypi-firmware-branding-openSUSE = %{version}
|
||||||
|
Obsoletes: raspberrypi-firmware-branding-openSUSE < %{version}
|
||||||
|
Provides: raspberrypi-firmware-config = %{version}
|
||||||
|
Provides: raspberrypi-firmware-config-rpi = %{version}
|
||||||
|
Obsoletes: raspberrypi-firmware-config-rpi < %{version}
|
||||||
|
Provides: raspberrypi-firmware-config-rpi0w = %{version}
|
||||||
|
Obsoletes: raspberrypi-firmware-config-rpi0w < %{version}
|
||||||
|
Provides: raspberrypi-firmware-config-rpi2 = %{version}
|
||||||
|
Obsoletes: raspberrypi-firmware-config-rpi2 < %{version}
|
||||||
|
Provides: raspberrypi-firmware-config-rpi3 = %{version}
|
||||||
|
Obsoletes: raspberrypi-firmware-config-rpi3 < %{version}
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description
|
||||||
|
This package configures the Raspberry Pi boot process.
|
||||||
|
2 flavors are available:
|
||||||
|
* raspberrypi-firmware-config - the default config
|
||||||
|
* raspberrypi-firmware-config-camera - the config which enables
|
||||||
|
start_x=1 and increase gpu_mem to be able to use a camera module
|
||||||
|
|
||||||
|
Note: config.txt should not be used to set manually params (gpu_mem, etc.)
|
||||||
|
please create extraconfig.txt instead.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
|
||||||
|
%build
|
||||||
|
|
||||||
|
%install
|
||||||
|
install -D -p -m 0644 %{SOURCE0} %{buildroot}/boot/vc/config.txt
|
||||||
|
%if "%{name}" == "raspberrypi-firmware-config-camera"
|
||||||
|
sed -i "s/gpu_mem=32/# gpu_mem=32/" %{buildroot}/boot/vc/config.txt
|
||||||
|
sed -i "s/# start_x=1/start_x=1/" %{buildroot}/boot/vc/config.txt
|
||||||
|
sed -i "s/# gpu_mem=128/gpu_mem=128/" %{buildroot}/boot/vc/config.txt
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%post
|
||||||
|
if mountpoint -q /boot/efi && [ ! -L /boot/efi ]; then
|
||||||
|
[ -f /boot/efi/config.txt ] && cp /boot/efi/config.txt /boot/efi/config.txt.rpmsave
|
||||||
|
cp /boot/vc/config.txt /boot/efi/config.txt
|
||||||
|
fi
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%config /boot/vc/config.txt
|
||||||
|
|
||||||
|
%changelog
|
2
raspberrypi-firmware-rpmlintrc
Normal file
2
raspberrypi-firmware-rpmlintrc
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# These are binaries not executed on the CPU but on the graphics card
|
||||||
|
addFilter('.*arch-independent-package-contains-binary-or-object.*/boot/vc/.*.elf')
|
1528
raspberrypi-firmware.changes
Normal file
1528
raspberrypi-firmware.changes
Normal file
File diff suppressed because it is too large
Load Diff
187
raspberrypi-firmware.spec
Normal file
187
raspberrypi-firmware.spec
Normal file
@ -0,0 +1,187 @@
|
|||||||
|
#
|
||||||
|
# spec file for package raspberrypi-firmware
|
||||||
|
#
|
||||||
|
# Copyright (c) 2023 SUSE LLC
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%if 0%{?suse_version} < 1550 && 0%{?sle_version} <= 150300
|
||||||
|
# systemd-rpm-macros is wrong in 15.3 and below
|
||||||
|
%define _modprobedir /lib/modprobe.d
|
||||||
|
%endif
|
||||||
|
%global modprobe_d_files 50-rpi3.conf
|
||||||
|
|
||||||
|
Name: raspberrypi-firmware
|
||||||
|
Version: 2023.04.25
|
||||||
|
Release: 0
|
||||||
|
Summary: Binary bootloader and firmware files for Raspberry Pi
|
||||||
|
License: SUSE-Firmware
|
||||||
|
Group: System/Boot
|
||||||
|
URL: https://github.com/raspberrypi/firmware/
|
||||||
|
Source0: raspberrypi-firmware-%{version}.tar.bz2
|
||||||
|
Source1: get-from-git.sh
|
||||||
|
Source99: %{name}-rpmlintrc
|
||||||
|
Requires(post): util-linux
|
||||||
|
Requires(preun):util-linux
|
||||||
|
Recommends: raspberrypi-firmware-config
|
||||||
|
Recommends: raspberrypi-firmware-dt
|
||||||
|
Supplements: modalias(of:NfirmwareT*Craspberrypi%2Cbcm2835-firmwareC*)
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description
|
||||||
|
Binary bootloader and firmware files for Raspberry Pi
|
||||||
|
|
||||||
|
%package extra
|
||||||
|
Summary: Extra bootloaders for Raspberry Pi
|
||||||
|
Group: System/Boot
|
||||||
|
Requires: raspberrypi-firmware = %{version}-%{release}
|
||||||
|
Requires(post): util-linux
|
||||||
|
Requires(preun):util-linux
|
||||||
|
|
||||||
|
%description extra
|
||||||
|
This package provides the console, experimental and debug
|
||||||
|
firmware files for Raspberry Pi
|
||||||
|
|
||||||
|
%package extra-pi4
|
||||||
|
Summary: Extra bootloaders for Raspberry Pi
|
||||||
|
Group: System/Boot
|
||||||
|
Requires: raspberrypi-firmware = %{version}-%{release}
|
||||||
|
Requires(post): util-linux
|
||||||
|
Requires(preun):util-linux
|
||||||
|
|
||||||
|
%description extra-pi4
|
||||||
|
This package provides the console, experimental and debug
|
||||||
|
firmware files for Raspberry Pi 4
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
|
||||||
|
%build
|
||||||
|
|
||||||
|
%install
|
||||||
|
mkdir -p %{buildroot}/boot/vc
|
||||||
|
cp -a boot/*.elf boot/*.bin boot/*.dat boot/LICENCE.broadcom %{buildroot}/boot/vc
|
||||||
|
|
||||||
|
mkdir -p %{buildroot}%{_prefix}/lib/sysctl.d/
|
||||||
|
cat > %{buildroot}%{_prefix}/lib/sysctl.d/50-rpi3.conf <<-'EOF'
|
||||||
|
# Avoid running out of DMA pages for smsc95xx (bsc#1012449)
|
||||||
|
vm.min_free_kbytes = 2048
|
||||||
|
EOF
|
||||||
|
|
||||||
|
mkdir -p %{buildroot}%{_modprobedir}/
|
||||||
|
cat > %{buildroot}%{_modprobedir}/50-rpi3.conf <<-'EOF'
|
||||||
|
# Prevent too many page allocations (bsc#1012449)
|
||||||
|
options smsc95xx turbo_mode=N
|
||||||
|
EOF
|
||||||
|
|
||||||
|
mkdir -p %{buildroot}%{_prefix}/lib/dracut/dracut.conf.d/
|
||||||
|
cat > %{buildroot}%{_prefix}/lib/dracut/dracut.conf.d/raspberrypi_modules.conf <<-'EOF'
|
||||||
|
# Add necessary kernel modules to the initrd
|
||||||
|
add_drivers+=" bcm2835_dma dwc2 " # bsc#1084272
|
||||||
|
add_drivers+=" pcie-brcmstb " # boo#1162669
|
||||||
|
EOF
|
||||||
|
|
||||||
|
%pre
|
||||||
|
# Avoid restoring outdated stuff in posttrans
|
||||||
|
for _f in %{?modprobe_d_files}; do
|
||||||
|
[ ! -f "/etc/modprobe.d/${_f}.rpmsave" ] || \
|
||||||
|
mv -f "/etc/modprobe.d/${_f}.rpmsave" "/etc/modprobe.d/${_f}.rpmsave.old" || :
|
||||||
|
done
|
||||||
|
|
||||||
|
%post
|
||||||
|
if mountpoint -q /boot/efi && [[ ! -L /boot/efi ]]; then
|
||||||
|
for f in start.elf start4.elf fixup.dat fixup4.dat bootcode.bin; do
|
||||||
|
cp /boot/vc/$f /boot/efi/
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
%preun
|
||||||
|
if [ $1 -eq 0 ] && mountpoint -q /boot/efi && [[ ! -L /boot/efi ]]; then
|
||||||
|
for f in start.elf start4.elf fixup.dat fixup4.dat bootcode.bin; do
|
||||||
|
rm -f /boot/efi/$f
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
%posttrans
|
||||||
|
# Migration of modprobe.conf files to _modprobedir
|
||||||
|
for _f in %{?modprobe_d_files}; do
|
||||||
|
[ ! -f "/etc/modprobe.d/${_f}.rpmsave" ] || \
|
||||||
|
mv -fv "/etc/modprobe.d/${_f}.rpmsave" "/etc/modprobe.d/${_f}" || :
|
||||||
|
done
|
||||||
|
|
||||||
|
%post extra
|
||||||
|
if mountpoint -q /boot/efi && [[ ! -L /boot/efi ]]; then
|
||||||
|
for suffix in _cd _db _x; do
|
||||||
|
cp /boot/vc/start${suffix}.elf /boot/efi/
|
||||||
|
cp /boot/vc/fixup${suffix}.dat /boot/efi/
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
%preun extra
|
||||||
|
if [ $1 -eq 0 ] && mountpoint -q /boot/efi && [[ ! -L /boot/efi ]]; then
|
||||||
|
for suffix in _cd _db _x; do
|
||||||
|
rm -f /boot/efi/start${suffix}.elf
|
||||||
|
rm -f /boot/efi/fixup${suffix}.dat
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
%post extra-pi4
|
||||||
|
if mountpoint -q /boot/efi && [[ ! -L /boot/efi ]]; then
|
||||||
|
for suffix in 4cd 4db 4x; do
|
||||||
|
cp /boot/vc/start${suffix}.elf /boot/efi/
|
||||||
|
cp /boot/vc/fixup${suffix}.dat /boot/efi/
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
%preun extra-pi4
|
||||||
|
if [ $1 -eq 0 ] && mountpoint -q /boot/efi && [[ ! -L /boot/efi ]]; then
|
||||||
|
for suffix in 4cd 4db 4x; do
|
||||||
|
rm -f /boot/efi/start${suffix}.elf
|
||||||
|
rm -f /boot/efi/fixup${suffix}.dat
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
%files
|
||||||
|
%license /boot/vc/LICENCE.broadcom
|
||||||
|
%dir /boot/vc
|
||||||
|
/boot/vc/start.elf
|
||||||
|
/boot/vc/start4.elf
|
||||||
|
/boot/vc/fixup.dat
|
||||||
|
/boot/vc/fixup4.dat
|
||||||
|
/boot/vc/bootcode.bin
|
||||||
|
%dir %{_prefix}/lib/dracut/
|
||||||
|
%dir %{_prefix}/lib/dracut/dracut.conf.d/
|
||||||
|
%{_prefix}/lib/dracut/dracut.conf.d/raspberrypi_modules.conf
|
||||||
|
%dir %{_modprobedir}
|
||||||
|
%{_modprobedir}/50-rpi3.conf
|
||||||
|
%dir %{_prefix}/lib/sysctl.d/
|
||||||
|
%{_prefix}/lib/sysctl.d/50-rpi3.conf
|
||||||
|
|
||||||
|
%files extra
|
||||||
|
/boot/vc/start_cd.elf
|
||||||
|
/boot/vc/start_db.elf
|
||||||
|
/boot/vc/start_x.elf
|
||||||
|
/boot/vc/fixup_cd.dat
|
||||||
|
/boot/vc/fixup_db.dat
|
||||||
|
/boot/vc/fixup_x.dat
|
||||||
|
|
||||||
|
%files extra-pi4
|
||||||
|
/boot/vc/start4cd.elf
|
||||||
|
/boot/vc/start4db.elf
|
||||||
|
/boot/vc/start4x.elf
|
||||||
|
/boot/vc/fixup4cd.dat
|
||||||
|
/boot/vc/fixup4db.dat
|
||||||
|
/boot/vc/fixup4x.dat
|
||||||
|
|
||||||
|
%changelog
|
Loading…
x
Reference in New Issue
Block a user