WS2812 integration

Greetings,

We added a WS2812 Led to a gateway device based on HLK-MT7628N. We searched for integration about it but we could not find many resources.

We came across a repo below, we are trying to compile it. But we get the following error during compilation.

Repository URL:

This repo contains many OpenWrt packages. The p44-ledchain project is a kernel module. When compiling it, we get an error like below.

❯ gmake package/p44-ledchain/compile V=s
gmake[2]: Entering directory '/home/halid/OpenWRT_Projects/openwrt/scripts/config'
gmake[2]: 'conf' is up to date.
gmake[2]: Leaving directory '/home/halid/OpenWRT_Projects/openwrt/scripts/config'
gmake[1]: Entering directory '/home/halid/OpenWRT_Projects/openwrt'
gmake[2]: Entering directory '/home/halid/OpenWRT_Projects/openwrt/package/p44-ledchain'
touch /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.prepared_c90cac3ff2219978a483dcf666608ccf_6664517399ebbbc92a37c5bb081b5c53_check
mkdir -p /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain
cp -fpR ./src/* /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/
touch /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.prepared_c90cac3ff2219978a483dcf666608ccf_6664517399ebbbc92a37c5bb081b5c53
rm -f /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.configured_*
rm -f /home/halid/OpenWRT_Projects/openwrt/staging_dir/target-mipsel_24kc_musl/stamp/.p44-ledchain_installed
(cd /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/./; if [ -x ./configure ]; then find /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/ -name config.guess | xargs -r chmod u+w; find /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/ -name config.guess | xargs -r -n1 cp --remove-destination /home/halid/OpenWRT_Projects/openwrt/scripts/config.guess; find /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/ -name config.sub | xargs -r chmod u+w; find /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/ -name config.sub | xargs -r -n1 cp --remove-destination /home/halid/OpenWRT_Projects/openwrt/scripts/config.sub; AR="mipsel-openwrt-linux-musl-gcc-ar" AS="mipsel-openwrt-linux-musl-gcc -c -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -fmacro-prefix-map=/home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain=p44-ledchain -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro" LD=mipsel-openwrt-linux-musl-ld NM="mipsel-openwrt-linux-musl-gcc-nm" CC="mipsel-openwrt-linux-musl-gcc" GCC="mipsel-openwrt-linux-musl-gcc" CXX="mipsel-openwrt-linux-musl-g++" RANLIB="mipsel-openwrt-linux-musl-gcc-ranlib" STRIP=mipsel-openwrt-linux-musl-strip OBJCOPY=mipsel-openwrt-linux-musl-objcopy OBJDUMP=mipsel-openwrt-linux-musl-objdump SIZE=mipsel-openwrt-linux-musl-size CFLAGS="-Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -fmacro-prefix-map=/home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain=p44-ledchain -mips16 -minterlink-mips16 -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro " CXXFLAGS="-Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -fmacro-prefix-map=/home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain=p44-ledchain -mips16 -minterlink-mips16 -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -mips16 -minterlink-mips16 " CPPFLAGS="-I/home/halid/OpenWRT_Projects/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/usr/include -I/home/halid/OpenWRT_Projects/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/include/fortify -I/home/halid/OpenWRT_Projects/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/include " LDFLAGS="-L/home/halid/OpenWRT_Projects/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/usr/lib -L/home/halid/OpenWRT_Projects/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/lib -znow -zrelro "   ./configure --target=mipsel-openwrt-linux --host=mipsel-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/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.configured_68b329da9893e34099c7d8ad5cb9c940
rm -f /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.built
touch /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.built_check
gmake -C "/home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/linux-5.15.134" ARCH="mips" CROSS_COMPILE="mipsel-openwrt-linux-musl-" SUBDIRS="/home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain" modules
gmake[3]: Entering directory '/home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/linux-5.15.134'
  SYSHDR  arch/mips/include/generated/uapi/asm/unistd_n32.h
  SYSHDR  arch/mips/include/generated/uapi/asm/unistd_n64.h
  SYSHDR  arch/mips/include/generated/uapi/asm/unistd_o32.h
  SYSTBL  arch/mips/include/generated/asm/syscall_table_n32.h
  SYSTBL  arch/mips/include/generated/asm/syscall_table_n64.h
  SYSTBL  arch/mips/include/generated/asm/syscall_table_o32.h
  SYSNR   arch/mips/include/generated/asm/unistd_nr_n32.h
  SYSNR   arch/mips/include/generated/asm/unistd_nr_n64.h
  SYSNR   arch/mips/include/generated/asm/unistd_nr_o32.h
  HOSTCC  scripts/basic/fixdep
  HOSTCC  arch/mips/tools/elf-entry
  HOSTCC  arch/mips/boot/tools/relocs_32.o
  HOSTCC  arch/mips/boot/tools/relocs_64.o
  HOSTCC  arch/mips/boot/tools/relocs_main.o
  HOSTLD  arch/mips/boot/tools/relocs
  HOSTCC  scripts/dtc/dtc.o
  HOSTCC  scripts/dtc/flattree.o
  HOSTCC  scripts/dtc/fstree.o
  HOSTCC  scripts/dtc/data.o
  HOSTCC  scripts/dtc/livetree.o
  HOSTCC  scripts/dtc/treesource.o
  HOSTCC  scripts/dtc/srcpos.o
  HOSTCC  scripts/dtc/checks.o
  HOSTCC  scripts/dtc/util.o
  HOSTCC  scripts/dtc/dtc-lexer.lex.o
  HOSTCC  scripts/dtc/dtc-parser.tab.o
  HOSTLD  scripts/dtc/dtc
  HOSTCC  scripts/dtc/libfdt/fdt.o
  HOSTCC  scripts/dtc/libfdt/fdt_ro.o
  HOSTCC  scripts/dtc/libfdt/fdt_wip.o
  HOSTCC  scripts/dtc/libfdt/fdt_sw.o
  HOSTCC  scripts/dtc/libfdt/fdt_rw.o
  HOSTCC  scripts/dtc/libfdt/fdt_strerror.o
  HOSTCC  scripts/dtc/libfdt/fdt_empty_tree.o
  HOSTCC  scripts/dtc/libfdt/fdt_addresses.o
  HOSTCC  scripts/dtc/libfdt/fdt_overlay.o
  HOSTCC  scripts/dtc/fdtoverlay.o
  HOSTLD  scripts/dtc/fdtoverlay
  HOSTCC  scripts/kallsyms
  HOSTCC  scripts/sorttable
  CC      scripts/mod/empty.o
  HOSTCC  scripts/mod/mk_elfconfig
  MKELF   scripts/mod/elfconfig.h
  HOSTCC  scripts/mod/modpost.o
  CC      scripts/mod/devicetable-offsets.s
  HOSTCC  scripts/mod/file2alias.o
  HOSTCC  scripts/mod/sumversion.o
  HOSTLD  scripts/mod/modpost
  CC      kernel/bounds.s
  CC      arch/mips/kernel/asm-offsets.s
  CALL    scripts/checksyscalls.sh
  CALL    scripts/atomic/check-atomics.sh
  CC [M]  fs/nls/nls_base.o
  CC [M]  crypto/seqiv.o
  CC [M]  crypto/acompress.o
  CC [M]  crypto/scompress.o
  LD [M]  crypto/crypto_acompress.o
  CC [M]  crypto/cmac.o
  CC [M]  crypto/hmac.o
  CC [M]  crypto/sha512_generic.o
  CC [M]  crypto/crc32c_generic.o
  CC [M]  crypto/lzo.o
  CC [M]  crypto/lzo-rle.o
  CC [M]  crypto/drbg.o
  CC [M]  crypto/jitterentropy.o
  CC [M]  crypto/jitterentropy-kcapi.o
  LD [M]  crypto/jitterentropy_rng.o
  CC [M]  drivers/net/ppp/ppp_generic.o
  CC [M]  drivers/net/ppp/ppp_async.o
  CC [M]  drivers/net/ppp/pppox.o
  CC [M]  drivers/net/ppp/pppoe.o
  CC [M]  drivers/net/slip/slhc.o
  CC [M]  drivers/net/usb/usbnet.o
  CC [M]  drivers/net/usb/qmi_wwan.o
  CC [M]  drivers/net/mii.o
  CC [M]  drivers/usb/common/common.o
  LD [M]  drivers/usb/common/usb-common.o
  CC [M]  drivers/usb/core/usb.o
  CC [M]  drivers/usb/core/hub.o
  CC [M]  drivers/usb/core/hcd.o
  CC [M]  drivers/usb/core/urb.o
  CC [M]  drivers/usb/core/message.o
  CC [M]  drivers/usb/core/driver.o
  CC [M]  drivers/usb/core/config.o
  CC [M]  drivers/usb/core/file.o
  CC [M]  drivers/usb/core/buffer.o
  CC [M]  drivers/usb/core/sysfs.o
  CC [M]  drivers/usb/core/endpoint.o
  CC [M]  drivers/usb/core/devio.o
  CC [M]  drivers/usb/core/notify.o
  CC [M]  drivers/usb/core/generic.o
  CC [M]  drivers/usb/core/quirks.o
  CC [M]  drivers/usb/core/devices.o
  CC [M]  drivers/usb/core/phy.o
  CC [M]  drivers/usb/core/port.o
  CC [M]  drivers/usb/core/of.o
  LD [M]  drivers/usb/core/usbcore.o
  CC [M]  drivers/usb/core/ledtrig-usbport.o
  CC [M]  drivers/usb/host/ehci-hcd.o
  CC [M]  drivers/usb/host/ehci-platform.o
  CC [M]  drivers/usb/host/ohci-hcd.o
  CC [M]  drivers/usb/host/ohci-platform.o
  CC [M]  drivers/usb/host/fsl-mph-dr-of.o
  CC [M]  drivers/usb/host/ehci-fsl.o
  CC [M]  drivers/usb/class/cdc-acm.o
  CC [M]  drivers/usb/class/cdc-wdm.o
  CC [M]  drivers/usb/serial/usb-serial.o
  CC [M]  drivers/usb/serial/generic.o
  CC [M]  drivers/usb/serial/bus.o
  LD [M]  drivers/usb/serial/usbserial.o
  CC [M]  drivers/usb/serial/option.o
  CC [M]  drivers/usb/serial/usb_wwan.o
  CC [M]  drivers/leds/leds-gpio.o
  CC [M]  net/netfilter/nfnetlink.o
  CC [M]  net/netfilter/nf_conntrack_core.o
  CC [M]  net/netfilter/nf_conntrack_standalone.o
  CC [M]  net/netfilter/nf_conntrack_expect.o
  CC [M]  net/netfilter/nf_conntrack_helper.o
  CC [M]  net/netfilter/nf_conntrack_proto.o
  CC [M]  net/netfilter/nf_conntrack_proto_generic.o
  CC [M]  net/netfilter/nf_conntrack_proto_tcp.o
  CC [M]  net/netfilter/nf_conntrack_proto_udp.o
  CC [M]  net/netfilter/nf_conntrack_proto_icmp.o
  CC [M]  net/netfilter/nf_conntrack_extend.o
  CC [M]  net/netfilter/nf_conntrack_acct.o
  CC [M]  net/netfilter/nf_conntrack_seqadj.o
  CC [M]  net/netfilter/nf_conntrack_proto_icmpv6.o
  LD [M]  net/netfilter/nf_conntrack.o
  CC [M]  net/netfilter/nf_log_syslog.o
  CC [M]  net/netfilter/nf_nat_core.o
  CC [M]  net/netfilter/nf_nat_proto.o
  CC [M]  net/netfilter/nf_nat_helper.o
  CC [M]  net/netfilter/nf_nat_redirect.o
  CC [M]  net/netfilter/nf_nat_masquerade.o
  LD [M]  net/netfilter/nf_nat.o
  CC [M]  net/netfilter/nf_tables_core.o
  CC [M]  net/netfilter/nf_tables_api.o
  CC [M]  net/netfilter/nft_chain_filter.o
  CC [M]  net/netfilter/nf_tables_trace.o
  CC [M]  net/netfilter/nft_immediate.o
  CC [M]  net/netfilter/nft_cmp.o
  CC [M]  net/netfilter/nft_range.o
  CC [M]  net/netfilter/nft_bitwise.o
  CC [M]  net/netfilter/nft_byteorder.o
  CC [M]  net/netfilter/nft_payload.o
  CC [M]  net/netfilter/nft_lookup.o
  CC [M]  net/netfilter/nft_dynset.o
  CC [M]  net/netfilter/nft_meta.o
  CC [M]  net/netfilter/nft_rt.o
  CC [M]  net/netfilter/nft_exthdr.o
  CC [M]  net/netfilter/nft_last.o
  CC [M]  net/netfilter/nft_chain_route.o
  CC [M]  net/netfilter/nf_tables_offload.o
  CC [M]  net/netfilter/nft_set_hash.o
  CC [M]  net/netfilter/nft_set_bitmap.o
  CC [M]  net/netfilter/nft_set_rbtree.o
  CC [M]  net/netfilter/nft_set_pipapo.o
  LD [M]  net/netfilter/nf_tables.o
  CC [M]  net/netfilter/nft_numgen.o
  CC [M]  net/netfilter/nft_ct.o
  CC [M]  net/netfilter/nft_flow_offload.o
  CC [M]  net/netfilter/nft_limit.o
  CC [M]  net/netfilter/nft_nat.o
  CC [M]  net/netfilter/nft_objref.o
  CC [M]  net/netfilter/nft_quota.o
  CC [M]  net/netfilter/nft_reject.o
  CC [M]  net/netfilter/nft_reject_inet.o
  CC [M]  net/netfilter/nft_counter.o
  CC [M]  net/netfilter/nft_log.o
  CC [M]  net/netfilter/nft_masq.o
  CC [M]  net/netfilter/nft_redir.o
  CC [M]  net/netfilter/nft_hash.o
  CC [M]  net/netfilter/nft_fib.o
  CC [M]  net/netfilter/nft_fib_inet.o
  CC [M]  net/netfilter/nft_chain_nat.o
  CC [M]  net/netfilter/nf_flow_table_core.o
  CC [M]  net/netfilter/nf_flow_table_ip.o
  CC [M]  net/netfilter/nf_flow_table_offload.o
  LD [M]  net/netfilter/nf_flow_table.o
  CC [M]  net/netfilter/nf_flow_table_inet.o
  CC [M]  net/ipv4/netfilter/nf_defrag_ipv4.o
  CC [M]  net/ipv4/netfilter/nf_reject_ipv4.o
  CC [M]  net/ipv4/netfilter/nft_reject_ipv4.o
  CC [M]  net/ipv4/netfilter/nft_fib_ipv4.o
  CC [M]  net/ipv4/netfilter/nf_flow_table_ipv4.o
  CC [M]  net/ipv6/netfilter/nf_defrag_ipv6_hooks.o
  CC [M]  net/ipv6/netfilter/nf_conntrack_reasm.o
  LD [M]  net/ipv6/netfilter/nf_defrag_ipv6.o
  CC [M]  net/ipv6/netfilter/nf_reject_ipv6.o
  CC [M]  net/ipv6/netfilter/nft_reject_ipv6.o
  CC [M]  net/ipv6/netfilter/nft_fib_ipv6.o
  CC [M]  net/ipv6/netfilter/nf_flow_table_ipv6.o
  CC [M]  lib/lzo/lzo1x_compress.o
  LD [M]  lib/lzo/lzo_compress.o
  CC [M]  lib/lzo/lzo1x_decompress_safe.o
  LD [M]  lib/lzo/lzo_decompress.o
  CC [M]  lib/crc-ccitt.o
  CC [M]  lib/libcrc32c.o
  LDS     scripts/module.lds
WARNING: Symbol version dump "vmlinux.symvers" is missing.
         Modules may not have dependencies or modversions.
         You may get many unresolved symbol warnings.
  MODPOST modules-only.symvers
WARNING: modpost: "memset" [lib/lzo/lzo_decompress.ko] undefined!
WARNING: modpost: "memset" [lib/lzo/lzo_compress.ko] undefined!
WARNING: modpost: "crypto_destroy_tfm" [lib/libcrc32c.ko] undefined!
WARNING: modpost: "crypto_alloc_shash" [lib/libcrc32c.ko] undefined!
WARNING: modpost: "__stack_chk_fail" [lib/libcrc32c.ko] undefined!
WARNING: modpost: "crypto_shash_update" [lib/libcrc32c.ko] undefined!
WARNING: modpost: "__stack_chk_guard" [lib/libcrc32c.ko] undefined!
WARNING: modpost: "skb_copy_bits" [net/ipv6/netfilter/nft_fib_ipv6.ko] undefined!
WARNING: modpost: "ip6_route_lookup" [net/ipv6/netfilter/nft_fib_ipv6.ko] undefined!
WARNING: modpost: "__stack_chk_fail" [net/ipv6/netfilter/nft_fib_ipv6.ko] undefined!
WARNING: modpost: suppressed 1622 unresolved symbol warnings because there were too many)
  CC [M]  crypto/cmac.mod.o
  LD [M]  crypto/cmac.ko
  CC [M]  crypto/crc32c_generic.mod.o
  LD [M]  crypto/crc32c_generic.ko
  CC [M]  crypto/crypto_acompress.mod.o
  LD [M]  crypto/crypto_acompress.ko
  CC [M]  crypto/drbg.mod.o
  LD [M]  crypto/drbg.ko
  CC [M]  crypto/hmac.mod.o
  LD [M]  crypto/hmac.ko
  CC [M]  crypto/jitterentropy_rng.mod.o
  LD [M]  crypto/jitterentropy_rng.ko
  CC [M]  crypto/lzo-rle.mod.o
  LD [M]  crypto/lzo-rle.ko
  CC [M]  crypto/lzo.mod.o
  LD [M]  crypto/lzo.ko
  CC [M]  crypto/seqiv.mod.o
  LD [M]  crypto/seqiv.ko
  CC [M]  crypto/sha512_generic.mod.o
  LD [M]  crypto/sha512_generic.ko
  CC [M]  drivers/leds/leds-gpio.mod.o
  LD [M]  drivers/leds/leds-gpio.ko
  CC [M]  drivers/net/mii.mod.o
  LD [M]  drivers/net/mii.ko
  CC [M]  drivers/net/ppp/ppp_async.mod.o
  LD [M]  drivers/net/ppp/ppp_async.ko
  CC [M]  drivers/net/ppp/ppp_generic.mod.o
  LD [M]  drivers/net/ppp/ppp_generic.ko
  CC [M]  drivers/net/ppp/pppoe.mod.o
  LD [M]  drivers/net/ppp/pppoe.ko
  CC [M]  drivers/net/ppp/pppox.mod.o
  LD [M]  drivers/net/ppp/pppox.ko
  CC [M]  drivers/net/slip/slhc.mod.o
  LD [M]  drivers/net/slip/slhc.ko
  CC [M]  drivers/net/usb/qmi_wwan.mod.o
  LD [M]  drivers/net/usb/qmi_wwan.ko
  CC [M]  drivers/net/usb/usbnet.mod.o
  LD [M]  drivers/net/usb/usbnet.ko
  CC [M]  drivers/usb/class/cdc-acm.mod.o
  LD [M]  drivers/usb/class/cdc-acm.ko
  CC [M]  drivers/usb/class/cdc-wdm.mod.o
  LD [M]  drivers/usb/class/cdc-wdm.ko
  CC [M]  drivers/usb/common/usb-common.mod.o
  LD [M]  drivers/usb/common/usb-common.ko
  CC [M]  drivers/usb/core/ledtrig-usbport.mod.o
  LD [M]  drivers/usb/core/ledtrig-usbport.ko
  CC [M]  drivers/usb/core/usbcore.mod.o
  LD [M]  drivers/usb/core/usbcore.ko
  CC [M]  drivers/usb/host/ehci-fsl.mod.o
  LD [M]  drivers/usb/host/ehci-fsl.ko
  CC [M]  drivers/usb/host/ehci-hcd.mod.o
  LD [M]  drivers/usb/host/ehci-hcd.ko
  CC [M]  drivers/usb/host/ehci-platform.mod.o
  LD [M]  drivers/usb/host/ehci-platform.ko
  CC [M]  drivers/usb/host/fsl-mph-dr-of.mod.o
  LD [M]  drivers/usb/host/fsl-mph-dr-of.ko
  CC [M]  drivers/usb/host/ohci-hcd.mod.o
  LD [M]  drivers/usb/host/ohci-hcd.ko
  CC [M]  drivers/usb/host/ohci-platform.mod.o
  LD [M]  drivers/usb/host/ohci-platform.ko
  CC [M]  drivers/usb/serial/option.mod.o
  LD [M]  drivers/usb/serial/option.ko
  CC [M]  drivers/usb/serial/usb_wwan.mod.o
  LD [M]  drivers/usb/serial/usb_wwan.ko
  CC [M]  drivers/usb/serial/usbserial.mod.o
  LD [M]  drivers/usb/serial/usbserial.ko
  CC [M]  fs/nls/nls_base.mod.o
  LD [M]  fs/nls/nls_base.ko
  CC [M]  lib/crc-ccitt.mod.o
  LD [M]  lib/crc-ccitt.ko
  CC [M]  lib/libcrc32c.mod.o
  LD [M]  lib/libcrc32c.ko
  CC [M]  lib/lzo/lzo_compress.mod.o
  LD [M]  lib/lzo/lzo_compress.ko
  CC [M]  lib/lzo/lzo_decompress.mod.o
  LD [M]  lib/lzo/lzo_decompress.ko
  CC [M]  net/ipv4/netfilter/nf_defrag_ipv4.mod.o
  LD [M]  net/ipv4/netfilter/nf_defrag_ipv4.ko
  CC [M]  net/ipv4/netfilter/nf_flow_table_ipv4.mod.o
  LD [M]  net/ipv4/netfilter/nf_flow_table_ipv4.ko
  CC [M]  net/ipv4/netfilter/nf_reject_ipv4.mod.o
  LD [M]  net/ipv4/netfilter/nf_reject_ipv4.ko
  CC [M]  net/ipv4/netfilter/nft_fib_ipv4.mod.o
  LD [M]  net/ipv4/netfilter/nft_fib_ipv4.ko
  CC [M]  net/ipv4/netfilter/nft_reject_ipv4.mod.o
  LD [M]  net/ipv4/netfilter/nft_reject_ipv4.ko
  CC [M]  net/ipv6/netfilter/nf_defrag_ipv6.mod.o
  LD [M]  net/ipv6/netfilter/nf_defrag_ipv6.ko
  CC [M]  net/ipv6/netfilter/nf_flow_table_ipv6.mod.o
  LD [M]  net/ipv6/netfilter/nf_flow_table_ipv6.ko
  CC [M]  net/ipv6/netfilter/nf_reject_ipv6.mod.o
  LD [M]  net/ipv6/netfilter/nf_reject_ipv6.ko
  CC [M]  net/ipv6/netfilter/nft_fib_ipv6.mod.o
  LD [M]  net/ipv6/netfilter/nft_fib_ipv6.ko
  CC [M]  net/ipv6/netfilter/nft_reject_ipv6.mod.o
  LD [M]  net/ipv6/netfilter/nft_reject_ipv6.ko
  CC [M]  net/netfilter/nf_conntrack.mod.o
  LD [M]  net/netfilter/nf_conntrack.ko
  CC [M]  net/netfilter/nf_flow_table.mod.o
  LD [M]  net/netfilter/nf_flow_table.ko
  CC [M]  net/netfilter/nf_flow_table_inet.mod.o
  LD [M]  net/netfilter/nf_flow_table_inet.ko
  CC [M]  net/netfilter/nf_log_syslog.mod.o
  LD [M]  net/netfilter/nf_log_syslog.ko
  CC [M]  net/netfilter/nf_nat.mod.o
  LD [M]  net/netfilter/nf_nat.ko
  CC [M]  net/netfilter/nf_tables.mod.o
  LD [M]  net/netfilter/nf_tables.ko
  CC [M]  net/netfilter/nfnetlink.mod.o
  LD [M]  net/netfilter/nfnetlink.ko
  CC [M]  net/netfilter/nft_chain_nat.mod.o
  LD [M]  net/netfilter/nft_chain_nat.ko
  CC [M]  net/netfilter/nft_counter.mod.o
  LD [M]  net/netfilter/nft_counter.ko
  CC [M]  net/netfilter/nft_ct.mod.o
  LD [M]  net/netfilter/nft_ct.ko
  CC [M]  net/netfilter/nft_fib.mod.o
  LD [M]  net/netfilter/nft_fib.ko
  CC [M]  net/netfilter/nft_fib_inet.mod.o
  LD [M]  net/netfilter/nft_fib_inet.ko
  CC [M]  net/netfilter/nft_flow_offload.mod.o
  LD [M]  net/netfilter/nft_flow_offload.ko
  CC [M]  net/netfilter/nft_hash.mod.o
  LD [M]  net/netfilter/nft_hash.ko
  CC [M]  net/netfilter/nft_limit.mod.o
  LD [M]  net/netfilter/nft_limit.ko
  CC [M]  net/netfilter/nft_log.mod.o
  LD [M]  net/netfilter/nft_log.ko
  CC [M]  net/netfilter/nft_masq.mod.o
  LD [M]  net/netfilter/nft_masq.ko
  CC [M]  net/netfilter/nft_nat.mod.o
  LD [M]  net/netfilter/nft_nat.ko
  CC [M]  net/netfilter/nft_numgen.mod.o
  LD [M]  net/netfilter/nft_numgen.ko
  CC [M]  net/netfilter/nft_objref.mod.o
  LD [M]  net/netfilter/nft_objref.ko
  CC [M]  net/netfilter/nft_quota.mod.o
  LD [M]  net/netfilter/nft_quota.ko
  CC [M]  net/netfilter/nft_redir.mod.o
  LD [M]  net/netfilter/nft_redir.ko
  CC [M]  net/netfilter/nft_reject.mod.o
  LD [M]  net/netfilter/nft_reject.ko
  CC [M]  net/netfilter/nft_reject_inet.mod.o
  LD [M]  net/netfilter/nft_reject_inet.ko
gmake[3]: Leaving directory '/home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/linux-5.15.134'
for subdir in .; do realdir=$(readlink -f /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain); grep -F /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/$subdir/Module.symvers >> /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/Module.symvers.tmp; [ "/home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain" = "$realdir" ] || grep -F $realdir /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/$subdir/Module.symvers >> /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/Module.symvers.tmp; done; sort -u /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/Module.symvers.tmp > /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/Module.symvers; mkdir -p /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/symvers; mv /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/Module.symvers /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/symvers/p44-ledchain.symvers
grep: /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/./Module.symvers: No such file or directory
touch /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.built
rm -rf /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.pkgdir/kmod-p44-ledchain.installed /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.pkgdir/kmod-p44-ledchain
mkdir -p /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.pkgdir/kmod-p44-ledchain
grep: /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/linux-5.15.134/modules.builtin: No such file or directory
ERROR: module '/home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/p44-ledchain.ko' is missing.
gmake[2]: *** [Makefile:61: /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.pkgdir/kmod-p44-ledchain.installed] Error 1
gmake[2]: Leaving directory '/home/halid/OpenWRT_Projects/openwrt/package/p44-ledchain'
time: package/p44-ledchain/compile#56.28#10.78#65.67
    ERROR: package/p44-ledchain failed to build.
gmake[1]: *** [package/Makefile:120: package/p44-ledchain/compile] Error 1
gmake[1]: Leaving directory '/home/halid/OpenWRT_Projects/openwrt'
gmake: *** [/home/halid/OpenWRT_Projects/openwrt/include/toplevel.mk:232: package/p44-ledchain/compile] Error 2

The developer of the package also tried to help on the issue below, but suggested I ask the forum.

Does anyone have any idea what I can do about this issue?

Please post output of

ubus call system board

Output of the command

{
	"kernel": "5.15.134",
	"hostname": "OpenWrt",
	"system": "MediaTek MT7628AN ver:1 eco:2",
	"model": "LoRaWAN Gateway v2.6",
	"board_name": "hilink,hlk-7628n",
	"rootfs_type": "squashfs",
	"release": {
		"distribution": "OpenWrt",
		"version": "23.05.0",
		"revision": "r23497-6637af95aa",
		"target": "ramips/mt76x8",
		"description": "OpenWrt 23.05.0 r23497-6637af95aa"
	}
}

Your module build fails because you change hardening flags between modules, best if you do whole build fresh. Also you have 3rd party nftables overlay, please document all these you got on top of openwrt.org sources (obviously unsupportable here)

Actually I did a zero build, only ARCH(mt7628n) is selected in the config file.

Other than that the mentioned package is included.

How can I fix this problem?

clearly in linked gh issue compiler flags were changed between 2 modules and kernel.

WARNING: modpost: "__stack_chk_fail" [lib/libcrc32c.ko] 

And there are C warnings that default to Werror in your new kmod you need to fix.

also if it is aarch MAC you need to make sure native toolset matches onevor other architecture, not a mix.