Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] rpi-kernel: update to 5.10.52.
@ 2021-07-28  4:43 ericonr
  2021-08-03 17:12 ` paper42
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: ericonr @ 2021-07-28  4:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1836 bytes --]

There is a new pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages rpi
https://github.com/void-linux/void-packages/pull/32224

rpi-kernel: update to 5.10.52.
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

I'm unsure how picking the upstream commit works? I'd like to document that too...

https://github.com/raspberrypi/linux/commit/7772256a0635f0dd5b03f4736402c6c0d6371f32 is the merge, but there seem to be a bunch of reverts right after that one.

A patch file from https://github.com/void-linux/void-packages/pull/32224.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-rpi-32224.patch --]
[-- Type: text/x-diff, Size: 1669 bytes --]

From 647aa52572cdb2d5767d012abedf5a4dac91e01b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Wed, 28 Jul 2021 01:38:42 -0300
Subject: [PATCH] rpi-kernel: update to 5.10.52.

---
 srcpkgs/rpi-kernel/template | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/rpi-kernel/template b/srcpkgs/rpi-kernel/template
index 8067f5d7ab7f..773199b65536 100644
--- a/srcpkgs/rpi-kernel/template
+++ b/srcpkgs/rpi-kernel/template
@@ -1,16 +1,16 @@
 # Template file for 'rpi-kernel'
 #
 # We track the latest Raspberry Pi LTS kernel as that is what is used in the
-# official Raspbian distribution. This is currently 5.4:
+# official Raspbian distribution. This is currently 5.10:
 #
-#   https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=269769
+# https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=288234
 
-_githash="76c49e60e742d0bebd798be972d67dd3fd007691"
+_githash="7772256a0635f0dd5b03f4736402c6c0d6371f32"
 _gitshort="${_githash:0:7}"
 
 pkgname=rpi-kernel
-version=5.4.83
-revision=2
+version=5.10.52
+revision=1
 archs="armv6l*"
 wrksrc="linux-${_githash}"
 hostmakedepends="perl kmod uboot-mkimage openssl-devel bc bison flex"
@@ -20,7 +20,7 @@ homepage="http://www.kernel.org"
 license="GPL-2.0-only"
 short_desc="Linux kernel for Raspberry Pi zero/1 (${version%.*} series [git ${_gitshort}])"
 distfiles="https://github.com/raspberrypi/linux/archive/${_githash}.tar.gz"
-checksum=4a98ea0d68c6e74d479789c12fc97619c872cb2607ae87a881a9491c1c3fbc35
+checksum=3e0e70d4f8d36168d6bd3f13ffca3691f8999e9d05997b5c0a5ecf692fcf6a09
 python_version=3
 
 _kernver="${version}_${revision}"

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: rpi-kernel: update to 5.10.52.
  2021-07-28  4:43 [PR PATCH] rpi-kernel: update to 5.10.52 ericonr
@ 2021-08-03 17:12 ` paper42
  2021-08-03 17:25 ` ericonr
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: paper42 @ 2021-08-03 17:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 335 bytes --]

New comment by paper42 on void-packages repository

https://github.com/void-linux/void-packages/pull/32224#issuecomment-892018074

Comment:
I have been running 5.10 on my rpi3B with the same patch applied on rpi3-kernel for almost a week without any issues. Do you want to switch only rpi-kernel or also all other variants in this PR?

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: rpi-kernel: update to 5.10.52.
  2021-07-28  4:43 [PR PATCH] rpi-kernel: update to 5.10.52 ericonr
  2021-08-03 17:12 ` paper42
@ 2021-08-03 17:25 ` ericonr
  2021-08-03 17:33 ` ahesford
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: ericonr @ 2021-08-03 17:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 285 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/32224#issuecomment-892026453

Comment:
I think I would switch all of them; will make a proper patch for all.

For testing, if interested, @ahesford @Piraty @pbui @fosslinux @amak79 

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: rpi-kernel: update to 5.10.52.
  2021-07-28  4:43 [PR PATCH] rpi-kernel: update to 5.10.52 ericonr
  2021-08-03 17:12 ` paper42
  2021-08-03 17:25 ` ericonr
@ 2021-08-03 17:33 ` ahesford
  2021-08-04 13:56 ` [PR PATCH] [Updated] " ericonr
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: ahesford @ 2021-08-03 17:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 198 bytes --]

New comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/32224#issuecomment-892031380

Comment:
I don't use `rpi-kernel` but can test `rpi{3,4}-kernel`.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR PATCH] [Updated] rpi-kernel: update to 5.10.52.
  2021-07-28  4:43 [PR PATCH] rpi-kernel: update to 5.10.52 ericonr
                   ` (2 preceding siblings ...)
  2021-08-03 17:33 ` ahesford
@ 2021-08-04 13:56 ` ericonr
  2021-08-04 14:20 ` ahesford
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: ericonr @ 2021-08-04 13:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1854 bytes --]

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages rpi
https://github.com/void-linux/void-packages/pull/32224

rpi-kernel: update to 5.10.52.
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

I'm unsure how picking the upstream commit works? I'd like to document that too...

https://github.com/raspberrypi/linux/commit/7772256a0635f0dd5b03f4736402c6c0d6371f32 is the merge, but there seem to be a bunch of reverts right after that one.

[ci-skip]

A patch file from https://github.com/void-linux/void-packages/pull/32224.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-rpi-32224.patch --]
[-- Type: text/x-diff, Size: 2045 bytes --]

From 46cbcd1fffbe16dfff6a4408e70e84cb640e776e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Wed, 28 Jul 2021 01:38:42 -0300
Subject: [PATCH] rpi-kernel: update to 5.10.52.

Also document how we pick the commit to be used.

In this case, we are using the commit from
https://github.com/raspberrypi/linux/releases/tag/1.20210727
---
 srcpkgs/rpi-kernel/template | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/rpi-kernel/template b/srcpkgs/rpi-kernel/template
index 8067f5d7ab7f..a432bc0fdc66 100644
--- a/srcpkgs/rpi-kernel/template
+++ b/srcpkgs/rpi-kernel/template
@@ -1,16 +1,21 @@
 # Template file for 'rpi-kernel'
 #
 # We track the latest Raspberry Pi LTS kernel as that is what is used in the
-# official Raspbian distribution. This is currently 5.4:
+# official Raspbian distribution. This is currently 5.10:
 #
-#   https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=269769
+# https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=288234
+#
+# Commit hash is picked from latest tag [1], if appropriate, or from latest
+# "Merge remote-tracking branch 'stable/linux-5.10.y' into rpi-5.10.y" commit.
+#
+# [1] https://github.com/raspberrypi/linux/releases
 
-_githash="76c49e60e742d0bebd798be972d67dd3fd007691"
+_githash="86729e78125d4f3d203457940feee8bc97b11f6c"
 _gitshort="${_githash:0:7}"
 
 pkgname=rpi-kernel
-version=5.4.83
-revision=2
+version=5.10.52
+revision=1
 archs="armv6l*"
 wrksrc="linux-${_githash}"
 hostmakedepends="perl kmod uboot-mkimage openssl-devel bc bison flex"
@@ -20,7 +25,7 @@ homepage="http://www.kernel.org"
 license="GPL-2.0-only"
 short_desc="Linux kernel for Raspberry Pi zero/1 (${version%.*} series [git ${_gitshort}])"
 distfiles="https://github.com/raspberrypi/linux/archive/${_githash}.tar.gz"
-checksum=4a98ea0d68c6e74d479789c12fc97619c872cb2607ae87a881a9491c1c3fbc35
+checksum=a25a7dfce4c2ca5bdca39ddab5e43539d9b04900b0dbefe19f4f9b053e59968c
 python_version=3
 
 _kernver="${version}_${revision}"

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR PATCH] [Updated] rpi-kernel: update to 5.10.52.
  2021-07-28  4:43 [PR PATCH] rpi-kernel: update to 5.10.52 ericonr
                   ` (3 preceding siblings ...)
  2021-08-04 13:56 ` [PR PATCH] [Updated] " ericonr
@ 2021-08-04 14:20 ` ahesford
  2021-08-04 14:44 ` ericonr
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: ahesford @ 2021-08-04 14:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1855 bytes --]

There is an updated pull request by ahesford against master on the void-packages repository

https://github.com/ericonr/void-packages rpi
https://github.com/void-linux/void-packages/pull/32224

rpi-kernel: update to 5.10.52.
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

I'm unsure how picking the upstream commit works? I'd like to document that too...

https://github.com/raspberrypi/linux/commit/7772256a0635f0dd5b03f4736402c6c0d6371f32 is the merge, but there seem to be a bunch of reverts right after that one.

[ci-skip]

A patch file from https://github.com/void-linux/void-packages/pull/32224.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-rpi-32224.patch --]
[-- Type: text/x-diff, Size: 2045 bytes --]

From 46cbcd1fffbe16dfff6a4408e70e84cb640e776e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Wed, 28 Jul 2021 01:38:42 -0300
Subject: [PATCH] rpi-kernel: update to 5.10.52.

Also document how we pick the commit to be used.

In this case, we are using the commit from
https://github.com/raspberrypi/linux/releases/tag/1.20210727
---
 srcpkgs/rpi-kernel/template | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/rpi-kernel/template b/srcpkgs/rpi-kernel/template
index 8067f5d7ab7f..a432bc0fdc66 100644
--- a/srcpkgs/rpi-kernel/template
+++ b/srcpkgs/rpi-kernel/template
@@ -1,16 +1,21 @@
 # Template file for 'rpi-kernel'
 #
 # We track the latest Raspberry Pi LTS kernel as that is what is used in the
-# official Raspbian distribution. This is currently 5.4:
+# official Raspbian distribution. This is currently 5.10:
 #
-#   https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=269769
+# https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=288234
+#
+# Commit hash is picked from latest tag [1], if appropriate, or from latest
+# "Merge remote-tracking branch 'stable/linux-5.10.y' into rpi-5.10.y" commit.
+#
+# [1] https://github.com/raspberrypi/linux/releases
 
-_githash="76c49e60e742d0bebd798be972d67dd3fd007691"
+_githash="86729e78125d4f3d203457940feee8bc97b11f6c"
 _gitshort="${_githash:0:7}"
 
 pkgname=rpi-kernel
-version=5.4.83
-revision=2
+version=5.10.52
+revision=1
 archs="armv6l*"
 wrksrc="linux-${_githash}"
 hostmakedepends="perl kmod uboot-mkimage openssl-devel bc bison flex"
@@ -20,7 +25,7 @@ homepage="http://www.kernel.org"
 license="GPL-2.0-only"
 short_desc="Linux kernel for Raspberry Pi zero/1 (${version%.*} series [git ${_gitshort}])"
 distfiles="https://github.com/raspberrypi/linux/archive/${_githash}.tar.gz"
-checksum=4a98ea0d68c6e74d479789c12fc97619c872cb2607ae87a881a9491c1c3fbc35
+checksum=a25a7dfce4c2ca5bdca39ddab5e43539d9b04900b0dbefe19f4f9b053e59968c
 python_version=3
 
 _kernver="${version}_${revision}"

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR PATCH] [Updated] rpi-kernel: update to 5.10.52.
  2021-07-28  4:43 [PR PATCH] rpi-kernel: update to 5.10.52 ericonr
                   ` (4 preceding siblings ...)
  2021-08-04 14:20 ` ahesford
@ 2021-08-04 14:44 ` ericonr
  2021-08-04 15:01 ` ericonr
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: ericonr @ 2021-08-04 14:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1854 bytes --]

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages rpi
https://github.com/void-linux/void-packages/pull/32224

rpi-kernel: update to 5.10.52.
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

I'm unsure how picking the upstream commit works? I'd like to document that too...

https://github.com/raspberrypi/linux/commit/7772256a0635f0dd5b03f4736402c6c0d6371f32 is the merge, but there seem to be a bunch of reverts right after that one.

[ci-skip]

A patch file from https://github.com/void-linux/void-packages/pull/32224.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-rpi-32224.patch --]
[-- Type: text/x-diff, Size: 9982 bytes --]

From 4893b9f0d7b7a542e7e93ec20af8de1af5a6c64b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Wed, 28 Jul 2021 01:38:42 -0300
Subject: [PATCH 1/4] rpi-kernel: update to 5.10.52.

- document how we pick the commit to be used
- fix header installations so dkms works; based on fixes to mainline
  kernel packages

In this update, we are using the commit from
https://github.com/raspberrypi/linux/releases/tag/1.20210727
---
 srcpkgs/rpi-kernel/template | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/rpi-kernel/template b/srcpkgs/rpi-kernel/template
index 8067f5d7ab7f..81a8c484d0a3 100644
--- a/srcpkgs/rpi-kernel/template
+++ b/srcpkgs/rpi-kernel/template
@@ -1,16 +1,23 @@
 # Template file for 'rpi-kernel'
 #
 # We track the latest Raspberry Pi LTS kernel as that is what is used in the
-# official Raspbian distribution. This is currently 5.4:
+# official Raspbian distribution. This is currently 5.10:
 #
-#   https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=269769
+# https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=288234
+#
+# Commit hash is picked from latest tag [1], if appropriate, or from latest
+# "Merge remote-tracking branch 'stable/linux-5.10.y' into rpi-5.10.y" commit.
+#
+# [1] https://github.com/raspberrypi/linux/releases
+#
+# WARNING: keep all rpi*-kernel packages in sync
 
-_githash="76c49e60e742d0bebd798be972d67dd3fd007691"
+_githash="86729e78125d4f3d203457940feee8bc97b11f6c"
 _gitshort="${_githash:0:7}"
 
 pkgname=rpi-kernel
-version=5.4.83
-revision=2
+version=5.10.52
+revision=1
 archs="armv6l*"
 wrksrc="linux-${_githash}"
 hostmakedepends="perl kmod uboot-mkimage openssl-devel bc bison flex"
@@ -20,7 +27,7 @@ homepage="http://www.kernel.org"
 license="GPL-2.0-only"
 short_desc="Linux kernel for Raspberry Pi zero/1 (${version%.*} series [git ${_gitshort}])"
 distfiles="https://github.com/raspberrypi/linux/archive/${_githash}.tar.gz"
-checksum=4a98ea0d68c6e74d479789c12fc97619c872cb2607ae87a881a9491c1c3fbc35
+checksum=a25a7dfce4c2ca5bdca39ddab5e43539d9b04900b0dbefe19f4f9b053e59968c
 python_version=3
 
 _kernver="${version}_${revision}"
@@ -141,7 +148,7 @@ do_install() {
 		mkdir -p ${hdrdest}/$(dirname $file)
 		install -Dm644 $file ${hdrdest}/${file}
 	done
-	for file in $(find arch/${_arch} -name module.lds -o -name Kbuild.platforms -o -name Platform); do
+	for file in $(find arch/${_arch} scripts -name module.lds -o -name Kbuild.platforms -o -name Platform); do
 		mkdir -p ${hdrdest}/$(dirname $file)
 		install -Dm644 $file ${hdrdest}/${file}
 	done
@@ -151,7 +158,7 @@ do_install() {
 	rm -rf ${DESTDIR}/usr/lib/firmware
 
 	for i in acpi asm-generic clocksource config crypto drm generated linux \
-		math-emu media net pcmcia scsi sound trace uapi video xen; do
+		math-emu media net pcmcia scsi sound trace uapi vdso video xen; do
 		[ -d include/$i ] && cp -a include/$i ${hdrdest}/include
 	done
 

From 95c4b6d2916710de1a3c9e019cbe313f0b20b595 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Wed, 4 Aug 2021 10:18:40 -0400
Subject: [PATCH 2/4] rpi4-kernel: update to 5.10.52.

---
 srcpkgs/rpi4-kernel/template | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/srcpkgs/rpi4-kernel/template b/srcpkgs/rpi4-kernel/template
index 04fbb7d64bb4..9ddae3fac5a3 100644
--- a/srcpkgs/rpi4-kernel/template
+++ b/srcpkgs/rpi4-kernel/template
@@ -1,15 +1,11 @@
 # Template file for 'rpi4-kernel'
-#
-# We track the latest Raspberry Pi LTS kernel as that is what is used in the
-# official Raspbian distribution. This is currently 5.4:
-#
-#   https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=269769
+# See rpi-kernel for version policy
 
-_githash="76c49e60e742d0bebd798be972d67dd3fd007691"
+_githash="86729e78125d4f3d203457940feee8bc97b11f6c"
 _gitshort="${_githash:0:7}"
 
 pkgname=rpi4-kernel
-version=5.4.83
+version=5.10.52
 revision=1
 archs="aarch64*"
 wrksrc="linux-${_githash}"
@@ -20,7 +16,7 @@ homepage="http://www.kernel.org"
 license="GPL-2.0-only"
 short_desc="Linux kernel for Raspberry Pi 4 (${version%.*} series [git ${_gitshort}])"
 distfiles="https://github.com/raspberrypi/linux/archive/${_githash}.tar.gz"
-checksum=4a98ea0d68c6e74d479789c12fc97619c872cb2607ae87a881a9491c1c3fbc35
+checksum=a25a7dfce4c2ca5bdca39ddab5e43539d9b04900b0dbefe19f4f9b053e59968c
 python_version=3
 conflicts=rpi3-kernel
 
@@ -145,7 +141,7 @@ do_install() {
 		mkdir -p ${hdrdest}/$(dirname $file)
 		install -Dm644 $file ${hdrdest}/${file}
 	done
-	for file in $(find arch/${_arch} -name module.lds -o -name Kbuild.platforms -o -name Platform); do
+	for file in $(find arch/${_arch} scripts -name module.lds -o -name Kbuild.platforms -o -name Platform); do
 		mkdir -p ${hdrdest}/$(dirname $file)
 		install -Dm644 $file ${hdrdest}/${file}
 	done
@@ -155,7 +151,7 @@ do_install() {
 	rm -rf ${DESTDIR}/usr/lib/firmware
 
 	for i in acpi asm-generic clocksource config crypto drm generated linux \
-		math-emu media net pcmcia scsi sound trace uapi video xen; do
+		math-emu media net pcmcia scsi sound trace uapi vdso video xen; do
 		[ -d include/$i ] && cp -a include/$i ${hdrdest}/include
 	done
 

From b526f456805cce2eefcfd61549898a28f8e1bb2e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Wed, 4 Aug 2021 11:42:20 -0300
Subject: [PATCH 3/4] rpi3-kernel: update to 5.10.52.

---
 srcpkgs/rpi3-kernel/template | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/rpi3-kernel/template b/srcpkgs/rpi3-kernel/template
index a3a16bc577fc..0dd5ce9593db 100644
--- a/srcpkgs/rpi3-kernel/template
+++ b/srcpkgs/rpi3-kernel/template
@@ -1,16 +1,12 @@
 # Template file for 'rpi3-kernel'
-#
-# We track the latest Raspberry Pi LTS kernel as that is what is used in the
-# official Raspbian distribution. This is currently 5.4:
-#
-#   https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=269769
+# See rpi-kernel for version policy
 
-_githash="76c49e60e742d0bebd798be972d67dd3fd007691"
+_githash="86729e78125d4f3d203457940feee8bc97b11f6c"
 _gitshort="${_githash:0:7}"
 
 pkgname=rpi3-kernel
-version=5.4.83
-revision=2
+version=5.10.52
+revision=1
 archs="aarch64*"
 wrksrc="linux-${_githash}"
 hostmakedepends="perl kmod uboot-mkimage openssl-devel bc bison flex"
@@ -20,7 +16,7 @@ homepage="http://www.kernel.org"
 license="GPL-2.0-only"
 short_desc="Linux kernel for Raspberry Pi 3 (${version%.*} series [git ${_gitshort}])"
 distfiles="https://github.com/raspberrypi/linux/archive/${_githash}.tar.gz"
-checksum=4a98ea0d68c6e74d479789c12fc97619c872cb2607ae87a881a9491c1c3fbc35
+checksum=a25a7dfce4c2ca5bdca39ddab5e43539d9b04900b0dbefe19f4f9b053e59968c
 python_version=3
 
 _kernver="${version}_${revision}"
@@ -144,7 +140,7 @@ do_install() {
 		mkdir -p ${hdrdest}/$(dirname $file)
 		install -Dm644 $file ${hdrdest}/${file}
 	done
-	for file in $(find arch/${_arch} -name module.lds -o -name Kbuild.platforms -o -name Platform); do
+	for file in $(find arch/${_arch} scripts -name module.lds -o -name Kbuild.platforms -o -name Platform); do
 		mkdir -p ${hdrdest}/$(dirname $file)
 		install -Dm644 $file ${hdrdest}/${file}
 	done
@@ -154,7 +150,7 @@ do_install() {
 	rm -rf ${DESTDIR}/usr/lib/firmware
 
 	for i in acpi asm-generic clocksource config crypto drm generated linux \
-		math-emu media net pcmcia scsi sound trace uapi video xen; do
+		math-emu media net pcmcia scsi sound trace uapi vdso video xen; do
 		[ -d include/$i ] && cp -a include/$i ${hdrdest}/include
 	done
 

From 5b6004b6ad643d0940b741142349c7696df93bb0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Wed, 4 Aug 2021 11:42:39 -0300
Subject: [PATCH 4/4] rpi2-kernel: update to 5.10.52.

---
 srcpkgs/rpi2-kernel/template | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/rpi2-kernel/template b/srcpkgs/rpi2-kernel/template
index cda240234550..cc861a0a261a 100644
--- a/srcpkgs/rpi2-kernel/template
+++ b/srcpkgs/rpi2-kernel/template
@@ -1,16 +1,12 @@
 # Template file for 'rpi2-kernel'
-#
-# We track the latest Raspberry Pi LTS kernel as that is what is used in the
-# official Raspbian distribution. This is currently 5.4:
-#
-#   https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=269769
+# See rpi-kernel for version policy
 
-_githash="76c49e60e742d0bebd798be972d67dd3fd007691"
+_githash="86729e78125d4f3d203457940feee8bc97b11f6c"
 _gitshort="${_githash:0:7}"
 
 pkgname=rpi2-kernel
-version=5.4.83
-revision=2
+version=5.10.52
+revision=1
 archs="armv7l*"
 wrksrc="linux-${_githash}"
 hostmakedepends="perl kmod uboot-mkimage openssl-devel bc bison flex"
@@ -20,7 +16,7 @@ homepage="http://www.kernel.org"
 license="GPL-2.0-only"
 short_desc="Linux kernel for Raspberry Pi 2 (${version%.*} series [git ${_gitshort}])"
 distfiles="https://github.com/raspberrypi/linux/archive/${_githash}.tar.gz"
-checksum=4a98ea0d68c6e74d479789c12fc97619c872cb2607ae87a881a9491c1c3fbc35
+checksum=a25a7dfce4c2ca5bdca39ddab5e43539d9b04900b0dbefe19f4f9b053e59968c
 python_version=3
 
 _kernver="${version}_${revision}"
@@ -141,7 +137,7 @@ do_install() {
 		mkdir -p ${hdrdest}/$(dirname $file)
 		install -Dm644 $file ${hdrdest}/${file}
 	done
-	for file in $(find arch/${_arch} -name module.lds -o -name Kbuild.platforms -o -name Platform); do
+	for file in $(find arch/${_arch} scripts -name module.lds -o -name Kbuild.platforms -o -name Platform); do
 		mkdir -p ${hdrdest}/$(dirname $file)
 		install -Dm644 $file ${hdrdest}/${file}
 	done
@@ -151,7 +147,7 @@ do_install() {
 	rm -rf ${DESTDIR}/usr/lib/firmware
 
 	for i in acpi asm-generic clocksource config crypto drm generated linux \
-		math-emu media net pcmcia scsi sound trace uapi video xen; do
+		math-emu media net pcmcia scsi sound trace uapi vdso video xen; do
 		[ -d include/$i ] && cp -a include/$i ${hdrdest}/include
 	done
 

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR PATCH] [Updated] rpi-kernel: update to 5.10.52.
  2021-07-28  4:43 [PR PATCH] rpi-kernel: update to 5.10.52 ericonr
                   ` (5 preceding siblings ...)
  2021-08-04 14:44 ` ericonr
@ 2021-08-04 15:01 ` ericonr
  2021-08-04 15:03 ` ericonr
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: ericonr @ 2021-08-04 15:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1854 bytes --]

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages rpi
https://github.com/void-linux/void-packages/pull/32224

rpi-kernel: update to 5.10.52.
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

I'm unsure how picking the upstream commit works? I'd like to document that too...

https://github.com/raspberrypi/linux/commit/7772256a0635f0dd5b03f4736402c6c0d6371f32 is the merge, but there seem to be a bunch of reverts right after that one.

[ci-skip]

A patch file from https://github.com/void-linux/void-packages/pull/32224.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-rpi-32224.patch --]
[-- Type: text/x-diff, Size: 24640 bytes --]

From 4893b9f0d7b7a542e7e93ec20af8de1af5a6c64b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Wed, 28 Jul 2021 01:38:42 -0300
Subject: [PATCH 1/6] rpi-kernel: update to 5.10.52.

- document how we pick the commit to be used
- fix header installations so dkms works; based on fixes to mainline
  kernel packages

In this update, we are using the commit from
https://github.com/raspberrypi/linux/releases/tag/1.20210727
---
 srcpkgs/rpi-kernel/template | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/rpi-kernel/template b/srcpkgs/rpi-kernel/template
index 8067f5d7ab7f..81a8c484d0a3 100644
--- a/srcpkgs/rpi-kernel/template
+++ b/srcpkgs/rpi-kernel/template
@@ -1,16 +1,23 @@
 # Template file for 'rpi-kernel'
 #
 # We track the latest Raspberry Pi LTS kernel as that is what is used in the
-# official Raspbian distribution. This is currently 5.4:
+# official Raspbian distribution. This is currently 5.10:
 #
-#   https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=269769
+# https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=288234
+#
+# Commit hash is picked from latest tag [1], if appropriate, or from latest
+# "Merge remote-tracking branch 'stable/linux-5.10.y' into rpi-5.10.y" commit.
+#
+# [1] https://github.com/raspberrypi/linux/releases
+#
+# WARNING: keep all rpi*-kernel packages in sync
 
-_githash="76c49e60e742d0bebd798be972d67dd3fd007691"
+_githash="86729e78125d4f3d203457940feee8bc97b11f6c"
 _gitshort="${_githash:0:7}"
 
 pkgname=rpi-kernel
-version=5.4.83
-revision=2
+version=5.10.52
+revision=1
 archs="armv6l*"
 wrksrc="linux-${_githash}"
 hostmakedepends="perl kmod uboot-mkimage openssl-devel bc bison flex"
@@ -20,7 +27,7 @@ homepage="http://www.kernel.org"
 license="GPL-2.0-only"
 short_desc="Linux kernel for Raspberry Pi zero/1 (${version%.*} series [git ${_gitshort}])"
 distfiles="https://github.com/raspberrypi/linux/archive/${_githash}.tar.gz"
-checksum=4a98ea0d68c6e74d479789c12fc97619c872cb2607ae87a881a9491c1c3fbc35
+checksum=a25a7dfce4c2ca5bdca39ddab5e43539d9b04900b0dbefe19f4f9b053e59968c
 python_version=3
 
 _kernver="${version}_${revision}"
@@ -141,7 +148,7 @@ do_install() {
 		mkdir -p ${hdrdest}/$(dirname $file)
 		install -Dm644 $file ${hdrdest}/${file}
 	done
-	for file in $(find arch/${_arch} -name module.lds -o -name Kbuild.platforms -o -name Platform); do
+	for file in $(find arch/${_arch} scripts -name module.lds -o -name Kbuild.platforms -o -name Platform); do
 		mkdir -p ${hdrdest}/$(dirname $file)
 		install -Dm644 $file ${hdrdest}/${file}
 	done
@@ -151,7 +158,7 @@ do_install() {
 	rm -rf ${DESTDIR}/usr/lib/firmware
 
 	for i in acpi asm-generic clocksource config crypto drm generated linux \
-		math-emu media net pcmcia scsi sound trace uapi video xen; do
+		math-emu media net pcmcia scsi sound trace uapi vdso video xen; do
 		[ -d include/$i ] && cp -a include/$i ${hdrdest}/include
 	done
 

From eac95b662c4d496aae2df526931099720f29236a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Wed, 4 Aug 2021 11:42:39 -0300
Subject: [PATCH 2/6] rpi2-kernel: update to 5.10.52.

---
 srcpkgs/rpi2-kernel/template | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/rpi2-kernel/template b/srcpkgs/rpi2-kernel/template
index cda240234550..cc861a0a261a 100644
--- a/srcpkgs/rpi2-kernel/template
+++ b/srcpkgs/rpi2-kernel/template
@@ -1,16 +1,12 @@
 # Template file for 'rpi2-kernel'
-#
-# We track the latest Raspberry Pi LTS kernel as that is what is used in the
-# official Raspbian distribution. This is currently 5.4:
-#
-#   https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=269769
+# See rpi-kernel for version policy
 
-_githash="76c49e60e742d0bebd798be972d67dd3fd007691"
+_githash="86729e78125d4f3d203457940feee8bc97b11f6c"
 _gitshort="${_githash:0:7}"
 
 pkgname=rpi2-kernel
-version=5.4.83
-revision=2
+version=5.10.52
+revision=1
 archs="armv7l*"
 wrksrc="linux-${_githash}"
 hostmakedepends="perl kmod uboot-mkimage openssl-devel bc bison flex"
@@ -20,7 +16,7 @@ homepage="http://www.kernel.org"
 license="GPL-2.0-only"
 short_desc="Linux kernel for Raspberry Pi 2 (${version%.*} series [git ${_gitshort}])"
 distfiles="https://github.com/raspberrypi/linux/archive/${_githash}.tar.gz"
-checksum=4a98ea0d68c6e74d479789c12fc97619c872cb2607ae87a881a9491c1c3fbc35
+checksum=a25a7dfce4c2ca5bdca39ddab5e43539d9b04900b0dbefe19f4f9b053e59968c
 python_version=3
 
 _kernver="${version}_${revision}"
@@ -141,7 +137,7 @@ do_install() {
 		mkdir -p ${hdrdest}/$(dirname $file)
 		install -Dm644 $file ${hdrdest}/${file}
 	done
-	for file in $(find arch/${_arch} -name module.lds -o -name Kbuild.platforms -o -name Platform); do
+	for file in $(find arch/${_arch} scripts -name module.lds -o -name Kbuild.platforms -o -name Platform); do
 		mkdir -p ${hdrdest}/$(dirname $file)
 		install -Dm644 $file ${hdrdest}/${file}
 	done
@@ -151,7 +147,7 @@ do_install() {
 	rm -rf ${DESTDIR}/usr/lib/firmware
 
 	for i in acpi asm-generic clocksource config crypto drm generated linux \
-		math-emu media net pcmcia scsi sound trace uapi video xen; do
+		math-emu media net pcmcia scsi sound trace uapi vdso video xen; do
 		[ -d include/$i ] && cp -a include/$i ${hdrdest}/include
 	done
 

From 696db0c0f342a093a384cd5e34a206d893037f1e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Wed, 4 Aug 2021 11:42:20 -0300
Subject: [PATCH 3/6] rpi3-kernel: update to 5.10.52.

---
 srcpkgs/rpi3-kernel/template | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/rpi3-kernel/template b/srcpkgs/rpi3-kernel/template
index a3a16bc577fc..0dd5ce9593db 100644
--- a/srcpkgs/rpi3-kernel/template
+++ b/srcpkgs/rpi3-kernel/template
@@ -1,16 +1,12 @@
 # Template file for 'rpi3-kernel'
-#
-# We track the latest Raspberry Pi LTS kernel as that is what is used in the
-# official Raspbian distribution. This is currently 5.4:
-#
-#   https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=269769
+# See rpi-kernel for version policy
 
-_githash="76c49e60e742d0bebd798be972d67dd3fd007691"
+_githash="86729e78125d4f3d203457940feee8bc97b11f6c"
 _gitshort="${_githash:0:7}"
 
 pkgname=rpi3-kernel
-version=5.4.83
-revision=2
+version=5.10.52
+revision=1
 archs="aarch64*"
 wrksrc="linux-${_githash}"
 hostmakedepends="perl kmod uboot-mkimage openssl-devel bc bison flex"
@@ -20,7 +16,7 @@ homepage="http://www.kernel.org"
 license="GPL-2.0-only"
 short_desc="Linux kernel for Raspberry Pi 3 (${version%.*} series [git ${_gitshort}])"
 distfiles="https://github.com/raspberrypi/linux/archive/${_githash}.tar.gz"
-checksum=4a98ea0d68c6e74d479789c12fc97619c872cb2607ae87a881a9491c1c3fbc35
+checksum=a25a7dfce4c2ca5bdca39ddab5e43539d9b04900b0dbefe19f4f9b053e59968c
 python_version=3
 
 _kernver="${version}_${revision}"
@@ -144,7 +140,7 @@ do_install() {
 		mkdir -p ${hdrdest}/$(dirname $file)
 		install -Dm644 $file ${hdrdest}/${file}
 	done
-	for file in $(find arch/${_arch} -name module.lds -o -name Kbuild.platforms -o -name Platform); do
+	for file in $(find arch/${_arch} scripts -name module.lds -o -name Kbuild.platforms -o -name Platform); do
 		mkdir -p ${hdrdest}/$(dirname $file)
 		install -Dm644 $file ${hdrdest}/${file}
 	done
@@ -154,7 +150,7 @@ do_install() {
 	rm -rf ${DESTDIR}/usr/lib/firmware
 
 	for i in acpi asm-generic clocksource config crypto drm generated linux \
-		math-emu media net pcmcia scsi sound trace uapi video xen; do
+		math-emu media net pcmcia scsi sound trace uapi vdso video xen; do
 		[ -d include/$i ] && cp -a include/$i ${hdrdest}/include
 	done
 

From 05bf9390a7587f79613e628d987b7b0c621b7a58 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Wed, 4 Aug 2021 10:18:40 -0400
Subject: [PATCH 4/6] rpi4-kernel: update to 5.10.52.

---
 srcpkgs/rpi4-kernel/template | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/srcpkgs/rpi4-kernel/template b/srcpkgs/rpi4-kernel/template
index 04fbb7d64bb4..9ddae3fac5a3 100644
--- a/srcpkgs/rpi4-kernel/template
+++ b/srcpkgs/rpi4-kernel/template
@@ -1,15 +1,11 @@
 # Template file for 'rpi4-kernel'
-#
-# We track the latest Raspberry Pi LTS kernel as that is what is used in the
-# official Raspbian distribution. This is currently 5.4:
-#
-#   https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=269769
+# See rpi-kernel for version policy
 
-_githash="76c49e60e742d0bebd798be972d67dd3fd007691"
+_githash="86729e78125d4f3d203457940feee8bc97b11f6c"
 _gitshort="${_githash:0:7}"
 
 pkgname=rpi4-kernel
-version=5.4.83
+version=5.10.52
 revision=1
 archs="aarch64*"
 wrksrc="linux-${_githash}"
@@ -20,7 +16,7 @@ homepage="http://www.kernel.org"
 license="GPL-2.0-only"
 short_desc="Linux kernel for Raspberry Pi 4 (${version%.*} series [git ${_gitshort}])"
 distfiles="https://github.com/raspberrypi/linux/archive/${_githash}.tar.gz"
-checksum=4a98ea0d68c6e74d479789c12fc97619c872cb2607ae87a881a9491c1c3fbc35
+checksum=a25a7dfce4c2ca5bdca39ddab5e43539d9b04900b0dbefe19f4f9b053e59968c
 python_version=3
 conflicts=rpi3-kernel
 
@@ -145,7 +141,7 @@ do_install() {
 		mkdir -p ${hdrdest}/$(dirname $file)
 		install -Dm644 $file ${hdrdest}/${file}
 	done
-	for file in $(find arch/${_arch} -name module.lds -o -name Kbuild.platforms -o -name Platform); do
+	for file in $(find arch/${_arch} scripts -name module.lds -o -name Kbuild.platforms -o -name Platform); do
 		mkdir -p ${hdrdest}/$(dirname $file)
 		install -Dm644 $file ${hdrdest}/${file}
 	done
@@ -155,7 +151,7 @@ do_install() {
 	rm -rf ${DESTDIR}/usr/lib/firmware
 
 	for i in acpi asm-generic clocksource config crypto drm generated linux \
-		math-emu media net pcmcia scsi sound trace uapi video xen; do
+		math-emu media net pcmcia scsi sound trace uapi vdso video xen; do
 		[ -d include/$i ] && cp -a include/$i ${hdrdest}/include
 	done
 

From 41c8eee53d05b16dbff2722deed947bcb8108912 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Wed, 4 Aug 2021 11:59:50 -0300
Subject: [PATCH 5/6] common/build-style: add rpi-kernel.

---
 common/build-style/rpi-kernel.sh             | 164 +++++++++++++++++++
 common/environment/build-style/rpi-kernel.sh |  29 ++++
 2 files changed, 193 insertions(+)
 create mode 100644 common/build-style/rpi-kernel.sh
 create mode 100644 common/environment/build-style/rpi-kernel.sh

diff --git a/common/build-style/rpi-kernel.sh b/common/build-style/rpi-kernel.sh
new file mode 100644
index 000000000000..e830fe40c789
--- /dev/null
+++ b/common/build-style/rpi-kernel.sh
@@ -0,0 +1,164 @@
+do_configure() {
+	local target defconfig
+
+	# Use upstream's default configuration, no need to maintain ours.
+	case "$XBPS_TARGET_MACHINE" in
+		armv6l*)
+			target=$kernel_target
+			;;
+	esac
+
+	defconfig="arch/${_arch}/configs/${target}"
+	echo "CONFIG_CONNECTOR=y" >> "$defconfig"
+	echo "CONFIG_PROC_EVENTS=y" >> "$defconfig"
+	echo "CONFIG_F2FS_FS_SECURITY=y" >> "$defconfig"
+	echo "CONFIG_CGROUP_PIDS=y" >> "$defconfig"
+
+	# IR Remote Support
+	echo "CONFIG_RC_CORE=y" >> "$defconfig"
+	echo "CONFIG_LIRC=y" >> "$defconfig"
+	echo "CONFIG_RC_DECODERS=y" >> "$defconfig"
+	echo "CONFIG_RC_DEVICES=y" >> "$defconfig"
+	echo "CONFIG_IR_RC6_DECODER=m" >> "$defconfig"
+	echo "CONFIG_IR_MCEUSB=m" >> "$defconfig"
+
+	# HID Controllers
+	echo "CONFIG_HID_STEAM=y" >> "$defconfig"
+
+	# LXD 4.2+ support
+	echo "CONFIG_BRIDGE_VLAN_FILTERING=y" >> "$defconfig"
+
+	make ${makejobs} ${_cross} ARCH=${_arch} ${target}
+
+	# Always use our revision to CONFIG_LOCALVERSION to match our pkg version.
+	vsed -i -e "s|^\(CONFIG_LOCALVERSION=\).*|\1\"_${revision}\"|" .config
+}
+do_build() {
+	local target
+
+	case "$XBPS_TARGET_MACHINE" in
+		arm*)
+			target="zImage modules dtbs"
+			;;
+		aarch64*)
+			target="Image modules dtbs"
+			;;
+	esac
+
+	make ${makejobs} ${_cross} ARCH=${_arch} prepare
+	make ${makejobs} ${_cross} ARCH=${_arch} ${target}
+}
+do_install() {
+	local hdrdest
+
+	# Run depmod after compressing modules.
+	sed -i '2iexit 0' scripts/depmod.sh
+
+	# Install kernel, firmware and modules
+	make ${makejobs} ARCH=${_arch} INSTALL_MOD_PATH=${DESTDIR} modules_install
+
+	# Install device tree blobs
+	make ${makejobs} ARCH=${_arch} INSTALL_DTBS_PATH=${DESTDIR}/boot dtbs_install
+
+	# Generate kernel.img and install it to destdir.
+	vmkdir boot
+	cp arch/arm/boot/zImage ${DESTDIR}/boot/kernel.img
+
+	hdrdest=${DESTDIR}/usr/src/${sourcepkg}-headers-${_kernver}
+
+	# Switch to /usr.
+	vmkdir usr
+	mv ${DESTDIR}/lib ${DESTDIR}/usr
+
+	cd ${DESTDIR}/usr/lib/modules/${_kernver}
+	rm -f source build
+	ln -sf ../../../src/${sourcepkg}-headers-${_kernver} build
+
+	cd ${wrksrc}
+	# Install required headers to build external modules
+	install -Dm644 Makefile ${hdrdest}/Makefile
+	install -Dm644 kernel/Makefile ${hdrdest}/kernel/Makefile
+	install -Dm644 .config ${hdrdest}/.config
+	for file in $(find . -name Kconfig\*); do
+		mkdir -p ${hdrdest}/$(dirname $file)
+		install -Dm644 $file ${hdrdest}/${file}
+	done
+	for file in $(find arch/${_arch} scripts -name module.lds -o -name Kbuild.platforms -o -name Platform); do
+		mkdir -p ${hdrdest}/$(dirname $file)
+		install -Dm644 $file ${hdrdest}/${file}
+	done
+	mkdir -p ${hdrdest}/include
+
+	# Remove firmware stuff provided by the "linux-firmware" pkg.
+	rm -rf ${DESTDIR}/usr/lib/firmware
+
+	for i in acpi asm-generic clocksource config crypto drm generated linux \
+		math-emu media net pcmcia scsi sound trace uapi vdso video xen; do
+		[ -d include/$i ] && cp -a include/$i ${hdrdest}/include
+	done
+
+	cd ${wrksrc}
+	# Remove helper binaries built for host,
+	# if generated files from the scripts/ directory need to be included,
+	# they need to be copied to ${hdrdest} before this step
+	if [ "$CROSS_BUILD" ]; then
+		make ${makejobs} ARCH=${_arch} _mrproper_scripts
+		# remove host specific objects as well
+		find scripts -name '*.o' -delete
+	fi
+
+	# Copy files necessary for later builds.
+	cp Module.symvers ${hdrdest}
+	cp -a scripts ${hdrdest}
+	mkdir -p ${hdrdest}/security/selinux
+	cp -a security/selinux/include ${hdrdest}/security/selinux
+	mkdir -p ${hdrdest}/tools/include
+	cp -a tools/include/tools ${hdrdest}/tools/include
+	if [ -d "arch/${_arch}/tools" ]; then
+		cp -a arch/${_arch}/tools ${hdrdest}/arch/${_arch}
+	fi
+
+	# copy arch includes for external modules
+	mkdir -p ${hdrdest}/arch/${_arch}
+	cp -a arch/${_arch}/include ${hdrdest}/arch/${_arch}
+
+	mkdir -p ${hdrdest}/arch/${_arch}/kernel
+	cp arch/${_arch}/Makefile ${hdrdest}/arch/${_arch}
+	cp arch/${_arch}/kernel/asm-offsets.s ${hdrdest}/arch/${_arch}/kernel
+	if [ "$_arch" = "arm64" ] ; then
+		cp -a arch/${_arch}/kernel/vdso ${hdrdest}/arch/${_arch}/kernel/
+	fi
+
+	# Add md headers
+	mkdir -p ${hdrdest}/drivers/md
+	cp drivers/md/*.h ${hdrdest}/drivers/md
+
+	# Add inotify.h
+	mkdir -p ${hdrdest}/include/linux
+	cp include/linux/inotify.h ${hdrdest}/include/linux
+
+	# Add wireless headers
+	mkdir -p ${hdrdest}/net/mac80211/
+	cp net/mac80211/*.h ${hdrdest}/net/mac80211
+
+	# add dvb headers for external modules
+	mkdir -p ${hdrdest}/include/config/dvb/
+	cp include/config/dvb/*.h ${hdrdest}/include/config/dvb/
+
+	# Remove unneeded architectures
+	# (save the correct one + Kconfig and delete all others)
+	mkdir -p arch-backup
+	cp -r ${hdrdest}/arch/${_arch} ${hdrdest}/arch/Kconfig arch-backup/
+	rm -rf ${hdrdest}/arch
+	mv arch-backup ${hdrdest}/arch
+	# Keep arch/x86/ras/Kconfig as it is needed by drivers/ras/Kconfig
+	mkdir -p ${hdrdest}/arch/x86/ras
+	cp -a arch/x86/ras/Kconfig ${hdrdest}/arch/x86/ras/Kconfig
+
+	# Compress all modules with xz to save a few MBs.
+	msg_normal "$pkgver: compressing kernel modules with gzip, please wait...\n"
+	find ${DESTDIR} -name '*.ko' | xargs -n1 -P0 gzip -9
+
+	# ... and run depmod again.
+	depmod -b ${DESTDIR}/usr -F System.map ${_kernver}
+}
diff --git a/common/environment/build-style/rpi-kernel.sh b/common/environment/build-style/rpi-kernel.sh
new file mode 100644
index 000000000000..7234e7d40bfc
--- /dev/null
+++ b/common/environment/build-style/rpi-kernel.sh
@@ -0,0 +1,29 @@
+_kernver="${version}_${revision}"
+
+nodebug=yes
+nostrip=yes
+noverifyrdeps=yes
+noshlibprovides=yes
+
+triggers="kernel-hooks"
+# These files could be modified when an external module is built.
+mutable_files="
+	/usr/lib/modules/${_kernver}/modules.dep
+	/usr/lib/modules/${_kernver}/modules.dep.bin
+	/usr/lib/modules/${_kernver}/modules.symbols
+	/usr/lib/modules/${_kernver}/modules.symbols.bin
+	/usr/lib/modules/${_kernver}/modules.alias
+	/usr/lib/modules/${_kernver}/modules.alias.bin
+	/usr/lib/modules/${_kernver}/modules.devname"
+
+_arch=
+case "$XBPS_TARGET_MACHINE" in
+	arm*) _arch=arm ;;
+	aarch64*) _arch=arm64 ;;
+esac
+_cross=
+if [ "$CROSS_BUILD" ]; then
+	_cross="CROSS_COMPILE=${XBPS_CROSS_TRIPLET}-"
+fi
+
+python_version=3

From e1151866a52ab99f2f93451a0b892a291afa525a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Wed, 4 Aug 2021 12:00:07 -0300
Subject: [PATCH 6/6] rpi-kernel: use rpi-kernel build style.

And remove gitshort from short_desc.
---
 srcpkgs/rpi-kernel/template | 203 +-----------------------------------
 1 file changed, 3 insertions(+), 200 deletions(-)

diff --git a/srcpkgs/rpi-kernel/template b/srcpkgs/rpi-kernel/template
index 81a8c484d0a3..f704a13b3602 100644
--- a/srcpkgs/rpi-kernel/template
+++ b/srcpkgs/rpi-kernel/template
@@ -13,220 +13,23 @@
 # WARNING: keep all rpi*-kernel packages in sync
 
 _githash="86729e78125d4f3d203457940feee8bc97b11f6c"
-_gitshort="${_githash:0:7}"
 
 pkgname=rpi-kernel
 version=5.10.52
 revision=1
 archs="armv6l*"
+build_style=rpi-kernel
 wrksrc="linux-${_githash}"
 hostmakedepends="perl kmod uboot-mkimage openssl-devel bc bison flex"
 makedepends="ncurses-devel"
 maintainer="Piraty <piraty1@inbox.ru>"
 homepage="http://www.kernel.org"
 license="GPL-2.0-only"
-short_desc="Linux kernel for Raspberry Pi zero/1 (${version%.*} series [git ${_gitshort}])"
+short_desc="Linux kernel for Raspberry Pi zero/1 (${version%.*} series)"
 distfiles="https://github.com/raspberrypi/linux/archive/${_githash}.tar.gz"
 checksum=a25a7dfce4c2ca5bdca39ddab5e43539d9b04900b0dbefe19f4f9b053e59968c
-python_version=3
 
-_kernver="${version}_${revision}"
-
-nodebug=yes
-nostrip=yes
-noverifyrdeps=yes
-noshlibprovides=yes
-
-triggers="kernel-hooks"
-# These files could be modified when an external module is built.
-mutable_files="
-	/usr/lib/modules/${_kernver}/modules.dep
-	/usr/lib/modules/${_kernver}/modules.dep.bin
-	/usr/lib/modules/${_kernver}/modules.symbols
-	/usr/lib/modules/${_kernver}/modules.symbols.bin
-	/usr/lib/modules/${_kernver}/modules.alias
-	/usr/lib/modules/${_kernver}/modules.alias.bin
-	/usr/lib/modules/${_kernver}/modules.devname"
-
-_arch=
-case "$XBPS_TARGET_MACHINE" in
-	arm*) _arch=arm ;;
-	aarch64*) _arch=arm64 ;;
-esac
-_cross=
-if [ "$CROSS_BUILD" ]; then
-	_cross="CROSS_COMPILE=${XBPS_CROSS_TRIPLET}-"
-fi
-
-pre_configure() {
-	# Remove .git directory, otherwise scripts/setkernelversion.sh
-	# modifies KERNELRELEASE and appends + to it.
-	rm -rf .git
-}
-do_configure() {
-	local target defconfig
-
-	# Use upstream's default configuration, no need to maintain ours.
-	case "$XBPS_TARGET_MACHINE" in
-		armv6l*)
-			target=bcmrpi_defconfig
-			;;
-	esac
-
-	defconfig="arch/${_arch}/configs/${target}"
-	echo "CONFIG_CONNECTOR=y" >> "$defconfig"
-	echo "CONFIG_PROC_EVENTS=y" >> "$defconfig"
-	echo "CONFIG_F2FS_FS_SECURITY=y" >> "$defconfig"
-	echo "CONFIG_CGROUP_PIDS=y" >> "$defconfig"
-
-	# IR Remote Support
-	echo "CONFIG_RC_CORE=y" >> "$defconfig"
-	echo "CONFIG_LIRC=y" >> "$defconfig"
-	echo "CONFIG_RC_DECODERS=y" >> "$defconfig"
-	echo "CONFIG_RC_DEVICES=y" >> "$defconfig"
-	echo "CONFIG_IR_RC6_DECODER=m" >> "$defconfig"
-	echo "CONFIG_IR_MCEUSB=m" >> "$defconfig"
-
-	# HID Controllers
-	echo "CONFIG_HID_STEAM=y" >> "$defconfig"
-
-	# LXD 4.2+ support
-	echo "CONFIG_BRIDGE_VLAN_FILTERING=y" >> "$defconfig"
-
-	make ${makejobs} ${_cross} ARCH=${_arch} ${target}
-
-	# Always use our revision to CONFIG_LOCALVERSION to match our pkg version.
-	vsed -i -e "s|^\(CONFIG_LOCALVERSION=\).*|\1\"_${revision}\"|" .config
-}
-do_build() {
-	local target
-
-	case "$XBPS_TARGET_MACHINE" in
-		arm*)
-			target="zImage modules dtbs"
-			;;
-		aarch64*)
-			target="Image modules dtbs"
-			;;
-	esac
-
-	make ${makejobs} ${_cross} ARCH=${_arch} prepare
-	make ${makejobs} ${_cross} ARCH=${_arch} ${target}
-}
-do_install() {
-	local hdrdest
-
-	# Run depmod after compressing modules.
-	sed -i '2iexit 0' scripts/depmod.sh
-
-	# Install kernel, firmware and modules
-	make ${makejobs} ARCH=${_arch} INSTALL_MOD_PATH=${DESTDIR} modules_install
-
-	# Install device tree blobs
-	make ${makejobs} ARCH=${_arch} INSTALL_DTBS_PATH=${DESTDIR}/boot dtbs_install
-
-	# Generate kernel.img and install it to destdir.
-	vmkdir boot
-	cp arch/arm/boot/zImage ${DESTDIR}/boot/kernel.img
-
-	hdrdest=${DESTDIR}/usr/src/${sourcepkg}-headers-${_kernver}
-
-	# Switch to /usr.
-	vmkdir usr
-	mv ${DESTDIR}/lib ${DESTDIR}/usr
-
-	cd ${DESTDIR}/usr/lib/modules/${_kernver}
-	rm -f source build
-	ln -sf ../../../src/${sourcepkg}-headers-${_kernver} build
-
-	cd ${wrksrc}
-	# Install required headers to build external modules
-	install -Dm644 Makefile ${hdrdest}/Makefile
-	install -Dm644 kernel/Makefile ${hdrdest}/kernel/Makefile
-	install -Dm644 .config ${hdrdest}/.config
-	for file in $(find . -name Kconfig\*); do
-		mkdir -p ${hdrdest}/$(dirname $file)
-		install -Dm644 $file ${hdrdest}/${file}
-	done
-	for file in $(find arch/${_arch} scripts -name module.lds -o -name Kbuild.platforms -o -name Platform); do
-		mkdir -p ${hdrdest}/$(dirname $file)
-		install -Dm644 $file ${hdrdest}/${file}
-	done
-	mkdir -p ${hdrdest}/include
-
-	# Remove firmware stuff provided by the "linux-firmware" pkg.
-	rm -rf ${DESTDIR}/usr/lib/firmware
-
-	for i in acpi asm-generic clocksource config crypto drm generated linux \
-		math-emu media net pcmcia scsi sound trace uapi vdso video xen; do
-		[ -d include/$i ] && cp -a include/$i ${hdrdest}/include
-	done
-
-	cd ${wrksrc}
-	# Remove helper binaries built for host,
-	# if generated files from the scripts/ directory need to be included,
-	# they need to be copied to ${hdrdest} before this step
-	if [ "$CROSS_BUILD" ]; then
-		make ${makejobs} ARCH=${_arch} _mrproper_scripts
-		# remove host specific objects as well
-		find scripts -name '*.o' -delete
-	fi
-
-	# Copy files necessary for later builds.
-	cp Module.symvers ${hdrdest}
-	cp -a scripts ${hdrdest}
-	mkdir -p ${hdrdest}/security/selinux
-	cp -a security/selinux/include ${hdrdest}/security/selinux
-	mkdir -p ${hdrdest}/tools/include
-	cp -a tools/include/tools ${hdrdest}/tools/include
-	if [ -d "arch/${_arch}/tools" ]; then
-		cp -a arch/${_arch}/tools ${hdrdest}/arch/${_arch}
-	fi
-
-	# copy arch includes for external modules
-	mkdir -p ${hdrdest}/arch/${_arch}
-	cp -a arch/${_arch}/include ${hdrdest}/arch/${_arch}
-
-	mkdir -p ${hdrdest}/arch/${_arch}/kernel
-	cp arch/${_arch}/Makefile ${hdrdest}/arch/${_arch}
-	cp arch/${_arch}/kernel/asm-offsets.s ${hdrdest}/arch/${_arch}/kernel
-	if [ "$_arch" = "arm64" ] ; then
-		cp -a arch/${_arch}/kernel/vdso ${hdrdest}/arch/${_arch}/kernel/
-	fi
-
-	# Add md headers
-	mkdir -p ${hdrdest}/drivers/md
-	cp drivers/md/*.h ${hdrdest}/drivers/md
-
-	# Add inotify.h
-	mkdir -p ${hdrdest}/include/linux
-	cp include/linux/inotify.h ${hdrdest}/include/linux
-
-	# Add wireless headers
-	mkdir -p ${hdrdest}/net/mac80211/
-	cp net/mac80211/*.h ${hdrdest}/net/mac80211
-
-	# add dvb headers for external modules
-	mkdir -p ${hdrdest}/include/config/dvb/
-	cp include/config/dvb/*.h ${hdrdest}/include/config/dvb/
-
-	# Remove unneeded architectures
-	# (save the correct one + Kconfig and delete all others)
-	mkdir -p arch-backup
-	cp -r ${hdrdest}/arch/${_arch} ${hdrdest}/arch/Kconfig arch-backup/
-	rm -rf ${hdrdest}/arch
-	mv arch-backup ${hdrdest}/arch
-	# Keep arch/x86/ras/Kconfig as it is needed by drivers/ras/Kconfig
-	mkdir -p ${hdrdest}/arch/x86/ras
-	cp -a arch/x86/ras/Kconfig ${hdrdest}/arch/x86/ras/Kconfig
-
-	# Compress all modules with xz to save a few MBs.
-	msg_normal "$pkgver: compressing kernel modules with gzip, please wait...\n"
-	find ${DESTDIR} -name '*.ko' | xargs -n1 -P0 gzip -9
-
-	# ... and run depmod again.
-	depmod -b ${DESTDIR}/usr -F System.map ${_kernver}
-}
+kernel_target=bcmrpi_defconfig
 
 rpi-kernel-headers_package() {
 	nostrip=yes

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR PATCH] [Updated] rpi-kernel: update to 5.10.52.
  2021-07-28  4:43 [PR PATCH] rpi-kernel: update to 5.10.52 ericonr
                   ` (6 preceding siblings ...)
  2021-08-04 15:01 ` ericonr
@ 2021-08-04 15:03 ` ericonr
  2021-08-04 18:28 ` ahesford
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: ericonr @ 2021-08-04 15:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1854 bytes --]

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages rpi
https://github.com/void-linux/void-packages/pull/32224

rpi-kernel: update to 5.10.52.
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

I'm unsure how picking the upstream commit works? I'd like to document that too...

https://github.com/raspberrypi/linux/commit/7772256a0635f0dd5b03f4736402c6c0d6371f32 is the merge, but there seem to be a bunch of reverts right after that one.

[ci-skip]

A patch file from https://github.com/void-linux/void-packages/pull/32224.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-rpi-32224.patch --]
[-- Type: text/x-diff, Size: 24579 bytes --]

From 4893b9f0d7b7a542e7e93ec20af8de1af5a6c64b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Wed, 28 Jul 2021 01:38:42 -0300
Subject: [PATCH 1/6] rpi-kernel: update to 5.10.52.

- document how we pick the commit to be used
- fix header installations so dkms works; based on fixes to mainline
  kernel packages

In this update, we are using the commit from
https://github.com/raspberrypi/linux/releases/tag/1.20210727
---
 srcpkgs/rpi-kernel/template | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/rpi-kernel/template b/srcpkgs/rpi-kernel/template
index 8067f5d7ab7f..81a8c484d0a3 100644
--- a/srcpkgs/rpi-kernel/template
+++ b/srcpkgs/rpi-kernel/template
@@ -1,16 +1,23 @@
 # Template file for 'rpi-kernel'
 #
 # We track the latest Raspberry Pi LTS kernel as that is what is used in the
-# official Raspbian distribution. This is currently 5.4:
+# official Raspbian distribution. This is currently 5.10:
 #
-#   https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=269769
+# https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=288234
+#
+# Commit hash is picked from latest tag [1], if appropriate, or from latest
+# "Merge remote-tracking branch 'stable/linux-5.10.y' into rpi-5.10.y" commit.
+#
+# [1] https://github.com/raspberrypi/linux/releases
+#
+# WARNING: keep all rpi*-kernel packages in sync
 
-_githash="76c49e60e742d0bebd798be972d67dd3fd007691"
+_githash="86729e78125d4f3d203457940feee8bc97b11f6c"
 _gitshort="${_githash:0:7}"
 
 pkgname=rpi-kernel
-version=5.4.83
-revision=2
+version=5.10.52
+revision=1
 archs="armv6l*"
 wrksrc="linux-${_githash}"
 hostmakedepends="perl kmod uboot-mkimage openssl-devel bc bison flex"
@@ -20,7 +27,7 @@ homepage="http://www.kernel.org"
 license="GPL-2.0-only"
 short_desc="Linux kernel for Raspberry Pi zero/1 (${version%.*} series [git ${_gitshort}])"
 distfiles="https://github.com/raspberrypi/linux/archive/${_githash}.tar.gz"
-checksum=4a98ea0d68c6e74d479789c12fc97619c872cb2607ae87a881a9491c1c3fbc35
+checksum=a25a7dfce4c2ca5bdca39ddab5e43539d9b04900b0dbefe19f4f9b053e59968c
 python_version=3
 
 _kernver="${version}_${revision}"
@@ -141,7 +148,7 @@ do_install() {
 		mkdir -p ${hdrdest}/$(dirname $file)
 		install -Dm644 $file ${hdrdest}/${file}
 	done
-	for file in $(find arch/${_arch} -name module.lds -o -name Kbuild.platforms -o -name Platform); do
+	for file in $(find arch/${_arch} scripts -name module.lds -o -name Kbuild.platforms -o -name Platform); do
 		mkdir -p ${hdrdest}/$(dirname $file)
 		install -Dm644 $file ${hdrdest}/${file}
 	done
@@ -151,7 +158,7 @@ do_install() {
 	rm -rf ${DESTDIR}/usr/lib/firmware
 
 	for i in acpi asm-generic clocksource config crypto drm generated linux \
-		math-emu media net pcmcia scsi sound trace uapi video xen; do
+		math-emu media net pcmcia scsi sound trace uapi vdso video xen; do
 		[ -d include/$i ] && cp -a include/$i ${hdrdest}/include
 	done
 

From eac95b662c4d496aae2df526931099720f29236a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Wed, 4 Aug 2021 11:42:39 -0300
Subject: [PATCH 2/6] rpi2-kernel: update to 5.10.52.

---
 srcpkgs/rpi2-kernel/template | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/rpi2-kernel/template b/srcpkgs/rpi2-kernel/template
index cda240234550..cc861a0a261a 100644
--- a/srcpkgs/rpi2-kernel/template
+++ b/srcpkgs/rpi2-kernel/template
@@ -1,16 +1,12 @@
 # Template file for 'rpi2-kernel'
-#
-# We track the latest Raspberry Pi LTS kernel as that is what is used in the
-# official Raspbian distribution. This is currently 5.4:
-#
-#   https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=269769
+# See rpi-kernel for version policy
 
-_githash="76c49e60e742d0bebd798be972d67dd3fd007691"
+_githash="86729e78125d4f3d203457940feee8bc97b11f6c"
 _gitshort="${_githash:0:7}"
 
 pkgname=rpi2-kernel
-version=5.4.83
-revision=2
+version=5.10.52
+revision=1
 archs="armv7l*"
 wrksrc="linux-${_githash}"
 hostmakedepends="perl kmod uboot-mkimage openssl-devel bc bison flex"
@@ -20,7 +16,7 @@ homepage="http://www.kernel.org"
 license="GPL-2.0-only"
 short_desc="Linux kernel for Raspberry Pi 2 (${version%.*} series [git ${_gitshort}])"
 distfiles="https://github.com/raspberrypi/linux/archive/${_githash}.tar.gz"
-checksum=4a98ea0d68c6e74d479789c12fc97619c872cb2607ae87a881a9491c1c3fbc35
+checksum=a25a7dfce4c2ca5bdca39ddab5e43539d9b04900b0dbefe19f4f9b053e59968c
 python_version=3
 
 _kernver="${version}_${revision}"
@@ -141,7 +137,7 @@ do_install() {
 		mkdir -p ${hdrdest}/$(dirname $file)
 		install -Dm644 $file ${hdrdest}/${file}
 	done
-	for file in $(find arch/${_arch} -name module.lds -o -name Kbuild.platforms -o -name Platform); do
+	for file in $(find arch/${_arch} scripts -name module.lds -o -name Kbuild.platforms -o -name Platform); do
 		mkdir -p ${hdrdest}/$(dirname $file)
 		install -Dm644 $file ${hdrdest}/${file}
 	done
@@ -151,7 +147,7 @@ do_install() {
 	rm -rf ${DESTDIR}/usr/lib/firmware
 
 	for i in acpi asm-generic clocksource config crypto drm generated linux \
-		math-emu media net pcmcia scsi sound trace uapi video xen; do
+		math-emu media net pcmcia scsi sound trace uapi vdso video xen; do
 		[ -d include/$i ] && cp -a include/$i ${hdrdest}/include
 	done
 

From 696db0c0f342a093a384cd5e34a206d893037f1e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Wed, 4 Aug 2021 11:42:20 -0300
Subject: [PATCH 3/6] rpi3-kernel: update to 5.10.52.

---
 srcpkgs/rpi3-kernel/template | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/rpi3-kernel/template b/srcpkgs/rpi3-kernel/template
index a3a16bc577fc..0dd5ce9593db 100644
--- a/srcpkgs/rpi3-kernel/template
+++ b/srcpkgs/rpi3-kernel/template
@@ -1,16 +1,12 @@
 # Template file for 'rpi3-kernel'
-#
-# We track the latest Raspberry Pi LTS kernel as that is what is used in the
-# official Raspbian distribution. This is currently 5.4:
-#
-#   https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=269769
+# See rpi-kernel for version policy
 
-_githash="76c49e60e742d0bebd798be972d67dd3fd007691"
+_githash="86729e78125d4f3d203457940feee8bc97b11f6c"
 _gitshort="${_githash:0:7}"
 
 pkgname=rpi3-kernel
-version=5.4.83
-revision=2
+version=5.10.52
+revision=1
 archs="aarch64*"
 wrksrc="linux-${_githash}"
 hostmakedepends="perl kmod uboot-mkimage openssl-devel bc bison flex"
@@ -20,7 +16,7 @@ homepage="http://www.kernel.org"
 license="GPL-2.0-only"
 short_desc="Linux kernel for Raspberry Pi 3 (${version%.*} series [git ${_gitshort}])"
 distfiles="https://github.com/raspberrypi/linux/archive/${_githash}.tar.gz"
-checksum=4a98ea0d68c6e74d479789c12fc97619c872cb2607ae87a881a9491c1c3fbc35
+checksum=a25a7dfce4c2ca5bdca39ddab5e43539d9b04900b0dbefe19f4f9b053e59968c
 python_version=3
 
 _kernver="${version}_${revision}"
@@ -144,7 +140,7 @@ do_install() {
 		mkdir -p ${hdrdest}/$(dirname $file)
 		install -Dm644 $file ${hdrdest}/${file}
 	done
-	for file in $(find arch/${_arch} -name module.lds -o -name Kbuild.platforms -o -name Platform); do
+	for file in $(find arch/${_arch} scripts -name module.lds -o -name Kbuild.platforms -o -name Platform); do
 		mkdir -p ${hdrdest}/$(dirname $file)
 		install -Dm644 $file ${hdrdest}/${file}
 	done
@@ -154,7 +150,7 @@ do_install() {
 	rm -rf ${DESTDIR}/usr/lib/firmware
 
 	for i in acpi asm-generic clocksource config crypto drm generated linux \
-		math-emu media net pcmcia scsi sound trace uapi video xen; do
+		math-emu media net pcmcia scsi sound trace uapi vdso video xen; do
 		[ -d include/$i ] && cp -a include/$i ${hdrdest}/include
 	done
 

From 05bf9390a7587f79613e628d987b7b0c621b7a58 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Wed, 4 Aug 2021 10:18:40 -0400
Subject: [PATCH 4/6] rpi4-kernel: update to 5.10.52.

---
 srcpkgs/rpi4-kernel/template | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/srcpkgs/rpi4-kernel/template b/srcpkgs/rpi4-kernel/template
index 04fbb7d64bb4..9ddae3fac5a3 100644
--- a/srcpkgs/rpi4-kernel/template
+++ b/srcpkgs/rpi4-kernel/template
@@ -1,15 +1,11 @@
 # Template file for 'rpi4-kernel'
-#
-# We track the latest Raspberry Pi LTS kernel as that is what is used in the
-# official Raspbian distribution. This is currently 5.4:
-#
-#   https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=269769
+# See rpi-kernel for version policy
 
-_githash="76c49e60e742d0bebd798be972d67dd3fd007691"
+_githash="86729e78125d4f3d203457940feee8bc97b11f6c"
 _gitshort="${_githash:0:7}"
 
 pkgname=rpi4-kernel
-version=5.4.83
+version=5.10.52
 revision=1
 archs="aarch64*"
 wrksrc="linux-${_githash}"
@@ -20,7 +16,7 @@ homepage="http://www.kernel.org"
 license="GPL-2.0-only"
 short_desc="Linux kernel for Raspberry Pi 4 (${version%.*} series [git ${_gitshort}])"
 distfiles="https://github.com/raspberrypi/linux/archive/${_githash}.tar.gz"
-checksum=4a98ea0d68c6e74d479789c12fc97619c872cb2607ae87a881a9491c1c3fbc35
+checksum=a25a7dfce4c2ca5bdca39ddab5e43539d9b04900b0dbefe19f4f9b053e59968c
 python_version=3
 conflicts=rpi3-kernel
 
@@ -145,7 +141,7 @@ do_install() {
 		mkdir -p ${hdrdest}/$(dirname $file)
 		install -Dm644 $file ${hdrdest}/${file}
 	done
-	for file in $(find arch/${_arch} -name module.lds -o -name Kbuild.platforms -o -name Platform); do
+	for file in $(find arch/${_arch} scripts -name module.lds -o -name Kbuild.platforms -o -name Platform); do
 		mkdir -p ${hdrdest}/$(dirname $file)
 		install -Dm644 $file ${hdrdest}/${file}
 	done
@@ -155,7 +151,7 @@ do_install() {
 	rm -rf ${DESTDIR}/usr/lib/firmware
 
 	for i in acpi asm-generic clocksource config crypto drm generated linux \
-		math-emu media net pcmcia scsi sound trace uapi video xen; do
+		math-emu media net pcmcia scsi sound trace uapi vdso video xen; do
 		[ -d include/$i ] && cp -a include/$i ${hdrdest}/include
 	done
 

From 63466d6147cbfe9b4e44a925064b2de0ebeed572 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Wed, 4 Aug 2021 11:59:50 -0300
Subject: [PATCH 5/6] common/build-style: add rpi-kernel.

---
 common/build-style/rpi-kernel.sh             | 160 +++++++++++++++++++
 common/environment/build-style/rpi-kernel.sh |  29 ++++
 2 files changed, 189 insertions(+)
 create mode 100644 common/build-style/rpi-kernel.sh
 create mode 100644 common/environment/build-style/rpi-kernel.sh

diff --git a/common/build-style/rpi-kernel.sh b/common/build-style/rpi-kernel.sh
new file mode 100644
index 000000000000..0456a6b6dadc
--- /dev/null
+++ b/common/build-style/rpi-kernel.sh
@@ -0,0 +1,160 @@
+do_configure() {
+	local target defconfig
+
+	# Use upstream's default configuration, no need to maintain ours.
+	target=$kernel_target
+
+	defconfig="arch/${_arch}/configs/${target}"
+	echo "CONFIG_CONNECTOR=y" >> "$defconfig"
+	echo "CONFIG_PROC_EVENTS=y" >> "$defconfig"
+	echo "CONFIG_F2FS_FS_SECURITY=y" >> "$defconfig"
+	echo "CONFIG_CGROUP_PIDS=y" >> "$defconfig"
+
+	# IR Remote Support
+	echo "CONFIG_RC_CORE=y" >> "$defconfig"
+	echo "CONFIG_LIRC=y" >> "$defconfig"
+	echo "CONFIG_RC_DECODERS=y" >> "$defconfig"
+	echo "CONFIG_RC_DEVICES=y" >> "$defconfig"
+	echo "CONFIG_IR_RC6_DECODER=m" >> "$defconfig"
+	echo "CONFIG_IR_MCEUSB=m" >> "$defconfig"
+
+	# HID Controllers
+	echo "CONFIG_HID_STEAM=y" >> "$defconfig"
+
+	# LXD 4.2+ support
+	echo "CONFIG_BRIDGE_VLAN_FILTERING=y" >> "$defconfig"
+
+	make ${makejobs} ${_cross} ARCH=${_arch} ${target}
+
+	# Always use our revision to CONFIG_LOCALVERSION to match our pkg version.
+	vsed -i -e "s|^\(CONFIG_LOCALVERSION=\).*|\1\"_${revision}\"|" .config
+}
+do_build() {
+	local target
+
+	case "$XBPS_TARGET_MACHINE" in
+		arm*)
+			target="zImage modules dtbs"
+			;;
+		aarch64*)
+			target="Image modules dtbs"
+			;;
+	esac
+
+	make ${makejobs} ${_cross} ARCH=${_arch} prepare
+	make ${makejobs} ${_cross} ARCH=${_arch} ${target}
+}
+do_install() {
+	local hdrdest
+
+	# Run depmod after compressing modules.
+	sed -i '2iexit 0' scripts/depmod.sh
+
+	# Install kernel, firmware and modules
+	make ${makejobs} ARCH=${_arch} INSTALL_MOD_PATH=${DESTDIR} modules_install
+
+	# Install device tree blobs
+	make ${makejobs} ARCH=${_arch} INSTALL_DTBS_PATH=${DESTDIR}/boot dtbs_install
+
+	# Generate kernel.img and install it to destdir.
+	vmkdir boot
+	cp arch/arm/boot/zImage ${DESTDIR}/boot/kernel.img
+
+	hdrdest=${DESTDIR}/usr/src/${sourcepkg}-headers-${_kernver}
+
+	# Switch to /usr.
+	vmkdir usr
+	mv ${DESTDIR}/lib ${DESTDIR}/usr
+
+	cd ${DESTDIR}/usr/lib/modules/${_kernver}
+	rm -f source build
+	ln -sf ../../../src/${sourcepkg}-headers-${_kernver} build
+
+	cd ${wrksrc}
+	# Install required headers to build external modules
+	install -Dm644 Makefile ${hdrdest}/Makefile
+	install -Dm644 kernel/Makefile ${hdrdest}/kernel/Makefile
+	install -Dm644 .config ${hdrdest}/.config
+	for file in $(find . -name Kconfig\*); do
+		mkdir -p ${hdrdest}/$(dirname $file)
+		install -Dm644 $file ${hdrdest}/${file}
+	done
+	for file in $(find arch/${_arch} scripts -name module.lds -o -name Kbuild.platforms -o -name Platform); do
+		mkdir -p ${hdrdest}/$(dirname $file)
+		install -Dm644 $file ${hdrdest}/${file}
+	done
+	mkdir -p ${hdrdest}/include
+
+	# Remove firmware stuff provided by the "linux-firmware" pkg.
+	rm -rf ${DESTDIR}/usr/lib/firmware
+
+	for i in acpi asm-generic clocksource config crypto drm generated linux \
+		math-emu media net pcmcia scsi sound trace uapi vdso video xen; do
+		[ -d include/$i ] && cp -a include/$i ${hdrdest}/include
+	done
+
+	cd ${wrksrc}
+	# Remove helper binaries built for host,
+	# if generated files from the scripts/ directory need to be included,
+	# they need to be copied to ${hdrdest} before this step
+	if [ "$CROSS_BUILD" ]; then
+		make ${makejobs} ARCH=${_arch} _mrproper_scripts
+		# remove host specific objects as well
+		find scripts -name '*.o' -delete
+	fi
+
+	# Copy files necessary for later builds.
+	cp Module.symvers ${hdrdest}
+	cp -a scripts ${hdrdest}
+	mkdir -p ${hdrdest}/security/selinux
+	cp -a security/selinux/include ${hdrdest}/security/selinux
+	mkdir -p ${hdrdest}/tools/include
+	cp -a tools/include/tools ${hdrdest}/tools/include
+	if [ -d "arch/${_arch}/tools" ]; then
+		cp -a arch/${_arch}/tools ${hdrdest}/arch/${_arch}
+	fi
+
+	# copy arch includes for external modules
+	mkdir -p ${hdrdest}/arch/${_arch}
+	cp -a arch/${_arch}/include ${hdrdest}/arch/${_arch}
+
+	mkdir -p ${hdrdest}/arch/${_arch}/kernel
+	cp arch/${_arch}/Makefile ${hdrdest}/arch/${_arch}
+	cp arch/${_arch}/kernel/asm-offsets.s ${hdrdest}/arch/${_arch}/kernel
+	if [ "$_arch" = "arm64" ] ; then
+		cp -a arch/${_arch}/kernel/vdso ${hdrdest}/arch/${_arch}/kernel/
+	fi
+
+	# Add md headers
+	mkdir -p ${hdrdest}/drivers/md
+	cp drivers/md/*.h ${hdrdest}/drivers/md
+
+	# Add inotify.h
+	mkdir -p ${hdrdest}/include/linux
+	cp include/linux/inotify.h ${hdrdest}/include/linux
+
+	# Add wireless headers
+	mkdir -p ${hdrdest}/net/mac80211/
+	cp net/mac80211/*.h ${hdrdest}/net/mac80211
+
+	# add dvb headers for external modules
+	mkdir -p ${hdrdest}/include/config/dvb/
+	cp include/config/dvb/*.h ${hdrdest}/include/config/dvb/
+
+	# Remove unneeded architectures
+	# (save the correct one + Kconfig and delete all others)
+	mkdir -p arch-backup
+	cp -r ${hdrdest}/arch/${_arch} ${hdrdest}/arch/Kconfig arch-backup/
+	rm -rf ${hdrdest}/arch
+	mv arch-backup ${hdrdest}/arch
+	# Keep arch/x86/ras/Kconfig as it is needed by drivers/ras/Kconfig
+	mkdir -p ${hdrdest}/arch/x86/ras
+	cp -a arch/x86/ras/Kconfig ${hdrdest}/arch/x86/ras/Kconfig
+
+	# Compress all modules with xz to save a few MBs.
+	msg_normal "$pkgver: compressing kernel modules with gzip, please wait...\n"
+	find ${DESTDIR} -name '*.ko' | xargs -n1 -P0 gzip -9
+
+	# ... and run depmod again.
+	depmod -b ${DESTDIR}/usr -F System.map ${_kernver}
+}
diff --git a/common/environment/build-style/rpi-kernel.sh b/common/environment/build-style/rpi-kernel.sh
new file mode 100644
index 000000000000..7234e7d40bfc
--- /dev/null
+++ b/common/environment/build-style/rpi-kernel.sh
@@ -0,0 +1,29 @@
+_kernver="${version}_${revision}"
+
+nodebug=yes
+nostrip=yes
+noverifyrdeps=yes
+noshlibprovides=yes
+
+triggers="kernel-hooks"
+# These files could be modified when an external module is built.
+mutable_files="
+	/usr/lib/modules/${_kernver}/modules.dep
+	/usr/lib/modules/${_kernver}/modules.dep.bin
+	/usr/lib/modules/${_kernver}/modules.symbols
+	/usr/lib/modules/${_kernver}/modules.symbols.bin
+	/usr/lib/modules/${_kernver}/modules.alias
+	/usr/lib/modules/${_kernver}/modules.alias.bin
+	/usr/lib/modules/${_kernver}/modules.devname"
+
+_arch=
+case "$XBPS_TARGET_MACHINE" in
+	arm*) _arch=arm ;;
+	aarch64*) _arch=arm64 ;;
+esac
+_cross=
+if [ "$CROSS_BUILD" ]; then
+	_cross="CROSS_COMPILE=${XBPS_CROSS_TRIPLET}-"
+fi
+
+python_version=3

From 0c284b015288712fbe5556ab1c043ac027c02840 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Wed, 4 Aug 2021 12:00:07 -0300
Subject: [PATCH 6/6] rpi-kernel: use rpi-kernel build style.

And remove gitshort from short_desc.
---
 srcpkgs/rpi-kernel/template | 203 +-----------------------------------
 1 file changed, 3 insertions(+), 200 deletions(-)

diff --git a/srcpkgs/rpi-kernel/template b/srcpkgs/rpi-kernel/template
index 81a8c484d0a3..f704a13b3602 100644
--- a/srcpkgs/rpi-kernel/template
+++ b/srcpkgs/rpi-kernel/template
@@ -13,220 +13,23 @@
 # WARNING: keep all rpi*-kernel packages in sync
 
 _githash="86729e78125d4f3d203457940feee8bc97b11f6c"
-_gitshort="${_githash:0:7}"
 
 pkgname=rpi-kernel
 version=5.10.52
 revision=1
 archs="armv6l*"
+build_style=rpi-kernel
 wrksrc="linux-${_githash}"
 hostmakedepends="perl kmod uboot-mkimage openssl-devel bc bison flex"
 makedepends="ncurses-devel"
 maintainer="Piraty <piraty1@inbox.ru>"
 homepage="http://www.kernel.org"
 license="GPL-2.0-only"
-short_desc="Linux kernel for Raspberry Pi zero/1 (${version%.*} series [git ${_gitshort}])"
+short_desc="Linux kernel for Raspberry Pi zero/1 (${version%.*} series)"
 distfiles="https://github.com/raspberrypi/linux/archive/${_githash}.tar.gz"
 checksum=a25a7dfce4c2ca5bdca39ddab5e43539d9b04900b0dbefe19f4f9b053e59968c
-python_version=3
 
-_kernver="${version}_${revision}"
-
-nodebug=yes
-nostrip=yes
-noverifyrdeps=yes
-noshlibprovides=yes
-
-triggers="kernel-hooks"
-# These files could be modified when an external module is built.
-mutable_files="
-	/usr/lib/modules/${_kernver}/modules.dep
-	/usr/lib/modules/${_kernver}/modules.dep.bin
-	/usr/lib/modules/${_kernver}/modules.symbols
-	/usr/lib/modules/${_kernver}/modules.symbols.bin
-	/usr/lib/modules/${_kernver}/modules.alias
-	/usr/lib/modules/${_kernver}/modules.alias.bin
-	/usr/lib/modules/${_kernver}/modules.devname"
-
-_arch=
-case "$XBPS_TARGET_MACHINE" in
-	arm*) _arch=arm ;;
-	aarch64*) _arch=arm64 ;;
-esac
-_cross=
-if [ "$CROSS_BUILD" ]; then
-	_cross="CROSS_COMPILE=${XBPS_CROSS_TRIPLET}-"
-fi
-
-pre_configure() {
-	# Remove .git directory, otherwise scripts/setkernelversion.sh
-	# modifies KERNELRELEASE and appends + to it.
-	rm -rf .git
-}
-do_configure() {
-	local target defconfig
-
-	# Use upstream's default configuration, no need to maintain ours.
-	case "$XBPS_TARGET_MACHINE" in
-		armv6l*)
-			target=bcmrpi_defconfig
-			;;
-	esac
-
-	defconfig="arch/${_arch}/configs/${target}"
-	echo "CONFIG_CONNECTOR=y" >> "$defconfig"
-	echo "CONFIG_PROC_EVENTS=y" >> "$defconfig"
-	echo "CONFIG_F2FS_FS_SECURITY=y" >> "$defconfig"
-	echo "CONFIG_CGROUP_PIDS=y" >> "$defconfig"
-
-	# IR Remote Support
-	echo "CONFIG_RC_CORE=y" >> "$defconfig"
-	echo "CONFIG_LIRC=y" >> "$defconfig"
-	echo "CONFIG_RC_DECODERS=y" >> "$defconfig"
-	echo "CONFIG_RC_DEVICES=y" >> "$defconfig"
-	echo "CONFIG_IR_RC6_DECODER=m" >> "$defconfig"
-	echo "CONFIG_IR_MCEUSB=m" >> "$defconfig"
-
-	# HID Controllers
-	echo "CONFIG_HID_STEAM=y" >> "$defconfig"
-
-	# LXD 4.2+ support
-	echo "CONFIG_BRIDGE_VLAN_FILTERING=y" >> "$defconfig"
-
-	make ${makejobs} ${_cross} ARCH=${_arch} ${target}
-
-	# Always use our revision to CONFIG_LOCALVERSION to match our pkg version.
-	vsed -i -e "s|^\(CONFIG_LOCALVERSION=\).*|\1\"_${revision}\"|" .config
-}
-do_build() {
-	local target
-
-	case "$XBPS_TARGET_MACHINE" in
-		arm*)
-			target="zImage modules dtbs"
-			;;
-		aarch64*)
-			target="Image modules dtbs"
-			;;
-	esac
-
-	make ${makejobs} ${_cross} ARCH=${_arch} prepare
-	make ${makejobs} ${_cross} ARCH=${_arch} ${target}
-}
-do_install() {
-	local hdrdest
-
-	# Run depmod after compressing modules.
-	sed -i '2iexit 0' scripts/depmod.sh
-
-	# Install kernel, firmware and modules
-	make ${makejobs} ARCH=${_arch} INSTALL_MOD_PATH=${DESTDIR} modules_install
-
-	# Install device tree blobs
-	make ${makejobs} ARCH=${_arch} INSTALL_DTBS_PATH=${DESTDIR}/boot dtbs_install
-
-	# Generate kernel.img and install it to destdir.
-	vmkdir boot
-	cp arch/arm/boot/zImage ${DESTDIR}/boot/kernel.img
-
-	hdrdest=${DESTDIR}/usr/src/${sourcepkg}-headers-${_kernver}
-
-	# Switch to /usr.
-	vmkdir usr
-	mv ${DESTDIR}/lib ${DESTDIR}/usr
-
-	cd ${DESTDIR}/usr/lib/modules/${_kernver}
-	rm -f source build
-	ln -sf ../../../src/${sourcepkg}-headers-${_kernver} build
-
-	cd ${wrksrc}
-	# Install required headers to build external modules
-	install -Dm644 Makefile ${hdrdest}/Makefile
-	install -Dm644 kernel/Makefile ${hdrdest}/kernel/Makefile
-	install -Dm644 .config ${hdrdest}/.config
-	for file in $(find . -name Kconfig\*); do
-		mkdir -p ${hdrdest}/$(dirname $file)
-		install -Dm644 $file ${hdrdest}/${file}
-	done
-	for file in $(find arch/${_arch} scripts -name module.lds -o -name Kbuild.platforms -o -name Platform); do
-		mkdir -p ${hdrdest}/$(dirname $file)
-		install -Dm644 $file ${hdrdest}/${file}
-	done
-	mkdir -p ${hdrdest}/include
-
-	# Remove firmware stuff provided by the "linux-firmware" pkg.
-	rm -rf ${DESTDIR}/usr/lib/firmware
-
-	for i in acpi asm-generic clocksource config crypto drm generated linux \
-		math-emu media net pcmcia scsi sound trace uapi vdso video xen; do
-		[ -d include/$i ] && cp -a include/$i ${hdrdest}/include
-	done
-
-	cd ${wrksrc}
-	# Remove helper binaries built for host,
-	# if generated files from the scripts/ directory need to be included,
-	# they need to be copied to ${hdrdest} before this step
-	if [ "$CROSS_BUILD" ]; then
-		make ${makejobs} ARCH=${_arch} _mrproper_scripts
-		# remove host specific objects as well
-		find scripts -name '*.o' -delete
-	fi
-
-	# Copy files necessary for later builds.
-	cp Module.symvers ${hdrdest}
-	cp -a scripts ${hdrdest}
-	mkdir -p ${hdrdest}/security/selinux
-	cp -a security/selinux/include ${hdrdest}/security/selinux
-	mkdir -p ${hdrdest}/tools/include
-	cp -a tools/include/tools ${hdrdest}/tools/include
-	if [ -d "arch/${_arch}/tools" ]; then
-		cp -a arch/${_arch}/tools ${hdrdest}/arch/${_arch}
-	fi
-
-	# copy arch includes for external modules
-	mkdir -p ${hdrdest}/arch/${_arch}
-	cp -a arch/${_arch}/include ${hdrdest}/arch/${_arch}
-
-	mkdir -p ${hdrdest}/arch/${_arch}/kernel
-	cp arch/${_arch}/Makefile ${hdrdest}/arch/${_arch}
-	cp arch/${_arch}/kernel/asm-offsets.s ${hdrdest}/arch/${_arch}/kernel
-	if [ "$_arch" = "arm64" ] ; then
-		cp -a arch/${_arch}/kernel/vdso ${hdrdest}/arch/${_arch}/kernel/
-	fi
-
-	# Add md headers
-	mkdir -p ${hdrdest}/drivers/md
-	cp drivers/md/*.h ${hdrdest}/drivers/md
-
-	# Add inotify.h
-	mkdir -p ${hdrdest}/include/linux
-	cp include/linux/inotify.h ${hdrdest}/include/linux
-
-	# Add wireless headers
-	mkdir -p ${hdrdest}/net/mac80211/
-	cp net/mac80211/*.h ${hdrdest}/net/mac80211
-
-	# add dvb headers for external modules
-	mkdir -p ${hdrdest}/include/config/dvb/
-	cp include/config/dvb/*.h ${hdrdest}/include/config/dvb/
-
-	# Remove unneeded architectures
-	# (save the correct one + Kconfig and delete all others)
-	mkdir -p arch-backup
-	cp -r ${hdrdest}/arch/${_arch} ${hdrdest}/arch/Kconfig arch-backup/
-	rm -rf ${hdrdest}/arch
-	mv arch-backup ${hdrdest}/arch
-	# Keep arch/x86/ras/Kconfig as it is needed by drivers/ras/Kconfig
-	mkdir -p ${hdrdest}/arch/x86/ras
-	cp -a arch/x86/ras/Kconfig ${hdrdest}/arch/x86/ras/Kconfig
-
-	# Compress all modules with xz to save a few MBs.
-	msg_normal "$pkgver: compressing kernel modules with gzip, please wait...\n"
-	find ${DESTDIR} -name '*.ko' | xargs -n1 -P0 gzip -9
-
-	# ... and run depmod again.
-	depmod -b ${DESTDIR}/usr -F System.map ${_kernver}
-}
+kernel_target=bcmrpi_defconfig
 
 rpi-kernel-headers_package() {
 	nostrip=yes

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: rpi-kernel: update to 5.10.52.
  2021-07-28  4:43 [PR PATCH] rpi-kernel: update to 5.10.52 ericonr
                   ` (7 preceding siblings ...)
  2021-08-04 15:03 ` ericonr
@ 2021-08-04 18:28 ` ahesford
  2021-08-09 22:06 ` ftpd
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: ahesford @ 2021-08-04 18:28 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 183 bytes --]

New comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/32224#issuecomment-892877756

Comment:
The `rpi-kernel` build style looks great!

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: rpi-kernel: update to 5.10.52.
  2021-07-28  4:43 [PR PATCH] rpi-kernel: update to 5.10.52 ericonr
                   ` (8 preceding siblings ...)
  2021-08-04 18:28 ` ahesford
@ 2021-08-09 22:06 ` ftpd
  2021-08-11  2:32 ` [PR PATCH] [Updated] " ericonr
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: ftpd @ 2021-08-09 22:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 270 bytes --]

New comment by ftpd on void-packages repository

https://github.com/void-linux/void-packages/pull/32224#issuecomment-895582352

Comment:
I've built rpi4-kernel from this PR and it works fine on my rPi 400 (aarch64). If some specific tests are needed, I'm eager to help.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR PATCH] [Updated] rpi-kernel: update to 5.10.52.
  2021-07-28  4:43 [PR PATCH] rpi-kernel: update to 5.10.52 ericonr
                   ` (9 preceding siblings ...)
  2021-08-09 22:06 ` ftpd
@ 2021-08-11  2:32 ` ericonr
  2021-08-11  2:33 ` rpi-kernel: create build style and use it ericonr
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: ericonr @ 2021-08-11  2:32 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1854 bytes --]

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages rpi
https://github.com/void-linux/void-packages/pull/32224

rpi-kernel: update to 5.10.52.
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

I'm unsure how picking the upstream commit works? I'd like to document that too...

https://github.com/raspberrypi/linux/commit/7772256a0635f0dd5b03f4736402c6c0d6371f32 is the merge, but there seem to be a bunch of reverts right after that one.

[ci skip]

A patch file from https://github.com/void-linux/void-packages/pull/32224.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-rpi-32224.patch --]
[-- Type: text/x-diff, Size: 14596 bytes --]

From 8a4337ebb28f153789095dc9ac897c5401b41d4d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Wed, 4 Aug 2021 11:59:50 -0300
Subject: [PATCH 1/2] common/build-style: add rpi-kernel.

---
 common/build-style/rpi-kernel.sh             | 160 +++++++++++++++++++
 common/environment/build-style/rpi-kernel.sh |  29 ++++
 2 files changed, 189 insertions(+)
 create mode 100644 common/build-style/rpi-kernel.sh
 create mode 100644 common/environment/build-style/rpi-kernel.sh

diff --git a/common/build-style/rpi-kernel.sh b/common/build-style/rpi-kernel.sh
new file mode 100644
index 000000000000..0456a6b6dadc
--- /dev/null
+++ b/common/build-style/rpi-kernel.sh
@@ -0,0 +1,160 @@
+do_configure() {
+	local target defconfig
+
+	# Use upstream's default configuration, no need to maintain ours.
+	target=$kernel_target
+
+	defconfig="arch/${_arch}/configs/${target}"
+	echo "CONFIG_CONNECTOR=y" >> "$defconfig"
+	echo "CONFIG_PROC_EVENTS=y" >> "$defconfig"
+	echo "CONFIG_F2FS_FS_SECURITY=y" >> "$defconfig"
+	echo "CONFIG_CGROUP_PIDS=y" >> "$defconfig"
+
+	# IR Remote Support
+	echo "CONFIG_RC_CORE=y" >> "$defconfig"
+	echo "CONFIG_LIRC=y" >> "$defconfig"
+	echo "CONFIG_RC_DECODERS=y" >> "$defconfig"
+	echo "CONFIG_RC_DEVICES=y" >> "$defconfig"
+	echo "CONFIG_IR_RC6_DECODER=m" >> "$defconfig"
+	echo "CONFIG_IR_MCEUSB=m" >> "$defconfig"
+
+	# HID Controllers
+	echo "CONFIG_HID_STEAM=y" >> "$defconfig"
+
+	# LXD 4.2+ support
+	echo "CONFIG_BRIDGE_VLAN_FILTERING=y" >> "$defconfig"
+
+	make ${makejobs} ${_cross} ARCH=${_arch} ${target}
+
+	# Always use our revision to CONFIG_LOCALVERSION to match our pkg version.
+	vsed -i -e "s|^\(CONFIG_LOCALVERSION=\).*|\1\"_${revision}\"|" .config
+}
+do_build() {
+	local target
+
+	case "$XBPS_TARGET_MACHINE" in
+		arm*)
+			target="zImage modules dtbs"
+			;;
+		aarch64*)
+			target="Image modules dtbs"
+			;;
+	esac
+
+	make ${makejobs} ${_cross} ARCH=${_arch} prepare
+	make ${makejobs} ${_cross} ARCH=${_arch} ${target}
+}
+do_install() {
+	local hdrdest
+
+	# Run depmod after compressing modules.
+	sed -i '2iexit 0' scripts/depmod.sh
+
+	# Install kernel, firmware and modules
+	make ${makejobs} ARCH=${_arch} INSTALL_MOD_PATH=${DESTDIR} modules_install
+
+	# Install device tree blobs
+	make ${makejobs} ARCH=${_arch} INSTALL_DTBS_PATH=${DESTDIR}/boot dtbs_install
+
+	# Generate kernel.img and install it to destdir.
+	vmkdir boot
+	cp arch/arm/boot/zImage ${DESTDIR}/boot/kernel.img
+
+	hdrdest=${DESTDIR}/usr/src/${sourcepkg}-headers-${_kernver}
+
+	# Switch to /usr.
+	vmkdir usr
+	mv ${DESTDIR}/lib ${DESTDIR}/usr
+
+	cd ${DESTDIR}/usr/lib/modules/${_kernver}
+	rm -f source build
+	ln -sf ../../../src/${sourcepkg}-headers-${_kernver} build
+
+	cd ${wrksrc}
+	# Install required headers to build external modules
+	install -Dm644 Makefile ${hdrdest}/Makefile
+	install -Dm644 kernel/Makefile ${hdrdest}/kernel/Makefile
+	install -Dm644 .config ${hdrdest}/.config
+	for file in $(find . -name Kconfig\*); do
+		mkdir -p ${hdrdest}/$(dirname $file)
+		install -Dm644 $file ${hdrdest}/${file}
+	done
+	for file in $(find arch/${_arch} scripts -name module.lds -o -name Kbuild.platforms -o -name Platform); do
+		mkdir -p ${hdrdest}/$(dirname $file)
+		install -Dm644 $file ${hdrdest}/${file}
+	done
+	mkdir -p ${hdrdest}/include
+
+	# Remove firmware stuff provided by the "linux-firmware" pkg.
+	rm -rf ${DESTDIR}/usr/lib/firmware
+
+	for i in acpi asm-generic clocksource config crypto drm generated linux \
+		math-emu media net pcmcia scsi sound trace uapi vdso video xen; do
+		[ -d include/$i ] && cp -a include/$i ${hdrdest}/include
+	done
+
+	cd ${wrksrc}
+	# Remove helper binaries built for host,
+	# if generated files from the scripts/ directory need to be included,
+	# they need to be copied to ${hdrdest} before this step
+	if [ "$CROSS_BUILD" ]; then
+		make ${makejobs} ARCH=${_arch} _mrproper_scripts
+		# remove host specific objects as well
+		find scripts -name '*.o' -delete
+	fi
+
+	# Copy files necessary for later builds.
+	cp Module.symvers ${hdrdest}
+	cp -a scripts ${hdrdest}
+	mkdir -p ${hdrdest}/security/selinux
+	cp -a security/selinux/include ${hdrdest}/security/selinux
+	mkdir -p ${hdrdest}/tools/include
+	cp -a tools/include/tools ${hdrdest}/tools/include
+	if [ -d "arch/${_arch}/tools" ]; then
+		cp -a arch/${_arch}/tools ${hdrdest}/arch/${_arch}
+	fi
+
+	# copy arch includes for external modules
+	mkdir -p ${hdrdest}/arch/${_arch}
+	cp -a arch/${_arch}/include ${hdrdest}/arch/${_arch}
+
+	mkdir -p ${hdrdest}/arch/${_arch}/kernel
+	cp arch/${_arch}/Makefile ${hdrdest}/arch/${_arch}
+	cp arch/${_arch}/kernel/asm-offsets.s ${hdrdest}/arch/${_arch}/kernel
+	if [ "$_arch" = "arm64" ] ; then
+		cp -a arch/${_arch}/kernel/vdso ${hdrdest}/arch/${_arch}/kernel/
+	fi
+
+	# Add md headers
+	mkdir -p ${hdrdest}/drivers/md
+	cp drivers/md/*.h ${hdrdest}/drivers/md
+
+	# Add inotify.h
+	mkdir -p ${hdrdest}/include/linux
+	cp include/linux/inotify.h ${hdrdest}/include/linux
+
+	# Add wireless headers
+	mkdir -p ${hdrdest}/net/mac80211/
+	cp net/mac80211/*.h ${hdrdest}/net/mac80211
+
+	# add dvb headers for external modules
+	mkdir -p ${hdrdest}/include/config/dvb/
+	cp include/config/dvb/*.h ${hdrdest}/include/config/dvb/
+
+	# Remove unneeded architectures
+	# (save the correct one + Kconfig and delete all others)
+	mkdir -p arch-backup
+	cp -r ${hdrdest}/arch/${_arch} ${hdrdest}/arch/Kconfig arch-backup/
+	rm -rf ${hdrdest}/arch
+	mv arch-backup ${hdrdest}/arch
+	# Keep arch/x86/ras/Kconfig as it is needed by drivers/ras/Kconfig
+	mkdir -p ${hdrdest}/arch/x86/ras
+	cp -a arch/x86/ras/Kconfig ${hdrdest}/arch/x86/ras/Kconfig
+
+	# Compress all modules with xz to save a few MBs.
+	msg_normal "$pkgver: compressing kernel modules with gzip, please wait...\n"
+	find ${DESTDIR} -name '*.ko' | xargs -n1 -P0 gzip -9
+
+	# ... and run depmod again.
+	depmod -b ${DESTDIR}/usr -F System.map ${_kernver}
+}
diff --git a/common/environment/build-style/rpi-kernel.sh b/common/environment/build-style/rpi-kernel.sh
new file mode 100644
index 000000000000..7234e7d40bfc
--- /dev/null
+++ b/common/environment/build-style/rpi-kernel.sh
@@ -0,0 +1,29 @@
+_kernver="${version}_${revision}"
+
+nodebug=yes
+nostrip=yes
+noverifyrdeps=yes
+noshlibprovides=yes
+
+triggers="kernel-hooks"
+# These files could be modified when an external module is built.
+mutable_files="
+	/usr/lib/modules/${_kernver}/modules.dep
+	/usr/lib/modules/${_kernver}/modules.dep.bin
+	/usr/lib/modules/${_kernver}/modules.symbols
+	/usr/lib/modules/${_kernver}/modules.symbols.bin
+	/usr/lib/modules/${_kernver}/modules.alias
+	/usr/lib/modules/${_kernver}/modules.alias.bin
+	/usr/lib/modules/${_kernver}/modules.devname"
+
+_arch=
+case "$XBPS_TARGET_MACHINE" in
+	arm*) _arch=arm ;;
+	aarch64*) _arch=arm64 ;;
+esac
+_cross=
+if [ "$CROSS_BUILD" ]; then
+	_cross="CROSS_COMPILE=${XBPS_CROSS_TRIPLET}-"
+fi
+
+python_version=3

From f2b96208511073cb39954e3b671a21e986ef2f54 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Wed, 4 Aug 2021 12:00:07 -0300
Subject: [PATCH 2/2] rpi-kernel: use rpi-kernel build style.

And remove gitshort from short_desc.
---
 srcpkgs/rpi-kernel/template | 203 +-----------------------------------
 1 file changed, 3 insertions(+), 200 deletions(-)

diff --git a/srcpkgs/rpi-kernel/template b/srcpkgs/rpi-kernel/template
index 81a8c484d0a3..f704a13b3602 100644
--- a/srcpkgs/rpi-kernel/template
+++ b/srcpkgs/rpi-kernel/template
@@ -13,220 +13,23 @@
 # WARNING: keep all rpi*-kernel packages in sync
 
 _githash="86729e78125d4f3d203457940feee8bc97b11f6c"
-_gitshort="${_githash:0:7}"
 
 pkgname=rpi-kernel
 version=5.10.52
 revision=1
 archs="armv6l*"
+build_style=rpi-kernel
 wrksrc="linux-${_githash}"
 hostmakedepends="perl kmod uboot-mkimage openssl-devel bc bison flex"
 makedepends="ncurses-devel"
 maintainer="Piraty <piraty1@inbox.ru>"
 homepage="http://www.kernel.org"
 license="GPL-2.0-only"
-short_desc="Linux kernel for Raspberry Pi zero/1 (${version%.*} series [git ${_gitshort}])"
+short_desc="Linux kernel for Raspberry Pi zero/1 (${version%.*} series)"
 distfiles="https://github.com/raspberrypi/linux/archive/${_githash}.tar.gz"
 checksum=a25a7dfce4c2ca5bdca39ddab5e43539d9b04900b0dbefe19f4f9b053e59968c
-python_version=3
 
-_kernver="${version}_${revision}"
-
-nodebug=yes
-nostrip=yes
-noverifyrdeps=yes
-noshlibprovides=yes
-
-triggers="kernel-hooks"
-# These files could be modified when an external module is built.
-mutable_files="
-	/usr/lib/modules/${_kernver}/modules.dep
-	/usr/lib/modules/${_kernver}/modules.dep.bin
-	/usr/lib/modules/${_kernver}/modules.symbols
-	/usr/lib/modules/${_kernver}/modules.symbols.bin
-	/usr/lib/modules/${_kernver}/modules.alias
-	/usr/lib/modules/${_kernver}/modules.alias.bin
-	/usr/lib/modules/${_kernver}/modules.devname"
-
-_arch=
-case "$XBPS_TARGET_MACHINE" in
-	arm*) _arch=arm ;;
-	aarch64*) _arch=arm64 ;;
-esac
-_cross=
-if [ "$CROSS_BUILD" ]; then
-	_cross="CROSS_COMPILE=${XBPS_CROSS_TRIPLET}-"
-fi
-
-pre_configure() {
-	# Remove .git directory, otherwise scripts/setkernelversion.sh
-	# modifies KERNELRELEASE and appends + to it.
-	rm -rf .git
-}
-do_configure() {
-	local target defconfig
-
-	# Use upstream's default configuration, no need to maintain ours.
-	case "$XBPS_TARGET_MACHINE" in
-		armv6l*)
-			target=bcmrpi_defconfig
-			;;
-	esac
-
-	defconfig="arch/${_arch}/configs/${target}"
-	echo "CONFIG_CONNECTOR=y" >> "$defconfig"
-	echo "CONFIG_PROC_EVENTS=y" >> "$defconfig"
-	echo "CONFIG_F2FS_FS_SECURITY=y" >> "$defconfig"
-	echo "CONFIG_CGROUP_PIDS=y" >> "$defconfig"
-
-	# IR Remote Support
-	echo "CONFIG_RC_CORE=y" >> "$defconfig"
-	echo "CONFIG_LIRC=y" >> "$defconfig"
-	echo "CONFIG_RC_DECODERS=y" >> "$defconfig"
-	echo "CONFIG_RC_DEVICES=y" >> "$defconfig"
-	echo "CONFIG_IR_RC6_DECODER=m" >> "$defconfig"
-	echo "CONFIG_IR_MCEUSB=m" >> "$defconfig"
-
-	# HID Controllers
-	echo "CONFIG_HID_STEAM=y" >> "$defconfig"
-
-	# LXD 4.2+ support
-	echo "CONFIG_BRIDGE_VLAN_FILTERING=y" >> "$defconfig"
-
-	make ${makejobs} ${_cross} ARCH=${_arch} ${target}
-
-	# Always use our revision to CONFIG_LOCALVERSION to match our pkg version.
-	vsed -i -e "s|^\(CONFIG_LOCALVERSION=\).*|\1\"_${revision}\"|" .config
-}
-do_build() {
-	local target
-
-	case "$XBPS_TARGET_MACHINE" in
-		arm*)
-			target="zImage modules dtbs"
-			;;
-		aarch64*)
-			target="Image modules dtbs"
-			;;
-	esac
-
-	make ${makejobs} ${_cross} ARCH=${_arch} prepare
-	make ${makejobs} ${_cross} ARCH=${_arch} ${target}
-}
-do_install() {
-	local hdrdest
-
-	# Run depmod after compressing modules.
-	sed -i '2iexit 0' scripts/depmod.sh
-
-	# Install kernel, firmware and modules
-	make ${makejobs} ARCH=${_arch} INSTALL_MOD_PATH=${DESTDIR} modules_install
-
-	# Install device tree blobs
-	make ${makejobs} ARCH=${_arch} INSTALL_DTBS_PATH=${DESTDIR}/boot dtbs_install
-
-	# Generate kernel.img and install it to destdir.
-	vmkdir boot
-	cp arch/arm/boot/zImage ${DESTDIR}/boot/kernel.img
-
-	hdrdest=${DESTDIR}/usr/src/${sourcepkg}-headers-${_kernver}
-
-	# Switch to /usr.
-	vmkdir usr
-	mv ${DESTDIR}/lib ${DESTDIR}/usr
-
-	cd ${DESTDIR}/usr/lib/modules/${_kernver}
-	rm -f source build
-	ln -sf ../../../src/${sourcepkg}-headers-${_kernver} build
-
-	cd ${wrksrc}
-	# Install required headers to build external modules
-	install -Dm644 Makefile ${hdrdest}/Makefile
-	install -Dm644 kernel/Makefile ${hdrdest}/kernel/Makefile
-	install -Dm644 .config ${hdrdest}/.config
-	for file in $(find . -name Kconfig\*); do
-		mkdir -p ${hdrdest}/$(dirname $file)
-		install -Dm644 $file ${hdrdest}/${file}
-	done
-	for file in $(find arch/${_arch} scripts -name module.lds -o -name Kbuild.platforms -o -name Platform); do
-		mkdir -p ${hdrdest}/$(dirname $file)
-		install -Dm644 $file ${hdrdest}/${file}
-	done
-	mkdir -p ${hdrdest}/include
-
-	# Remove firmware stuff provided by the "linux-firmware" pkg.
-	rm -rf ${DESTDIR}/usr/lib/firmware
-
-	for i in acpi asm-generic clocksource config crypto drm generated linux \
-		math-emu media net pcmcia scsi sound trace uapi vdso video xen; do
-		[ -d include/$i ] && cp -a include/$i ${hdrdest}/include
-	done
-
-	cd ${wrksrc}
-	# Remove helper binaries built for host,
-	# if generated files from the scripts/ directory need to be included,
-	# they need to be copied to ${hdrdest} before this step
-	if [ "$CROSS_BUILD" ]; then
-		make ${makejobs} ARCH=${_arch} _mrproper_scripts
-		# remove host specific objects as well
-		find scripts -name '*.o' -delete
-	fi
-
-	# Copy files necessary for later builds.
-	cp Module.symvers ${hdrdest}
-	cp -a scripts ${hdrdest}
-	mkdir -p ${hdrdest}/security/selinux
-	cp -a security/selinux/include ${hdrdest}/security/selinux
-	mkdir -p ${hdrdest}/tools/include
-	cp -a tools/include/tools ${hdrdest}/tools/include
-	if [ -d "arch/${_arch}/tools" ]; then
-		cp -a arch/${_arch}/tools ${hdrdest}/arch/${_arch}
-	fi
-
-	# copy arch includes for external modules
-	mkdir -p ${hdrdest}/arch/${_arch}
-	cp -a arch/${_arch}/include ${hdrdest}/arch/${_arch}
-
-	mkdir -p ${hdrdest}/arch/${_arch}/kernel
-	cp arch/${_arch}/Makefile ${hdrdest}/arch/${_arch}
-	cp arch/${_arch}/kernel/asm-offsets.s ${hdrdest}/arch/${_arch}/kernel
-	if [ "$_arch" = "arm64" ] ; then
-		cp -a arch/${_arch}/kernel/vdso ${hdrdest}/arch/${_arch}/kernel/
-	fi
-
-	# Add md headers
-	mkdir -p ${hdrdest}/drivers/md
-	cp drivers/md/*.h ${hdrdest}/drivers/md
-
-	# Add inotify.h
-	mkdir -p ${hdrdest}/include/linux
-	cp include/linux/inotify.h ${hdrdest}/include/linux
-
-	# Add wireless headers
-	mkdir -p ${hdrdest}/net/mac80211/
-	cp net/mac80211/*.h ${hdrdest}/net/mac80211
-
-	# add dvb headers for external modules
-	mkdir -p ${hdrdest}/include/config/dvb/
-	cp include/config/dvb/*.h ${hdrdest}/include/config/dvb/
-
-	# Remove unneeded architectures
-	# (save the correct one + Kconfig and delete all others)
-	mkdir -p arch-backup
-	cp -r ${hdrdest}/arch/${_arch} ${hdrdest}/arch/Kconfig arch-backup/
-	rm -rf ${hdrdest}/arch
-	mv arch-backup ${hdrdest}/arch
-	# Keep arch/x86/ras/Kconfig as it is needed by drivers/ras/Kconfig
-	mkdir -p ${hdrdest}/arch/x86/ras
-	cp -a arch/x86/ras/Kconfig ${hdrdest}/arch/x86/ras/Kconfig
-
-	# Compress all modules with xz to save a few MBs.
-	msg_normal "$pkgver: compressing kernel modules with gzip, please wait...\n"
-	find ${DESTDIR} -name '*.ko' | xargs -n1 -P0 gzip -9
-
-	# ... and run depmod again.
-	depmod -b ${DESTDIR}/usr -F System.map ${_kernver}
-}
+kernel_target=bcmrpi_defconfig
 
 rpi-kernel-headers_package() {
 	nostrip=yes

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: rpi-kernel: create build style and use it
  2021-07-28  4:43 [PR PATCH] rpi-kernel: update to 5.10.52 ericonr
                   ` (10 preceding siblings ...)
  2021-08-11  2:32 ` [PR PATCH] [Updated] " ericonr
@ 2021-08-11  2:33 ` ericonr
  2022-05-31  2:13 ` github-actions
  2022-06-14  2:13 ` [PR PATCH] [Closed]: " github-actions
  13 siblings, 0 replies; 15+ messages in thread
From: ericonr @ 2021-08-11  2:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 256 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/32224#issuecomment-896453107

Comment:
Thanks all for testing! I've pushed the new kernels to master, and now this PR will only deal with the build style.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: rpi-kernel: create build style and use it
  2021-07-28  4:43 [PR PATCH] rpi-kernel: update to 5.10.52 ericonr
                   ` (11 preceding siblings ...)
  2021-08-11  2:33 ` rpi-kernel: create build style and use it ericonr
@ 2022-05-31  2:13 ` github-actions
  2022-06-14  2:13 ` [PR PATCH] [Closed]: " github-actions
  13 siblings, 0 replies; 15+ messages in thread
From: github-actions @ 2022-05-31  2:13 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

New comment by github-actions[bot] on void-packages repository

https://github.com/void-linux/void-packages/pull/32224#issuecomment-1141597458

Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that.  If this pull request is still relevant bump it or assign it.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR PATCH] [Closed]: rpi-kernel: create build style and use it
  2021-07-28  4:43 [PR PATCH] rpi-kernel: update to 5.10.52 ericonr
                   ` (12 preceding siblings ...)
  2022-05-31  2:13 ` github-actions
@ 2022-06-14  2:13 ` github-actions
  13 siblings, 0 replies; 15+ messages in thread
From: github-actions @ 2022-06-14  2:13 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1713 bytes --]

There's a closed pull request on the void-packages repository

rpi-kernel: create build style and use it
https://github.com/void-linux/void-packages/pull/32224

Description:
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

I'm unsure how picking the upstream commit works? I'd like to document that too...

https://github.com/raspberrypi/linux/commit/7772256a0635f0dd5b03f4736402c6c0d6371f32 is the merge, but there seem to be a bunch of reverts right after that one.

[ci skip]

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2022-06-14  2:13 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-28  4:43 [PR PATCH] rpi-kernel: update to 5.10.52 ericonr
2021-08-03 17:12 ` paper42
2021-08-03 17:25 ` ericonr
2021-08-03 17:33 ` ahesford
2021-08-04 13:56 ` [PR PATCH] [Updated] " ericonr
2021-08-04 14:20 ` ahesford
2021-08-04 14:44 ` ericonr
2021-08-04 15:01 ` ericonr
2021-08-04 15:03 ` ericonr
2021-08-04 18:28 ` ahesford
2021-08-09 22:06 ` ftpd
2021-08-11  2:32 ` [PR PATCH] [Updated] " ericonr
2021-08-11  2:33 ` rpi-kernel: create build style and use it ericonr
2022-05-31  2:13 ` github-actions
2022-06-14  2:13 ` [PR PATCH] [Closed]: " github-actions

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).