|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
%global firmware_tag 1.20250127
|
|
|
|
|
%global version_tag 20250127
|
|
|
|
|
%global commit_firmware_long 734829e3525e5baea62d1deedbe65eb60f4fb36b
|
|
|
|
|
%global version_tag 20240423
|
|
|
|
|
|
|
|
|
|
ExclusiveArch: aarch64
|
|
|
|
|
|
|
|
|
@ -19,16 +19,7 @@ ExclusiveArch: aarch64
|
|
|
|
|
%define ksuffix 4
|
|
|
|
|
|
|
|
|
|
%define kversion 6.6
|
|
|
|
|
%define patchlevel 74
|
|
|
|
|
|
|
|
|
|
# standard kernel
|
|
|
|
|
%define with_up %{?_without_up: 0} %{?!_without_up: 1}
|
|
|
|
|
# tools
|
|
|
|
|
%define with_tools %{?_without_tools: 0} %{?!_without_tools: 1}
|
|
|
|
|
# firmware
|
|
|
|
|
%define with_firmware %{?_without_firmware: 0} %{?!_without_firmware: 1}
|
|
|
|
|
# kernel-headers
|
|
|
|
|
%define with_headers %{?_without_headers: 0} %{?!_without_headers: 1}
|
|
|
|
|
%define patchlevel 28
|
|
|
|
|
|
|
|
|
|
Name: raspberrypi%{rpisuffix}
|
|
|
|
|
Version: %{kversion}.%{patchlevel}
|
|
|
|
@ -38,13 +29,9 @@ Summary: Specific kernel and bootcode for Raspberry Pi
|
|
|
|
|
License: GPLv2
|
|
|
|
|
URL: https://github.com/raspberrypi/linux
|
|
|
|
|
Source0: https://github.com/raspberrypi/linux/archive/refs/tags/stable_%{version_tag}.tar.gz
|
|
|
|
|
Source1: https://github.com/raspberrypi/firmware/archive/refs/tags/%{firmware_tag}.tar.gz
|
|
|
|
|
Source1: https://github.com/raspberrypi/firmware/archive/%{commit_firmware_long}.tar.gz
|
|
|
|
|
Patch100: config_2711.patch
|
|
|
|
|
Patch101: config_2712.patch
|
|
|
|
|
# Sources for kernel-tools
|
|
|
|
|
Source2000: cpupower.service
|
|
|
|
|
Source2001: cpupower.config
|
|
|
|
|
Source2002: kvm_stat.logrotate
|
|
|
|
|
|
|
|
|
|
BuildRequires: kmod, patch, bash, coreutils, tar
|
|
|
|
|
BuildRequires: bzip2, xz, findutils, gzip, m4, perl, perl-Carp, make, diffutils, gawk
|
|
|
|
@ -54,13 +41,6 @@ BuildRequires: elfutils-devel zlib-devel binutils-devel newt-devel python3-devel
|
|
|
|
|
BuildRequires: audit-libs-devel
|
|
|
|
|
BuildRequires: pciutils-devel gettext ncurses-devel
|
|
|
|
|
BuildRequires: openssl-devel
|
|
|
|
|
%if %{with_tools}
|
|
|
|
|
# kernel-tools
|
|
|
|
|
BuildRequires: asciidoc
|
|
|
|
|
%endif
|
|
|
|
|
%if %{with_headers}
|
|
|
|
|
BuildRequires: rsync
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
Specific kernel and bootcode for Raspberry Pi
|
|
|
|
@ -69,8 +49,8 @@ Specific kernel and bootcode for Raspberry Pi
|
|
|
|
|
Group: System Environment/Kernel
|
|
|
|
|
Summary: The Linux kernel
|
|
|
|
|
Provides: kernel = %{version}-%{release}
|
|
|
|
|
Provides: installonlypkg(kernel)
|
|
|
|
|
Requires: coreutils
|
|
|
|
|
#Requires: dracut
|
|
|
|
|
|
|
|
|
|
%description kernel%{?ksuffix}
|
|
|
|
|
The kernel package contains the Linux kernel (vmlinuz), the core of any
|
|
|
|
@ -83,7 +63,6 @@ Group: System Environment/Kernel
|
|
|
|
|
Summary: Development package for building kernel modules to match the kernel
|
|
|
|
|
Provides: kernel-devel = %{version}-%{release}
|
|
|
|
|
Provides: kernel-devel-uname-r = %{version}-%{release}
|
|
|
|
|
Provides: installonlypkg(kernel)
|
|
|
|
|
Autoreq: no
|
|
|
|
|
Requires(pre): findutils
|
|
|
|
|
Requires: findutils
|
|
|
|
@ -93,46 +72,7 @@ Requires: perl-interpreter
|
|
|
|
|
This package provides kernel headers and makefiles sufficient to build modules
|
|
|
|
|
against the kernel package.
|
|
|
|
|
|
|
|
|
|
%if %{with_tools}
|
|
|
|
|
%package kernel%{?ksuffix}-tools
|
|
|
|
|
Summary: Assortment of tools for the Linux kernel
|
|
|
|
|
Provides: cpupowerutils = 1:009-0.6.p1
|
|
|
|
|
Obsoletes: cpupowerutils < 1:009-0.6.p1
|
|
|
|
|
Provides: cpufreq-utils = 1:009-0.6.p1
|
|
|
|
|
Provides: cpufrequtils = 1:009-0.6.p1
|
|
|
|
|
Obsoletes: cpufreq-utils < 1:009-0.6.p1
|
|
|
|
|
Obsoletes: cpufrequtils < 1:009-0.6.p1
|
|
|
|
|
Obsoletes: cpuspeed < 1:1.5-16
|
|
|
|
|
Requires: %{name}-kernel%{?ksuffix}-tools-libs = %{version}-%{release}
|
|
|
|
|
Obsoletes: kernel-tools < %{version}
|
|
|
|
|
Provides: kernel-tools = %{version}-%{release}
|
|
|
|
|
%define __requires_exclude ^%{_bindir}/python
|
|
|
|
|
%description kernel%{?ksuffix}-tools
|
|
|
|
|
This package contains the tools/ directory from the kernel source
|
|
|
|
|
and the supporting documentation.
|
|
|
|
|
|
|
|
|
|
%package kernel%{?ksuffix}-tools-libs
|
|
|
|
|
Summary: Libraries for the kernels-tools
|
|
|
|
|
Obsoletes: kernel-tools-libs < %{version}
|
|
|
|
|
Provides: kernel-tools-libs = %{version}-%{release}
|
|
|
|
|
%description kernel%{?ksuffix}-tools-libs
|
|
|
|
|
This package contains the libraries built from the tools/ directory
|
|
|
|
|
from the kernel source.
|
|
|
|
|
|
|
|
|
|
%package kernel%{?ksuffix}-tools-libs-devel
|
|
|
|
|
Summary: Assortment of tools for the Linux kernel
|
|
|
|
|
Requires: %{name}-kernel%{?ksuffix}-tools = %{version}-%{release}
|
|
|
|
|
Provides: cpupowerutils-devel = 1:009-0.6.p1
|
|
|
|
|
Obsoletes: cpupowerutils-devel < 1:009-0.6.p1
|
|
|
|
|
Requires: %{name}-kernel%{?ksuffix}-tools-libs = %{version}-%{release}
|
|
|
|
|
Obsoletes: kernel-tools-libs-devel < %{version}
|
|
|
|
|
Provides: kernel-tools-libs-devel = %{version}-%{release}
|
|
|
|
|
%description kernel%{?ksuffix}-tools-libs-devel
|
|
|
|
|
This package contains the development files for the tools/ directory from
|
|
|
|
|
the kernel source.
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{with_firmware}
|
|
|
|
|
%package firmware
|
|
|
|
|
Summary: GPU firmware for the Raspberry Pi computer
|
|
|
|
|
License: Redistributable, with restrictions; see LICENSE.broadcom
|
|
|
|
@ -144,23 +84,7 @@ Provides: grubby=8.40-10
|
|
|
|
|
%description firmware
|
|
|
|
|
This package contains the GPU firmware for the Raspberry Pi BCM2835 SOC
|
|
|
|
|
including the kernel bootloader.
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{with_headers}
|
|
|
|
|
%package kernel%{?ksuffix}-headers
|
|
|
|
|
Obsoletes: kernel-headers < %{version}
|
|
|
|
|
Provides: kernel-headers = %{version}-%{release}
|
|
|
|
|
Obsoletes: glibc-kernheaders < 3.0-46
|
|
|
|
|
Provides: glibc-kernheaders = 3.0-46
|
|
|
|
|
Summary: Header files for the Linux kernel for use by glibc
|
|
|
|
|
|
|
|
|
|
%description kernel%{?ksuffix}-headers
|
|
|
|
|
Kernel-headers includes the C header files that specify the interface
|
|
|
|
|
between the Linux kernel and userspace libraries and programs. The
|
|
|
|
|
header files define structures and constants that are needed for
|
|
|
|
|
building most standard programs and are also needed for rebuilding the
|
|
|
|
|
glibc package.
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n linux-stable_%{version_tag}
|
|
|
|
@ -186,29 +110,9 @@ pathfix.py -pni "%{__python3} %{py3_shbang_opts}" tools/ tools/perf/scripts/pyth
|
|
|
|
|
# to support both RPi 4 and 5.
|
|
|
|
|
export KERNEL=kernel%{armtarget}
|
|
|
|
|
make bcm%{bcmmodel}_defconfig
|
|
|
|
|
%if %{with_up}
|
|
|
|
|
make %{?_smp_mflags} HOSTCFLAGS="%{?build_cflags}" HOSTLDFLAGS="%{?build_ldflags}" %{build_image} modules dtbs
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# kernel-tools
|
|
|
|
|
%if %{with_tools}
|
|
|
|
|
make %{?_smp_mflags} -C tools/power/cpupower CPUFREQ_BENCH=false DEBUG=false
|
|
|
|
|
pushd tools/thermal/tmon/
|
|
|
|
|
make %{?_smp_mflags} HOSTCFLAGS="%{?build_cflags}" HOSTLDFLAGS="%{?build_ldflags}"
|
|
|
|
|
popd
|
|
|
|
|
pushd tools/iio/
|
|
|
|
|
make %{?_smp_mflags} HOSTCFLAGS="%{?build_cflags}" HOSTLDFLAGS="%{?build_ldflags}"
|
|
|
|
|
popd
|
|
|
|
|
pushd tools/gpio/
|
|
|
|
|
make %{?_smp_mflags} HOSTCFLAGS="%{?build_cflags}" HOSTLDFLAGS="%{?build_ldflags}"
|
|
|
|
|
popd
|
|
|
|
|
pushd tools/mm/
|
|
|
|
|
make %{?_smp_mflags} HOSTCFLAGS="%{?build_cflags}" HOSTLDFLAGS="%{?build_ldflags}" slabinfo page_owner_sort
|
|
|
|
|
popd
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%if %{with_up}
|
|
|
|
|
# kernel
|
|
|
|
|
mkdir -p %{buildroot}/boot/overlays/
|
|
|
|
|
mkdir -p %{buildroot}/usr/share/%{name}-kernel/%{version}-%{release}/boot/overlays
|
|
|
|
@ -266,77 +170,17 @@ touch -r %{buildroot}$DevelDir/Makefile %{buildroot}$DevelDir/include/linux/vers
|
|
|
|
|
ln -T -s $DevelDir %{buildroot}/lib/modules/%{version}-%{release}/build --force
|
|
|
|
|
ln -T -s build %{buildroot}/lib/modules/%{version}-%{release}/source --force
|
|
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{with_firmware}
|
|
|
|
|
# firmware
|
|
|
|
|
# precompiled GPU firmware and bootloader
|
|
|
|
|
pushd %{buildroot}
|
|
|
|
|
tar -xf %{_sourcedir}/%{firmware_tag}.tar.gz \
|
|
|
|
|
firmware-%{firmware_tag}/boot/start* \
|
|
|
|
|
firmware-%{firmware_tag}/boot/fixup* \
|
|
|
|
|
firmware-%{firmware_tag}/boot/LICENCE.broadcom \
|
|
|
|
|
firmware-%{firmware_tag}/boot/bootcode.bin \
|
|
|
|
|
tar -xf %{_sourcedir}/%{commit_firmware_long}.tar.gz \
|
|
|
|
|
firmware-%{commit_firmware_long}/boot/start* \
|
|
|
|
|
firmware-%{commit_firmware_long}/boot/fixup* \
|
|
|
|
|
firmware-%{commit_firmware_long}/boot/LICENCE.broadcom \
|
|
|
|
|
firmware-%{commit_firmware_long}/boot/bootcode.bin \
|
|
|
|
|
--strip-components=1
|
|
|
|
|
%{__chmod} -x %{buildroot}/boot/start*.elf
|
|
|
|
|
popd
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{with_tools}
|
|
|
|
|
# kernel-tools
|
|
|
|
|
make -C tools/power/cpupower DESTDIR=$RPM_BUILD_ROOT libdir=%{_libdir} mandir=%{_mandir} CPUFREQ_BENCH=false install
|
|
|
|
|
rm -f %{buildroot}%{_libdir}/*.{a,la}
|
|
|
|
|
%find_lang cpupower
|
|
|
|
|
|
|
|
|
|
install -D -m644 %{SOURCE2000} %{buildroot}%{_unitdir}/cpupower.service
|
|
|
|
|
install -D -m644 %{SOURCE2001} %{buildroot}%{_sysconfdir}/sysconfig/cpupower
|
|
|
|
|
pushd tools/thermal/tmon
|
|
|
|
|
make INSTALL_ROOT=%{buildroot} install
|
|
|
|
|
popd
|
|
|
|
|
pushd tools/iio
|
|
|
|
|
make DESTDIR=%{buildroot} install
|
|
|
|
|
popd
|
|
|
|
|
pushd tools/gpio
|
|
|
|
|
make DESTDIR=%{buildroot} install
|
|
|
|
|
popd
|
|
|
|
|
install -m644 -D %{SOURCE2002} %{buildroot}%{_sysconfdir}/logrotate.d/kvm_stat
|
|
|
|
|
pushd tools/kvm/kvm_stat
|
|
|
|
|
%{__make} INSTALL_ROOT=%{buildroot} install-tools
|
|
|
|
|
%{__make} INSTALL_ROOT=%{buildroot} install-man
|
|
|
|
|
install -m644 -D kvm_stat.service %{buildroot}%{_unitdir}/kvm_stat.service
|
|
|
|
|
popd
|
|
|
|
|
pushd tools/mm/
|
|
|
|
|
install -m755 slabinfo %{buildroot}%{_bindir}/slabinfo
|
|
|
|
|
install -m755 page_owner_sort %{buildroot}%{_bindir}/page_owner_sort
|
|
|
|
|
popd
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{with_headers}
|
|
|
|
|
%{__make} ARCH=%{Arch} INSTALL_HDR_PATH=%{buildroot}/usr headers_install
|
|
|
|
|
|
|
|
|
|
find %{buildroot}/usr/include \
|
|
|
|
|
\( -name .install -o -name .check -o \
|
|
|
|
|
-name ..install.cmd -o -name ..check.cmd \) -delete
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{with_tools}
|
|
|
|
|
%post kernel%{?ksuffix}-tools
|
|
|
|
|
%systemd_post cpupower.service
|
|
|
|
|
|
|
|
|
|
%preun kernel%{?ksuffix}-tools
|
|
|
|
|
%systemd_preun cpupower.service
|
|
|
|
|
|
|
|
|
|
%postun kernel%{?ksuffix}-tools
|
|
|
|
|
%systemd_postun cpupower.service
|
|
|
|
|
|
|
|
|
|
%post kernel%{?ksuffix}-tools-libs
|
|
|
|
|
/sbin/ldconfig
|
|
|
|
|
|
|
|
|
|
%postun kernel%{?ksuffix}-tools-libs
|
|
|
|
|
/sbin/ldconfig
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{with_up}
|
|
|
|
|
%files kernel%{?ksuffix}
|
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
|
/lib/modules/%{version}-%{release}
|
|
|
|
@ -361,6 +205,7 @@ fi
|
|
|
|
|
cp /usr/share/%{name}-kernel/%{version}-%{release}/boot/*.dtb /boot/
|
|
|
|
|
cp /usr/share/%{name}-kernel/%{version}-%{release}/boot/overlays/*.dtb* /boot/overlays/
|
|
|
|
|
cp /usr/share/%{name}-kernel/%{version}-%{release}/boot/overlays/README /boot/overlays/
|
|
|
|
|
/usr/bin/dracut /boot/initramfs-%{version}-%{release}.img %{version}-%{release}
|
|
|
|
|
cp /boot/config-kernel-%{version}-%{release}.inc /boot/config-kernel.inc
|
|
|
|
|
|
|
|
|
|
%postun kernel%{?ksuffix}
|
|
|
|
@ -377,85 +222,16 @@ cp $(ls -1 /boot/config-kernel-*-*|sort -V|tail -1) /boot/config-kernel.inc
|
|
|
|
|
%files kernel%{?ksuffix}-devel
|
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
/usr/src/kernels/%{version}-%{release}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{with_tools}
|
|
|
|
|
%files kernel%{?ksuffix}-tools -f cpupower.lang
|
|
|
|
|
%{_bindir}/cpupower
|
|
|
|
|
%{_datadir}/bash-completion/completions/cpupower
|
|
|
|
|
%{_unitdir}/cpupower.service
|
|
|
|
|
%{_mandir}/man[1-8]/cpupower*
|
|
|
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/cpupower
|
|
|
|
|
%{_bindir}/tmon
|
|
|
|
|
%{_bindir}/iio_event_monitor
|
|
|
|
|
%{_bindir}/iio_generic_buffer
|
|
|
|
|
%{_bindir}/lsiio
|
|
|
|
|
%{_bindir}/lsgpio
|
|
|
|
|
%{_bindir}/gpio-hammer
|
|
|
|
|
%{_bindir}/gpio-event-mon
|
|
|
|
|
%{_bindir}/gpio-watch
|
|
|
|
|
%{_mandir}/man1/kvm_stat*
|
|
|
|
|
%{_bindir}/kvm_stat
|
|
|
|
|
%{_unitdir}/kvm_stat.service
|
|
|
|
|
%config(noreplace) %{_sysconfdir}/logrotate.d/kvm_stat
|
|
|
|
|
%{_bindir}/page_owner_sort
|
|
|
|
|
%{_bindir}/slabinfo
|
|
|
|
|
|
|
|
|
|
%files kernel%{?ksuffix}-tools-libs
|
|
|
|
|
%{_libdir}/libcpupower.so.1
|
|
|
|
|
%{_libdir}/libcpupower.so.0.0.1
|
|
|
|
|
|
|
|
|
|
%files kernel%{?ksuffix}-tools-libs-devel
|
|
|
|
|
%{_libdir}/libcpupower.so
|
|
|
|
|
%{_includedir}/cpufreq.h
|
|
|
|
|
%{_includedir}/cpuidle.h
|
|
|
|
|
%{_includedir}/powercap.h
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{with_firmware}
|
|
|
|
|
%files firmware
|
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
|
/boot/bootcode.bin
|
|
|
|
|
/boot/fixup*
|
|
|
|
|
/boot/start*
|
|
|
|
|
%doc /boot/LICENCE.broadcom
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{with_headers}
|
|
|
|
|
%files kernel%{?ksuffix}-headers
|
|
|
|
|
/usr/include/*
|
|
|
|
|
%exclude %{_includedir}/cpufreq.h
|
|
|
|
|
%exclude %{_includedir}/internal/
|
|
|
|
|
%exclude %{_includedir}/perf/
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Thu Feb 20 2025 Koichiro Iwao <meta@almalinux.org> - 6.6.74-20250127.v8.1
|
|
|
|
|
- Update kernel to v6.6.74 stable_20250127
|
|
|
|
|
- Update firmware to 1.20250127
|
|
|
|
|
- Remove dracut as initramfs is not needed (mentioned in 4.4.21-2)
|
|
|
|
|
|
|
|
|
|
* Mon Oct 21 2024 Koichiro Iwao <meta@almalinux.org> - 6.6.51-20241008.v8.1
|
|
|
|
|
- Update kernel to version v6.6.51 stable_20241008
|
|
|
|
|
- Update firmware to 1.20241008
|
|
|
|
|
|
|
|
|
|
* Thu Sep 05 2024 Koichiro Iwao <meta@almalinux.org> - 6.6.31-20240529.v8.4
|
|
|
|
|
- Add kernel-headers subpackage
|
|
|
|
|
|
|
|
|
|
* Fri Aug 30 2024 Andrew Lukoshko <alukoshko@almalinux.org> - 6.6.31-20240529.v8.3
|
|
|
|
|
- Fix kernel-tools dependencies
|
|
|
|
|
|
|
|
|
|
* Thu Jun 20 2024 Koichiro Iwao <meta@almalinux.org> - 6.6.31-20240529.v8.2
|
|
|
|
|
- Add kernel-tools to optimize CPU clock (cpupower.service)
|
|
|
|
|
|
|
|
|
|
* Mon Jun 10 2024 Koichiro Iwao <meta@almalinux.org> - 6.6.31-20240529.v8.1
|
|
|
|
|
- Update to v6.6.31 stable_20240529
|
|
|
|
|
|
|
|
|
|
* Tue Jun 04 2024 Koichiro Iwao <meta@almalinux.org> - 6.6.28-20240423.v8.2
|
|
|
|
|
- Add installonlypkg(kernel) to kernel and -devel subpackages
|
|
|
|
|
Resolves: https://github.com/AlmaLinux/raspberry-pi/issues/39
|
|
|
|
|
See also: https://src.fedoraproject.org/rpms/kernel/c/aba3940
|
|
|
|
|
|
|
|
|
|
* Thu May 30 2024 Koichiro Iwao <meta@almalinux.org> - 6.6.28-20240423.v8.1
|
|
|
|
|
- Update to version v6.6.28
|
|
|
|
|
- Support both Raspberry Pi 4 and 5
|
|
|
|
|