Compare commits

..

2 Commits

Author SHA1 Message Date
2d0fd0863b Rename specfile to raspberrypi5.spec 2024-05-24 09:10:44 +00:00
f25ac98033 Raspberry Pi 5 support 2024-05-24 09:06:26 +00:00
4 changed files with 30 additions and 163 deletions

View File

@ -1,68 +0,0 @@
From 8bdc23947dfc60f7c1e277dc4f87a8bc5fc645c6 Mon Sep 17 00:00:00 2001
From: Koichiro Iwao <meta@almalinux.org>
Date: Tue, 28 May 2024 15:11:20 +0900
Subject: [PATCH 1/2] Apply config patch for Raspberry Pi (BCM2711)
The patch is originally provided by Pablo Greco <pgreco@centosproject.org>.
Signed-off-by: Koichiro Iwao <meta@almalinux.org>
---
arch/arm64/configs/bcm2711_defconfig | 38 ++++++++++++++++++++++++++--
1 file changed, 36 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/configs/bcm2711_defconfig b/arch/arm64/configs/bcm2711_defconfig
index e87791286ab4..6fda5b261683 100644
--- a/arch/arm64/configs/bcm2711_defconfig
+++ b/arch/arm64/configs/bcm2711_defconfig
@@ -1622,8 +1622,6 @@ CONFIG_NLS_KOI8_U=m
CONFIG_DLM=m
CONFIG_KEY_DH_OPERATIONS=y
CONFIG_SECURITY=y
-CONFIG_SECURITY_APPARMOR=y
-CONFIG_LSM=""
CONFIG_CRYPTO_USER=m
CONFIG_CRYPTO_CRYPTD=m
CONFIG_CRYPTO_AES=m
@@ -1674,3 +1672,39 @@ CONFIG_SCHED_TRACER=y
CONFIG_BLK_DEV_IO_TRACE=y
# CONFIG_UPROBE_EVENTS is not set
# CONFIG_STRICT_DEVMEM is not set
+
+# CentOS/AlmaLinux added
+CONFIG_AUDIT=y
+CONFIG_NETLABEL=y
+CONFIG_NETFILTER_XT_TARGET_AUDIT=m
+CONFIG_IP_NF_SECURITY=m
+CONFIG_IP6_NF_SECURITY=m
+CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y
+CONFIG_NFSD_V4_SECURITY_LABEL=y
+CONFIG_SECURITY_NETWORK=y
+CONFIG_SECURITY_PATH=y
+CONFIG_SECURITY_SELINUX=y
+CONFIG_SECURITY_SELINUX_BOOTPARAM=y
+CONFIG_SECURITY_SELINUX_DISABLE=y
+CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
+CONFIG_NET_TEAM=m
+CONFIG_NET_TEAM_MODE_ACTIVEBACKUP=m
+CONFIG_NET_TEAM_MODE_BROADCAST=m
+CONFIG_NET_TEAM_MODE_LOADBALANCE=m
+CONFIG_NET_TEAM_MODE_RANDOM=m
+CONFIG_NET_TEAM_MODE_ROUNDROBIN=m
+CONFIG_CRYPTO_BLAKE2S=m
+CONFIG_CRYPTO_CURVE25519=m
+CONFIG_CRYPTO_LIB_BLAKE2S=m
+CONFIG_CRYPTO_LIB_CHACHA20POLY1305=m
+CONFIG_CRYPTO_LIB_CHACHA=m
+CONFIG_CRYPTO_LIB_CURVE25519=m
+CONFIG_CRYPTO_LIB_POLY1305=m
+CONFIG_CRYPTO_POLY1305_NEON=m
+# CONFIG_EFI_CUSTOM_SSDT_OVERLAYS is not set
+# CONFIG_WIREGUARD_DEBUG is not set
+CONFIG_WIREGUARD=m
+CONFIG_BLK_DEV_RBD=m
+CONFIG_FW_LOADER_COMPRESS=y
+CONFIG_FW_LOADER_COMPRESS_XZ=y
+CONFIG_FW_LOADER_COMPRESS_ZSTD=y
--
2.45.1

View File

@ -1,68 +0,0 @@
From 5ae1f73a82e6ba1203d031c5c82943865dce8174 Mon Sep 17 00:00:00 2001
From: Koichiro Iwao <meta@almalinux.org>
Date: Tue, 28 May 2024 15:14:02 +0900
Subject: [PATCH 2/2] Apply config patch for Raspberry Pi (BCM2712)
The patch is originally provided by Pablo Greco <pgreco@centosproject.org>.
Signed-off-by: Koichiro Iwao <meta@almalinux.org>
---
arch/arm64/configs/bcm2712_defconfig | 38 ++++++++++++++++++++++++++--
1 file changed, 36 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/configs/bcm2712_defconfig b/arch/arm64/configs/bcm2712_defconfig
index 79c4332581eb..7b63683ff687 100644
--- a/arch/arm64/configs/bcm2712_defconfig
+++ b/arch/arm64/configs/bcm2712_defconfig
@@ -1625,8 +1625,6 @@ CONFIG_NLS_KOI8_U=m
CONFIG_DLM=m
CONFIG_KEY_DH_OPERATIONS=y
CONFIG_SECURITY=y
-CONFIG_SECURITY_APPARMOR=y
-CONFIG_LSM=""
CONFIG_CRYPTO_USER=m
CONFIG_CRYPTO_CRYPTD=m
CONFIG_CRYPTO_AES=m
@@ -1677,3 +1675,39 @@ CONFIG_SCHED_TRACER=y
CONFIG_BLK_DEV_IO_TRACE=y
# CONFIG_UPROBE_EVENTS is not set
# CONFIG_STRICT_DEVMEM is not set
+
+# CentOS/AlmaLinux added
+CONFIG_AUDIT=y
+CONFIG_NETLABEL=y
+CONFIG_NETFILTER_XT_TARGET_AUDIT=m
+CONFIG_IP_NF_SECURITY=m
+CONFIG_IP6_NF_SECURITY=m
+CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y
+CONFIG_NFSD_V4_SECURITY_LABEL=y
+CONFIG_SECURITY_NETWORK=y
+CONFIG_SECURITY_PATH=y
+CONFIG_SECURITY_SELINUX=y
+CONFIG_SECURITY_SELINUX_BOOTPARAM=y
+CONFIG_SECURITY_SELINUX_DISABLE=y
+CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
+CONFIG_NET_TEAM=m
+CONFIG_NET_TEAM_MODE_ACTIVEBACKUP=m
+CONFIG_NET_TEAM_MODE_BROADCAST=m
+CONFIG_NET_TEAM_MODE_LOADBALANCE=m
+CONFIG_NET_TEAM_MODE_RANDOM=m
+CONFIG_NET_TEAM_MODE_ROUNDROBIN=m
+CONFIG_CRYPTO_BLAKE2S=m
+CONFIG_CRYPTO_CURVE25519=m
+CONFIG_CRYPTO_LIB_BLAKE2S=m
+CONFIG_CRYPTO_LIB_CHACHA20POLY1305=m
+CONFIG_CRYPTO_LIB_CHACHA=m
+CONFIG_CRYPTO_LIB_CURVE25519=m
+CONFIG_CRYPTO_LIB_POLY1305=m
+CONFIG_CRYPTO_POLY1305_NEON=m
+# CONFIG_EFI_CUSTOM_SSDT_OVERLAYS is not set
+# CONFIG_WIREGUARD_DEBUG is not set
+CONFIG_WIREGUARD=m
+CONFIG_BLK_DEV_RBD=m
+CONFIG_FW_LOADER_COMPRESS=y
+CONFIG_FW_LOADER_COMPRESS_XZ=y
+CONFIG_FW_LOADER_COMPRESS_ZSTD=y
--
2.45.1

View File

@ -10,7 +10,7 @@ ExclusiveArch: aarch64
%define armtarget 8
%define local_version v8
%define bcmmodel 2711
%define bcmmodel 2712
%define ksuffix 6
%define extra_version 1
@ -26,8 +26,6 @@ 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/%{commit_firmware_long}.tar.gz
Patch100: config_2711.patch
Patch101: config_2712.patch
BuildRequires: kmod, patch, bash, coreutils, tar
BuildRequires: bzip2, xz, findutils, gzip, m4, perl, perl-Carp, make, diffutils, gawk
@ -54,6 +52,7 @@ Linux operating system. The kernel handles the basic functions
of the operating system: memory allocation, process allocation, device
input and output, etc.
%package kernel%{?ksuffix}-devel
Group: System Environment/Kernel
Summary: Development package for building kernel modules to match the kernel
@ -84,11 +83,8 @@ including the kernel bootloader.
%prep
%setup -q -n linux-stable_%{version_tag}
%patch100 -p1
%patch101 -p1
perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -%{release}/" Makefile
perl -p -i -e "s/^CONFIG_LOCALVERSION=.*/CONFIG_LOCALVERSION=/" arch/%{Arch}/configs/bcm2711_defconfig
perl -p -i -e "s/^CONFIG_LOCALVERSION=.*/CONFIG_LOCALVERSION=/" arch/%{Arch}/configs/bcm2712_defconfig
perl -p -i -e "s/^CONFIG_LOCALVERSION=.*/CONFIG_LOCALVERSION=/" arch/%{Arch}/configs/bcm%{bcmmodel}_defconfig
%if 0%{?rhel} >= 8
# Mangle /usr/bin/python shebangs to /usr/bin/python3
@ -108,16 +104,21 @@ make %{?_smp_mflags} HOSTCFLAGS="%{?build_cflags}" HOSTLDFLAGS="%{?build_ldflags
%install
# kernel
mkdir -p %{buildroot}/boot/overlays/
mkdir -p %{buildroot}/usr/share/%{name}-kernel/%{version}-%{release}/boot/overlays
mkdir -p %{buildroot}/boot/firmware/
mkdir -p %{buildroot}/usr/share/%{name}-kernel/%{version}-%{release}/boot/firmware
mkdir -p %{buildroot}/boot/firmware/overlays/
mkdir -p %{buildroot}/usr/share/%{name}-kernel/%{version}-%{release}/boot/firmware/overlays
ln -s firmware/overlays %{buildroot}/boot
ln -s firmware/overlays %{buildroot}/usr/share/%{name}-kernel/%{version}-%{release}/boot
cp -p -v COPYING %{buildroot}/boot/COPYING.linux-%{kversion}
%ifarch aarch64
cp -p -v arch/%{Arch}/boot/dts/broadcom/*.dtb %{buildroot}/usr/share/%{name}-kernel/%{version}-%{release}/boot
cp -p -v arch/%{Arch}/boot/dts/broadcom/*.dtb %{buildroot}/usr/share/%{name}-kernel/%{version}-%{release}/boot/firmware
%else
cp -p -v arch/%{Arch}/boot/dts/*.dtb %{buildroot}/usr/share/%{name}-kernel/%{version}-%{release}/boot
#cp -p -v arch/%{Arch}/boot/dts/*.dtb %{buildroot}/usr/share/%{name}-kernel/%{version}-%{release}/boot
%endif
cp -p -v arch/%{Arch}/boot/dts/overlays/*.dtb* %{buildroot}/usr/share/%{name}-kernel/%{version}-%{release}/boot/overlays
cp -p -v arch/%{Arch}/boot/dts/overlays/README %{buildroot}/usr/share/%{name}-kernel/%{version}-%{release}/boot/overlays
cp -p -v arch/%{Arch}/boot/dts/overlays/*.dtb* %{buildroot}/usr/share/%{name}-kernel/%{version}-%{release}/boot/firmware/overlays
cp -p -v arch/%{Arch}/boot/dts/overlays/README %{buildroot}/usr/share/%{name}-kernel/%{version}-%{release}/boot/firmware/overlays
#scripts/mkknlimg arch/%{Arch}/boot/zImage %{buildroot}/boot/kernel-%{version}-%{release}.img
cp -p -v arch/%{Arch}/boot/%{build_image} %{buildroot}/boot/kernel-%{version}-%{release}.img
make INSTALL_MOD_PATH=%{buildroot} modules_install
cat > %{buildroot}/boot/config-kernel-%{version}-%{release}.inc <<__EOF__
@ -170,13 +171,13 @@ ln -T -s build %{buildroot}/lib/modules/%{version}-%{release}/source --force
# firmware
# precompiled GPU firmware and bootloader
pushd %{buildroot}
pushd %{buildroot}/boot/firmware
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
--strip-components=2
popd
%files kernel%{?ksuffix}
@ -184,9 +185,11 @@ popd
/lib/modules/%{version}-%{release}
/usr/share/%{name}-kernel/%{version}-%{release}
/usr/share/%{name}-kernel/%{version}-%{release}/boot
/usr/share/%{name}-kernel/%{version}-%{release}/boot/*.dtb
/usr/share/%{name}-kernel/%{version}-%{release}/boot/firmware
/usr/share/%{name}-kernel/%{version}-%{release}/boot/firmware/*.dtb
/boot/config-%{version}-%{release}
/boot/overlays/
/boot/firmware/overlays/
/boot/overlays
/usr/share/%{name}-kernel/%{version}-%{release}/boot/overlays/*
%attr(0755,root,root) /boot/kernel-%{version}-%{release}.img
%ghost /boot/initramfs-%{version}-%{release}.img
@ -200,9 +203,9 @@ if [ -f /boot/kernel%{armtarget}.img ] || [ ! -f /boot/config-kernel.inc ];then
# if we have moved to initramfs
cp /boot/kernel-%{version}-%{release}.img /boot/kernel%{armtarget}.img
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/
cp /usr/share/%{name}-kernel/%{version}-%{release}/boot/*.dtb /boot/firmware/
cp /usr/share/%{name}-kernel/%{version}-%{release}/boot/firmware/overlays/*.dtb* /boot/firmware/overlays/
cp /usr/share/%{name}-kernel/%{version}-%{release}/boot/firmware/overlays/README /boot/firmware/overlays/
/usr/bin/dracut /boot/initramfs-%{version}-%{release}.img %{version}-%{release}
cp /boot/config-kernel-%{version}-%{release}.inc /boot/config-kernel.inc
@ -211,9 +214,9 @@ if [ -f /boot/kernel%{armtarget}.img ];then
#only restore kernel%{armtarget}.img if it exists, we may have moved to initramfs
cp $(ls -1 /boot/kernel-*-*|sort -V|tail -1) /boot/kernel%{armtarget}.img
fi
cp $(ls -1d /usr/share/%{name}-kernel/*-*/|sort -V|tail -1)/boot/*.dtb /boot/
cp $(ls -1d /usr/share/%{name}-kernel/*-*/|sort -V|tail -1)/boot/overlays/*.dtb* /boot/overlays/
cp $(ls -1d /usr/share/%{name}-kernel/*-*/|sort -V|tail -1)/boot/overlays/README /boot/overlays/
cp $(ls -1d /usr/share/%{name}-kernel/*-*/|sort -V|tail -1)/boot/firmware/*.dtb /boot/firmware/
cp $(ls -1d /usr/share/%{name}-kernel/*-*/|sort -V|tail -1)/boot/firmware/overlays/*.dtb* /boot/firmware/overlays/
cp $(ls -1d /usr/share/%{name}-kernel/*-*/|sort -V|tail -1)/boot/firmware/overlays/README /boot/firmware/overlays/
cp $(ls -1 /boot/config-kernel-*-*|sort -V|tail -1) /boot/config-kernel.inc
@ -229,10 +232,10 @@ cp $(ls -1 /boot/config-kernel-*-*|sort -V|tail -1) /boot/config-kernel.inc
%files firmware
%defattr(-,root,root,-)
/boot/bootcode.bin
/boot/fixup*
/boot/start*
%doc /boot/LICENCE.broadcom
/boot/firmware/bootcode.bin
/boot/firmware/fixup*
/boot/firmware/start*
%doc /boot/firmware/LICENCE.broadcom
%changelog
* Fri May 24 2024 Koichiro Iwao <meta@almalinux.org> - 6.6.28