Closed calypso closed 3 days ago
A you suggest, it seems that DKMS is working fine in registering the module, but the build process fails.
I am not well versed in the TrueNAS OS. Can you point me to the source for disabling rootFS protection (so I am at the same state as your machine)? I'll install TrueNAS this weekend and build it myself to see if I can trace the problem.
Certainly. the command I used is under /usr/local/libexec/disable-rootfs-protection. However I'm doubling back and I realized there is a command called install-dev-tools. I'm going to run that and see if that resolves the issue.
Update: same error. Apparently the preferred method is to run install-dev-tools as root
https://www.truenas.com/docs/scale/24.10/scaletutorials/systemsettings/advanced/developermode/
Also from what I can tell its Debian 12 with a lot of middleware and optimizations for storage (and rootfs protection lol)
I had a TrueNAS VM laying around, I ran /usr/local/libexec/disable-rootfs-protection
, then install-dev-tools
and apt install dkms
. The kernel module compiled successfully.
I checked with modprobe qnap8528
and it found the module and probed it (the probe failed do to it being a VM without an IT8528, but I got the error messages the module prints in the console).
Edit: I updated the VM to the exact version you have (24.10.0.2), I did all commands via console as root.
I attempted a reinstall of dkms and did another clone of the repo. Same errors
Can you please do the following:
cd qnap8528/src
src/Makefile
and add V=1
at the end of the line $(MAKE) -C $(KERNEL_DIR) M=$$PWD modules
src
directory with make
Well some "good" news? The error changed slightly after that
cmd; rm -f /home/truenas_admin/qnap8528/src/.qnap8528.o.d"
make[3]: *** [scripts/Makefile.build:243: /home/truenas_admin/qnap8528/src/qnap8528.o] Killed
make[2]: *** [/usr/src/linux-headers-6.6.44-production+truenas/Makefile:1924: /home/truenas_admin/qnap8528/src] Error 2
make[1]: *** [Makefile:237: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.6.44-production+truenas'
make: *** [Makefile:7: all] Error 2
Instead of being in the log files.
This is what src/Makefile looks like
obj-m += qnap8528.o
KERNEL_DIR ?= /lib/modules/$(shell uname -r)/build
#CFLAGS_qnap8528.o := -DDEBUG
all:
$(MAKE) -C $(KERNEL_DIR) M=$$PWD modules V=1
clean:
$(MAKE) -C $(KERNEL_DIR) M=$$PWD clean
It seems that the problem is before the compilation of the actual module, when the compilation process is preparing.
sudo make
)V=1
, can you add --trace
after $(MAKE)
(so its $(MAKE) --trace -C $(KERNEL_DIR) M=$$PWD modules
) and retry the make
(please run make clean
before running make
again)Same error using both sudo make and adding trace. Should I remove V=1? Is there any trace data you need from me and if so where would I locate this?
No need to remove V=1
.
--trace
should provide a lot more than the small error above. It should trace every command executed in the build process. Something feels wrong specifically in your environment.
Since the TrueNAS environment is usually stable, I could suggest a "hack" and to compile the kernel module in a fresh environment (on a virtual machine for example, I can provide you) and to copy the resulting ko
over, but this does not fix your real environment, its just ignoring the symptoms.
For context, this is the output from my test setup with --trace
and V=1
:
make --trace -C /lib/modules/6.6.44-production+truenas/build M=$PWD modules V=1
make[1]: Entering directory '/usr/src/linux-headers-6.6.44-production+truenas'
Makefile:237: target '__sub-make' does not exist
make --no-print-directory -C /usr/src/linux-headers-6.6.44-production+truenas \
-f /usr/src/linux-headers-6.6.44-production+truenas/Makefile modules
/usr/src/linux-headers-6.6.44-production+truenas/Makefile:809: target 'include/config/auto.conf' does not exist
test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \
echo >&2; \
echo >&2 " ERROR: Kernel configuration is invalid."; \
echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
echo >&2 ; \
/bin/false)
/usr/src/linux-headers-6.6.44-production+truenas/Makefile:1797: target 'prepare' does not exist
if [ "gcc (Debian 12.2.0-14) 12.2.0" != "gcc (Debian 12.2.0-14) 12.2.0" ]; then \
echo >&2 "warning: the compiler differs from the one used to build the kernel"; \
echo >&2 " The kernel was built by: gcc (Debian 12.2.0-14) 12.2.0"; \
echo >&2 " You are using: gcc (Debian 12.2.0-14) 12.2.0"; \
fi
/usr/src/linux-headers-6.6.44-production+truenas/Makefile:1924: update target '/root/qnap8528/src' due to: prepare
make -f ./scripts/Makefile.build obj=/root/qnap8528/src need-builtin=1 need-modorder=1
scripts/Makefile.build:243: update target '/root/qnap8528/src/qnap8528.o' due to: /root/qnap8528/src/qnap8528.c FORCE
set -e; echo '# CC [M] /root/qnap8528/src/qnap8528.o'; echo ' gcc -Wp,-MMD,/root/qnap8528/src/.qnap8528.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=./= -Werror -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=branch -fno-jump-tables -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -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 -mharden-sls=all -fpatchable-function-entry=16,16 -fno-delete-null-pointer-checks -O2 -fno-allow-store-data-races -fstack-protector-strong -ftrivial-auto-var-init=zero -fno-stack-clash-protection -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -falign-functions=16 -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 -Wframe-larger-than=2048 -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-dangling-pointer -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wenum-conversion -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-restrict -Wno-packed-not-aligned -Wno-format-overflow -Wno-format-truncation -Wno-stringop-overflow -Wno-stringop-truncation -Wno-missing-field-initializers -Wno-type-limits -Wno-shift-negative-value -Wno-maybe-uninitialized -Wno-sign-compare -g -DMODULE -DKBUILD_BASENAME='\''"qnap8528"'\'' -DKBUILD_MODNAME='\''"qnap8528"'\'' -D__KBUILD_MODNAME=kmod_qnap8528 -c -o /root/qnap8528/src/qnap8528.o /root/qnap8528/src/qnap8528.c ; ./tools/objtool/objtool --hacks=jump_label --hacks=noinstr --hacks=skylake --ibt --orc --retpoline --rethunk --sls --static-call --uaccess --prefix=16 --link --module /root/qnap8528/src/qnap8528.o'; trap 'rm -f /root/qnap8528/src/qnap8528.o; trap - HUP; kill -s HUP $$' HUP; trap 'rm -f /root/qnap8528/src/qnap8528.o; trap - INT; kill -s INT $$' INT; trap 'rm -f /root/qnap8528/src/qnap8528.o; trap - QUIT; kill -s QUIT $$' QUIT; trap 'rm -f /root/qnap8528/src/qnap8528.o; trap - TERM; kill -s TERM $$' TERM; trap 'rm -f /root/qnap8528/src/qnap8528.o; trap - PIPE; kill -s PIPE $$' PIPE; gcc -Wp,-MMD,/root/qnap8528/src/.qnap8528.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=./= -Werror -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=branch -fno-jump-tables -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -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 -mharden-sls=all -fpatchable-function-entry=16,16 -fno-delete-null-pointer-checks -O2 -fno-allow-store-data-races -fstack-protector-strong -ftrivial-auto-var-init=zero -fno-stack-clash-protection -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -falign-functions=16 -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 -Wframe-larger-than=2048 -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-dangling-pointer -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wenum-conversion -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-restrict -Wno-packed-not-aligned -Wno-format-overflow -Wno-format-truncation -Wno-stringop-overflow -Wno-stringop-truncation -Wno-missing-field-initializers -Wno-type-limits -Wno-shift-negative-value -Wno-maybe-uninitialized -Wno-sign-compare -g -DMODULE -DKBUILD_BASENAME='"qnap8528"' -DKBUILD_MODNAME='"qnap8528"' -D__KBUILD_MODNAME=kmod_qnap8528 -c -o /root/qnap8528/src/qnap8528.o /root/qnap8528/src/qnap8528.c ; ./tools/objtool/objtool --hacks=jump_label --hacks=noinstr --hacks=skylake --ibt --orc --retpoline --rethunk --sls --static-call --uaccess --prefix=16 --link --module /root/qnap8528/src/qnap8528.o; scripts/basic/fixdep /root/qnap8528/src/.qnap8528.o.d /root/qnap8528/src/qnap8528.o 'gcc -Wp,-MMD,/root/qnap8528/src/.qnap8528.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=./= -Werror -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=branch -fno-jump-tables -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -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 -mharden-sls=all -fpatchable-function-entry=16,16 -fno-delete-null-pointer-checks -O2 -fno-allow-store-data-races -fstack-protector-strong -ftrivial-auto-var-init=zero -fno-stack-clash-protection -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -falign-functions=16 -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 -Wframe-larger-than=2048 -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-dangling-pointer -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wenum-conversion -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-restrict -Wno-packed-not-aligned -Wno-format-overflow -Wno-format-truncation -Wno-stringop-overflow -Wno-stringop-truncation -Wno-missing-field-initializers -Wno-type-limits -Wno-shift-negative-value -Wno-maybe-uninitialized -Wno-sign-compare -g -DMODULE -DKBUILD_BASENAME='\''"qnap8528"'\'' -DKBUILD_MODNAME='\''"qnap8528"'\'' -D__KBUILD_MODNAME=kmod_qnap8528 -c -o /root/qnap8528/src/qnap8528.o /root/qnap8528/src/qnap8528.c ; ./tools/objtool/objtool --hacks=jump_label --hacks=noinstr --hacks=skylake --ibt --orc --retpoline --rethunk --sls --static-call --uaccess --prefix=16 --link --module /root/qnap8528/src/qnap8528.o' > /root/qnap8528/src/.qnap8528.o.cmd; rm -f /root/qnap8528/src/.qnap8528.o.d
# CC [M] /root/qnap8528/src/qnap8528.o
gcc -Wp,-MMD,/root/qnap8528/src/.qnap8528.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=./= -Werror -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=branch -fno-jump-tables -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -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 -mharden-sls=all -fpatchable-function-entry=16,16 -fno-delete-null-pointer-checks -O2 -fno-allow-store-data-races -fstack-protector-strong -ftrivial-auto-var-init=zero -fno-stack-clash-protection -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -falign-functions=16 -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 -Wframe-larger-than=2048 -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-dangling-pointer -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wenum-conversion -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-restrict -Wno-packed-not-aligned -Wno-format-overflow -Wno-format-truncation -Wno-stringop-overflow -Wno-stringop-truncation -Wno-missing-field-initializers -Wno-type-limits -Wno-shift-negative-value -Wno-maybe-uninitialized -Wno-sign-compare -g -DMODULE -DKBUILD_BASENAME='"qnap8528"' -DKBUILD_MODNAME='"qnap8528"' -D__KBUILD_MODNAME=kmod_qnap8528 -c -o /root/qnap8528/src/qnap8528.o /root/qnap8528/src/qnap8528.c ; ./tools/objtool/objtool --hacks=jump_label --hacks=noinstr --hacks=skylake --ibt --orc --retpoline --rethunk --sls --static-call --uaccess --prefix=16 --link --module /root/qnap8528/src/qnap8528.o
:
:
set -e; echo '# cmd_gen_objtooldep /root/qnap8528/src/qnap8528.o'; echo ' { echo ; echo '\''/root/qnap8528/src/qnap8528.o: $(wildcard ./tools/objtool/objtool)'\'' ; } >> /root/qnap8528/src/.qnap8528.o.cmd'; trap 'rm -f /root/qnap8528/src/qnap8528.o; trap - HUP; kill -s HUP $$' HUP; trap 'rm -f /root/qnap8528/src/qnap8528.o; trap - INT; kill -s INT $$' INT; trap 'rm -f /root/qnap8528/src/qnap8528.o; trap - QUIT; kill -s QUIT $$' QUIT; trap 'rm -f /root/qnap8528/src/qnap8528.o; trap - TERM; kill -s TERM $$' TERM; trap 'rm -f /root/qnap8528/src/qnap8528.o; trap - PIPE; kill -s PIPE $$' PIPE; { echo ; echo '/root/qnap8528/src/qnap8528.o: $(wildcard ./tools/objtool/objtool)' ; } >> /root/qnap8528/src/.qnap8528.o.cmd
# cmd_gen_objtooldep /root/qnap8528/src/qnap8528.o
{ echo ; echo '/root/qnap8528/src/qnap8528.o: $(wildcard ./tools/objtool/objtool)' ; } >> /root/qnap8528/src/.qnap8528.o.cmd
set -e; echo '# cmd_gen_symversions_c /root/qnap8528/src/qnap8528.o'; echo ' if nm /root/qnap8528/src/qnap8528.o 2>/dev/null | grep -q '\'' __export_symbol_'\''; then gcc -E -D__GENKSYMS__ -Wp,-MMD,/root/qnap8528/src/.qnap8528.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=./= -Werror -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=branch -fno-jump-tables -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -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 -mharden-sls=all -fpatchable-function-entry=16,16 -fno-delete-null-pointer-checks -O2 -fno-allow-store-data-races -fstack-protector-strong -ftrivial-auto-var-init=zero -fno-stack-clash-protection -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -falign-functions=16 -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 -Wframe-larger-than=2048 -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-dangling-pointer -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wenum-conversion -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-restrict -Wno-packed-not-aligned -Wno-format-overflow -Wno-format-truncation -Wno-stringop-overflow -Wno-stringop-truncation -Wno-missing-field-initializers -Wno-type-limits -Wno-shift-negative-value -Wno-maybe-uninitialized -Wno-sign-compare -g -DMODULE -DKBUILD_BASENAME='\''"qnap8528"'\'' -DKBUILD_MODNAME='\''"qnap8528"'\'' -D__KBUILD_MODNAME=kmod_qnap8528 /root/qnap8528/src/qnap8528.c | scripts/genksyms/genksyms -r /dev/null >> /root/qnap8528/src/.qnap8528.o.cmd; fi'; trap 'rm -f /root/qnap8528/src/qnap8528.o; trap - HUP; kill -s HUP $$' HUP; trap 'rm -f /root/qnap8528/src/qnap8528.o; trap - INT; kill -s INT $$' INT; trap 'rm -f /root/qnap8528/src/qnap8528.o; trap - QUIT; kill -s QUIT $$' QUIT; trap 'rm -f /root/qnap8528/src/qnap8528.o; trap - TERM; kill -s TERM $$' TERM; trap 'rm -f /root/qnap8528/src/qnap8528.o; trap - PIPE; kill -s PIPE $$' PIPE; if nm /root/qnap8528/src/qnap8528.o 2>/dev/null | grep -q ' __export_symbol_'; then gcc -E -D__GENKSYMS__ -Wp,-MMD,/root/qnap8528/src/.qnap8528.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=./= -Werror -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=branch -fno-jump-tables -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -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 -mharden-sls=all -fpatchable-function-entry=16,16 -fno-delete-null-pointer-checks -O2 -fno-allow-store-data-races -fstack-protector-strong -ftrivial-auto-var-init=zero -fno-stack-clash-protection -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -falign-functions=16 -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 -Wframe-larger-than=2048 -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-dangling-pointer -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wenum-conversion -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-restrict -Wno-packed-not-aligned -Wno-format-overflow -Wno-format-truncation -Wno-stringop-overflow -Wno-stringop-truncation -Wno-missing-field-initializers -Wno-type-limits -Wno-shift-negative-value -Wno-maybe-uninitialized -Wno-sign-compare -g -DMODULE -DKBUILD_BASENAME='"qnap8528"' -DKBUILD_MODNAME='"qnap8528"' -D__KBUILD_MODNAME=kmod_qnap8528 /root/qnap8528/src/qnap8528.c | scripts/genksyms/genksyms -r /dev/null >> /root/qnap8528/src/.qnap8528.o.cmd; fi
# cmd_gen_symversions_c /root/qnap8528/src/qnap8528.o
if nm /root/qnap8528/src/qnap8528.o 2>/dev/null | grep -q ' __export_symbol_'; then gcc -E -D__GENKSYMS__ -Wp,-MMD,/root/qnap8528/src/.qnap8528.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=./= -Werror -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=branch -fno-jump-tables -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -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 -mharden-sls=all -fpatchable-function-entry=16,16 -fno-delete-null-pointer-checks -O2 -fno-allow-store-data-races -fstack-protector-strong -ftrivial-auto-var-init=zero -fno-stack-clash-protection -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -falign-functions=16 -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 -Wframe-larger-than=2048 -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-dangling-pointer -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wenum-conversion -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-restrict -Wno-packed-not-aligned -Wno-format-overflow -Wno-format-truncation -Wno-stringop-overflow -Wno-stringop-truncation -Wno-missing-field-initializers -Wno-type-limits -Wno-shift-negative-value -Wno-maybe-uninitialized -Wno-sign-compare -g -DMODULE -DKBUILD_BASENAME='"qnap8528"' -DKBUILD_MODNAME='"qnap8528"' -D__KBUILD_MODNAME=kmod_qnap8528 /root/qnap8528/src/qnap8528.c | scripts/genksyms/genksyms -r /dev/null >> /root/qnap8528/src/.qnap8528.o.cmd; fi
:
:
:
scripts/Makefile.build:252: update target '/root/qnap8528/src/qnap8528.mod' due to: FORCE
set -e; echo '# cmd_mod /root/qnap8528/src/qnap8528.mod'; echo ' printf '\''%s\n'\'' qnap8528.o | awk '\''!x[$0]++ { print("/root/qnap8528/src/"$0) }'\'' > /root/qnap8528/src/qnap8528.mod'; trap 'rm -f /root/qnap8528/src/qnap8528.mod; trap - HUP; kill -s HUP $$' HUP; trap 'rm -f /root/qnap8528/src/qnap8528.mod; trap - INT; kill -s INT $$' INT; trap 'rm -f /root/qnap8528/src/qnap8528.mod; trap - QUIT; kill -s QUIT $$' QUIT; trap 'rm -f /root/qnap8528/src/qnap8528.mod; trap - TERM; kill -s TERM $$' TERM; trap 'rm -f /root/qnap8528/src/qnap8528.mod; trap - PIPE; kill -s PIPE $$' PIPE; printf '%s\n' qnap8528.o | awk '!x[$0]++ { print("/root/qnap8528/src/"$0) }' > /root/qnap8528/src/qnap8528.mod; printf '%s\n' 'savedcmd_/root/qnap8528/src/qnap8528.mod := printf '\''%s\n'\'' qnap8528.o | awk '\''!x[$$0]++ { print("/root/qnap8528/src/"$$0) }'\'' > /root/qnap8528/src/qnap8528.mod' > /root/qnap8528/src/.qnap8528.mod.cmd
# cmd_mod /root/qnap8528/src/qnap8528.mod
printf '%s
' qnap8528.o | awk '!x[$0]++ { print("/root/qnap8528/src/"$0) }' > /root/qnap8528/src/qnap8528.mod
scripts/Makefile.build:418: update target '/root/qnap8528/src/modules.order' due to: /root/qnap8528/src/qnap8528.o FORCE
set -e; echo '# cmd_modules_order /root/qnap8528/src/modules.order'; echo ' { echo /root/qnap8528/src/qnap8528.o; :; } > /root/qnap8528/src/modules.order'; trap 'rm -f /root/qnap8528/src/modules.order; trap - HUP; kill -s HUP $$' HUP; trap 'rm -f /root/qnap8528/src/modules.order; trap - INT; kill -s INT $$' INT; trap 'rm -f /root/qnap8528/src/modules.order; trap - QUIT; kill -s QUIT $$' QUIT; trap 'rm -f /root/qnap8528/src/modules.order; trap - TERM; kill -s TERM $$' TERM; trap 'rm -f /root/qnap8528/src/modules.order; trap - PIPE; kill -s PIPE $$' PIPE; { echo /root/qnap8528/src/qnap8528.o; :; } > /root/qnap8528/src/modules.order; printf '%s\n' 'savedcmd_/root/qnap8528/src/modules.order := { echo /root/qnap8528/src/qnap8528.o; :; } > /root/qnap8528/src/modules.order' > /root/qnap8528/src/.modules.order.cmd
# cmd_modules_order /root/qnap8528/src/modules.order
{ echo /root/qnap8528/src/qnap8528.o; :; } > /root/qnap8528/src/modules.order
scripts/Makefile.build:464: update target '/root/qnap8528/src/' due to: /root/qnap8528/src/qnap8528.o /root/qnap8528/src/qnap8528.mod /root/qnap8528/src/modules.order
:
/usr/src/linux-headers-6.6.44-production+truenas/Makefile:1851: update target '/root/qnap8528/src/modules.order' due to: /root/qnap8528/src
:
/usr/src/linux-headers-6.6.44-production+truenas/Makefile:1862: update target 'modules_check' due to: /root/qnap8528/src/modules.order
sh ./scripts/modules-check.sh /root/qnap8528/src/modules.order
/usr/src/linux-headers-6.6.44-production+truenas/Makefile:1876: update target 'modpost' due to: modules_check
make -f ./scripts/Makefile.modpost
scripts/Makefile.modpost:145: update target '/root/qnap8528/src/Module.symvers' due to: scripts/mod/modpost /root/qnap8528/src/modules.order Module.symvers FORCE
set -e; echo '# MODPOST /root/qnap8528/src/Module.symvers'; echo ' scripts/mod/modpost -M -m -o /root/qnap8528/src/Module.symvers -T /root/qnap8528/src/modules.order -i Module.symvers -e '; trap 'rm -f /root/qnap8528/src/Module.symvers; trap - HUP; kill -s HUP $$' HUP; trap 'rm -f /root/qnap8528/src/Module.symvers; trap - INT; kill -s INT $$' INT; trap 'rm -f /root/qnap8528/src/Module.symvers; trap - QUIT; kill -s QUIT $$' QUIT; trap 'rm -f /root/qnap8528/src/Module.symvers; trap - TERM; kill -s TERM $$' TERM; trap 'rm -f /root/qnap8528/src/Module.symvers; trap - PIPE; kill -s PIPE $$' PIPE; scripts/mod/modpost -M -m -o /root/qnap8528/src/Module.symvers -T /root/qnap8528/src/modules.order -i Module.symvers -e ; printf '%s\n' 'savedcmd_/root/qnap8528/src/Module.symvers := scripts/mod/modpost -M -m -o /root/qnap8528/src/Module.symvers -T /root/qnap8528/src/modules.order -i Module.symvers -e ' > /root/qnap8528/src/.Module.symvers.cmd
# MODPOST /root/qnap8528/src/Module.symvers
scripts/mod/modpost -M -m -o /root/qnap8528/src/Module.symvers -T /root/qnap8528/src/modules.order -i Module.symvers -e
/usr/src/linux-headers-6.6.44-production+truenas/Makefile:1857: update target 'modules' due to: modpost
make -f ./scripts/Makefile.modfinal
scripts/Makefile.modfinal:29: update target '/root/qnap8528/src/qnap8528.mod.o' due to: /root/qnap8528/src/qnap8528.mod.c FORCE
set -e; echo '# CC [M] /root/qnap8528/src/qnap8528.mod.o'; echo ' gcc -Wp,-MMD,/root/qnap8528/src/.qnap8528.mod.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=./= -Werror -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=branch -fno-jump-tables -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -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 -mharden-sls=all -fpatchable-function-entry=16,16 -fno-delete-null-pointer-checks -O2 -fno-allow-store-data-races -fstack-protector-strong -ftrivial-auto-var-init=zero -fno-stack-clash-protection -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -falign-functions=16 -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 -Wframe-larger-than=2048 -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-dangling-pointer -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wenum-conversion -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-restrict -Wno-packed-not-aligned -Wno-format-overflow -Wno-format-truncation -Wno-stringop-overflow -Wno-stringop-truncation -Wno-missing-field-initializers -Wno-type-limits -Wno-shift-negative-value -Wno-maybe-uninitialized -Wno-sign-compare -g -DMODULE -DKBUILD_BASENAME='\''"qnap8528.mod"'\'' -DKBUILD_MODNAME='\''"qnap8528"'\'' -D__KBUILD_MODNAME=kmod_qnap8528 -c -o /root/qnap8528/src/qnap8528.mod.o /root/qnap8528/src/qnap8528.mod.c'; trap 'rm -f /root/qnap8528/src/qnap8528.mod.o; trap - HUP; kill -s HUP $$' HUP; trap 'rm -f /root/qnap8528/src/qnap8528.mod.o; trap - INT; kill -s INT $$' INT; trap 'rm -f /root/qnap8528/src/qnap8528.mod.o; trap - QUIT; kill -s QUIT $$' QUIT; trap 'rm -f /root/qnap8528/src/qnap8528.mod.o; trap - TERM; kill -s TERM $$' TERM; trap 'rm -f /root/qnap8528/src/qnap8528.mod.o; trap - PIPE; kill -s PIPE $$' PIPE; gcc -Wp,-MMD,/root/qnap8528/src/.qnap8528.mod.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=./= -Werror -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=branch -fno-jump-tables -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -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 -mharden-sls=all -fpatchable-function-entry=16,16 -fno-delete-null-pointer-checks -O2 -fno-allow-store-data-races -fstack-protector-strong -ftrivial-auto-var-init=zero -fno-stack-clash-protection -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -falign-functions=16 -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 -Wframe-larger-than=2048 -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-dangling-pointer -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wenum-conversion -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-restrict -Wno-packed-not-aligned -Wno-format-overflow -Wno-format-truncation -Wno-stringop-overflow -Wno-stringop-truncation -Wno-missing-field-initializers -Wno-type-limits -Wno-shift-negative-value -Wno-maybe-uninitialized -Wno-sign-compare -g -DMODULE -DKBUILD_BASENAME='"qnap8528.mod"' -DKBUILD_MODNAME='"qnap8528"' -D__KBUILD_MODNAME=kmod_qnap8528 -c -o /root/qnap8528/src/qnap8528.mod.o /root/qnap8528/src/qnap8528.mod.c; scripts/basic/fixdep /root/qnap8528/src/.qnap8528.mod.o.d /root/qnap8528/src/qnap8528.mod.o 'gcc -Wp,-MMD,/root/qnap8528/src/.qnap8528.mod.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=./= -Werror -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=branch -fno-jump-tables -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -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 -mharden-sls=all -fpatchable-function-entry=16,16 -fno-delete-null-pointer-checks -O2 -fno-allow-store-data-races -fstack-protector-strong -ftrivial-auto-var-init=zero -fno-stack-clash-protection -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -falign-functions=16 -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 -Wframe-larger-than=2048 -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-dangling-pointer -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wenum-conversion -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-restrict -Wno-packed-not-aligned -Wno-format-overflow -Wno-format-truncation -Wno-stringop-overflow -Wno-stringop-truncation -Wno-missing-field-initializers -Wno-type-limits -Wno-shift-negative-value -Wno-maybe-uninitialized -Wno-sign-compare -g -DMODULE -DKBUILD_BASENAME='\''"qnap8528.mod"'\'' -DKBUILD_MODNAME='\''"qnap8528"'\'' -D__KBUILD_MODNAME=kmod_qnap8528 -c -o /root/qnap8528/src/qnap8528.mod.o /root/qnap8528/src/qnap8528.mod.c' > /root/qnap8528/src/.qnap8528.mod.o.cmd; rm -f /root/qnap8528/src/.qnap8528.mod.o.d
# CC [M] /root/qnap8528/src/qnap8528.mod.o
gcc -Wp,-MMD,/root/qnap8528/src/.qnap8528.mod.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=./= -Werror -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=branch -fno-jump-tables -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -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 -mharden-sls=all -fpatchable-function-entry=16,16 -fno-delete-null-pointer-checks -O2 -fno-allow-store-data-races -fstack-protector-strong -ftrivial-auto-var-init=zero -fno-stack-clash-protection -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -falign-functions=16 -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 -Wframe-larger-than=2048 -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-dangling-pointer -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wenum-conversion -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-restrict -Wno-packed-not-aligned -Wno-format-overflow -Wno-format-truncation -Wno-stringop-overflow -Wno-stringop-truncation -Wno-missing-field-initializers -Wno-type-limits -Wno-shift-negative-value -Wno-maybe-uninitialized -Wno-sign-compare -g -DMODULE -DKBUILD_BASENAME='"qnap8528.mod"' -DKBUILD_MODNAME='"qnap8528"' -D__KBUILD_MODNAME=kmod_qnap8528 -c -o /root/qnap8528/src/qnap8528.mod.o /root/qnap8528/src/qnap8528.mod.c
scripts/Makefile.modfinal:59: update target '/root/qnap8528/src/qnap8528.ko' due to: /root/qnap8528/src/qnap8528.o /root/qnap8528/src/qnap8528.mod.o scripts/module.lds FORCE
set -e; echo '# LD [M] /root/qnap8528/src/qnap8528.ko'; echo ' ld -r -m elf_x86_64 -z noexecstack --no-warn-rwx-segments --build-id=sha1 -T scripts/module.lds -o /root/qnap8528/src/qnap8528.ko /root/qnap8528/src/qnap8528.o /root/qnap8528/src/qnap8528.mod.o; make -f ./arch/x86/Makefile.postlink /root/qnap8528/src/qnap8528.ko'; trap 'rm -f /root/qnap8528/src/qnap8528.ko; trap - HUP; kill -s HUP $$' HUP; trap 'rm -f /root/qnap8528/src/qnap8528.ko; trap - INT; kill -s INT $$' INT; trap 'rm -f /root/qnap8528/src/qnap8528.ko; trap - QUIT; kill -s QUIT $$' QUIT; trap 'rm -f /root/qnap8528/src/qnap8528.ko; trap - TERM; kill -s TERM $$' TERM; trap 'rm -f /root/qnap8528/src/qnap8528.ko; trap - PIPE; kill -s PIPE $$' PIPE; ld -r -m elf_x86_64 -z noexecstack --no-warn-rwx-segments --build-id=sha1 -T scripts/module.lds -o /root/qnap8528/src/qnap8528.ko /root/qnap8528/src/qnap8528.o /root/qnap8528/src/qnap8528.mod.o; make -f ./arch/x86/Makefile.postlink /root/qnap8528/src/qnap8528.ko; printf '%s\n' 'savedcmd_/root/qnap8528/src/qnap8528.ko := ld -r -m elf_x86_64 -z noexecstack --no-warn-rwx-segments --build-id=sha1 -T scripts/module.lds -o /root/qnap8528/src/qnap8528.ko /root/qnap8528/src/qnap8528.o /root/qnap8528/src/qnap8528.mod.o; make -f ./arch/x86/Makefile.postlink /root/qnap8528/src/qnap8528.ko' > /root/qnap8528/src/.qnap8528.ko.cmd
# LD [M] /root/qnap8528/src/qnap8528.ko
ld -r -m elf_x86_64 -z noexecstack --no-warn-rwx-segments --build-id=sha1 -T scripts/module.lds -o /root/qnap8528/src/qnap8528.ko /root/qnap8528/src/qnap8528.o /root/qnap8528/src/qnap8528.mod.o; make -f ./arch/x86/Makefile.postlink /root/qnap8528/src/qnap8528.ko
arch/x86/Makefile.postlink:38: target '/root/qnap8528/src/qnap8528.ko' does not exist
true
set -e; echo '# BTF [M] /root/qnap8528/src/qnap8528.ko'; echo ' if [ ! -f vmlinux ]; then printf "Skipping BTF generation for %s due to unavailability of vmlinux\n" /root/qnap8528/src/qnap8528.ko 1>&2; else LLVM_OBJCOPY="objcopy" pahole -J --btf_base vmlinux /root/qnap8528/src/qnap8528.ko; ./tools/bpf/resolve_btfids/resolve_btfids -b vmlinux /root/qnap8528/src/qnap8528.ko; fi;'; trap 'rm -f /root/qnap8528/src/qnap8528.ko; trap - HUP; kill -s HUP $$' HUP; trap 'rm -f /root/qnap8528/src/qnap8528.ko; trap - INT; kill -s INT $$' INT; trap 'rm -f /root/qnap8528/src/qnap8528.ko; trap - QUIT; kill -s QUIT $$' QUIT; trap 'rm -f /root/qnap8528/src/qnap8528.ko; trap - TERM; kill -s TERM $$' TERM; trap 'rm -f /root/qnap8528/src/qnap8528.ko; trap - PIPE; kill -s PIPE $$' PIPE; if [ ! -f vmlinux ]; then printf "Skipping BTF generation for %s due to unavailability of vmlinux\n" /root/qnap8528/src/qnap8528.ko 1>&2; else LLVM_OBJCOPY="objcopy" pahole -J --btf_base vmlinux /root/qnap8528/src/qnap8528.ko; ./tools/bpf/resolve_btfids/resolve_btfids -b vmlinux /root/qnap8528/src/qnap8528.ko; fi;
# BTF [M] /root/qnap8528/src/qnap8528.ko
if [ ! -f vmlinux ]; then printf "Skipping BTF generation for %s due to unavailability of vmlinux
" /root/qnap8528/src/qnap8528.ko 1>&2; else LLVM_OBJCOPY="objcopy" pahole -J --btf_base vmlinux /root/qnap8528/src/qnap8528.ko; ./tools/bpf/resolve_btfids/resolve_btfids -b vmlinux /root/qnap8528/src/qnap8528.ko; fi;
scripts/Makefile.modfinal:19: update target '__modfinal' due to: /root/qnap8528/src/qnap8528.ko
:
Makefile:233: update target 'modules' due to: __sub-make
:
make[1]: Leaving directory '/usr/src/linux-headers-6.6.44-production+truenas'
Wow...yea that is definitely not what I'm seeing lol.
okay I could use the help with the vm config 100% lol
I installed TrueNAS on my laptop under VMWare Workstation (paid software), you an use VirtualBox or any other software. My config is as follows:
I installed TrueNAS on the single disk and then in the console (option 7) (not the webshell) ran What i wrote in comment https://github.com/0xGiddi/qnap8528/issues/4#issuecomment-2492182518
Ill try and understand the error you are getting, it might take me some time.
Ill try and understand the error you are getting, it might take me some time.
No worries. I totally understand. I'm just super happy for help in general :)
I'll work on building the VM and I'll get back to you.
So an update: I reran make but I pushed as much as I could into a txt file with sudo make > output.txt > 2>&1
and I got this
make --trace -C /lib/modules/6.6.44-production+truenas/build M=$PWD modules V=1
make[1]: Entering directory '/usr/src/linux-headers-6.6.44-production+truenas'
Makefile:237: target '__sub-make' does not exist
make --no-print-directory -C /usr/src/linux-headers-6.6.44-production+truenas \
-f /usr/src/linux-headers-6.6.44-production+truenas/Makefile modules
/usr/src/linux-headers-6.6.44-production+truenas/Makefile:809: target 'include/config/auto.conf' does not exist
test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \
echo >&2; \
echo >&2 " ERROR: Kernel configuration is invalid."; \
echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
echo >&2 ; \
/bin/false)
/usr/src/linux-headers-6.6.44-production+truenas/Makefile:1797: target 'prepare' does not exist
if [ "gcc (Debian 12.2.0-14) 12.2.0" != "gcc (Debian 12.2.0-14) 12.2.0" ]; then \
echo >&2 "warning: the compiler differs from the one used to build the kernel"; \
echo >&2 " The kernel was built by: gcc (Debian 12.2.0-14) 12.2.0"; \
echo >&2 " You are using: gcc (Debian 12.2.0-14) 12.2.0"; \
fi
/usr/src/linux-headers-6.6.44-production+truenas/Makefile:1924: update target '/home/truenas_admin/qnap8528/src' due to: prepare
make -f ./scripts/Makefile.build obj=/home/truenas_admin/qnap8528/src need-builtin=1 need-modorder=1
scripts/Makefile.build:243: update target '/home/truenas_admin/qnap8528/src/qnap8528.o' due to: /home/truenas_admin/qnap8528/src/qnap8528.c FORCE
set -e; echo '# CC [M] /home/truenas_admin/qnap8528/src/qnap8528.o'; echo ' gcc -Wp,-MMD,/home/truenas_admin/qnap8528/src/.qnap8528.o.d -nostdinc -I./arch/x86/include -I./arch/x86/include/>
make[3]: *** [scripts/Makefile.build:243: /home/truenas_admin/qnap8528/src/qnap8528.o] Killed
make[2]: *** [/usr/src/linux-headers-6.6.44-production+truenas/Makefile:1924: /home/truenas_admin/qnap8528/src] Error 2
make[1]: *** [Makefile:237: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.6.44-production+truenas'
make: *** [Makefile:7: all] Error 2
So, after reading through the output over and over, the line ‘ make[3]: *** [scripts/Makefile.build:243: /home/truenas_admin/qnap8528/src/qnap8528.o] Killed’ does not sit right with me. There should be an error if its a build system issue, not just ‘killed’. It could be a permission issue, but we already checked that. Could this be the OOM killer? Could you check that there is enough free memory when compiling? Also, check ’dmesg’ after compiling to see if OOM killer was called? (Look for ‘oom’, ‘killed’ ‘Out of memory’ and similar)
I sure hope not with 64GB of RAM with no apps currently running lol. I just ran the command again and checked dmesg and I don't see any OOM errors.
It was worth a shot, I cannot figure out why it would be killed and not exiting with an error condition. I don't know enough about TrueNAS architecture if it might be something else, I did read many complaints about the OOM killer getting invoked in 24.04.x.x for other processes.
I think this is an environmental issue rather than a build system issue that is specifically with your setup. You can try and reboot if its not too much of an inconvenience just to have a “fresh” system.
I would start digging through logs, monitoring the system load and memory and more while trying. but alas, I dont own the system so I’m afraid without new information its hard ti help ither that suggest more and more debugging steps.
Compiling on an external machine like a VM is still an option. If i can think if anything I’ll comment.
You can try and reboot if its not too much of an inconvenience just to have a “fresh” system.
Thats the plan after the scrub finishes tomorrow lol (literally just got out of an abusive relationship with QuTS Hero 3 days ago lol) It would be really funny if it turns out the solution was just rebooting.
Update: rebooted NAS. Same error.
I'm not allowed to have nice things lol.
Hi, just wanted to pop in and mention that I'm experiencing the same issue on my TS-673A
Independently tried some of the suggested remediation steps before discovering this thread.
@rwz Thank you for replying this, it's helps to know this is not an isolated case. Can you confirm make is also being killed? Not just an error?
I will install TrueNAS on my TS-473A see if it happens to me and debug from there. The motherboard of all 3 devices is the same, so if it's somehow the architecture I might catch it. I'll update one I have some findings.
I'm honestly just happy its not an isolated case. I wasn't sure if it was something I had done or if I was doing something wrong
Mixed news everybody! I have managed to kind of reproduce the error myself. It appears that I did not encounter this problem when I tested it since I was using TrueNAS console, not the web shell or SSH. I have just installed TrueNAS 24.10.0.2 on a spare NVME drive on my TS-473A and just like your experience, when compiling via the webshell the process was killed (after a lot of output). I also enabled SSH and tried to compile it there, but it was killed as well. I think the problem might be sudo
no sure yet.
There are two solutions currently that work for me (assuming you have run install-dev-tools
(and apt install dkms
if using first solution)):
First solution - DKMS:
Install either using make install
in the root project directory or build only the module using make
in the src
directory. I did not encounter any problems with this using the local console (over serial or with a GPU w/ scree and keyboard).
Second solution - NO DKMS:
Since you cant run dkms
from truenas_admin
without sudo (and the makefile uses dkms
), download and compile the module only (make
in src/
directory) using the truenas_admin
user (no sudo
!) and then use sudo insmod
on the resulting qnap8528.ko
manually. In this method, you will need to manually add the kernel module to the system so modprobe
will find it.
I am working on figuring out why running under sudo
is problematic.
Edit: Text that has gone missing
sudo insmod
on the resultingqnap8528.ko
manually. In this method, you will need to manually add the kernel module to the system somodprobe
will find it.
After doing sudo insmod is there anything else we need to do?
You might want to copy the module over to /lib/modules/<kernel version>
and run sudo depmod -a
.
Unload the kernel module if you inserted it manually using rmmod qnap8528
and then, run modprobe qnap8528
(run it from a directory where the .ko
is not there to just be sure). Check dmsg
that the module probed and all functions work as you need and want.
You can install the systemd
script to load it on boot, however, I have not tested this yet with TrueNAS (but it should be OK if it's Debian, then again sudo
does not work properly on TrueNAS...).
If you install the script, you might want to reboot and see that it loads automatically as expected. As far as I can tell, all this will not survive a TrueNAS update, and it will need to be install manually again if you update the system.
As far as I can tell, all this will not survive a TrueNAS update, and it will need to be install manually again if you update the system.
That's expected and known behavior. If a process can be created then a process can be automated :)
Looks like that at least got things kind of working
truenas_admin@truenas[/etc/systemd/system]$ sudo systemctl status qnap8528-load-module.service
● qnap8528-load-module.service - Load qnap8528 EC kernel module
Loaded: loaded (/etc/systemd/system/qnap8528-load-module.service; enabled; preset: enabled)
Active: active (exited) since Fri 2024-11-22 16:41:42 EST; 36s ago
Process: 682823 ExecStart=/sbin/modprobe qnap8528 (code=exited, status=0/SUCCESS)
Main PID: 682823 (code=exited, status=0/SUCCESS)
CPU: 6ms
Nov 22 16:41:42 truenas systemd[1]: Starting qnap8528-load-module.service - Load qnap8528 EC kernel module...
Nov 22 16:41:42 truenas systemd[1]: Finished qnap8528-load-module.service - Load qnap8528 EC kernel module.
If a process can be created then a process can be automated :)
As long as that process does not need sudo
.
If everything is ok and working as expected feel. free to close the issue and open any other ones if needed.
Hardware: Qnap TS-873A OS: Truenas Scale ElectricEel-24.10.0.2 (Debian 12 Bookworm) Software Version: qnap8528-v1.2
Steps to reproduce After disabling the rootfs protection I installed dkms then pulled the latest build. When compiling I get the following error.
/var/lib/dkms/qnap8528/1.2/build/make.log outputs this
When I run dkms status however I see qnap8528/1.2: added
I then created the systemd entry and enabled it. I then received an error. systemctl status shows
Expected behavior: The module installs without error and starts when enabling the systemctl service.