* [gentoo-commits] repo/gentoo:master commit in: app-emulation/vendor-reset/files/, app-emulation/vendor-reset/
@ 2022-12-23 23:45 Nick Sarnie
0 siblings, 0 replies; 3+ messages in thread
From: Nick Sarnie @ 2022-12-23 23:45 UTC (permalink / raw
To: gentoo-commits
commit: fcda13a18ba7d522b8829558db20770a328b0550
Author: Nick Sarnie <sarnex <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 23 23:42:31 2022 +0000
Commit: Nick Sarnie <sarnex <AT> gentoo <DOT> org>
CommitDate: Fri Dec 23 23:44:40 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fcda13a1
app-emulation/vendor-reset: Improve ebuild
Closes: https://bugs.gentoo.org/884527
Closes: https://bugs.gentoo.org/884529
Signed-off-by: Nick Sarnie <sarnex <AT> gentoo.org>
.../vendor-reset/files/Respect-eselect-kernel.patch | 13 -------------
.../vendor-reset-0.1.1_pre20221205.ebuild | 19 +++++--------------
app-emulation/vendor-reset/vendor-reset-9999.ebuild | 19 +++++--------------
3 files changed, 10 insertions(+), 41 deletions(-)
diff --git a/app-emulation/vendor-reset/files/Respect-eselect-kernel.patch b/app-emulation/vendor-reset/files/Respect-eselect-kernel.patch
deleted file mode 100644
index 9259a3e12bf2..000000000000
--- a/app-emulation/vendor-reset/files/Respect-eselect-kernel.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/Makefile b/Makefile
-index b8a0652..79f60e8 100644
---- a/Makefile
-+++ b/Makefile
-@@ -1,6 +1,6 @@
- USER := $(shell whoami)
--KVER ?= $(shell uname -r)
--KDIR ?= /lib/modules/$(KVER)/build
-+KVER ?= $(KV_FULL)
-+KDIR ?= ${KERNEL_DIR}
-
- all: build
-
diff --git a/app-emulation/vendor-reset/vendor-reset-0.1.1_pre20221205.ebuild b/app-emulation/vendor-reset/vendor-reset-0.1.1_pre20221205.ebuild
index ceaaa99a4a5f..68ee284aa9d7 100644
--- a/app-emulation/vendor-reset/vendor-reset-0.1.1_pre20221205.ebuild
+++ b/app-emulation/vendor-reset/vendor-reset-0.1.1_pre20221205.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-inherit linux-mod
+inherit linux-mod toolchain-funcs
if [[ ${PV} == *9999* ]]; then
EGIT_REPO_URI="https://github.com/gnif/vendor-reset.git"
@@ -24,26 +24,17 @@ DEPEND=""
RDEPEND="${DEPEND}"
S="${WORKDIR}/${PN}-${EGIT_COMMIT}"
-PATCHES=( "${FILESDIR}/Respect-eselect-kernel.patch" )
+MODULE_NAMES="vendor-reset(extra)"
pkg_setup() {
local CONFIG_CHECK="FTRACE KPROBES PCI_QUIRKS KALLSYMS FUNCTION_TRACER"
linux-mod_pkg_setup
- export KV_FULL=${KV_FULL}
- export KERNEL_DIR=${KERNEL_DIR}
-}
-
-src_compile() {
- set_arch_to_kernel
- default
+ BUILD_TARGETS="build"
+ BUILD_PARAMS="CC=\"$(tc-getBUILD_CC)\" KDIR=${KERNEL_DIR}"
}
src_install() {
- set_arch_to_kernel
- emake \
- DESTDIR="${ED}" \
- INSTALL_MOD_PATH="${ED}" \
- install
+ linux-mod_src_install
insinto /etc/modules-load.d/
newins "${FILESDIR}"/modload.conf vendor-reset.conf
diff --git a/app-emulation/vendor-reset/vendor-reset-9999.ebuild b/app-emulation/vendor-reset/vendor-reset-9999.ebuild
index a0b2326fc95a..b82d5b15ad5c 100644
--- a/app-emulation/vendor-reset/vendor-reset-9999.ebuild
+++ b/app-emulation/vendor-reset/vendor-reset-9999.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-inherit linux-mod
+inherit linux-mod toolchain-funcs
if [[ ${PV} == *9999* ]]; then
EGIT_REPO_URI="https://github.com/gnif/vendor-reset.git"
@@ -23,26 +23,17 @@ SLOT="0"
DEPEND=""
RDEPEND="${DEPEND}"
-PATCHES=( "${FILESDIR}/Respect-eselect-kernel.patch" )
+MODULE_NAMES="vendor-reset(extra)"
pkg_setup() {
local CONFIG_CHECK="FTRACE KPROBES PCI_QUIRKS KALLSYMS FUNCTION_TRACER"
linux-mod_pkg_setup
- export KV_FULL=${KV_FULL}
- export KERNEL_DIR=${KERNEL_DIR}
-}
-
-src_compile() {
- set_arch_to_kernel
- default
+ BUILD_TARGETS="build"
+ BUILD_PARAMS="CC=\"$(tc-getBUILD_CC)\" KDIR=${KERNEL_DIR}"
}
src_install() {
- set_arch_to_kernel
- emake \
- DESTDIR="${ED}" \
- INSTALL_MOD_PATH="${ED}" \
- install
+ linux-mod_src_install
insinto /etc/modules-load.d/
newins "${FILESDIR}"/modload.conf vendor-reset.conf
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-emulation/vendor-reset/files/, app-emulation/vendor-reset/
@ 2024-04-29 17:13 Nick Sarnie
0 siblings, 0 replies; 3+ messages in thread
From: Nick Sarnie @ 2024-04-29 17:13 UTC (permalink / raw
To: gentoo-commits
commit: 3ee6246a9878a2852a8978a69e39a7ee5aa81b7d
Author: Brahmajit Das <brahmajit.xyz <AT> gmail <DOT> com>
AuthorDate: Mon Apr 29 13:11:58 2024 +0000
Commit: Nick Sarnie <sarnex <AT> gentoo <DOT> org>
CommitDate: Mon Apr 29 17:12:49 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ee6246a
app-emulation/vendor-reset: Fix implicit declaration of function strlcpy
Pulling C99 patches from upstream
Closes: https://bugs.gentoo.org/928306
Signed-off-by: Brahmajit Das <brahmajit.xyz <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/36481
Signed-off-by: Nick Sarnie <sarnex <AT> gentoo.org>
....1.1-allow-correct-compilation-with-clang.patch | 23 +++++++++++
...endor-reset-0.1.1-fix-build-on-kernel-6.8.patch | 35 +++++++++++++++++
.../vendor-reset-0.1.1_pre20221205-r2.ebuild | 44 ++++++++++++++++++++++
3 files changed, 102 insertions(+)
diff --git a/app-emulation/vendor-reset/files/vendor-reset-0.1.1-allow-correct-compilation-with-clang.patch b/app-emulation/vendor-reset/files/vendor-reset-0.1.1-allow-correct-compilation-with-clang.patch
new file mode 100644
index 000000000000..32ae298d4049
--- /dev/null
+++ b/app-emulation/vendor-reset/files/vendor-reset-0.1.1-allow-correct-compilation-with-clang.patch
@@ -0,0 +1,23 @@
+https://github.com/gnif/vendor-reset/commit/084881c6e9e11bdadaf05798e669568848e698a3.patch
+From: =?UTF-8?q?Marcus=20K=C3=B6hler?= <khler.marcus@gmail.com>
+Date: Mon, 25 Dec 2023 21:43:41 +0100
+Subject: [PATCH] Allow correct compilation with Clang/LLVM
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Marcus Köhler <khler.marcus@gmail.com>
+--- a/src/hook.c
++++ b/src/hook.c
+@@ -30,7 +30,11 @@ static bool hook_installed = false;
+ static int (*orig_pci_dev_specific_reset)(struct pci_dev *dev, int probe);
+
+ /* TCO breaks the hook, we must disable it for this function */
++#if defined(__GNUC__) && !defined(__llvm__)
+ __attribute__((optimize("-fno-optimize-sibling-calls")))
++#elif defined(__clang__)
++__attribute__((disable_tail_calls))
++#endif
+ static int hooked_pci_dev_specific_reset(struct pci_dev *dev, int probe)
+ {
+ int ret;
diff --git a/app-emulation/vendor-reset/files/vendor-reset-0.1.1-fix-build-on-kernel-6.8.patch b/app-emulation/vendor-reset/files/vendor-reset-0.1.1-fix-build-on-kernel-6.8.patch
new file mode 100644
index 000000000000..d99212c9ee27
--- /dev/null
+++ b/app-emulation/vendor-reset/files/vendor-reset-0.1.1-fix-build-on-kernel-6.8.patch
@@ -0,0 +1,35 @@
+https://github.com/gnif/vendor-reset/commit/f72619e468846e0bab4426f5e71b069f88c33a11.patch
+From: Sakari <20642596+sakarie9@users.noreply.github.com>
+Date: Thu, 14 Mar 2024 10:59:15 +0800
+Subject: [PATCH] Fix build on kernel 6.8+
+
+--- a/src/amd/amdgpu/atom.c
++++ b/src/amd/amdgpu/atom.c
+@@ -28,6 +28,7 @@
+ #include <linux/sched.h>
+ #include <linux/slab.h>
+ #include <linux/delay.h>
++#include <linux/version.h>
+ #include <asm/unaligned.h>
+
+ //#include <drm/drm_util.h>
+@@ -39,6 +40,10 @@
+ #include "atom-names.h"
+ #include "atom-bits.h"
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0)
++#define strscpy strlcpy
++#endif
++
+ #define ATOM_COND_ABOVE 0
+ #define ATOM_COND_ABOVEOREQUAL 1
+ #define ATOM_COND_ALWAYS 2
+@@ -1424,7 +1429,7 @@ struct atom_context *amdgpu_atom_parse(struct card_info *card, void *bios)
+ if (*str != '\0')
+ {
+ pr_info("ATOM BIOS: %s\n", str);
+- strlcpy(ctx->vbios_version, str, sizeof(ctx->vbios_version));
++ strscpy(ctx->vbios_version, str, sizeof(ctx->vbios_version));
+ }
+
+ return ctx;
diff --git a/app-emulation/vendor-reset/vendor-reset-0.1.1_pre20221205-r2.ebuild b/app-emulation/vendor-reset/vendor-reset-0.1.1_pre20221205-r2.ebuild
new file mode 100644
index 000000000000..f34969845915
--- /dev/null
+++ b/app-emulation/vendor-reset/vendor-reset-0.1.1_pre20221205-r2.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit linux-mod-r1
+
+if [[ ${PV} == *9999* ]]; then
+ EGIT_REPO_URI="https://github.com/gnif/vendor-reset.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+else
+ KEYWORDS="~amd64"
+ EGIT_COMMIT="4b466e92a2d9f76ce1082cde982c7be0be91e248"
+ SRC_URI="https://github.com/gnif/vendor-reset/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
+fi
+
+DESCRIPTION="Linux kernel vendor specific hardware reset module"
+HOMEPAGE="https://github.com/gnif/vendor-reset"
+
+LICENSE="GPL-2"
+SLOT="0"
+
+S="${WORKDIR}/${PN}-${EGIT_COMMIT}"
+
+CONFIG_CHECK="FTRACE KPROBES PCI_QUIRKS KALLSYMS FUNCTION_TRACER"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.1.1-allow-correct-compilation-with-clang.patch"
+ "${FILESDIR}/${PN}-0.1.1-fix-build-on-kernel-6.8.patch"
+)
+
+src_compile() {
+ local modlist=( vendor-reset )
+ local modargs=( KDIR="${KV_OUT_DIR}" )
+ linux-mod-r1_src_compile
+}
+
+src_install() {
+ linux-mod-r1_src_install
+
+ insinto /etc/modules-load.d/
+ newins "${FILESDIR}"/modload.conf vendor-reset.conf
+}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-emulation/vendor-reset/files/, app-emulation/vendor-reset/
@ 2022-12-06 1:59 Nick Sarnie
0 siblings, 0 replies; 3+ messages in thread
From: Nick Sarnie @ 2022-12-06 1:59 UTC (permalink / raw
To: gentoo-commits
commit: e9e5a76e9db897b85f87d705f30040858ccb66e4
Author: Nick Sarnie <sarnex <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 6 01:55:15 2022 +0000
Commit: Nick Sarnie <sarnex <AT> gentoo <DOT> org>
CommitDate: Tue Dec 6 01:58:51 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e9e5a76e
app-emulation/vendor-reset: Version bump, bugfix
Closes: https://bugs.gentoo.org/778890
Signed-off-by: Nick Sarnie <sarnex <AT> gentoo.org>
app-emulation/vendor-reset/Manifest | 2 +-
.../vendor-reset/files/Respect-eselect-kernel.patch | 13 +++++++++++++
...0220902.ebuild => vendor-reset-0.1.1_pre20221205.ebuild} | 6 +++++-
app-emulation/vendor-reset/vendor-reset-9999.ebuild | 7 ++++++-
4 files changed, 25 insertions(+), 3 deletions(-)
diff --git a/app-emulation/vendor-reset/Manifest b/app-emulation/vendor-reset/Manifest
index 17660f5bb12e..6ddfbd7eb277 100644
--- a/app-emulation/vendor-reset/Manifest
+++ b/app-emulation/vendor-reset/Manifest
@@ -1,2 +1,2 @@
DIST vendor-reset-0.1.0.tar.gz 12718324 BLAKE2B 762ec8bc289b572ab8f8ecc3fa233e3c78c48c48a261c58ce1be9c10356a55957e0bd8fd01e3143443be74236bf9ed540b84d332788c67aa949599ccc5a564d3 SHA512 ed4dcb1a71fa8901732e729d37b501ac105cc2c93d0666e44c08e311d99a244027339d5709a9305ff992ca2acb2f337793cdb1f9369197911985cd20d6f3139f
-DIST vendor-reset-0.1.1_pre20220902.tar.gz 12724563 BLAKE2B 6d1aa45216a4a72981fc766ba7541873902272a27b5eebc08f7b2627f186d6236c3b6f576f997e35a3a9a3bb4b0c5f6a285585522e7c0eb86b446808e2de501b SHA512 27bc02fdbc7d0339c0f706e1ec8406bc47f163fca6d6471dd7ad92272a384ab7319f6180641177f90a38c11aee2def52ae408a2165438980b7fc3aea10f88b4e
+DIST vendor-reset-0.1.1_pre20221205.tar.gz 12725340 BLAKE2B 5f2e34b74e83c8f48daad8d2c714872ab23f50cb0fad6b5c7920476b43c2fbfcf5543e923c506dfb2d8c33846e8fdd08c7d20b30fcc053f2c191d813872b44c5 SHA512 87a3c64d917e6a44308115480f14956f65a9f84fef70de29feebe3fcd7d522b59a3dbcb5fc9a340ac9b7a3612a29ed696b4f52648f86a0d877b915c97c5a4cc9
diff --git a/app-emulation/vendor-reset/files/Respect-eselect-kernel.patch b/app-emulation/vendor-reset/files/Respect-eselect-kernel.patch
new file mode 100644
index 000000000000..9259a3e12bf2
--- /dev/null
+++ b/app-emulation/vendor-reset/files/Respect-eselect-kernel.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile b/Makefile
+index b8a0652..79f60e8 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,6 +1,6 @@
+ USER := $(shell whoami)
+-KVER ?= $(shell uname -r)
+-KDIR ?= /lib/modules/$(KVER)/build
++KVER ?= $(KV_FULL)
++KDIR ?= ${KERNEL_DIR}
+
+ all: build
+
diff --git a/app-emulation/vendor-reset/vendor-reset-0.1.1_pre20220902.ebuild b/app-emulation/vendor-reset/vendor-reset-0.1.1_pre20221205.ebuild
similarity index 84%
rename from app-emulation/vendor-reset/vendor-reset-0.1.1_pre20220902.ebuild
rename to app-emulation/vendor-reset/vendor-reset-0.1.1_pre20221205.ebuild
index d0f34c496d9c..ceaaa99a4a5f 100644
--- a/app-emulation/vendor-reset/vendor-reset-0.1.1_pre20220902.ebuild
+++ b/app-emulation/vendor-reset/vendor-reset-0.1.1_pre20221205.ebuild
@@ -11,7 +11,7 @@ if [[ ${PV} == *9999* ]]; then
inherit git-r3
else
KEYWORDS="~amd64"
- EGIT_COMMIT="7d43285a5054e4b2b18dbba771b57d365943a0f7"
+ EGIT_COMMIT="4b466e92a2d9f76ce1082cde982c7be0be91e248"
SRC_URI="https://github.com/gnif/vendor-reset/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
fi
@@ -24,9 +24,13 @@ DEPEND=""
RDEPEND="${DEPEND}"
S="${WORKDIR}/${PN}-${EGIT_COMMIT}"
+PATCHES=( "${FILESDIR}/Respect-eselect-kernel.patch" )
+
pkg_setup() {
local CONFIG_CHECK="FTRACE KPROBES PCI_QUIRKS KALLSYMS FUNCTION_TRACER"
linux-mod_pkg_setup
+ export KV_FULL=${KV_FULL}
+ export KERNEL_DIR=${KERNEL_DIR}
}
src_compile() {
diff --git a/app-emulation/vendor-reset/vendor-reset-9999.ebuild b/app-emulation/vendor-reset/vendor-reset-9999.ebuild
index 64f307942f3d..a0b2326fc95a 100644
--- a/app-emulation/vendor-reset/vendor-reset-9999.ebuild
+++ b/app-emulation/vendor-reset/vendor-reset-9999.ebuild
@@ -11,7 +11,8 @@ if [[ ${PV} == *9999* ]]; then
inherit git-r3
else
KEYWORDS="~amd64"
- SRC_URI="https://github.com/gnif/vendor-reset/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ EGIT_COMMIT="4b466e92a2d9f76ce1082cde982c7be0be91e248"
+ SRC_URI="https://github.com/gnif/vendor-reset/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
fi
DESCRIPTION="Linux kernel vendor specific hardware reset module"
@@ -22,9 +23,13 @@ SLOT="0"
DEPEND=""
RDEPEND="${DEPEND}"
+PATCHES=( "${FILESDIR}/Respect-eselect-kernel.patch" )
+
pkg_setup() {
local CONFIG_CHECK="FTRACE KPROBES PCI_QUIRKS KALLSYMS FUNCTION_TRACER"
linux-mod_pkg_setup
+ export KV_FULL=${KV_FULL}
+ export KERNEL_DIR=${KERNEL_DIR}
}
src_compile() {
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-04-29 17:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-23 23:45 [gentoo-commits] repo/gentoo:master commit in: app-emulation/vendor-reset/files/, app-emulation/vendor-reset/ Nick Sarnie
-- strict thread matches above, loose matches on Subject: below --
2024-04-29 17:13 Nick Sarnie
2022-12-06 1:59 Nick Sarnie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox