View previous topic :: View next topic |
Author |
Message |
jaypeche Apprentice

Joined: 13 Jun 2007 Posts: 185 Location: France
|
Posted: Thu May 22, 2025 5:36 pm Post subject: [Kernel module] Impossible de compiler asus-armoury.ko () |
|
|
Bonjour à tous,
Je suis l' heureux possesseur du Notebook Gaming https://rog.asus.com/fr/laptops/rog-strix/rog-strix-g18-2023-series, dont je suis ravi.
Afin d'exploiter les performances de ce PC pour les jeux AAA, il m'a paru naturel d'installer Steam+Proton sous Gentoo Linux.
Le résultat est très concluant, et les jeux windows sont quelquefois plus performant avec proton, qu'en natif avec windows.
Sur ce site https://asus-linux.org, le rédacteur affirme que Linux est une bonne solution pour exploiter cette configuration Gaming.
Je souhaite mettre au point l'ebuild d'installation du kernel module asus-armoury pour automatiser l'installation de cette dépendance à asusctl ou rog control center.
Ebuild:
Code: | # Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit linux-mod-r1
if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/uejji/asus-armoury.git"
EGIT_BRANCH="master"
KEYWORDS=""
else
SRC_URI="https://github.com/uejji/asus-armoury/archive/refs/tags/20240911.3.tar.gz -> ${PN}-${PV}.tar.gz"
RESTRICT="mirror"
KEYWORDS="~amd64 ~x86"
S="${WORKDIR}/${PN}-20240911.3"
fi
DESCRIPTION="Platform kernel driver for ASUS Armoury"
HOMEPAGE="https://github.com/uejji/asus-armoury"
LICENSE="GPL-3+"
SLOT="0"
DEPEND="
virtual/linux-sources
sys-kernel/linux-headers
"
#PATCHES=( "${FILESDIR}/asus-wmi-gentoo.diff" )
pkg_setup() {
linux-mod-r1_pkg_setup
}
src_prepare() {
# Fix build failure, bug #513542 and bug #761370
# sed "s%^KDIR :=.*%KDIR := ${KV_OUT_DIR:-$KERNEL_DIR}%g" -i Makefile || die
default
}
src_compile() {
local modlist=( asus-armoury )
local modargs=(
KVERSION=${KV_FULL}
)
linux-mod-r1_src_compile
}
src_install() {
einstalldocs
# insinto /etc/modprobe.d
# newins "${FILESDIR}"/bbswitch.modprobe bbswitch.conf
linux-mod-r1_src_install
}
|
Compile :
Code: | strix /home/jay # emerge -av asus-armoury
* IMPORTANT: 2 news items need reading for repository 'gentoo'.
* Use eselect news read to view new items.
These are the packages that would be merged, in order:
Calculating dependencies... done!
Dependency resolution took 2.13 s (backtrack: 0/20).
[ebuild N ~] sys-devel/asus-armoury-20240911_p3::strix-overlay USE="strip -dist-kernel -modules-compress -modules-sign" 0 KiB
Total: 1 package (1 new), Size of downloads: 0 KiB
Would you like to merge these packages? [Yes/No]
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) sys-devel/asus-armoury-20240911_p3::strix-overlay
* asus-armoury-20240911_p3.tar.gz BLAKE2B SHA512 size ;-) ... [ ok ]
* Determining the location of the kernel source code
* Found kernel source directory:
* /usr/src/linux
* Found sources for kernel version:
* 6.12.21-gentoo-x86_64
* Checking for suitable kernel configuration options ... [ ok ]
* Preparing x86_64-pc-linux-gnu toolchain for kernel modules (override with KERNEL_CHOST) ...
* Toolchain picked for kernel modules (override with KERNEL_CC, _LD, ...): '/usr/bin/x86_64-pc-linux-gnu-gcc-14' '/usr/bin/x86_64-pc-linux-gnu-g++-14' '/usr/bin/x86_64-pc-linux-gnu-ld.bfd' '/usr/bin/x86_64-pc-linux-gnu-gcc-ar' '/usr/bin/x86_64-pc-linux-gnu-gcc-nm' '/usr/bin/x86_64-pc-linux-gnu-objcopy' '/usr/bin/x86_64-pc-linux-gnu-objdump' '/usr/bin/x86_64-pc-linux-gnu-readelf' '/usr/bin/x86_64-pc-linux-gnu-strip'
>>> Unpacking source...
>>> Unpacking asus-armoury-20240911_p3.tar.gz to /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work
>>> Source unpacked in /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work
>>> Preparing source in /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3 ...
* Building asus-armoury module in /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3 ...
make -j15 -l8 ARCH=x86 V=1 KBUILD_VERBOSE=1 CONFIG_WERROR= CONFIG_MODULE_SIG_ALL= CONFIG_MODULE_COMPRESS_ALL= CONFIG_MODULE_COMPRESS_GZIP= CONFIG_MODULE_COMPRESS_XZ= CONFIG_MODULE_COMPRESS_ZSTD= DEPMOD=true STRIP=true CROSS_COMPILE=x86_64-pc-linux-gnu- HOSTCC=x86_64-pc-linux-gnu-gcc HOSTCXX=x86_64-pc-linux-gnu-g++ 'HOSTCFLAGS=-march=raptorlake -O2 -pipe' 'HOSTCXXFLAGS=-march=raptorlake -O2 -pipe' 'HOSTLDFLAGS=-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs' HOSTPKG_CONFIG=x86_64-pc-linux-gnu-pkg-config CC=/usr/bin/x86_64-pc-linux-gnu-gcc-14 CXX=/usr/bin/x86_64-pc-linux-gnu-g++-14 LD=/usr/bin/x86_64-pc-linux-gnu-ld.bfd AR=/usr/bin/x86_64-pc-linux-gnu-gcc-ar NM=/usr/bin/x86_64-pc-linux-gnu-gcc-nm OBJCOPY=/usr/bin/x86_64-pc-linux-gnu-objcopy OBJDUMP=/usr/bin/x86_64-pc-linux-gnu-objdump READELF=/usr/bin/x86_64-pc-linux-gnu-readelf KVERSION=6.12.21-gentoo-x86_64 modules
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-pc-linux-gnu-gcc (Gentoo 14.2.1_p20241221 p7) 14.2.1 20241221
You are using: x86_64-pc-linux-gnu-gcc-14 (Gentoo 14.2.1_p20241221 p7) 14.2.1 20241221
make -f ./scripts/Makefile.build obj=/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3 need-builtin=1 need-modorder=1
# CC [M] /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.o
/usr/bin/x86_64-pc-linux-gnu-gcc-14 -Wp,-MMD,/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/.asus-armoury.o.d -nostdinc -I./arch/x86/include -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map=./= -std=gnu11 -fshort-wchar -funsigned-char -fno-common -fno-PIE -fno-strict-aliasing -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=none -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -march=core2 -mno-red-zone -mcmodel=kernel -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -mindirect-branch-cs-prefix -mfunction-return=thunk-extern -fno-jump-tables -fpatchable-function-entry=16,16 -fno-delete-null-pointer-checks -O2 -fno-allow-store-data-races -fstack-protector -fno-stack-clash-protection -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -fmin-function-alignment=16 -fstrict-flex-arrays=3 -fno-strict-overflow -fno-stack-check -fconserve-stack -Wall -Wundef -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Werror=strict-prototypes -Wno-format-security -Wno-trigraphs -Wno-frame-address -Wno-address-of-packed-member -Wmissing-declarations -Wmissing-prototypes -Wframe-larger-than=2048 -Wno-main -Wno-dangling-pointer -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-overflow -Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wenum-conversion -Wextra -Wunused -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-packed-not-aligned -Wno-format-overflow -Wno-format-truncation -Wno-stringop-truncation -Wno-override-init -Wno-missing-field-initializers -Wno-type-limits -Wno-shift-negative-value -Wno-maybe-uninitialized -Wno-sign-compare -Wno-unused-parameter -DOXP_PLATFORM_DRIVER_VERSION='"20240911.3"' -DMODULE -DKBUILD_BASENAME='"asus_armoury"' -DKBUILD_MODNAME='"asus_armoury"' -D__KBUILD_MODNAME=kmod_asus_armoury -c -o /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.o /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c ; ./tools/objtool/objtool --hacks=jump_label --hacks=noinstr --hacks=skylake --orc --retpoline --rethunk --static-call --uaccess --prefix=16 --module /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.o
# cmd_mod /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.mod
printf '%s\n' asus-armoury.o | awk '!x[$0]++ { print("/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/"$0) }' > /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.mod
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c:28:10: fatal error: asus-wmi.h: No such file or directory
28 | #include "asus-wmi.h"
| ^~~~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:229: /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.o] Error 1
make[1]: *** [Makefile:1946: /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3] Error 2
make: *** [Makefile:74: modules] Error 2
* ERROR: sys-devel/asus-armoury-20240911_p3::strix-overlay failed (compile phase):
* emake failed
*
* If you need support, post the output of `emerge --info '=sys-devel/asus-armoury-20240911_p3::strix-overlay'`,
* the complete build log and the output of `emerge -pqv '=sys-devel/asus-armoury-20240911_p3::strix-overlay'`.
* The complete build log is located at '/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/temp/environment'.
* Working directory: '/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3'
* S: '/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3'
>>> Failed to emerge sys-devel/asus-armoury-20240911_p3, Log file:
>>> '/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/temp/build.log'
* Messages for package sys-devel/asus-armoury-20240911_p3:
* ERROR: sys-devel/asus-armoury-20240911_p3::strix-overlay failed (compile phase):
* emake failed
*
* If you need support, post the output of `emerge --info '=sys-devel/asus-armoury-20240911_p3::strix-overlay'`,
* the complete build log and the output of `emerge -pqv '=sys-devel/asus-armoury-20240911_p3::strix-overlay'`.
* The complete build log is located at '/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/temp/environment'.
* Working directory: '/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3'
* S: '/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3'
|
Il me manque l'inclusion de asus_wmi.h
Ce que je trouve étrange c'est qu'il soit appelé 2 fois dans asus-armoury.c :
Code: |
/*
* Asus Armoury (WMI) attributes driver. This driver uses the fw_attributes
* class to expose the various WMI functions that many gaming and some
* non-gaming ASUS laptops have available.
* These typically don't fit anywhere else in the sysfs such as under LED class,
* hwmon or other, and are set in Windows using the ASUS Armoury Crate tool.
*
* Copyright(C) 2010 Intel Corporation.
* Copyright(C) 2024-2024 Luke Jones <luke@ljones.dev>
*/
#include <linux/bitfield.h>
#include <linux/device.h>
#include <linux/dmi.h>
#include <linux/errno.h>
#include <linux/fs.h>
#include <linux/kernel.h>
#include <linux/kmod.h>
#include <linux/kobject.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/platform_data/x86/asus-wmi.h>
#include <linux/types.h>
#include "asus-armoury.h"
#include "firmware_attributes_class.h"
#include "asus-wmi.h"
#define ASUS_NB_WMI_EVENT_GUID "0B3CBB35-E3C2-45ED-91C2-4C5A6D195D1C"
#define ASUS_MINI_LED_MODE_MASK 0x03
/* Standard modes for devices with only on/off */
#define ASUS_MINI_LED_OFF 0x00
#define ASUS_MINI_LED_ON 0x01
/* New mode on some devices, define here to clarify remapping later */
#define ASUS_MINI_LED_STRONG_MODE 0x02
/* New modes for devices with 3 mini-led mode types */
#define ASUS_MINI_LED_2024_WEAK 0x00
#define ASUS_MINI_LED_2024_STRONG 0x01
#define ASUS_MINI_LED_2024_OFF 0x02
#define ASUS_POWER_CORE_MASK GENMASK(15, 8)
#define ASUS_PERF_CORE_MASK GENMASK(7, 0)
enum cpu_core_type {
CPU_CORE_PERF = 0,
CPU_CORE_POWER,
};
enum cpu_core_value {
CPU_CORE_DEFAULT = 0,
CPU_CORE_MIN,
CPU_CORE_MAX,
CPU_CORE_CURRENT,
};
/* Default limits for tunables available on ASUS ROG laptops */
#define PPT_CPU_LIMIT_MIN 5
#define PPT_CPU_LIMIT_MAX 150
#define PPT_CPU_LIMIT_DEFAULT 80
#define PPT_PLATFORM_MIN 5
#define PPT_PLATFORM_MAX 100
#define PPT_PLATFORM_DEFAULT 80
#define NVIDIA_BOOST_MIN 5
#define NVIDIA_BOOST_MAX 25
#define NVIDIA_TEMP_MIN 75
#define NVIDIA_TEMP_MAX 87
#define NVIDIA_POWER_MIN 0
#define NVIDIA_POWER_MAX 70
#define NVIDIA_POWER_DEFAULT 70
...
|
Si quelqu'un a une idée Je suis preneur...
emerge --info :
Code: | strix /usr/local/portage/overlay/strix-overlay/sys-devel/asus-armoury # emerge --info
Portage 3.0.67 (python 3.13.3-final-0, default/linux/amd64/23.0/desktop/gnome/systemd, gcc-14, glibc-2.40-r8, 6.12.21-gentoo-x86_64 x86_64)
=================================================================
System uname: Linux-6.12.21-gentoo-x86_64-x86_64-13th_Gen_Intel-R-_Core-TM-_i7-13650HX-with-glibc2.40
KiB Mem: 32477104 total, 26078264 free
KiB Swap: 8191996 total, 8191996 free
Timestamp of repository gentoo: Wed, 21 May 2025 14:15:00 +0000
Head commit of repository gentoo: 93c364c66e48287e168fa5b9904d958bb05d1a27
Timestamp of repository steam-overlay: Fri, 16 May 2025 10:24:14 +0000
Head commit of repository steam-overlay: d277759a1f8f39e271f6c46511ee7be01af005c7
Timestamp of repository zGentoo: Mon, 19 May 2025 21:24:09 +0000
Head commit of repository zGentoo: 2bc273ea8c6d7463d64d9a460ebdb82bac35a453
sh bash 5.2_p37
ld GNU ld (Gentoo 2.44 p1) 2.44.0
distcc 3.4 x86_64-pc-linux-gnu [disabled]
app-misc/pax-utils: 1.3.8::gentoo
app-shells/bash: 5.2_p37::gentoo
dev-build/autoconf: 2.13-r8::gentoo, 2.72-r1::gentoo
dev-build/automake: 1.17-r1::gentoo
dev-build/cmake: 3.31.5::gentoo
dev-build/libtool: 2.5.4::gentoo
dev-build/make: 4.4.1-r100::gentoo
dev-build/meson: 1.7.0::gentoo
dev-java/java-config: 2.3.4::gentoo
dev-lang/perl: 5.40.2::gentoo
dev-lang/python: 3.11.12::gentoo, 3.12.10::gentoo, 3.13.3::gentoo
dev-lang/rust-bin: 1.81.0-r103::gentoo, 1.84.1-r2::gentoo, 1.85.1::gentoo
llvm-core/clang: 19.1.7::gentoo
llvm-core/llvm: 18.1.8-r6::gentoo, 19.1.7::gentoo
sys-apps/baselayout: 2.17::gentoo
sys-apps/sandbox: 2.46::gentoo
sys-apps/systemd: 256.10::gentoo
sys-devel/binutils: 2.44-r1::gentoo
sys-devel/binutils-config: 5.5.2::gentoo
sys-devel/gcc: 14.2.1_p20241221::gentoo
sys-devel/gcc-config: 2.12.1::gentoo
sys-kernel/linux-headers: 6.12::gentoo (virtual/os-headers)
sys-libs/glibc: 2.40-r8::gentoo
Repositories:
gentoo
location: /var/db/repos/gentoo
sync-type: rsync
sync-uri: rsync://rsync.gentoo.org/gentoo-portage
priority: -1000
volatile: False
sync-rsync-verify-max-age: 3
sync-rsync-verify-metamanifest: yes
sync-rsync-verify-jobs: 1
sync-rsync-extra-opts:
crossdev
location: /var/db/repos/crossdev
masters: gentoo
volatile: False
steam-overlay
location: /var/db/repos/steam-overlay
sync-type: git
sync-uri: https://github.com/gentoo-mirror/steam-overlay.git
masters: gentoo
volatile: False
strix-overlay
location: /usr/local/portage/overlay/strix-overlay
masters: gentoo
priority: 0
volatile: True
zGentoo
location: /var/db/repos/zGentoo
sync-type: git
sync-uri: https://github.com/gentoo-mirror/zGentoo.git
masters: gentoo
volatile: False
Binary Repositories:
gentoobinhost
priority: 1
sync-uri: https://distfiles.gentoo.org/releases/amd64/binpackages/23.0/x86-64
Installed sets: @steam
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE ipw2100-fw bonnie EUPL-1.2 LPPL-1.2 EPL-1.0 BSD IJG GPL-3+-with-autoconf-exception Sleepycat Nokia-Qt-LGPL-Exception-1.1 metapackage FTL GPL-3+ ZPL GPL-1+ FSFAP Ruby-BSD Clear-BSD PSF-2 SGI-B-2.0 tanuki-community UoI-NCSA vim libgcc AGPL-3 MIT LGPL-2 GPL-3+-with-font-exception UPX-exception ZLIB GPL-2+-with-openssl-exception WTFPL-2 GPL-1 Clarified-Artistic GPL-3+-with-openssl-exception LGPL-2.1-with-linking-exception libstdc++ Unicode-DFS-2016 Apache-2.0-with-LLVM-exceptions ISC LGPL-2.1 LGPL-2-with-linking-exception GPL-2+-with-Pyinstaller-Bootloader-exception Unlicense gcc-runtime-library-exception-3.1 GPL-2 BSD-2 OPENLDAP W3C GPL-3-with-font-exception GPL-2-with-MySQL-FLOSS-exception PYTHON LGPL-2.1+ GPL-2-with-font-exception LGPL-3-with-linking-exception CeCILL-2 PSF-2.4 GPL-3-with-openssl-exception Unicode-DFS-2015 GPL-3 GPL-2+ LGPL-3 Artistic-2 HPND Ruby ECL-2.0 LGPL-3+ LGPL-2+ MPL-2.0 CC0-1.0 public-domain qwt GPL-2-with-classpath-exception AGPL-3+ GPL-2+-with-eCos-exception-2 Transmission-OpenSSL-exception GPL-2-with-linking-exception wxWinLL-3.1 UPL-1.0 Boost-1.0 Apache-2.0 Ms-RL CeCILL-C Zend-2.0 OSL-2.1 AFL-3.0 Apache-1.0 NPL-1.1 CDDL AFL-2.1 CeCILL-B gnuplot LPL-1.02 MPL-1.0 EPL-2.0 CNRI CPAL-1.0 OSL-2.0 OSL-1.1 APSL-2 openssl EUPL-1.1 PHP-3.01 Ms-PL CPL-1.0 QPL-1.0 FraunhoferFDK MPL-1.1 IBM Apache-1.1 BSD-4 LPPL-1.3a gsm tm-align FVWM matplotlib libpng2 RtMidi tablelist DES pngnq the-Click-license icu IDPL Sendmail boehm-gc JasPer2.0 xtrs NEWLIB xbatt tcp_wrappers_license RSA w3m ZSH SSLeay xboing photopc NCSA-AMD CDDL-1.1 HTML-Tidy Flashpix libpng TeX flexmock pngcrush JOVE ElementTree XC gd otter NPSL-0.95 DUMB-0.9.3 TeX-other-free Emacs Khronos-CLHPP BSD-2-with-patent PHP-2.02 rc LIBGLOSS bufexplorer.vim Time-modules Old-MIT sdlsasteroids LPPL-1.0 netcat mpich2 par LLGPL-2.1 LambdaMOO rdisc BSD-1 JDOM Toyoda Xdebug minpack BSD-with-disclosure CAOSL symlinks BSD-with-attribution coldspringharbor regexp-UofT Mini-XML rwpng lsof FLTK Time-Format Spencer-99 docbook mm openafs-krb5-a libtiff Snd Crypt-IDEA torque-2.5 dom4j File-MMagic AMPAS Ispell ipadic UCAR-Unidata freetts psutils X11-Lucent BEER-WARE wm2 tcltk BZIP2 TextMate-bundle scanlogd ngrep iASL VTK FFT2D Sendmail-Open-Source sash trio repoze CDDL-Schily imagemagick Openwall alternate SunSoft AIFFWriter.m Info-ZIP perforce MIT-with-advertising Base64 unicode curl ErlPL-1.1 FLEX inner-net libmng URT FastCGI Princeton SMAIL LPPL-1.3 NCSA-HDF buddy PCRE CPL-0.5 feh Allegro Sympow-BSD BSD EUPL-1.2 LBNLBSD EPL-1.0 0BSD Sleepycat Ms-RL GPL-3+ OSL-2.1 ZPL AFL-3.0 GPL-1+ UoI-NCSA PSF-2 LPPL-1.3c AGPL-3 Unicode-3.0 MIT CDDL LGPL-2 IPAfont POSTGRESQL ZLIB LPL-1.02 MPL-1.0 EPL-2.0 GPL-1 CNRI nethack Unicode-DFS-2016 CPAL-1.0 ISC LGPL-2.1 APL-1.0 EUPL-1.1 BSD-2 GPL-2 W3C PHP-3.01 wxWinLL-3 LGPL-2.1+ CPL-1.0 Ms-PL QPL-1.0 Unicode-DFS-2015 MirOS GPL-3 GPL-2+ MPL-1.1 LGPL-3 Artistic-2 HPND OFL-1.1 Artistic ECL-2.0 IBM LGPL-2+ LGPL-3+ MPL-2.0 MIT-0 Unlicense AGPL-3+ PHP-3 UPL-1.0 Apache-1.1 APSL-2 BlueOak-1.0.0 Boost-1.0 Apache-2.0 FDL-1.2 FDL-1.1 GPL-3+ CC-BY-2.5 GPL-1+ Free-Art-1.3 FDL-1.3 CC-BY-SA-3.0 OPL IPAfont OFL-1.0 CC-BY-SA-2.5 CC-BY-3.0 FDL-1.2+ CC-BY-4.0 GPL-1 Arphic FDL-1.3+ CC-BY-2.0 CC-BY-SA-2.0 GPL-2 Free-Art-1.2 CC-BY-SA-4.0 FDL-1.1+ GPL-3 GPL-2+ OFL-1.1 myspell-en_CA-KevinAtkinson CC-PD Texinfo-manual CC-BY-SA-1.0 wxWinFDL-3 CC-SA-1.0 CC-BY-1.0 quake1-textures UbuntuFontLicense-1.0 mplus-fonts BitstreamVera LDP-1a man-pages vlgothic MaxMind2 BAEKMUK man-pages-posix-2013 LDP-1 Mellanox-AS-IS linux-fw-redistributable shmux LSI-tw_cli ipw2200-fw intel-ucode Broadcom ISSL freedist MicroChip-SDCC NVIDIA-r1 bh-luxi NOSA NVIDIA-r2 no-source-code Atmel unRAR JSON AVASYS qlogic-fibre-channel-firmware"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=raptorlake -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=raptorlake -O2 -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.free.fr/mirrors/ftp.gentoo.org/ https://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ https://gentoo.mirrors.ovh.net/gentoo-distfiles/ http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="fr_FR.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
LINGUAS="fr"
MAKEOPTS="-j15 -l8"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="X a52 aac acl acpi alsa amd64 bluetooth branding bzip2 cairo cdda cdr cet cifs colord crypt cups dbus dri dts dvd dvdr eds encode evo exif flac fuse gdbm gdk-pixbuf gif glx gnome gnome-keyring gnome-online-accounts gnome-shell gpm gstreamer gtk gui iconv icu introspection jpeg keyring lcms libnotify libtirpc lvm mad mng mp3 mp4 mpeg mtp multilib nautilus ncurses networkmanager nfs nls nvidia ogg opengl openmp pam pango pcre pdf pipewire png policykit ppds pulseaudio qml readline samba sdl seccomp sound spell ssl startup-notification svg sysprof systemd test-rust tiff tracker truetype udev udisks unicode upower usb verify-sig vorbis vulkan wxwidgets x264 xattr xcb xft xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gcc_14" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="libinput joystick mouse keyboard" KERNEL="linux" L10N="fr" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres17" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_13 python3_12" RUBY_TARGETS="ruby32" SANE_BACKENDS="hp net" VIDEO_CARDS="intel i915 nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
|
_________________ "Je peux expliquer le logiciel libre en 3 mots : Liberté, égalité, fraternité" Richard Stallman (2012)
Gentoo Linux Rullez ! |
|
Back to top |
|
 |
ghoti Advocate


Joined: 30 Dec 2002 Posts: 3647 Location: Belgium
|
Posted: Fri May 23, 2025 9:49 am Post subject: |
|
|
Salut !
jaypeche wrote: |
Il me manque l'inclusion de asus_wmi.h
Ce que je trouve étrange c'est qu'il soit appelé 2 fois dans asus-armoury.c : |
Sans avoir trop creusé, mon hypothèse serait que l'auteur a supprimé sa propre version de asus-wmi.h car le fichier est maintenant dans les sources du noyau mais il a oublié de faire le ménage dans son code, d'où la redondance.
Essaie en supprimant la ligne Code: | #include "asus-wmi.h" | dans asus-armoury.c  |
|
Back to top |
|
 |
jaypeche Apprentice

Joined: 13 Jun 2007 Posts: 185 Location: France
|
Posted: Sat May 24, 2025 12:18 pm Post subject: |
|
|
Bonjour, et merçi à toi ghoti
J'ai localisé ce fichier :
Code: | find /usr/src/linux/. -type f -name "asus-wmi.h"
/usr/src/linux/./drivers/platform/x86/asus-wmi.h
/usr/src/linux/./include/linux/platform_data/x86/asus-wmi.h
|
Ce qui confirme l'emplacement, du coup ai créer un patch pour supprimer cet inclusion, mais j'ai d'autres souçis à la compilation :
Code: | >>> Emerging (1 of 1) sys-devel/asus-armoury-20240911_p3::strix-overlay
* asus-armoury-20240911_p3.tar.gz BLAKE2B SHA512 size ;-) ... [ ok ]
* Determining the location of the kernel source code
* Found kernel source directory:
* /usr/src/linux
* Found sources for kernel version:
* 6.12.21-gentoo-x86_64
* Checking for suitable kernel configuration options ... [ ok ]
* Preparing x86_64-pc-linux-gnu toolchain for kernel modules (override with KERNEL_CHOST) ...
* Toolchain picked for kernel modules (override with KERNEL_CC, _LD, ...): '/usr/bin/x86_64-pc-linux-gnu-gcc-14' '/usr/bin/x86_64-pc-linux-gnu-g++-14' '/usr/bin/x86_64-pc-linux-gnu-ld.bfd' '/usr/bin/x86_64-pc-linux-gnu-gcc-ar' '/usr/bin/x86_64-pc-linux-gnu-gcc-nm' '/usr/bin/x86_64-pc-linux-gnu-objcopy' '/usr/bin/x86_64-pc-linux-gnu-objdump' '/usr/bin/x86_64-pc-linux-gnu-readelf' '/usr/bin/x86_64-pc-linux-gnu-strip'
>>> Unpacking source...
>>> Unpacking asus-armoury-20240911_p3.tar.gz to /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work
>>> Source unpacked in /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work
>>> Preparing source in /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3 ...
* Applying asus-wmi-gentoo.diff ... [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3 ...
* Building asus-armoury module in /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3 ...
make -j15 -l8 ARCH=x86 V=1 KBUILD_VERBOSE=1 CONFIG_WERROR= CONFIG_MODULE_SIG_ALL= CONFIG_MODULE_COMPRESS_ALL= CONFIG_MODULE_COMPRESS_GZIP= CONFIG_MODULE_COMPRESS_XZ= CONFIG_MODULE_COMPRESS_ZSTD= DEPMOD=true STRIP=true CROSS_COMPILE=x86_64-pc-linux-gnu- HOSTCC=x86_64-pc-linux-gnu-gcc HOSTCXX=x86_64-pc-linux-gnu-g++ 'HOSTCFLAGS=-march=raptorlake -O2 -pipe' 'HOSTCXXFLAGS=-march=raptorlake -O2 -pipe' 'HOSTLDFLAGS=-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs' HOSTPKG_CONFIG=x86_64-pc-linux-gnu-pkg-config CC=/usr/bin/x86_64-pc-linux-gnu-gcc-14 CXX=/usr/bin/x86_64-pc-linux-gnu-g++-14 LD=/usr/bin/x86_64-pc-linux-gnu-ld.bfd AR=/usr/bin/x86_64-pc-linux-gnu-gcc-ar NM=/usr/bin/x86_64-pc-linux-gnu-gcc-nm OBJCOPY=/usr/bin/x86_64-pc-linux-gnu-objcopy OBJDUMP=/usr/bin/x86_64-pc-linux-gnu-objdump READELF=/usr/bin/x86_64-pc-linux-gnu-readelf KVERSION=6.12.21-gentoo-x86_64 modules
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-pc-linux-gnu-gcc (Gentoo 14.2.1_p20241221 p7) 14.2.1 20241221
You are using: x86_64-pc-linux-gnu-gcc-14 (Gentoo 14.2.1_p20241221 p7) 14.2.1 20241221
make -f ./scripts/Makefile.build obj=/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3 need-builtin=1 need-modorder=1
# CC [M] /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.o
/usr/bin/x86_64-pc-linux-gnu-gcc-14 -Wp,-MMD,/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/.asus-armoury.o.d -nostdinc -I./arch/x86/include -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map=./= -std=gnu11 -fshort-wchar -funsigned-char -fno-common -fno-PIE -fno-strict-aliasing -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=none -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -march=core2 -mno-red-zone -mcmodel=kernel -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -mindirect-branch-cs-prefix -mfunction-return=thunk-extern -fno-jump-tables -fpatchable-function-entry=16,16 -fno-delete-null-pointer-checks -O2 -fno-allow-store-data-races -fstack-protector -fno-stack-clash-protection -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -fmin-function-alignment=16 -fstrict-flex-arrays=3 -fno-strict-overflow -fno-stack-check -fconserve-stack -Wall -Wundef -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Werror=strict-prototypes -Wno-format-security -Wno-trigraphs -Wno-frame-address -Wno-address-of-packed-member -Wmissing-declarations -Wmissing-prototypes -Wframe-larger-than=2048 -Wno-main -Wno-dangling-pointer -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-overflow -Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wenum-conversion -Wextra -Wunused -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-packed-not-aligned -Wno-format-overflow -Wno-format-truncation -Wno-stringop-truncation -Wno-override-init -Wno-missing-field-initializers -Wno-type-limits -Wno-shift-negative-value -Wno-maybe-uninitialized -Wno-sign-compare -Wno-unused-parameter -DOXP_PLATFORM_DRIVER_VERSION='"20240911.3"' -DMODULE -DKBUILD_BASENAME='"asus_armoury"' -DKBUILD_MODNAME='"asus_armoury"' -D__KBUILD_MODNAME=kmod_asus_armoury -c -o /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.o /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c ; ./tools/objtool/objtool --hacks=jump_label --hacks=noinstr --hacks=skylake --orc --retpoline --rethunk --static-call --uaccess --prefix=16 --module /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.o
# cmd_mod /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.mod
printf '%s\n' asus-armoury.o | awk '!x[$0]++ { print("/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/"$0) }' > /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.mod
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c: In function ‘attr_int_store’:
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c:208:15: error: implicit declaration of function ‘asus_wmi_set_devstate’ [-Wimplicit-function-declaration]
208 | err = asus_wmi_set_devstate(wmi_dev, value, &result);
| ^~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c: In function ‘mini_led_mode_current_value_show’:
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c:236:15: error: implicit declaration of function ‘asus_wmi_get_devstate_dsts’ [-Wimplicit-function-declaration]
236 | err = asus_wmi_get_devstate_dsts(asus_armoury.mini_led_dev_id, &value);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c: In function ‘apu_mem_current_value_show’:
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c:494:42: error: ‘ASUS_WMI_DEVID_APU_MEM’ undeclared (first use in this function); did you mean ‘ASUS_WMI_DEVID_GPU_MUX’?
494 | err = asus_wmi_get_devstate_dsts(ASUS_WMI_DEVID_APU_MEM, &mem);
| ^~~~~~~~~~~~~~~~~~~~~~
| ASUS_WMI_DEVID_GPU_MUX
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c:494:42: note: each undeclared identifier is reported only once for each function it appears in
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c: In function ‘apu_mem_current_value_store’:
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c:579:37: error: ‘ASUS_WMI_DEVID_APU_MEM’ undeclared (first use in this function); did you mean ‘ASUS_WMI_DEVID_GPU_MUX’?
579 | err = asus_wmi_set_devstate(ASUS_WMI_DEVID_APU_MEM, mem, &result);
| ^~~~~~~~~~~~~~~~~~~~~~
| ASUS_WMI_DEVID_GPU_MUX
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c: In function ‘init_max_cpu_cores’:
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c:612:42: error: ‘ASUS_WMI_DEVID_CORES_MAX’ undeclared (first use in this function); did you mean ‘ASUS_WMI_DEVID_CAMERA’?
612 | err = asus_wmi_get_devstate_dsts(ASUS_WMI_DEVID_CORES_MAX, &cores);
| ^~~~~~~~~~~~~~~~~~~~~~~~
| ASUS_WMI_DEVID_CAMERA
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c:621:42: error: ‘ASUS_WMI_DEVID_CORES’ undeclared (first use in this function); did you mean ‘ASUS_WMI_DEVID_OOBE’?
621 | err = asus_wmi_get_devstate_dsts(ASUS_WMI_DEVID_CORES, &cores);
| ^~~~~~~~~~~~~~~~~~~~
| ASUS_WMI_DEVID_OOBE
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c: In function ‘cores_current_value_store’:
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c:693:37: error: ‘ASUS_WMI_DEVID_CORES’ undeclared (first use in this function); did you mean ‘ASUS_WMI_DEVID_OOBE’?
693 | err = asus_wmi_set_devstate(ASUS_WMI_DEVID_CORES, out_val, &result);
| ^~~~~~~~~~~~~~~~~~~~
| ASUS_WMI_DEVID_OOBE
In file included from /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c:26:
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c: In function ‘dgpu_base_tgp_current_value_show’:
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c:807:62: error: ‘ASUS_WMI_DEVID_DGPU_BASE_TGP’ undeclared (first use in this function); did you mean ‘ASUS_WMI_DEVID_GPU_FAN_CTRL’?
807 | ATTR_GROUP_INT_VALUE_ONLY_RO(dgpu_base_tgp, "dgpu_base_tgp", ASUS_WMI_DEVID_DGPU_BASE_TGP,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.h:59:42: note: in definition of macro ‘WMI_SHOW_INT’
59 | err = asus_wmi_get_devstate_dsts(_wmi, &result); \
| ^~~~
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.h:124:9: note: in expansion of macro ‘__ATTR_CURRENT_INT_RO’
124 | __ATTR_CURRENT_INT_RO(_attrname, _wmi); \
| ^~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c:807:1: note: in expansion of macro ‘ATTR_GROUP_INT_VALUE_ONLY_RO’
807 | ATTR_GROUP_INT_VALUE_ONLY_RO(dgpu_base_tgp, "dgpu_base_tgp", ASUS_WMI_DEVID_DGPU_BASE_TGP,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c: In function ‘dgpu_tgp_current_value_store’:
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c:809:46: error: ‘ASUS_WMI_DEVID_DGPU_SET_TGP’ undeclared (first use in this function); did you mean ‘ASUS_WMI_DEVID_GPU_FAN_CTRL’?
809 | ATTR_GROUP_ROG_TUNABLE(dgpu_tgp, "dgpu_tgp", ASUS_WMI_DEVID_DGPU_SET_TGP,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.h:214:52: note: in definition of macro ‘__ROG_TUNABLE_RW’
214 | &asus_armoury.rog_tunables->_attr, _wmi); \
| ^~~~
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c:809:1: note: in expansion of macro ‘ATTR_GROUP_ROG_TUNABLE’
809 | ATTR_GROUP_ROG_TUNABLE(dgpu_tgp, "dgpu_tgp", ASUS_WMI_DEVID_DGPU_SET_TGP,
| ^~~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c: In function ‘panel_hd_mode_current_value_store’:
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c:821:52: error: ‘ASUS_WMI_DEVID_PANEL_HD’ undeclared (first use in this function); did you mean ‘ASUS_WMI_DEVID_PANEL_OD’?
821 | ATTR_GROUP_BOOL_RW(panel_hd_mode, "panel_hd_mode", ASUS_WMI_DEVID_PANEL_HD,
| ^~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.h:50:73: note: in definition of macro ‘__WMI_STORE_INT’
50 | return attr_int_store(kobj, attr, buf, count, _min, _max, NULL, _wmi); \
| ^~~~
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.h:132:9: note: in expansion of macro ‘__ATTR_CURRENT_INT_RW’
132 | __ATTR_CURRENT_INT_RW(_attrname, 0, 1, _wmi); \
| ^~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c:821:1: note: in expansion of macro ‘ATTR_GROUP_BOOL_RW’
821 | ATTR_GROUP_BOOL_RW(panel_hd_mode, "panel_hd_mode", ASUS_WMI_DEVID_PANEL_HD,
| ^~~~~~~~~~~~~~~~~~
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c: In function ‘panel_hd_mode_current_value_show’:
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c:821:52: error: ‘ASUS_WMI_DEVID_PANEL_HD’ undeclared (first use in this function); did you mean ‘ASUS_WMI_DEVID_PANEL_OD’?
821 | ATTR_GROUP_BOOL_RW(panel_hd_mode, "panel_hd_mode", ASUS_WMI_DEVID_PANEL_HD,
| ^~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.h:59:42: note: in definition of macro ‘WMI_SHOW_INT’
59 | err = asus_wmi_get_devstate_dsts(_wmi, &result); \
| ^~~~
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.h:132:9: note: in expansion of macro ‘__ATTR_CURRENT_INT_RW’
132 | __ATTR_CURRENT_INT_RW(_attrname, 0, 1, _wmi); \
| ^~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c:821:1: note: in expansion of macro ‘ATTR_GROUP_BOOL_RW’
821 | ATTR_GROUP_BOOL_RW(panel_hd_mode, "panel_hd_mode", ASUS_WMI_DEVID_PANEL_HD,
| ^~~~~~~~~~~~~~~~~~
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c: At top level:
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c:839:38: error: ‘ASUS_WMI_DEVID_DGPU_BASE_TGP’ undeclared here (not in a function); did you mean ‘ASUS_WMI_DEVID_GPU_FAN_CTRL’?
839 | { &dgpu_base_tgp_attr_group, ASUS_WMI_DEVID_DGPU_BASE_TGP },
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| ASUS_WMI_DEVID_GPU_FAN_CTRL
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c:840:33: error: ‘ASUS_WMI_DEVID_DGPU_SET_TGP’ undeclared here (not in a function); did you mean ‘ASUS_WMI_DEVID_GPU_FAN_CTRL’?
840 | { &dgpu_tgp_attr_group, ASUS_WMI_DEVID_DGPU_SET_TGP },
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| ASUS_WMI_DEVID_GPU_FAN_CTRL
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c:841:32: error: ‘ASUS_WMI_DEVID_APU_MEM’ undeclared here (not in a function); did you mean ‘ASUS_WMI_DEVID_GPU_MUX’?
841 | { &apu_mem_attr_group, ASUS_WMI_DEVID_APU_MEM },
| ^~~~~~~~~~~~~~~~~~~~~~
| ASUS_WMI_DEVID_GPU_MUX
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c:842:41: error: ‘ASUS_WMI_DEVID_CORES_MAX’ undeclared here (not in a function); did you mean ‘ASUS_WMI_DEVID_CAMERA’?
842 | { &cores_efficiency_attr_group, ASUS_WMI_DEVID_CORES_MAX },
| ^~~~~~~~~~~~~~~~~~~~~~~~
| ASUS_WMI_DEVID_CAMERA
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c:849:38: error: ‘ASUS_WMI_DEVID_PANEL_HD’ undeclared here (not in a function); did you mean ‘ASUS_WMI_DEVID_PANEL_OD’?
849 | { &panel_hd_mode_attr_group, ASUS_WMI_DEVID_PANEL_HD },
| ^~~~~~~~~~~~~~~~~~~~~~~
| ASUS_WMI_DEVID_PANEL_OD
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c: In function ‘asus_fw_attr_add’:
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c:911:50: error: ‘asus_rog_ally_device’ undeclared (first use in this function)
911 | dmi_check_system(asus_rog_ally_device))
| ^~~~~~~~~~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:229: /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.o] Error 1
make[1]: *** [Makefile:1946: /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3] Error 2
make: *** [Makefile:74: modules] Error 2
* ERROR: sys-devel/asus-armoury-20240911_p3::strix-overlay failed (compile phase):
* emake failed
*
* If you need support, post the output of `emerge --info '=sys-devel/asus-armoury-20240911_p3::strix-overlay'`,
* the complete build log and the output of `emerge -pqv '=sys-devel/asus-armoury-20240911_p3::strix-overlay'`.
* The complete build log is located at '/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/temp/environment'.
* Working directory: '/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3'
* S: '/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3'
>>> Failed to emerge sys-devel/asus-armoury-20240911_p3, Log file:
>>> '/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/temp/build.log'
* Messages for package sys-devel/asus-armoury-20240911_p3:
* ERROR: sys-devel/asus-armoury-20240911_p3::strix-overlay failed (compile phase):
* emake failed
*
* If you need support, post the output of `emerge --info '=sys-devel/asus-armoury-20240911_p3::strix-overlay'`,
* the complete build log and the output of `emerge -pqv '=sys-devel/asus-armoury-20240911_p3::strix-overlay'`.
* The complete build log is located at '/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/temp/environment'.
* Working directory: '/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3'
* S: '/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3'
|
+++
Je vais regarder les sources et Makefile de plus près... (Rog Ally ?)
Il faut que je me penche sur le sujet, car là comme ca je ne vois pas ! Une idée
Trouvé ceci :https://github.com/uejji/asus-armoury/tree/main/patch !
Ces patchs sont nécessaires, en revanche je ne sais pas appliquer les patchs Git depuis un ebuild !
Il faut au préalable patcher le noyau, autant pour moi ..§!
Ca avance un peu :
1. Copier les 4 patchs kernel sous /etc/portage/patches/sys-kernel/gentoo-sources/
2. réemerger les sources et compilation kernel via genkernel
3. Compilation d'asus-armoury, qui bloque sur ce mesg ->
Code: | strix /home/jay # emerge -av asus-armoury
* IMPORTANT: 2 news items need reading for repository 'gentoo'.
* Use eselect news read to view new items.
These are the packages that would be merged, in order:
Calculating dependencies... done!
Dependency resolution took 2.12 s (backtrack: 0/20).
[ebuild N ~] sys-devel/asus-armoury-20240911_p3::strix-overlay USE="strip -dist-kernel -modules-compress -modules-sign" 0 KiB
Total: 1 package (1 new), Size of downloads: 0 KiB
Would you like to merge these packages? [Yes/No]
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) sys-devel/asus-armoury-20240911_p3::strix-overlay
* asus-armoury-20240911_p3.tar.gz BLAKE2B SHA512 size ;-) ... [ ok ]
* Determining the location of the kernel source code
* Found kernel source directory:
* /usr/src/linux
* Found sources for kernel version:
* 6.12.21-gentoo-x86_64
* Checking for suitable kernel configuration options ... [ ok ]
* Preparing x86_64-pc-linux-gnu toolchain for kernel modules (override with KERNEL_CHOST) ...
* Toolchain picked for kernel modules (override with KERNEL_CC, _LD, ...): '/usr/bin/x86_64-pc-linux-gnu-gcc-14' '/usr/bin/x86_64-pc-linux-gnu-g++-14' '/usr/bin/x86_64-pc-linux-gnu-ld.bfd' '/usr/bin/x86_64-pc-linux-gnu-gcc-ar' '/usr/bin/x86_64-pc-linux-gnu-gcc-nm' '/usr/bin/x86_64-pc-linux-gnu-objcopy' '/usr/bin/x86_64-pc-linux-gnu-objdump' '/usr/bin/x86_64-pc-linux-gnu-readelf' '/usr/bin/x86_64-pc-linux-gnu-strip'
>>> Unpacking source...
>>> Unpacking asus-armoury-20240911_p3.tar.gz to /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work
>>> Source unpacked in /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work
>>> Preparing source in /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3 ...
* Applying asus-wmi-gentoo.diff ... [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3 ...
* Building asus-armoury module in /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3 ...
make -j15 -l8 ARCH=x86 V=1 KBUILD_VERBOSE=1 CONFIG_WERROR= CONFIG_MODULE_SIG_ALL= CONFIG_MODULE_COMPRESS_ALL= CONFIG_MODULE_COMPRESS_GZIP= CONFIG_MODULE_COMPRESS_XZ= CONFIG_MODULE_COMPRESS_ZSTD= DEPMOD=true STRIP=true CROSS_COMPILE=x86_64-pc-linux-gnu- HOSTCC=x86_64-pc-linux-gnu-gcc HOSTCXX=x86_64-pc-linux-gnu-g++ 'HOSTCFLAGS=-march=raptorlake -O2 -pipe' 'HOSTCXXFLAGS=-march=raptorlake -O2 -pipe' 'HOSTLDFLAGS=-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs' HOSTPKG_CONFIG=x86_64-pc-linux-gnu-pkg-config CC=/usr/bin/x86_64-pc-linux-gnu-gcc-14 CXX=/usr/bin/x86_64-pc-linux-gnu-g++-14 LD=/usr/bin/x86_64-pc-linux-gnu-ld.bfd AR=/usr/bin/x86_64-pc-linux-gnu-gcc-ar NM=/usr/bin/x86_64-pc-linux-gnu-gcc-nm OBJCOPY=/usr/bin/x86_64-pc-linux-gnu-objcopy OBJDUMP=/usr/bin/x86_64-pc-linux-gnu-objdump READELF=/usr/bin/x86_64-pc-linux-gnu-readelf KVERSION=6.12.21-gentoo-x86_64 modules
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-pc-linux-gnu-gcc (Gentoo 14.2.1_p20241221 p7) 14.2.1 20241221
You are using: x86_64-pc-linux-gnu-gcc-14 (Gentoo 14.2.1_p20241221 p7) 14.2.1 20241221
make -f ./scripts/Makefile.build obj=/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3 need-builtin=1 need-modorder=1
# CC [M] /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.o
/usr/bin/x86_64-pc-linux-gnu-gcc-14 -Wp,-MMD,/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/.asus-armoury.o.d -nostdinc -I./arch/x86/include -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map=./= -std=gnu11 -fshort-wchar -funsigned-char -fno-common -fno-PIE -fno-strict-aliasing -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=none -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -march=core2 -mno-red-zone -mcmodel=kernel -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -mindirect-branch-cs-prefix -mfunction-return=thunk-extern -fno-jump-tables -fpatchable-function-entry=16,16 -fno-delete-null-pointer-checks -O2 -fno-allow-store-data-races -fstack-protector -fno-stack-clash-protection -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -fmin-function-alignment=16 -fstrict-flex-arrays=3 -fno-strict-overflow -fno-stack-check -fconserve-stack -Wall -Wundef -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Werror=strict-prototypes -Wno-format-security -Wno-trigraphs -Wno-frame-address -Wno-address-of-packed-member -Wmissing-declarations -Wmissing-prototypes -Wframe-larger-than=2048 -Wno-main -Wno-dangling-pointer -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-overflow -Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wenum-conversion -Wextra -Wunused -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-packed-not-aligned -Wno-format-overflow -Wno-format-truncation -Wno-stringop-truncation -Wno-override-init -Wno-missing-field-initializers -Wno-type-limits -Wno-shift-negative-value -Wno-maybe-uninitialized -Wno-sign-compare -Wno-unused-parameter -DOXP_PLATFORM_DRIVER_VERSION='"20240911.3"' -DMODULE -DKBUILD_BASENAME='"asus_armoury"' -DKBUILD_MODNAME='"asus_armoury"' -D__KBUILD_MODNAME=kmod_asus_armoury -c -o /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.o /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c ; ./tools/objtool/objtool --hacks=jump_label --hacks=noinstr --hacks=skylake --orc --retpoline --rethunk --static-call --uaccess --prefix=16 --module /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.o
# cmd_mod /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.mod
printf '%s\n' asus-armoury.o | awk '!x[$0]++ { print("/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/"$0) }' > /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.mod
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c: In function ‘asus_fw_attr_add’:
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c:911:50: error: ‘asus_rog_ally_device’ undeclared (first use in this function)
911 | dmi_check_system(asus_rog_ally_device))
| ^~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c:911:50: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [scripts/Makefile.build:229: /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.o] Error 1
make[1]: *** [Makefile:1946: /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3] Error 2
make: *** [Makefile:74: modules] Error 2
* ERROR: sys-devel/asus-armoury-20240911_p3::strix-overlay failed (compile phase):
* emake failed
*
* If you need support, post the output of `emerge --info '=sys-devel/asus-armoury-20240911_p3::strix-overlay'`,
* the complete build log and the output of `emerge -pqv '=sys-devel/asus-armoury-20240911_p3::strix-overlay'`.
* The complete build log is located at '/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/temp/environment'.
* Working directory: '/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3'
* S: '/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3'
>>> Failed to emerge sys-devel/asus-armoury-20240911_p3, Log file:
>>> '/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/temp/build.log'
* Messages for package sys-devel/asus-armoury-20240911_p3:
* ERROR: sys-devel/asus-armoury-20240911_p3::strix-overlay failed (compile phase):
* emake failed
*
* If you need support, post the output of `emerge --info '=sys-devel/asus-armoury-20240911_p3::strix-overlay'`,
* the complete build log and the output of `emerge -pqv '=sys-devel/asus-armoury-20240911_p3::strix-overlay'`.
* The complete build log is located at '/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/temp/environment'.
* Working directory: '/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3'
* S: '/var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3'
|
_________________ "Je peux expliquer le logiciel libre en 3 mots : Liberté, égalité, fraternité" Richard Stallman (2012)
Gentoo Linux Rullez ! |
|
Back to top |
|
 |
ghoti Advocate


Joined: 30 Dec 2002 Posts: 3647 Location: Belgium
|
Posted: Sat May 24, 2025 6:16 pm Post subject: |
|
|
jaypeche wrote: | Code: | /var/tmp/portage/sys-devel/asus-armoury-20240911_p3/work/asus-armoury-20240911.3/asus-armoury.c:911:50: error: ‘asus_rog_ally_device’ undeclared (first use in this function)
911 | dmi_check_system(asus_rog_ally_device))
| ^~~~~~~~~~~~~~~~~~~~
|
|
Pourtant asus_rog_ally_device est défini dans 01-platform-x86-asus-armoury-move-existing-tunings-to-a.patch
Tu es sûr que les patches ont été appliqués correctement ? |
|
Back to top |
|
 |
jaypeche Apprentice

Joined: 13 Jun 2007 Posts: 185 Location: France
|
Posted: Sat May 24, 2025 7:41 pm Post subject: |
|
|
Merçi ghoti,
Après verif, ca à l'air bon :
Code: | strix /etc/portage/patches/sys-kernel/gentoo-sources # emerge -av gentoo-sources
* IMPORTANT: 2 news items need reading for repository 'gentoo'.
* Use eselect news read to view new items.
These are the packages that would be merged, in order:
Calculating dependencies... done!
Dependency resolution took 1.47 s (backtrack: 0/20).
[ebuild R #] sys-kernel/gentoo-sources-6.12.21:6.12.21::gentoo USE="symlink -build -experimental" 0 KiB
Total: 1 package (1 reinstall), Size of downloads: 0 KiB
Would you like to merge these packages? [Yes/No]
>>> Verifying ebuild manifests
>>> Running pre-merge checks for sys-kernel/gentoo-sources-6.12.21
* Checking for at least 4 GiB disk space at "/var/tmp/notmpfs/portage/sys-kernel/gentoo-sources-6.12.21/temp" ... [ ok ]
>>> Emerging (1 of 1) sys-kernel/gentoo-sources-6.12.21::gentoo
* linux-6.12.tar.xz BLAKE2B SHA512 size ;-) ... [ ok ]
* genpatches-6.12-25.base.tar.xz BLAKE2B SHA512 size ;-) ... [ ok ]
* genpatches-6.12-25.extras.tar.xz BLAKE2B SHA512 size ;-) ... [ ok ]
* >>> Preparing to unpack ...
>>> Unpacking source...
>>> Unpacking linux-6.12.tar.xz to /var/tmp/notmpfs/portage/sys-kernel/gentoo-sources-6.12.21/work
>>> Unpacking genpatches-6.12-25.base.tar.xz to /var/tmp/notmpfs/portage/sys-kernel/gentoo-sources-6.12.21/work/patches
>>> Unpacking genpatches-6.12-25.extras.tar.xz to /var/tmp/notmpfs/portage/sys-kernel/gentoo-sources-6.12.21/work/patches
* Excluding Patch #5010_enable-additional-cpu-optimizations-for-gcc.patch ... [ ok ]
* Excluding Patch #5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch ... [ ok ]
* Excluding Patch #5011_enable-cpu-optimizations-for-gcc8.patch ... [ ok ]
* Excluding Patch #5012_enable-cpu-optimizations-for-gcc91.patch ... [ ok ]
* Excluding Patch #5013_enable-cpu-optimizations-for-gcc10.patch ... [ ok ]
* Excluding Patch #5010_enable-additional-cpu-optimizations-for-gcc.patch ... [ ok ]
* Excluding Patch #5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch ... [ ok ]
* Excluding Patch #5011_enable-cpu-optimizations-for-gcc8.patch ... [ ok ]
* Excluding Patch #5012_enable-cpu-optimizations-for-gcc91.patch ... [ ok ]
* Excluding Patch #5013_enable-cpu-optimizations-for-gcc10.patch ... [ ok ]
* Applying 1001_linux-6.12.1.patch (-p1) ... [ ok ]
* Applying 1001_linux-6.12.2.patch (-p1) ... [ ok ]
* Applying 1002_linux-6.12.3.patch (-p1) ... [ ok ]
* Applying 1003_linux-6.12.4.patch (-p1) ... [ ok ]
* Applying 1004_linux-6.12.5.patch (-p1) ... [ ok ]
* Applying 1005_linux-6.12.6.patch (-p1) ... [ ok ]
* Applying 1006_linux-6.12.7.patch (-p1) ... [ ok ]
* Applying 1007_linux-6.12.8.patch (-p1) ... [ ok ]
* Applying 1008_linux-6.12.9.patch (-p1) ... [ ok ]
* Applying 1009_linux-6.12.10.patch (-p1) ... [ ok ]
* Applying 1010_linux-6.12.11.patch (-p1) ... [ ok ]
* Applying 1011_linux-6.12.12.patch (-p1) ... [ ok ]
* Applying 1012_linux-6.12.13.patch (-p1) ... [ ok ]
* Applying 1013_linux-6.12.14.patch (-p1) ... [ ok ]
* Applying 1014_linux-6.12.15.patch (-p1) ... [ ok ]
* Applying 1015_linux-6.12.16.patch (-p1) ... [ ok ]
* Applying 1016_linux-6.12.17.patch (-p1) ... [ ok ]
* Applying 1017_linux-6.12.18.patch (-p1) ... [ ok ]
* Applying 1018_linux-6.12.19.patch (-p1) ... [ ok ]
* Applying 1019_linux-6.12.20.patch (-p1) ... [ ok ]
* Applying 1020_linux-6.12.21.patch (-p1) ... [ ok ]
* Applying 1500_fortify-copy-size-value-range-tracking-fix.patch (-p1) ... [ ok ]
* Applying 1510_fs-enable-link-security-restrictions-by-default.patch (-p1) ... [ ok ]
* Applying 1700_sparc-address-warray-bound-warnings.patch (-p1) ... [ ok ]
* Applying 1730_parisc-Disable-prctl.patch (-p1) ... [ ok ]
* Applying 2000_BT-Check-key-sizes-only-if-Secure-Simple-Pairing-enabled.patch (-p1) ... [ ok ]
* Applying 2400_wifi-mt76-mt7921-null-ptr-deref-fix.patch (-p1) ... [ ok ]
* Applying 2910_bfp-mark-get-entry-ip-as--maybe-unused.patch (-p1) ... [ ok ]
* Applying 2920_sign-file-patch-for-libressl.patch (-p1) ... [ ok ]
* Applying 2980_kbuild-gcc15-gnu23-to-gnu11-fix.patch (-p1) ... [ ok ]
* Applying 2990_libbpf-v2-workaround-Wmaybe-uninitialized-false-pos.patch (-p1) ... [ ok ]
* Applying 3000_Support-printing-firmware-info.patch (-p1) ... [ ok ]
* Applying 4567_distro-Gentoo-Kconfig.patch (-p1) ... [ ok ]
>>> Source unpacked in /var/tmp/notmpfs/portage/sys-kernel/gentoo-sources-6.12.21/work
>>> Preparing source in /var/tmp/notmpfs/portage/sys-kernel/gentoo-sources-6.12.21/work/linux-6.12.21-gentoo ...
* ================================================================================================================================================================================================================
* Applying user patches from /etc/portage/patches ...
* Applying 01-platform-x86-asus-armoury-move-existing-tunings-to-a.patch ... [ ok ]
* Applying 02-platform-x86-asus-armoury-add-dgpu-tgp-control.patch ... [ ok ]
* Applying 03-platform-x86-asus-armoury-add-apu-mem-control-suppor.patch ... [ ok ]
* Applying 04-platform-x86-asus-armoury-add-core-count-control.patch ... [ ok ]
* User patches applied.
* ================================================================================================================================================================================================================
>>> Source prepared.
>>> Configuring source in /var/tmp/notmpfs/portage/sys-kernel/gentoo-sources-6.12.21/work/linux-6.12.21-gentoo ...
>>> Source configured.
>>> Compiling source in /var/tmp/notmpfs/portage/sys-kernel/gentoo-sources-6.12.21/work/linux-6.12.21-gentoo ...
>>> Source compiled.
>>> Test phase [not enabled]: sys-kernel/gentoo-sources-6.12.21
>>> Install sys-kernel/gentoo-sources-6.12.21 into /var/tmp/notmpfs/portage/sys-kernel/gentoo-sources-6.12.21/image
* >>> Copying sources ...
|
_________________ "Je peux expliquer le logiciel libre en 3 mots : Liberté, égalité, fraternité" Richard Stallman (2012)
Gentoo Linux Rullez ! |
|
Back to top |
|
 |
ghoti Advocate


Joined: 30 Dec 2002 Posts: 3647 Location: Belgium
|
Posted: Sat May 24, 2025 11:08 pm Post subject: |
|
|
Quand je disais de vérifier l'application des patches, je parlais de contrôler si le contenu des fichiers ciblés par les patches avait effectivement été modifié.
En l'occurrence, une fois que la série de patches est sensée avoir été appliquée, il s'agit de vérifier si le fichier /usr/src/linux-6.12.21-gentoo/drivers/platform/x86/asus-wmi.h contient bien la définition de la structure asus_rog_ally_device[] après la ligne 85.
Si ce n'est pas le cas, c'est que le patch correspondant a échoué.
Si la modification n'a pas eu lieu, je te suggère, dans un premier temps, de modifier manuellement asus-wmi.h en ajoutant toi-même directement les lignes de code qui manquent. Cela te permettra au moins de t'assurer que le module compile correctement et peut effectivement démarrer.
Il est possible qu'il faille faire d'autres ajouts puisque le patch contient plusieurs modifs. Traite une modif (erreur) à la fois pour ne pas perdre le fil ...
Une fois la "faisabilité" vérifiée, il sera toujours temps de revenir sur le problème de l'automatisation des paches  |
|
Back to top |
|
 |
jaypeche Apprentice

Joined: 13 Jun 2007 Posts: 185 Location: France
|
Posted: Sat May 24, 2025 11:40 pm Post subject: |
|
|
Effectivement le patch n'est pas appliqué  _________________ "Je peux expliquer le logiciel libre en 3 mots : Liberté, égalité, fraternité" Richard Stallman (2012)
Gentoo Linux Rullez ! |
|
Back to top |
|
 |
ghoti Advocate


Joined: 30 Dec 2002 Posts: 3647 Location: Belgium
|
Posted: Sun May 25, 2025 10:53 pm Post subject: |
|
|
jaypeche wrote: | Effectivement le patch n'est pas appliqué  |
Bizarre !
Je viens d'essayer et le fichier /usr/src/linux-6.12.21-gentoo/drivers/platform/x86/asus-wmi.h est pourtant bel et bien patché :
Code: | /* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Asus PC WMI hotkey driver
*
* Copyright(C) 2010 Intel Corporation.
* Copyright(C) 2010-2011 Corentin Chary <corentin.chary@gmail.com>
*
* Portions based on wistron_btns.c:
* Copyright (C) 2005 Miloslav Trmac <mitr@volny.cz>
* Copyright (C) 2005 Bernhard Rosenkraenzer <bero@arklinux.org>
* Copyright (C) 2005 Dmitry Torokhov <dtor@mail.ru>
*/
#ifndef _ASUS_WMI_H_
#define _ASUS_WMI_H_
#include <linux/platform_device.h>
#include <linux/i8042.h>
.....<SNIP> ...
int asus_wmi_register_driver(struct asus_wmi_driver *driver);
void asus_wmi_unregister_driver(struct asus_wmi_driver *driver);
static const struct dmi_system_id asus_rog_ally_device[] = {
{
.matches = {
DMI_MATCH(DMI_BOARD_NAME, "RC71L"),
},
},
{
.matches = {
DMI_MATCH(DMI_BOARD_NAME, "RC72L"),
},
},
{ },
};
#endif /* !_ASUS_WMI_H_ */ |
|
|
Back to top |
|
 |
jaypeche Apprentice

Joined: 13 Jun 2007 Posts: 185 Location: France
|
Posted: Tue May 27, 2025 8:45 pm Post subject: |
|
|
Bonsoir Ghoti,
Merci de prendre le temps d'aider !
J'ai suivi tes conseil pour l'application des patchs, que j'ai fait par étapes et que j'ai groupé dans ce fichier diff :
https://gist.github.com/jaypeche/3bf8681dd6b4a8ba0c441a9ae9a28142
Je constate que les sources sont bien patchées, tout comme toi apparemment. Par contre la compilation retourne une erreur :
https://gist.github.com/jaypeche/8bb033d22dac71c8bfc05e402b970edb
Je sèche un peu sur ce message d'erreur, je n'ai pas remarqué d'anomalie avec l'application du patch ..? _________________ "Je peux expliquer le logiciel libre en 3 mots : Liberté, égalité, fraternité" Richard Stallman (2012)
Gentoo Linux Rullez ! |
|
Back to top |
|
 |
netfab Advocate

Joined: 03 Mar 2005 Posts: 2024 Location: 127.0.0.1
|
Posted: Tue May 27, 2025 9:26 pm Post subject: |
|
|
Salut,
ghoti wrote: | jaypeche wrote: | Effectivement le patch n'est pas appliqué  |
Bizarre !
Je viens d'essayer et le fichier /usr/src/linux-6.12.21-gentoo/drivers/platform/x86/asus-wmi.h est pourtant bel et bien patché :
|
Oui. Mais le fichier inclus est le suivant :
Quote: |
#include <linux/platform_data/x86/asus-wmi.h>
|
Sur mon système, avec un gentoo-kernel-bin :
Code: |
# find /usr/src/linux-6.1.138-gentoo-dist -type f -name asus-wmi.h
/usr/src/linux-6.1.138-gentoo-dist/include/linux/platform_data/x86/asus-wmi.h
|
Avec un gentoo-sources :
Code: |
# find /usr/src/linux-6.1.132-gentoo -type f -name asus-wmi.h
/usr/src/linux-6.1.132-gentoo/drivers/platform/x86/asus-wmi.h
/usr/src/linux-6.1.132-gentoo/include/linux/platform_data/x86/asus-wmi.h
|
|
|
Back to top |
|
 |
ghoti Advocate


Joined: 30 Dec 2002 Posts: 3647 Location: Belgium
|
Posted: Tue May 27, 2025 11:20 pm Post subject: |
|
|
Bien vu, netfab, tu as parfaitement raison !
Les deux "asus-wmi.h" ne sont visiblement pas interchangeables et doivent donc être inclus tous les deux.
Voilà qui explique finalement pourquoi il apparaissait deux fois dans asus-armoury.c !
Cependant, la seconde occurence (la ligne qu'on avait supprimée à tort) faisait référence à un fichier asus-wmi.h local. Il s'agissait sans doute de la version patchée redirigée avec "patch -o" au lieu d'écraser directement les sources du noyau. |
|
Back to top |
|
 |
jaypeche Apprentice

Joined: 13 Jun 2007 Posts: 185 Location: France
|
Posted: Fri May 30, 2025 4:03 pm Post subject: |
|
|
Slt et merci à vous deux,
Je pensais que je pouvais ajouter la fonction ou structure :dmi_system_id asus_rog_ally_device[] , dans /usr/src/linux-6.12/include/linux/platform_data/x86/asus-wmi.h, via un second patch.
Mais ça ne compile pas, je ne suis pas un pro en C, rrhhh !
Je comprends un peu près le rôle d'un asus-wmi local, mais ce n'est pas clair dans mon esprit, je pense à :
Quote: | Cependant, la seconde occurence (la ligne qu'on avait supprimée à tort) faisait référence à un fichier asus-wmi.h local. Il s'agissait sans doute de la version patchée redirigée avec "patch -o" au lieu d'écraser directement les sources du noyau. |
Ce que j'en ai compris, est que l'argument -o, permet de définir la cible du patch, sans certitude.
Auriez-vous une idée de la meilleure soluce pour gérer cela avec ebuild ? Le mien étant encore au stade experimental
https://gist.github.com/jaypeche/b88ec412bcae1e02e920bd1605c16398
https://github.com/uejji/asus-armoury/tree/main _________________ "Je peux expliquer le logiciel libre en 3 mots : Liberté, égalité, fraternité" Richard Stallman (2012)
Gentoo Linux Rullez ! |
|
Back to top |
|
 |
ghoti Advocate


Joined: 30 Dec 2002 Posts: 3647 Location: Belgium
|
Posted: Fri May 30, 2025 11:25 pm Post subject: |
|
|
Quote: | Ce que j'en ai compris, est que l'argument -o, permet de définir la cible du patch, sans certitude. |
Oui, c'est bien ça !
En fait, ici, c'est une simple supposition. En effet, en examinant asus-armoury.c, on constate que les "#include" sont répartis en 2 blocs :
- un bloc avec la syntaxe '#include <linux/fichier>'
- un second bloc avec la syntaxe '#include "fichier"'
La première syntaxe vise les fichiers d'entête stockés dans des répertoires standards système et globaux.
La seconde syntaxe adresse des fichiers dans le répertoire courant ou avec un chemin.
"asus-armoury.h" et "firmware_attributes_class.h" apparaissent bien dans le répertoire courant.
On s'attendrait donc à trouver également "asus-wmi.h". D'où ma supposition
Il y a probablement plusieurs solutions mais la première qui vient à l'esprit serait de modifier l'#include pour rajouter le chemin de "asus-wmi.h" dans asus-armoury.c |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|