-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
76 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
REF=$(shell cat ref) | ||
|
||
ifeq ($(shell uname -m), x86_64) | ||
CROSS=aarch64-linux-gnu- | ||
endif | ||
|
||
setup: | ||
rm -rf ../linux/*.patch | ||
cp *.patch ../linux | ||
cd ../linux; \ | ||
git remote remove raspberrypi; \ | ||
git remote add raspberrypi https://github.com/raspberrypi/linux.git; \ | ||
git checkout master; \ | ||
git branch -D $(REF); \ | ||
git fetch -f raspberrypi refs/heads/$(REF):refs/heads/$(REF); \ | ||
git reset --hard raspberrypi/$(REF); \ | ||
git clean -df; \ | ||
for patch in $$(ls *.patch); do patch -p1 < "$$patch"; done; \ | ||
git -c commit.gpgsign=false commit -a -m 'removing -dirty suffix after patches'; \ | ||
make ARCH=arm64 bcm2711_defconfig | ||
|
||
compile: | ||
ARCH=arm64 CROSS_COMPILE=$(CROSS) make -C ../linux olddefconfig rpm-pkg -j$(shell nproc) | ||
cp -r ../linux/rpmbuild . | ||
rm -rf ../linux/rpmbuild | ||
|
||
build: setup compile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
rpi-6.6.y |
25 changes: 25 additions & 0 deletions
25
rpi4/scripts-package-kernel-spec-install-dtbs-and-installkernel-fix.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
diff --git a/scripts/package/kernel.spec b/scripts/package/kernel.spec | ||
index 3eee0143e0c5..a11b779a4033 100644 | ||
--- a/scripts/package/kernel.spec | ||
+++ b/scripts/package/kernel.spec | ||
@@ -65,6 +65,7 @@ cp $(%{make} %{makeflags} -s image_name) %{buildroot}/boot/vmlinuz-%{KERNELRELEA | ||
%endif | ||
%{make} %{makeflags} INSTALL_MOD_PATH=%{buildroot} modules_install | ||
%{make} %{makeflags} INSTALL_HDR_PATH=%{buildroot}/usr headers_install | ||
+%{make} %{makeflags} INSTALL_DTBS_PATH=%{buildroot}/boot/dtb-%{KERNELRELEASE} dtbs_install | ||
cp System.map %{buildroot}/boot/System.map-%{KERNELRELEASE} | ||
cp .config %{buildroot}/boot/config-%{KERNELRELEASE} | ||
ln -fns /usr/src/kernels/%{KERNELRELEASE} %{buildroot}/lib/modules/%{KERNELRELEASE}/build | ||
@@ -77,11 +78,7 @@ rm -rf %{buildroot} | ||
|
||
%post | ||
if [ -x /sbin/installkernel -a -r /boot/vmlinuz-%{KERNELRELEASE} -a -r /boot/System.map-%{KERNELRELEASE} ]; then | ||
-cp /boot/vmlinuz-%{KERNELRELEASE} /boot/.vmlinuz-%{KERNELRELEASE}-rpm | ||
-cp /boot/System.map-%{KERNELRELEASE} /boot/.System.map-%{KERNELRELEASE}-rpm | ||
-rm -f /boot/vmlinuz-%{KERNELRELEASE} /boot/System.map-%{KERNELRELEASE} | ||
-/sbin/installkernel %{KERNELRELEASE} /boot/.vmlinuz-%{KERNELRELEASE}-rpm /boot/.System.map-%{KERNELRELEASE}-rpm | ||
-rm -f /boot/.vmlinuz-%{KERNELRELEASE}-rpm /boot/.System.map-%{KERNELRELEASE}-rpm | ||
+/sbin/installkernel %{KERNELRELEASE} /boot/vmlinuz-%{KERNELRELEASE} /boot/System.map-%{KERNELRELEASE} | ||
fi | ||
|
||
%preun |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
diff --git a/scripts/package/kernel.spec b/scripts/package/kernel.spec | ||
index 3eee0143e0c5..ddc52d125f7c 100644 | ||
--- a/scripts/package/kernel.spec | ||
+++ b/scripts/package/kernel.spec | ||
@@ -5,7 +5,7 @@ | ||
%define __spec_install_post /usr/lib/rpm/brp-compress || : | ||
%define debug_package %{nil} | ||
|
||
-Name: kernel | ||
+Name: kernel-rpi4 | ||
Summary: The Linux Kernel | ||
Version: %(echo %{KERNELRELEASE} | sed -e 's/-/_/g') | ||
Release: %{pkg_release} | ||
@@ -41,7 +41,7 @@ glibc package. | ||
Summary: Development package for building kernel modules to match the %{version} kernel | ||
Group: System Environment/Kernel | ||
AutoReqProv: no | ||
-%description -n kernel-devel | ||
+%description -n kernel-rpi4-devel | ||
This package provides kernel headers and makefiles sufficient to build modules | ||
against the %{version} kernel package. | ||
%endif |