public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-kernel/asahi-sources/files/, sys-kernel/asahi-sources/
@ 2024-04-01  6:27 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2024-04-01  6:27 UTC (permalink / raw
  To: gentoo-commits

commit:     edb6d6dd39278f16704550a0ca8cda8f39d80d63
Author:     James Calligeros <jcalligeros99 <AT> gmail <DOT> com>
AuthorDate: Mon Apr  1 01:39:04 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Apr  1 06:27:00 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=edb6d6dd

sys-kernel/asahi-sources: add 6.6.0_p16, drop 6.6.0_p15

Signed-off-by: James Calligeros <jcalligeros99 <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-kernel/asahi-sources/Manifest                                | 3 ++-
 ...i-sources-6.6.0_p15.ebuild => asahi-sources-6.6.0_p16.ebuild} | 9 ++++++---
 ...atch => asahi-sources-6.6.0_p16-enable-speakers-stage1.patch} | 0
 ...atch => asahi-sources-6.6.0_p16-enable-speakers-stage2.patch} | 0
 4 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/sys-kernel/asahi-sources/Manifest b/sys-kernel/asahi-sources/Manifest
index 42188bc6d33d..8715ebde0d66 100644
--- a/sys-kernel/asahi-sources/Manifest
+++ b/sys-kernel/asahi-sources/Manifest
@@ -1 +1,2 @@
-DIST asahi-sources-6.6.0_p15.tar.gz 229858421 BLAKE2B f0cdce0421bb8637d52e82d2ff0b7e07c29e828783c7cb8733f1582916be81bfd14a0b6a98f51f633ee9da3d10aa1fff6b27c5779bd9fa55c1d04615173d6d4b SHA512 b261e3813f1c0f5bae3a24e7ed0dce41470cfe2ee965ab0121d41793aa08f72d0d91be633f7ba0317f265a6e98a7a134cf86a29e7d48dbb58c5f5f7a3a13cc53
+DIST asahi-sources-6.6.0_p16-rust-alloc-fix.patch 52132 BLAKE2B 3ba12bf87decb581626739786b8c0b6686c8a1d2c964ac534e2701473b117d59b084c686ba8e09bb65f27fbe57574ec2ddf8e89b544f3bdaaebc7acd4f0d2d5f SHA512 d4d1edab5a67152326a4712493a783660f68c1353e058536d19ed7a7f7d288e77b9916fc07639edd1f13f8a1948028fad3b92a90c03152522159b7f79ab54aa1
+DIST asahi-sources-6.6.0_p16.tar.gz 229861406 BLAKE2B e8f90373fe3cfb0ee8824158c59d548af05d1e68626715a65dcf086b35cfe7f4d44b184f02bbfad33474040b86f488e4fa99c8886ae329cf138933161658f94c SHA512 fc62cf346b95229aa31bc1483c9fcffaeacf94d09d13801a3e8e50ed3ba7f3d1b1d4dd8083051879955e1f99bffa61bf411cd38fcc45e176d372fc1d205b9c76

diff --git a/sys-kernel/asahi-sources/asahi-sources-6.6.0_p15.ebuild b/sys-kernel/asahi-sources/asahi-sources-6.6.0_p16.ebuild
similarity index 82%
rename from sys-kernel/asahi-sources/asahi-sources-6.6.0_p15.ebuild
rename to sys-kernel/asahi-sources/asahi-sources-6.6.0_p16.ebuild
index f462385c5aac..4f175400b85e 100644
--- a/sys-kernel/asahi-sources/asahi-sources-6.6.0_p15.ebuild
+++ b/sys-kernel/asahi-sources/asahi-sources-6.6.0_p16.ebuild
@@ -25,15 +25,17 @@ fi
 DESCRIPTION="Asahi Linux kernel sources"
 HOMEPAGE="https://asahilinux.org"
 KERNEL_URI="https://github.com/AsahiLinux/linux/archive/refs/tags/${MY_P}.tar.gz -> ${PN}-${PV}.tar.gz"
-SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI}"
+SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI}
+	https://raw.githubusercontent.com/chadmed/asahi-overlay/main/sys-kernel/asahi-kernel/files/asahi-kernel-6.6.0_p16-rust-alloc-fix.patch -> ${P}-rust-alloc-fix.patch
+"
 
 KEYWORDS="~arm64"
 IUSE="rust"
 
 DEPEND="
 	${DEPEND}
-	rust? ( || ( dev-lang/rust[rust-src]
-				 dev-lang/rust-bin[rust-src]
+	rust? ( || ( dev-lang/rust:stable/1.75[rust-src,rustfmt]
+				 ~dev-lang/rust-bin-1.75.0[rust-src,rustfmt]
 			)
 			dev-util/bindgen
 		)
@@ -42,6 +44,7 @@ DEPEND="
 PATCHES=(
 		"${FILESDIR}/${P}-enable-speakers-stage1.patch"
 		"${FILESDIR}/${P}-enable-speakers-stage2.patch"
+		"${DISTDIR}/${P}-rust-alloc-fix.patch"
 )
 
 src_unpack() {

diff --git a/sys-kernel/asahi-sources/files/asahi-sources-6.6.0_p15-enable-speakers-stage1.patch b/sys-kernel/asahi-sources/files/asahi-sources-6.6.0_p16-enable-speakers-stage1.patch
similarity index 100%
rename from sys-kernel/asahi-sources/files/asahi-sources-6.6.0_p15-enable-speakers-stage1.patch
rename to sys-kernel/asahi-sources/files/asahi-sources-6.6.0_p16-enable-speakers-stage1.patch

diff --git a/sys-kernel/asahi-sources/files/asahi-sources-6.6.0_p15-enable-speakers-stage2.patch b/sys-kernel/asahi-sources/files/asahi-sources-6.6.0_p16-enable-speakers-stage2.patch
similarity index 100%
rename from sys-kernel/asahi-sources/files/asahi-sources-6.6.0_p15-enable-speakers-stage2.patch
rename to sys-kernel/asahi-sources/files/asahi-sources-6.6.0_p16-enable-speakers-stage2.patch


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

* [gentoo-commits] repo/gentoo:master commit in: sys-kernel/asahi-sources/files/, sys-kernel/asahi-sources/
@ 2024-05-19 16:46 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2024-05-19 16:46 UTC (permalink / raw
  To: gentoo-commits

commit:     cb4377173212fc0e7f5ac75a68bb6536bb7beb2c
Author:     Janne Grunau <j <AT> jannau <DOT> net>
AuthorDate: Sun May 19 13:40:50 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun May 19 16:46:38 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cb437717

sys-kernel/asahi-sources: add 6.8.9_p6

This switches asahi-sources to patch based build based on genpatches for
stable releases and asahi patches as requested from github on top.
This requires a little bit of cleanup. The asahi "patchset" contains a
SPI change merged in 6.8.2. So revert this first so the asahi patches
apply cleanly.
The desired RUST support in asahi "patchset" creates circular
dependencies with GCC_PLUGIN_RANDSTRUCT slected by
GENTOO_KERNEL_SELF_PROTECTION_COMMON. Remove randstruct from the latter
to break the circular dependencies.

Signed-off-by: Janne Grunau <j <AT> jannau.net>
Closes: https://github.com/gentoo/gentoo/pull/36743
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-kernel/asahi-sources/Manifest                  |  4 ++
 .../asahi-sources/asahi-sources-6.8.9_p6.ebuild    | 78 ++++++++++++++++++++++
 ...oo-Drop-RANDSTRUCT-from-GENTOO_KERNEL_SEL.patch | 40 +++++++++++
 .../asahi-6.8.2_revert_spi_stable_asahi.patch      | 46 +++++++++++++
 4 files changed, 168 insertions(+)

diff --git a/sys-kernel/asahi-sources/Manifest b/sys-kernel/asahi-sources/Manifest
index 0c86b984215f..742e602c34cf 100644
--- a/sys-kernel/asahi-sources/Manifest
+++ b/sys-kernel/asahi-sources/Manifest
@@ -1,3 +1,7 @@
+DIST genpatches-6.8-12.base.tar.xz 687664 BLAKE2B 3c27ee511c258f3659d7f8cd5b6d470ffa10a2fc95bd536b272e0bb20c368dfc8c512f23fdc025e85ad90d6f628a58c80d8d15ec0ef8898caf7461162cf2dec2 SHA512 cd845b49341366190834b9782c9ffa270608a35e616ff483b40094913f6d01809421b80a7830117b606e57e6bb0ed9b0ed6dc14220826364fc9d2ee6a5916ad6
+DIST genpatches-6.8-12.extras.tar.xz 3736 BLAKE2B 15a15ca3097dc42ac5855e59fe61c961854c1afa8adc719c761ac58bb7c869d3240c228b0963a91927a9bc0af6998b4c40e4d286faf7d2defc2f21029d11c114 SHA512 4f1c8c07e81c0d1ed110bd4512d2a16c3e202c47d8ab6bedf5213cf6c2f8675e9b543e52dbce50fbbf550d88252e2c1c19c2465ddd7907f11a2979fa92466a7c
+DIST linux-6.8.tar.xz 142502100 BLAKE2B c6f17f816cea16e629f63e9379b98888713f57b2c5173306926471f139a9d612a0c74e119341f8075390e55e203d787d9edeb4ad5a064b18870f6f0f7ffaafb2 SHA512 5c4eb4aa1d3f7d1ea01c0f7ddeadacdece6e144fd4bdfc16b2b925d3e10dc04de3a6db69320b79a96c3560052616f001d2c09e7a1bb4f7b731e2380a7ecce068
 DIST linux-asahi-6.8.8-2.tar.gz 235265018 BLAKE2B cf543955971865d65c048b7021a8bf4d9711294afd49e4ce31bf3e4761dea8724950a52a7b6b852645760e0abb1ca2abe1ac6c3feafbcb933a53e56dcc4044e4 SHA512 101566de3777517d151effcdd2e38b6a5d5961754734cdabfae7c359bbf0f35e2c7a4ecb912d4c300adb3f09ecaa31eafaf076d849171e0e5244ec29a0bf30a4
 DIST linux-asahi-6.8.9-3.tar.gz 235275610 BLAKE2B 8ee3ff2572a02851d66239c65187312a0f67aa492d9c3b3a734e291b250acbf9450960c745687ff98a339e4cc14a2eab7675c08d39f88de0c0aa7c320d20bdc8 SHA512 ebd854b357a1d0a7663129f48956da559bc23a4347836dd0c3a3eb8cd47013ed86d83711dc2b7a221c28f51bd0c42c0b1ea2302ef45ee4a2ddfbfacf33e6efc2
 DIST linux-asahi-6.8.9-5.tar.gz 235264452 BLAKE2B 5a08d3df1d0e1fc274a68f29ab592c790421d58dafa5533b7f526f13c5046d668e0c864b9a71f2c5b736a1890a65ba0877694b11bbde9acf5ff873f7a8a5a167 SHA512 e592959bfd546588df26bcec6b6de86dc3450d6ae89b073b272dd41b9927a7c2b09b9f8ff77b3cc80393b65821062eddabe351f177bfc1f732f11d685594412f
+DIST linux-asahi-6.8.9-6.patch 5163031 BLAKE2B de6411c7f6bb95fec4162648c89d6bf6be5e863d4647877c4cbbb9e4c8540b12b1dacd42c26a1d3561a36fe6c79650caf5e0481338764a10101cec53921043c7 SHA512 0cc24bf50c16cb6fc59bf9bd025babcdca081bc789da5791d0fd914c65d31342cc632998fe4a667296ee3ed067b311dc105e994e2a77d569bac3a8ed48fb5ecc

diff --git a/sys-kernel/asahi-sources/asahi-sources-6.8.9_p6.ebuild b/sys-kernel/asahi-sources/asahi-sources-6.8.9_p6.ebuild
new file mode 100644
index 000000000000..a0aa5d1ee2e2
--- /dev/null
+++ b/sys-kernel/asahi-sources/asahi-sources-6.8.9_p6.ebuild
@@ -0,0 +1,78 @@
+# Copyright 2023-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+ETYPE="sources"
+
+CKV="$(ver_cut 1-3)"
+K_SECURITY_UNSUPPORTED="1"
+K_WANT_GENPATCHES="base extras"
+K_GENPATCHES_VER="12"
+K_NODRYRUN="1"
+
+inherit kernel-2
+detect_version
+detect_arch
+
+if [[ ${PV} != ${PV/_rc} ]] ; then
+	# $PV is expected to be of following form: 6.0_rc5_p1
+	MY_TAG="$(ver_cut 6)"
+	MY_BASE="$(ver_rs 2 - $(ver_cut 1-4))"
+else
+	# $PV is expected to be of following form: 5.19.0_p1
+	MY_TAG="$(ver_cut 5)"
+	if [[ "$(ver_cut 3)" == "0" ]] ; then
+		MY_BASE="$(ver_cut 1-2)"
+	else
+		MY_BASE="$(ver_cut 1-3)"
+	fi
+fi
+
+EXTRAVERSION="-asahi-${MY_TAG}"
+
+ASAHI_TAG="asahi-${MY_BASE}-${MY_TAG}"
+
+DESCRIPTION="Asahi Linux kernel sources"
+HOMEPAGE="https://asahilinux.org"
+SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI}
+	https://github.com/AsahiLinux/linux/compare/v${MY_BASE}...${ASAHI_TAG}.patch
+		-> linux-${ASAHI_TAG}.patch
+"
+KV_FULL="${PVR/_p/-asahi-}"
+S="${WORKDIR}/linux-${KV_FULL}"
+
+KEYWORDS="~arm64"
+IUSE="rust"
+
+DEPEND="
+	${DEPEND}
+	rust? (
+		|| (
+			>=dev-lang/rust-bin-1.76[rust-src,rustfmt]
+			>=dev-lang/rust-1.76[rust-src,rustfmt]
+		)
+		dev-util/bindgen
+	)
+"
+
+UNIPATCH_STRICTORDER="yes"
+UNIPATCH_LIST="
+	${FILESDIR}/asahi-6.8-config-gentoo-Drop-RANDSTRUCT-from-GENTOO_KERNEL_SEL.patch
+	${FILESDIR}/asahi-6.8.2_revert_spi_stable_asahi.patch
+	${DISTDIR}/linux-asahi-6.8.9-6.patch
+	${FILESDIR}/asahi-sources-6.6.0_p16-enable-speakers-stage1.patch
+	${FILESDIR}/asahi-sources-6.6.0_p16-enable-speakers-stage2.patch
+"
+
+src_prepare() {
+	default
+
+	# remove asahi upstream set localversion, use EXTRAVERSION instead
+	rm localversion.05-asahi
+}
+
+pkg_postinst() {
+	einfo "For more information about Asahi Linux please visit ${HOMEPAGE},"
+	einfo "or consult the Wiki at https://github.com/AsahiLinux/docs/wiki."
+	kernel-2_pkg_postinst
+}

diff --git a/sys-kernel/asahi-sources/files/asahi-6.8-config-gentoo-Drop-RANDSTRUCT-from-GENTOO_KERNEL_SEL.patch b/sys-kernel/asahi-sources/files/asahi-6.8-config-gentoo-Drop-RANDSTRUCT-from-GENTOO_KERNEL_SEL.patch
new file mode 100644
index 000000000000..0e99029145e5
--- /dev/null
+++ b/sys-kernel/asahi-sources/files/asahi-6.8-config-gentoo-Drop-RANDSTRUCT-from-GENTOO_KERNEL_SEL.patch
@@ -0,0 +1,40 @@
+From 7bc5223ed71bdee422c01c67b0456c4238b4a36e Mon Sep 17 00:00:00 2001
+From: Janne Grunau <j@jannau.net>
+Date: Sat, 18 May 2024 11:47:46 +0200
+Subject: [PATCH 1/1] config: gentoo: Drop RANDSTRUCT from
+ GENTOO_KERNEL_SELF_PROTECTION_COMMON
+
+It is incompatible with RUST and the current method of selected it
+results in Kconfig breakage due to circular dependencies. Drop it for
+asahi-kernel.
+
+Signed-off-by: Janne Grunau <j@jannau.net>
+---
+ distro/Kconfig | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/distro/Kconfig b/distro/Kconfig
+index 9166e4a9abe6..ad4b417e0da7 100644
+--- a/distro/Kconfig
++++ b/distro/Kconfig
+@@ -174,7 +174,7 @@ if GENTOO_KERNEL_SELF_PROTECTION
+ config GENTOO_KERNEL_SELF_PROTECTION_COMMON
+ 	bool "Enable Kernel Self Protection Project Recommendations"
+ 
+-	depends on GENTOO_LINUX && !ACPI_CUSTOM_METHOD && !COMPAT_BRK && !PROC_KCORE && !COMPAT_VDSO && !KEXEC && !HIBERNATION && !LEGACY_PTYS && !X86_X32_ABI && !MODIFY_LDT_SYSCALL && GCC_PLUGINS && !IOMMU_DEFAULT_DMA_LAZY && !IOMMU_DEFAULT_PASSTHROUGH && IOMMU_DEFAULT_DMA_STRICT && SECURITY && !ARCH_EPHEMERAL_INODES  && RANDSTRUCT_PERFORMANCE
++	depends on GENTOO_LINUX && !ACPI_CUSTOM_METHOD && !COMPAT_BRK && !PROC_KCORE && !COMPAT_VDSO && !KEXEC && !HIBERNATION && !LEGACY_PTYS && !X86_X32_ABI && !MODIFY_LDT_SYSCALL && GCC_PLUGINS && !IOMMU_DEFAULT_DMA_LAZY && !IOMMU_DEFAULT_PASSTHROUGH && IOMMU_DEFAULT_DMA_STRICT && SECURITY && !ARCH_EPHEMERAL_INODES
+ 
+ 	select BUG
+ 	select STRICT_KERNEL_RWX
+@@ -221,8 +221,6 @@ config GENTOO_KERNEL_SELF_PROTECTION_COMMON
+ 	select GCC_PLUGIN_LATENT_ENTROPY
+ 	select GCC_PLUGIN_STRUCTLEAK
+ 	select GCC_PLUGIN_STRUCTLEAK_BYREF_ALL
+-	select GCC_PLUGIN_RANDSTRUCT 
+-	select GCC_PLUGIN_RANDSTRUCT_PERFORMANCE
+ 	select ZERO_CALL_USED_REGS if CC_HAS_ZERO_CALL_USED_REGS
+ 
+ 	help
+-- 
+2.45.0
+

diff --git a/sys-kernel/asahi-sources/files/asahi-6.8.2_revert_spi_stable_asahi.patch b/sys-kernel/asahi-sources/files/asahi-6.8.2_revert_spi_stable_asahi.patch
new file mode 100644
index 000000000000..fc6522e205b8
--- /dev/null
+++ b/sys-kernel/asahi-sources/files/asahi-6.8.2_revert_spi_stable_asahi.patch
@@ -0,0 +1,46 @@
+diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
+index 46f153548760..d1b297f438f1 100644
+--- a/drivers/spi/spi.c
++++ b/drivers/spi/spi.c
+@@ -1042,14 +1042,10 @@ static void spi_set_cs(struct spi_device *spi, bool enable, bool force)
+ 	if (spi->mode & SPI_CS_HIGH)
+ 		enable = !enable;
+ 
+-	/*
+-	 * Handle chip select delays for GPIO based CS or controllers without
+-	 * programmable chip select timing.
+-	 */
+-	if ((spi_is_csgpiod(spi) || !spi->controller->set_cs_timing) && !activate)
+-		spi_delay_exec(&spi->cs_hold, NULL);
+-
+ 	if (spi_is_csgpiod(spi)) {
++		if (!spi->controller->set_cs_timing && !activate)
++			spi_delay_exec(&spi->cs_hold, NULL);
++
+ 		if (!(spi->mode & SPI_NO_CS)) {
+ 			/*
+ 			 * Historically ACPI has no means of the GPIO polarity and
+@@ -1083,16 +1079,16 @@ static void spi_set_cs(struct spi_device *spi, bool enable, bool force)
+ 		if ((spi->controller->flags & SPI_CONTROLLER_GPIO_SS) &&
+ 		    spi->controller->set_cs)
+ 			spi->controller->set_cs(spi, !enable);
++
++		if (!spi->controller->set_cs_timing) {
++			if (activate)
++				spi_delay_exec(&spi->cs_setup, NULL);
++			else
++				spi_delay_exec(&spi->cs_inactive, NULL);
++		}
+ 	} else if (spi->controller->set_cs) {
+ 		spi->controller->set_cs(spi, !enable);
+ 	}
+-
+-	if (spi_is_csgpiod(spi) || !spi->controller->set_cs_timing) {
+-		if (activate)
+-			spi_delay_exec(&spi->cs_setup, NULL);
+-		else
+-			spi_delay_exec(&spi->cs_inactive, NULL);
+-	}
+ }
+ 
+ #ifdef CONFIG_HAS_DMA


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

end of thread, other threads:[~2024-05-19 16:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-19 16:46 [gentoo-commits] repo/gentoo:master commit in: sys-kernel/asahi-sources/files/, sys-kernel/asahi-sources/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2024-04-01  6:27 Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox