".ko is missing" when trying to add kernel module

Hi,
I'm trying to add a kernel module for rtw8852cu, in target x86.
the kernel module is built fine in the x86 build env, but unsuccessful in openwrt build env.
the error doesn't really say anything (only that the .ko file is missing), even with verbose output (V=s).
how can I tell what's wrong?

my steps were:

git clone https://git.openwrt.org/openwrt/openwrt.git
cd openwrt
git pull

./scripts/feeds update -a
./scripts/feeds install -a

mkdir packages/kernel/rtw8852cu
**copy my Makefile (below) to packages/kernel/rtw8852cu**
wget https://downloads.openwrt.org/snapshots/targets/x86/64/config.buildinfo -O .config
 
make menuconfig

make tools/install
make toolchain/install
make target/linux/compile
make package/kernel/linux/compile
make package/kernel/rtw8852cu/compile V=s

the error:

mkdir -p /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/.pkgdir/kmod-rtw8852cu
ERROR: module '/home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/rtw8852cu.ko' is missing.
make[2]: *** [Makefile:56: /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/.pkgdir/kmod-rtw8852cu.installed] Error 1
make[2]: Leaving directory '/home/user/realtek_openwrt/openwrt/package/kernel/rtw8852cu'
time: package/kernel/rtw8852cu/compile#0.78#0.27#1.01
    ERROR: package/kernel/rtw8852cu failed to build.

my Makefile (used some rtl88x2bu openwrt packages as reference):

include $(TOPDIR)/rules.mk

PKG_NAME:=rtw8852cu
PKG_RELEASE=2
PKG_LICENSE:=GPLv2

PKG_SOURCE_URL:=https://github.com/lwfinger/rtw8852cu
PKG_MIRROR_HASH:=852fcede3207aa2789e9640feb433f805ebfffeddf15a3b773a5510d1deb51d5
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2024-04-28
PKG_SOURCE_VERSION:=d256c2ae282b70f03629e36900da54905ab4187c
PKG_MAINTAINER:=lwfinger
PKG_BUILD_PARALLEL:=1


include $(INCLUDE_DIR)/kernel.mk
include $(INCLUDE_DIR)/package.mk

define KernelPackage/rtw8852cu
	SUBMENU:=Wireless Drivers
	TITLE:=Realtek 8852CU
	DEPENDS:=+kmod-cfg80211 +kmod-usb-core +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT
	FILES:=$(PKG_BUILD_DIR)/rtw8852cu.ko
	AUTOLOAD:=$(call AutoProbe,rtw8852cu)
	PROVIDES:=kmod-rtw8852cu
endef

NOSTDINC_FLAGS := \
	$(KERNEL_NOSTDINC_FLAGS) \
	-I$(PKG_BUILD_DIR) \
	-I$(PKG_BUILD_DIR)/include \
	-I$(STAGING_DIR)/usr/include/mac80211-backport \
	-I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
	-I$(STAGING_DIR)/usr/include/mac80211 \
	-I$(STAGING_DIR)/usr/include/mac80211/uapi \
	-include backport/backport.h

# from Makefile: obj-(CONFIG_rtw8822BU) = ...
ifdef CONFIG_PACKAGE_kmod-rtw8852cu
   PKG_MAKE_FLAGS += CONFIG_rtw8825CU=m
endif

NOSTDINC_FLAGS+=-DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT -DBUILD_OPENWRT

define Build/Compile
	+$(KERNEL_MAKE) $(PKG_JOBS) \
		$(KERNEL_MAKE_FLAGS) \
		$(PKG_MAKE_FLAGS) \
		M="$(PKG_BUILD_DIR)" \
		NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
		modules
endef

$(eval $(call KernelPackage,rtw8852cu))

any help is appreciated

1 Like

Please attach more context, building of module failed way before final message that found it was not built.

What @brada4 said, compile with j1 and V=sc.

1 Like

What you already built will not be rebuilt with diagnostic build.

I'm compiling without the -j flag so it's suppose to be one job by default

here are the immediate logs before it, tell me how much more is needed..

make[2]: Leaving directory '/home/user/realtek_openwrt/openwrt/package/kernel/mac80211'
time: package/kernel/mac80211/smallbuffers/compile#62.89#4.35#67.18
make[2]: Entering directory '/home/user/realtek_openwrt/openwrt/package/kernel/rtw8852cu'
touch /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/.prepared_c45bd544f8e9c488696c74f41aa3c611_18f1e190c5d53547fed41a3eaa76e9e9_check
. /home/user/realtek_openwrt/openwrt/include/shell.sh; zstdcat /home/user/realtek_openwrt/openwrt/dl/rtw8852cu-2024.04.28~d256c2ae.tar.zst | tar -C /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/.. -xf -
[ ! -d ./src/ ] || cp -fpR ./src/. /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae
touch /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/.prepared_c45bd544f8e9c488696c74f41aa3c611_18f1e190c5d53547fed41a3eaa76e9e9
rm -f /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/.configured_*
rm -f /home/user/realtek_openwrt/openwrt/staging_dir/target-x86_64_musl/stamp/.rtw8852cu_installed
(cd /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/./; if [ -x ./configure ]; then find /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/ -name config.guess | xargs -r chmod u+w; find /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/ -name config.guess | xargs -r -n1 cp --remove-destination /home/user/realtek_openwrt/openwrt/scripts/config.guess; find /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/ -name config.sub | xargs -r chmod u+w; find /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/ -name config.sub | xargs -r -n1 cp --remove-destination /home/user/realtek_openwrt/openwrt/scripts/config.sub; AR="x86_64-openwrt-linux-musl-gcc-ar" AS="x86_64-openwrt-linux-musl-gcc -c -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -ffile-prefix-map=/home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae=rtw8852cu-2024.04.28~d256c2ae -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro" LD="x86_64-openwrt-linux-musl-ld.bfd" NM="x86_64-openwrt-linux-musl-gcc-nm" CC="x86_64-openwrt-linux-musl-gcc" GCC="x86_64-openwrt-linux-musl-gcc" CXX="x86_64-openwrt-linux-musl-g++" RANLIB="x86_64-openwrt-linux-musl-gcc-ranlib" STRIP=x86_64-openwrt-linux-musl-strip OBJCOPY=x86_64-openwrt-linux-musl-objcopy OBJDUMP=x86_64-openwrt-linux-musl-objdump SIZE=x86_64-openwrt-linux-musl-size CFLAGS="-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -ffile-prefix-map=/home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae=rtw8852cu-2024.04.28~d256c2ae -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro " CXXFLAGS="-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -ffile-prefix-map=/home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae=rtw8852cu-2024.04.28~d256c2ae -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro " CPPFLAGS="-I/home/user/realtek_openwrt/openwrt/staging_dir/toolchain-x86_64_gcc-13.2.0_musl/usr/include -I/home/user/realtek_openwrt/openwrt/staging_dir/toolchain-x86_64_gcc-13.2.0_musl/include -I/home/user/realtek_openwrt/openwrt/staging_dir/toolchain-x86_64_gcc-13.2.0_musl/include/fortify " LDFLAGS="-L/home/user/realtek_openwrt/openwrt/staging_dir/toolchain-x86_64_gcc-13.2.0_musl/usr/lib -L/home/user/realtek_openwrt/openwrt/staging_dir/toolchain-x86_64_gcc-13.2.0_musl/lib -fuse-ld=bfd -znow -zrelro "   ./configure --target=x86_64-openwrt-linux --host=x86_64-openwrt-linux --build=x86_64-pc-linux-gnu --disable-dependency-tracking --program-prefix="" --program-suffix="" --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var --mandir=/usr/man --infodir=/usr/info --disable-nls  ; fi; )
touch /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/.configured_68b329da9893e34099c7d8ad5cb9c940
rm -f /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/.built
touch /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/.built_check
make -C "/home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.30" KCFLAGS="-ffile-prefix-map=/home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl=target-x86_64_musl -fno-caller-saves " HOSTCFLAGS="-O2 -I/home/user/realtek_openwrt/openwrt/staging_dir/host/include -I/home/user/realtek_openwrt/openwrt/staging_dir/hostpkg/include -I/home/user/realtek_openwrt/openwrt/staging_dir/target-x86_64_musl/host/include -Wall -Wmissing-prototypes -Wstrict-prototypes" CROSS_COMPILE="x86_64-openwrt-linux-musl-" ARCH="x86" KBUILD_HAVE_NLS=no KBUILD_BUILD_USER="builder" KBUILD_BUILD_HOST="buildhost" KBUILD_BUILD_TIMESTAMP="Sat May 25 18:36:32 2024" KBUILD_BUILD_VERSION="0" KBUILD_HOSTLDFLAGS="-L/home/user/realtek_openwrt/openwrt/staging_dir/host/lib" CONFIG_SHELL="bash" V=1  cmd_syscalls= KBUILD_EXTRA_SYMBOLS="/home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/symvers/gpio-button-hotplug.symvers /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/symvers/mac80211.symvers" CC="x86_64-openwrt-linux-musl-gcc" KERNELRELEASE=6.6.30 M="/home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae" EXTRA_CFLAGS="" modules
make[3]: Entering directory '/home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.30'
make --no-print-directory -C /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.30 \
-f /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.30/Makefile modules
make -f ./scripts/Makefile.build obj=/home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae need-builtin=1 need-modorder=1
# cmd_modules_order /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/modules.order
  {  :; } > /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/modules.order
bash ./scripts/modules-check.sh /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/modules.order
make -f ./scripts/Makefile.modpost
# MODPOST /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/Module.symvers
   scripts/mod/modpost -M        -o /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/Module.symvers -T /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/modules.order -i Module.symvers -e -i /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/symvers/gpio-button-hotplug.symvers -i /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/symvers/mac80211.symvers
make -f ./scripts/Makefile.modfinal
make[3]: Leaving directory '/home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.30'
for subdir in .; do realdir=$(readlink -f /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae); grep -F /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/$subdir/Module.symvers >> /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/Module.symvers.tmp; [ "/home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae" = "$realdir" ] || grep -F $realdir /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/$subdir/Module.symvers >> /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/Module.symvers.tmp; done; sort -u /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/Module.symvers.tmp > /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/Module.symvers; mkdir -p /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/symvers; mv /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/Module.symvers /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/symvers/rtw8852cu.symvers
touch /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/.built
rm -rf /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/.pkgdir/kmod-rtw8852cu.installed /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/.pkgdir/kmod-rtw8852cu
mkdir -p /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/.pkgdir/kmod-rtw8852cu
ERROR: module '/home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/rtw8852cu.ko' is missing.

If you know better why you ask here?
I'd focus on compiling mac80211 before any wifi drivers, please provide context backwards starting few lines before first build error.

1 Like

have fun not finding the issue ...

there's also https://github.com/morrownr/USB-WiFi/blob/main/home/USB_WiFi_Chipsets.md

why? that's the default I read for make in general

I know about it, but it's beside the point. there are working linux drivers that I want to create kmod for..

I know exactly nothing about openwrt kernel modules, that's why I'm asking. not sure why you assume I "know better"...

do you mean the kernel module mac80211, e.g. make package/kernel/mac80211/compile V=sc?

latest output after running:

make clean
make package/kernel/rtw8852cu/clean
make target/linux/compile
make package/kernel/linux/compile
make package/kernel/rtw8852cu/compile -j1 V=sc

is:

...
# CC [M]  /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/net/wireless/cfg80211.mod.o
  x86_64-openwrt-linux-musl-gcc -Wp,-MMD,/home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/net/wireless/.cfg80211.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=none -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 -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-stack-clash-protection -falign-functions=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 -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 -fno-var-tracking -femit-struct-debug-baseonly -ffile-prefix-map=/home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl=target-x86_64_musl -fno-caller-saves -I/home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/include -ffile-prefix-map=/home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15=backports-6.6.15 -DCONFIG_ATH10K_SMALLBUFFERS -DMODULE -DKBUILD_BASENAME='"cfg80211.mod"' -DKBUILD_MODNAME='"cfg80211"' -D__KBUILD_MODNAME=kmod_cfg80211 -c -o /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/net/wireless/cfg80211.mod.o /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/net/wireless/cfg80211.mod.c
# LD [M]  /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/net/wireless/cfg80211.ko
  x86_64-openwrt-linux-musl-ld -r -m elf_x86_64 -z noexecstack --no-warn-rwx-segments --build-id=sha1  -T scripts/module.lds -o /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/net/wireless/cfg80211.ko /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/net/wireless/cfg80211.o /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/net/wireless/cfg80211.mod.o;  /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/scripts/make -f ./arch/x86/Makefile.postlink /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/net/wireless/cfg80211.ko
# CC [M]  /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/net/mac80211/mac80211.mod.o
  x86_64-openwrt-linux-musl-gcc -Wp,-MMD,/home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/net/mac80211/.mac80211.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=none -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 -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-stack-clash-protection -falign-functions=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 -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 -fno-var-tracking -femit-struct-debug-baseonly -ffile-prefix-map=/home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl=target-x86_64_musl -fno-caller-saves -I/home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/include -ffile-prefix-map=/home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15=backports-6.6.15 -DCONFIG_ATH10K_SMALLBUFFERS -DMODULE -DKBUILD_BASENAME='"mac80211.mod"' -DKBUILD_MODNAME='"mac80211"' -D__KBUILD_MODNAME=kmod_mac80211 -c -o /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/net/mac80211/mac80211.mod.o /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/net/mac80211/mac80211.mod.c
# LD [M]  /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/net/mac80211/mac80211.ko
  x86_64-openwrt-linux-musl-ld -r -m elf_x86_64 -z noexecstack --no-warn-rwx-segments --build-id=sha1  -T scripts/module.lds -o /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/net/mac80211/mac80211.ko /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/net/mac80211/mac80211.o /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/net/mac80211/mac80211.mod.o;  /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/scripts/make -f ./arch/x86/Makefile.postlink /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/net/mac80211/mac80211.ko
make[3]: Leaving directory '/home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15'
for subdir in .; do realdir=$(readlink -f /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15); grep -F /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15 /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/$subdir/Module.symvers >> /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/Module.symvers.tmp; [ "/home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15" = "$realdir" ] || grep -F $realdir /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/$subdir/Module.symvers >> /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/Module.symvers.tmp; done; sort -u /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/Module.symvers.tmp > /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/Module.symvers; mkdir -p /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/symvers; mv /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/Module.symvers /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/symvers/mac80211.symvers
touch /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/.built
rm -rf /home/user/realtek_openwrt/openwrt/tmp/stage-mac80211
mkdir -p /home/user/realtek_openwrt/openwrt/tmp/stage-mac80211/host /home/user/realtek_openwrt/openwrt/staging_dir/target-x86_64_musl/packages
mkdir -p /home/user/realtek_openwrt/openwrt/tmp/stage-mac80211/usr/include/mac80211 /home/user/realtek_openwrt/openwrt/tmp/stage-mac80211/usr/include/mac80211-backport /home/user/realtek_openwrt/openwrt/tmp/stage-mac80211/usr/include/mac80211/ath /home/user/realtek_openwrt/openwrt/tmp/stage-mac80211/usr/include/net/mac80211
cp -fpR /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/net/mac80211/*.h /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/include/* /home/user/realtek_openwrt/openwrt/tmp/stage-mac80211/usr/include/mac80211/
cp -fpR /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/backport-include/* /home/user/realtek_openwrt/openwrt/tmp/stage-mac80211/usr/include/mac80211-backport/
cp -fpR /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/net/mac80211/rate.h /home/user/realtek_openwrt/openwrt/tmp/stage-mac80211/usr/include/net/mac80211/
cp -fpR /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/drivers/net/wireless/ath/*.h /home/user/realtek_openwrt/openwrt/tmp/stage-mac80211/usr/include/mac80211/ath/
rm -f /home/user/realtek_openwrt/openwrt/tmp/stage-mac80211/usr/include/mac80211-backport/linux/module.h
find /home/user/realtek_openwrt/openwrt/tmp/stage-mac80211 -name '*.la' | xargs -r rm -f;
if [ -f /home/user/realtek_openwrt/openwrt/staging_dir/target-x86_64_musl/packages/mac80211.smallbuffers.list ]; then /home/user/realtek_openwrt/openwrt/scripts/clean-package.sh "/home/user/realtek_openwrt/openwrt/staging_dir/target-x86_64_musl/packages/mac80211.smallbuffers.list" "/home/user/realtek_openwrt/openwrt/staging_dir/target-x86_64_musl"; fi
if [ -d /home/user/realtek_openwrt/openwrt/tmp/stage-mac80211 ]; then (cd /home/user/realtek_openwrt/openwrt/tmp/stage-mac80211; find ./ > /home/user/realtek_openwrt/openwrt/tmp/stage-mac80211.files);    SHELL= flock /home/user/realtek_openwrt/openwrt/tmp/.staging-dir.flock -c ' mv /home/user/realtek_openwrt/openwrt/tmp/stage-mac80211.files /home/user/realtek_openwrt/openwrt/staging_dir/target-x86_64_musl/packages/mac80211.smallbuffers.list && cp -fpR /home/user/realtek_openwrt/openwrt/tmp/stage-mac80211/* /home/user/realtek_openwrt/openwrt/staging_dir/target-x86_64_musl/; '; fi
rm -rf /home/user/realtek_openwrt/openwrt/tmp/stage-mac80211
touch /home/user/realtek_openwrt/openwrt/staging_dir/target-x86_64_musl/stamp/.mac80211.smallbuffers_installed
rm -rf /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/ipkg-x86_64/kmod-ath10k-smallbuffers
mkdir -p /home/user/realtek_openwrt/openwrt/bin/targets/x86/64/packages /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/ipkg-x86_64/kmod-ath10k-smallbuffers /home/user/realtek_openwrt/openwrt/staging_dir/target-x86_64_musl/pkginfo
mkdir -p /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/ipkg-x86_64/kmod-ath10k-smallbuffers/etc/modules.d; ( echo "ath10k_core frame_mode=2";   echo "ath10k_pci"; ) > /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/ipkg-x86_64/kmod-ath10k-smallbuffers/etc/modules.d/ath10k-smallbuffers;
find /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/ipkg-x86_64/kmod-ath10k-smallbuffers -name 'CVS' -o -name '.svn' -o -name '.#*' -o -name '*~'| xargs -r rm -rf
export CROSS="x86_64-openwrt-linux-musl-"  NO_RENAME=1 ; NM="x86_64-openwrt-linux-musl-nm" STRIP="/home/user/realtek_openwrt/openwrt/staging_dir/host/bin/sstrip -z" STRIP_KMOD="/home/user/realtek_openwrt/openwrt/scripts/strip-kmod.sh" PATCHELF="/home/user/realtek_openwrt/openwrt/staging_dir/host/bin/patchelf" /home/user/realtek_openwrt/openwrt/scripts/rstrip.sh /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/ipkg-x86_64/kmod-ath10k-smallbuffers
rstrip.sh: /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/ipkg-x86_64/kmod-ath10k-smallbuffers/lib/modules/6.6.30/ath10k_core.ko: relocatable
rstrip.sh: /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/ipkg-x86_64/kmod-ath10k-smallbuffers/lib/modules/6.6.30/ath10k_pci.ko: relocatable
install -d -m0755 /home/user/realtek_openwrt/openwrt/bin/targets/x86/64/packages/tmp
mkdir -p /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/ipkg-x86_64/kmod-ath10k-smallbuffers/CONTROL
(cd /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/ipkg-x86_64/kmod-ath10k-smallbuffers/CONTROL; ( echo "$CONTROL"; printf "Description: "; echo "$DESCRIPTION" | sed -e 's,^[[:space:]]*, ,g'; ) > control; chmod 644 control; ( echo "#!/bin/sh"; echo "[ \"\${IPKG_NO_SCRIPT}\" = \"1\" ] && exit 0"; echo "[ -s "\${IPKG_INSTROOT}/lib/functions.sh" ] || exit 0"; echo ". \${IPKG_INSTROOT}/lib/functions.sh"; echo "default_postinst \$0 \$@"; ) > postinst; ( echo "#!/bin/sh"; echo "[ -s "\${IPKG_INSTROOT}/lib/functions.sh" ] || exit 0"; echo ". \${IPKG_INSTROOT}/lib/functions.sh"; echo "default_prerm \$0 \$@"; ) > prerm; chmod 0755 postinst prerm;  )
/home/user/realtek_openwrt/openwrt/staging_dir/host/bin/fakeroot /home/user/realtek_openwrt/openwrt/staging_dir/host/bin/bash /home/user/realtek_openwrt/openwrt/scripts/ipkg-build -m "" /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/ipkg-x86_64/kmod-ath10k-smallbuffers /home/user/realtek_openwrt/openwrt/bin/targets/x86/64/packages
Packaged contents of /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/ipkg-x86_64/kmod-ath10k-smallbuffers into /home/user/realtek_openwrt/openwrt/bin/targets/x86/64/packages/kmod-ath10k-smallbuffers_6.6.30.6.6.15-r1_x86_64.ipk
rm -rf /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/.pkgdir/kmod-ath10k-smallbuffers.installed /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/.pkgdir/kmod-ath10k-smallbuffers
mkdir -p /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/.pkgdir/kmod-ath10k-smallbuffers
mkdir -p /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/.pkgdir/kmod-ath10k-smallbuffers/etc/modules.d; ( echo "ath10k_core frame_mode=2";   echo "ath10k_pci"; ) > /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/.pkgdir/kmod-ath10k-smallbuffers/etc/modules.d/ath10k-smallbuffers;
touch /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/.pkgdir/kmod-ath10k-smallbuffers.installed
mkdir -p /home/user/realtek_openwrt/openwrt/staging_dir/target-x86_64_musl/root-x86/stamp
SHELL= flock /home/user/realtek_openwrt/openwrt/tmp/.root-copy.flock -c 'cp -fpR /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/.pkgdir/kmod-ath10k-smallbuffers/. /home/user/realtek_openwrt/openwrt/staging_dir/target-x86_64_musl/root-x86/'
touch /home/user/realtek_openwrt/openwrt/staging_dir/target-x86_64_musl/root-x86/stamp/.kmod-ath10k-smallbuffers_installed
touch -r /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/.built /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15/.autoremove 2>/dev/null >/dev/null
find /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-smallbuffers/backports-6.6.15 -mindepth 1 -maxdepth 1 -not '(' -type f -and -name '.*' -and -size 0 ')' -and -not -name '.pkgdir'  -print0 | xargs -r -0 rm -rf
make[2]: Leaving directory '/home/user/realtek_openwrt/openwrt/package/kernel/mac80211'
time: package/kernel/mac80211/smallbuffers/compile#80.84#5.58#86.38
make[2]: Entering directory '/home/user/realtek_openwrt/openwrt/package/kernel/rtw8852cu'
touch /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/.prepared_7d7c742cc66f767cd55edddfb0d6ef22_18f1e190c5d53547fed41a3eaa76e9e9_check
. /home/user/realtek_openwrt/openwrt/include/shell.sh; zstdcat /home/user/realtek_openwrt/openwrt/dl/rtw8852cu-2024.04.28~d256c2ae.tar.zst | tar -C /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/.. -xf -
[ ! -d ./src/ ] || cp -fpR ./src/. /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae
touch /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/.prepared_7d7c742cc66f767cd55edddfb0d6ef22_18f1e190c5d53547fed41a3eaa76e9e9
rm -f /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/.configured_*
rm -f /home/user/realtek_openwrt/openwrt/staging_dir/target-x86_64_musl/stamp/.rtw8852cu_installed
(cd /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/./; if [ -x ./configure ]; then find /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/ -name config.guess | xargs -r chmod u+w; find /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/ -name config.guess | xargs -r -n1 cp --remove-destination /home/user/realtek_openwrt/openwrt/scripts/config.guess; find /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/ -name config.sub | xargs -r chmod u+w; find /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/ -name config.sub | xargs -r -n1 cp --remove-destination /home/user/realtek_openwrt/openwrt/scripts/config.sub; AR="x86_64-openwrt-linux-musl-gcc-ar" AS="x86_64-openwrt-linux-musl-gcc -c -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -ffile-prefix-map=/home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae=rtw8852cu-2024.04.28~d256c2ae -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro" LD="x86_64-openwrt-linux-musl-ld.bfd" NM="x86_64-openwrt-linux-musl-gcc-nm" CC="x86_64-openwrt-linux-musl-gcc" GCC="x86_64-openwrt-linux-musl-gcc" CXX="x86_64-openwrt-linux-musl-g++" RANLIB="x86_64-openwrt-linux-musl-gcc-ranlib" STRIP=x86_64-openwrt-linux-musl-strip OBJCOPY=x86_64-openwrt-linux-musl-objcopy OBJDUMP=x86_64-openwrt-linux-musl-objdump SIZE=x86_64-openwrt-linux-musl-size CFLAGS="-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -ffile-prefix-map=/home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae=rtw8852cu-2024.04.28~d256c2ae -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro " CXXFLAGS="-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -ffile-prefix-map=/home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae=rtw8852cu-2024.04.28~d256c2ae -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro " CPPFLAGS="-I/home/user/realtek_openwrt/openwrt/staging_dir/toolchain-x86_64_gcc-13.2.0_musl/usr/include -I/home/user/realtek_openwrt/openwrt/staging_dir/toolchain-x86_64_gcc-13.2.0_musl/include -I/home/user/realtek_openwrt/openwrt/staging_dir/toolchain-x86_64_gcc-13.2.0_musl/include/fortify " LDFLAGS="-L/home/user/realtek_openwrt/openwrt/staging_dir/toolchain-x86_64_gcc-13.2.0_musl/usr/lib -L/home/user/realtek_openwrt/openwrt/staging_dir/toolchain-x86_64_gcc-13.2.0_musl/lib -fuse-ld=bfd -znow -zrelro "   ./configure --target=x86_64-openwrt-linux --host=x86_64-openwrt-linux --build=x86_64-pc-linux-gnu --disable-dependency-tracking --program-prefix="" --program-suffix="" --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var --mandir=/usr/man --infodir=/usr/info --disable-nls  ; fi; )
touch /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/.configured_68b329da9893e34099c7d8ad5cb9c940
rm -f /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/.built
touch /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/.built_check
make -C "/home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.30" KCFLAGS="-ffile-prefix-map=/home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl=target-x86_64_musl -fno-caller-saves " HOSTCFLAGS="-O2 -I/home/user/realtek_openwrt/openwrt/staging_dir/host/include -I/home/user/realtek_openwrt/openwrt/staging_dir/hostpkg/include -I/home/user/realtek_openwrt/openwrt/staging_dir/target-x86_64_musl/host/include -Wall -Wmissing-prototypes -Wstrict-prototypes" CROSS_COMPILE="x86_64-openwrt-linux-musl-" ARCH="x86" KBUILD_HAVE_NLS=no KBUILD_BUILD_USER="builder" KBUILD_BUILD_HOST="buildhost" KBUILD_BUILD_TIMESTAMP="Sat May 25 18:36:32 2024" KBUILD_BUILD_VERSION="0" KBUILD_HOSTLDFLAGS="-L/home/user/realtek_openwrt/openwrt/staging_dir/host/lib" CONFIG_SHELL="bash" V=1  cmd_syscalls= KBUILD_EXTRA_SYMBOLS="/home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/symvers/gpio-button-hotplug.symvers /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/symvers/mac80211.symvers" CC="x86_64-openwrt-linux-musl-gcc" KERNELRELEASE=6.6.30 M="/home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae" EXTRA_CFLAGS="" modules
make[3]: Entering directory '/home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.30'
make --no-print-directory -C /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.30 \
-f /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.30/Makefile modules
make -f ./scripts/Makefile.build obj=/home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae need-builtin=1 need-modorder=1
# cmd_modules_order /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/modules.order
  {  :; } > /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/modules.order
bash ./scripts/modules-check.sh /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/modules.order
make -f ./scripts/Makefile.modpost
# MODPOST /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/Module.symvers
   scripts/mod/modpost -M        -o /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/Module.symvers -T /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/modules.order -i Module.symvers -e -i /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/symvers/gpio-button-hotplug.symvers -i /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/symvers/mac80211.symvers
make -f ./scripts/Makefile.modfinal
make[3]: Leaving directory '/home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.30'
for subdir in .; do realdir=$(readlink -f /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae); grep -F /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/$subdir/Module.symvers >> /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/Module.symvers.tmp; [ "/home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae" = "$realdir" ] || grep -F $realdir /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/$subdir/Module.symvers >> /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/Module.symvers.tmp; done; sort -u /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/Module.symvers.tmp > /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/Module.symvers; mkdir -p /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/symvers; mv /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/Module.symvers /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/symvers/rtw8852cu.symvers
touch /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/.built
rm -rf /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/.pkgdir/kmod-rtw8852cu.installed /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/.pkgdir/kmod-rtw8852cu
mkdir -p /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/.pkgdir/kmod-rtw8852cu
ERROR: module '/home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/rtw8852cu.ko' is missing.
make[2]: *** [Makefile:56: /home/user/realtek_openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/rtw8852cu-2024.04.28~d256c2ae/.pkgdir/kmod-rtw8852cu.installed] Error 1
make[2]: Leaving directory '/home/user/realtek_openwrt/openwrt/package/kernel/rtw8852cu'
time: package/kernel/rtw8852cu/compile#1.01#0.27#1.24
    ERROR: package/kernel/rtw8852cu failed to build.

the log is very long, tell me where to cut it, or what context to look for?

You are porting out of tree driver to openwrt, and the scripts you scraped from the web just do not build any kmod. Easiest is to wait for support to get upstreamed, harder is to compare your additions with other rt88 kmods.

... which might not happen, based on the morrownr link.

1 Like

basically this and modified mac80211 do not build in modern kernel, and significant programming effort is needed to port the module to modern kernel.

but why don't they build the kmod? where's the issue?
do you see anything in the logs? am I missing something? is the Makefile for the package faulty?

from all of the openwrt wiki/documentation/posts I read, if it builds on regular x86, it should be able to build and pack it in to a kmod.

I based the Makefile on other "out of tree" driver Makefiles (e.g. https://github.com/mirobiala/rtl88x2bu-cl) but I'm now stuck, don't even know where the problem is...

They include ancient mac80211 framework, you need to port driver at least to default mac80211, something that only realtek is likely to be able to do.

1 Like

there's a reason why RTL wireless is a no go zone ...

do you mean the drivers at https://github.com/lwfinger/rtw8852cu?
how can you tell from the logs that that's the issue?

The logs indicate you compile exactly nothing.

1 Like

well, seeing as https://github.com/mirobiala/rtl88x2bu-cl/blob/main/Makefile created a kmod that relies on https://github.com/RinCat/RTL88x2BU-Linux-Driver, in which (as far as I can understand) the realtek mac80211 code (or some of it) is older than what I'm trying do - I don't understand why.

from my point of view, I should fail in the process, see where the problems are, and try to fix them (if I can, with patches I copy/refer to from other similar modules).
right now, I see that nothing gets done, and there are no errors indicating what's going on.
I'd love some help with that.. even if we forget for a minute that it's a realtek wifi kernel module that I'm specifically trying to compile

Run their dkms commands with openwrt crosscompiler against openwrt kernel source. Currently YOUR Makefiles compile nothing.

if it works, why did you

it's not what the rtl88x2bu-cl github page tells you to do ?

by only compiling the kmod, you'll also run into the issue described in Using custom compiled 23.05.3

what I understand from that, is there's an issue in the Makefile. can you point me to it?