Building kmod-brcm-wl for -a supposedly- lantiq xrx200 SOC

Hi!

I've been reading about the broadcom wl module and I've found that it's only available for the BCM47xx platform, so far.

BUT!

I've got a router which has (at least to my knowledge) the lantiq xrx200 processor¹.

...and it was running a version of broadcom-wl when it was on stock firmware (from which i've got a backup). And which btw was based on Barrier Breaker (as noted in the opkg.conf file).

The router has a broadcom 43222 ² wireless card, which i cannot get to work either with b43, b43-legacy, nor brcmfmac or brcmsmac.

it reports the following to lspci:
00:0e.0 Network controller: Broadcom Inc. and subsidiaries Device a8d6

When I try to use bcm47xx's module on my router it responds:

root@OpenWRT:~# modprobe wl
invalid endianess: 1
failed to load the .modinfo section from /lib/modules/4.14.195/wl.ko
invalid endianess: 1
failed to load the .modinfo section from /lib/modules/4.14.195/wl_glue.ko

So. I've got many questions:

How to know precisely which SOC does it have?
is it possible that cat /proc/cpuinfo lies to me?
is it possible for cat /proc/cpuinfo to be biased?

Can I rebuild kmod-bcm-wl with the alternate 'endianess' (from le to BE, or all theway around) ?

How can I port the backed wl version of my router to the 4.14.195 kernel version in 19.7.4?
Is it possible to get the 4.195 kernel to use the older 2.6.32 module (which worked in stock firmware)?

¹

root@OpenWRT:~# cat /proc/cpuinfo 
system type		: xRX200 rev 1.2
machine			: ZyXEL P-2812HNU-F1
processor		: 0
cpu model		: MIPS 34Kc V5.6
BogoMIPS		: 332.54
wait instruction	: yes
microsecond timers	: yes
tlb_entries		: 16
extra interrupt vector	: yes
hardware watchpoint	: yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa			: mips1 mips2 mips32r1 mips32r2
ASEs implemented	: mips16 dsp mt
Options implemented	: tlb 4kex 4k_cache prefetch mcheck ejtag llsc dc_aliases userlocal vint perf_cntr_intr_bit nan_legacy nan_2008 perf
shadow register sets	: 1
kscratch registers	: 0
package			: 0
core			: 0
VPE			: 0
VCED exceptions		: not available
VCEI exceptions		: not available

processor		: 1
cpu model		: MIPS 34Kc V5.6
BogoMIPS		: 333.82
wait instruction	: yes
microsecond timers	: yes
tlb_entries		: 16
extra interrupt vector	: yes
hardware watchpoint	: yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa			: mips1 mips2 mips32r1 mips32r2
ASEs implemented	: mips16 dsp mt
Options implemented	: tlb 4kex 4k_cache prefetch mcheck ejtag llsc dc_aliases userlocal vint perf_cntr_intr_bit nan_legacy nan_2008 perf
shadow register sets	: 1
kscratch registers	: 0
package			: 0
core			: 0
VPE			: 1
VCED exceptions		: not available
VCEI exceptions		: not available

² I know it's listed as 'NOT TESTED' in [linux wireless], but I've got the proof of concept of it working on previously.
(http://linuxwireless.sipsolutions.net/en/users/Drivers/b43/#Device_firmware_installation)

Hi @tulainas ,
It definitely use lantiq VRX200 family SoC. Cpuinfo shows it's a ZyXEL P-2812HNU-F1, but this model has a Ralink radio. What exactly is the model written on the label?

Can you show the entire bootlog?

Hi, sure!

Here it is.

But I've got to say that I flashed it with openWRT's ZyXEL P-2812HNU-Fx firmware on purpose, since it was the most similar; hence my first three questions:

How to know precisely which SOC does it have?
is it possible that cat /proc/cpuinfo lies to me?
is it possible for cat /proc/cpuinfo to be biased?

Bootlog:

ROM VER: 1.1.4
CFG 06
NAND
NAND Read OK

U-Boot SPL 2013.10-openwrt5 (Nov 18 2014 - 19:54:01)
SPL: initializing NAND flash
SPL: checking U-Boot image
SPL: loading U-Boot to RAM
SPL: decompressing U-Boot with LZO
SPL: jumping to U-Boot


U-Boot 2013.10-openwrt5 (Nov 18 2014 - 19:54:01) P-2812HNU-Fx

Board: ZyXEL P-2812HNU-Fx
SoC:   Lantiq VRX288 v1.2
CPU:   500 MHz
IO:    250 MHz
BUS:   250 MHz
BOOT:  NAND
DRAM:  256 MiB
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   ltq-eth
Hit any key to stop autoboot:  0 

NAND read: device 0 offset 0x60000, size 0x300000
 3145728 bytes read: OK
## Booting kernel from Legacy Image at 80800000 ...
   Image Name:   MIPS OpenWrt Linux-4.14.195
   Created:      2020-09-06  16:19:39 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    2008615 Bytes = 1.9 MiB
   Load Address: 80002000
   Entry Point:  80002000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK

Starting kernel ...

[    0.000000] Linux version 4.14.195 (builder@buildhost) (gcc version 7.5.0 (OpenWrt GCC 7.5.0 r11208-ce6496d796)) #0 SMP Sun Sep 6 16:19:39 2020
[    0.000000] SoC: xRX200 rev 1.2
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019556 (MIPS 34Kc)
[    0.000000] MIPS: machine is ZyXEL P-2812HNU-F1
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Detected 1 available secondary CPU(s)
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] random: get_random_bytes called from 0x80634740 with crng_init=0
[    0.000000] percpu: Embedded 14 pages/cpu s25968 r8192 d23184 u57344
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyLTQ0,115200
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Writing ErrCtl register=000089a0
[    0.000000] Readback ErrCtl register=000089a0
[    0.000000] Memory: 121884K/131072K available (5225K kernel code, 198K rwdata, 912K rodata, 1264K init, 230K bss, 9188K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS: 256
[    0.000000] CPU Clock: 500MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041786 ns
[    0.000012] sched_clock: 32 bits at 250MHz, resolution 4ns, wraps every 8589934590ns
[    0.007909] Calibrating delay loop... 332.54 BogoMIPS (lpj=665088)
[    0.045991] pid_max: default: 32768 minimum: 301
[    0.050910] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.057423] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.066865] Hierarchical SRCU implementation.
[    0.072325] smp: Bringing up secondary CPUs ...
[    0.077773] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.077787] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.077940] CPU1 revision is: 00019556 (MIPS 34Kc)
[    0.108991] Synchronize counters for CPU 1: done.
[    0.133302] smp: Brought up 1 node, 2 CPUs
[    0.142380] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.152055] futex hash table entries: 512 (order: 2, 16384 bytes)
[    0.158308] pinctrl core: initialized pinctrl subsystem
[    0.165063] NET: Registered protocol family 16
[    0.181358] pinctrl-xway 1e100b10.pinmux: Init done
[    0.188046] dma-xway 1e104100.dma: Init done - hw rev: 7, ports: 7, channels: 28
[    0.200142] dcdc-xrx200 1f106a00.dcdc: Core Voltage : 1016 mV
[    0.208073] PCI host bridge /fpi@10000000/pci@e105400 ranges:
[    0.213776]  MEM 0x0000000018000000..0x0000000019ffffff
[    0.219041]   IO 0x000000001ae00000..0x000000001affffff
[    0.248472] gpio-stp-xway 1e100bb0.stp: Init done
[    0.255550] usbcore: registered new interface driver usbfs
[    0.261133] usbcore: registered new interface driver hub
[    0.266532] usbcore: registered new device driver usb
[    0.272205] PCI host bridge to bus 0000:00
[    0.276250] pci_bus 0000:00: root bus resource [mem 0x18000000-0x19ffffff]
[    0.283155] pci_bus 0000:00: root bus resource [io  0x1ae00000-0x1affffff]
[    0.290117] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.296946] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.305579] pci 0000:00:0e.0: BAR 0: assigned [mem 0x18000000-0x18003fff]
[    0.314619] clocksource: Switched to clocksource MIPS
[    0.322074] NET: Registered protocol family 2
[    0.327752] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.334642] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[    0.341074] TCP: Hash tables configured (established 1024 bind 1024)
[    0.347644] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.353443] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.360040] NET: Registered protocol family 1
[    0.365139] gptu: totally 6 16-bit timers/counters
[    0.370165] gptu: misc_register on minor 63
[    0.374316] gptu: succeeded to request irq 126
[    0.378821] gptu: succeeded to request irq 127
[    0.383309] gptu: succeeded to request irq 128
[    0.387853] gptu: succeeded to request irq 129
[    0.392337] gptu: succeeded to request irq 130
[    0.396872] gptu: succeeded to request irq 131
[    0.401542] No VPEs reserved for AP/SP, not initialize VPE loader
[    0.401542] Pass maxvpes=<n> argument as kernel argument
[    0.412918] No TCs reserved for AP/SP, not initializing RTLX.
[    0.412918] Pass maxtcs=<n> argument as kernel argument
[    0.425697] Crashlog allocated RAM at address 0x3f00000
[    0.431354] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    0.444261] random: fast init done
[    0.452058] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.457836] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.474843] io scheduler noop registered
[    0.478653] io scheduler deadline registered (default)
[    0.488318] 1e100c00.serial: ttyLTQ0 at MMIO 0x1e100c00 (irq = 112, base_baud = 0) is a lantiq,asc
[    0.497306] console [ttyLTQ0] enabled
[    0.497306] console [ttyLTQ0] enabled
[    0.504579] bootconsole [early0] disabled
[    0.504579] bootconsole [early0] disabled
[    0.516878] nand: device found, Manufacturer ID: 0xc2, Chip ID: 0xf1
[    0.521917] nand: Macronix MX30LF1GE8AB
[    0.525702] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    0.533266] Scanning device for bad blocks
[    0.568043] Bad eraseblock 298 at 0x000002540000
[    0.582434] Bad eraseblock 408 at 0x000003300000
[    0.608111] Bad eraseblock 627 at 0x000004e60000
[    0.636038] Bad eraseblock 868 at 0x000006c80000
[    0.640701] Bad eraseblock 883 at 0x000006e60000
[    0.650832] Bad eraseblock 951 at 0x0000076e0000
[    0.655198] Bad eraseblock 963 at 0x000007860000
[    0.664109] Bad eraseblock 1017 at 0x000007f20000
[    0.668060] 4 fixed-partitions partitions found on MTD device 10000000.nand
[    0.674363] Creating 4 MTD partitions on "10000000.nand":
[    0.679769] 0x000000000000-0x000000040000 : "uboot"
[    0.686200] 0x000000040000-0x000000060000 : "uboot-env"
[    0.691853] 0x000000060000-0x000000360000 : "kernel"
[    0.697105] 0x000000360000-0x000008000000 : "ubi"
[    0.707876] libphy: Fixed MDIO Bus: probed
[    0.715315] wdt 1f8803f0.watchdog: Init done
[    0.726274] NET: Registered protocol family 10
[    0.733142] Segment Routing with IPv6
[    0.735642] NET: Registered protocol family 17
[    0.739927] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    0.752821] 8021q: 802.1Q VLAN Support v1.8
[    0.867650] libphy: lantiq,xrx200-mdio: probed
[    0.947215] Intel XWAY PHY11G (PEF 7071/PEF 7072) v1.5 / v1.6 0:00: attached PHY driver [Intel XWAY PHY11G (PEF 7071/PEF 7072) v1.5 / v1.6] (mii_bus:phy_addr=0:00, irq=POLL)
[    1.031193] Intel XWAY PHY11G (PEF 7071/PEF 7072) v1.5 / v1.6 0:01: attached PHY driver [Intel XWAY PHY11G (PEF 7071/PEF 7072) v1.5 / v1.6] (mii_bus:phy_addr=0:01, irq=POLL)
[    1.115178] Intel XWAY PHY11G (xRX v1.2 integrated) 0:11: attached PHY driver [Intel XWAY PHY11G (xRX v1.2 integrated)] (mii_bus:phy_addr=0:11, irq=POLL)
[    1.199175] Intel XWAY PHY11G (xRX v1.2 integrated) 0:13: attached PHY driver [Intel XWAY PHY11G (xRX v1.2 integrated)] (mii_bus:phy_addr=0:13, irq=POLL)
[    1.283194] Intel XWAY PHY11G (PEF 7071/PEF 7072) v1.5 / v1.6 0:05: attached PHY driver [Intel XWAY PHY11G (PEF 7071/PEF 7072) v1.5 / v1.6] (mii_bus:phy_addr=0:05, irq=POLL)
[    1.300075] UBI: auto-attach mtd3
[    1.301966] ubi0: attaching mtd3
[    1.487854] ubi0: scanning is finished
[    1.504568] ubi0: attached mtd3 (name "ubi", size 124 MiB)
[    1.508684] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes
[    1.515535] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512
[    1.522218] ubi0: VID header offset: 512 (aligned 512), data offset: 2048
[    1.529014] ubi0: good PEBs: 989, bad PEBs: 8, corrupted PEBs: 0
[    1.535020] ubi0: user volume: 2, internal volumes: 1, max. volumes count: 128
[    1.542270] ubi0: max/mean erase counter: 10/5, WL threshold: 4096, image sequence number: 3774473769
[    1.551471] ubi0: available PEBs: 0, total reserved PEBs: 989, PEBs reserved for bad PEB handling: 12
[    1.560769] ubi0: background thread "ubi_bgt0d" started, PID 428
[    1.565907] block ubiblock0_0: created from ubi0:0(rootfs)
[    1.572284] ubiblock: device ubiblock0_0 (rootfs) set to be root filesystem
[    1.579568] USB_VBUS: [    1.589273] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[    1.599132] Freeing unused kernel memory: 1264K
[    1.602226] This architecture does not have kernel memory protection.
[    2.233208] init: Console is alive
[    2.235656] init: - watchdog -
[    3.277853] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    3.397229] dwc2 1e101000.usb: 1e101000.usb supply vusb_d not found, using dummy regulator
[    3.404243] dwc2 1e101000.usb: 1e101000.usb supply vusb_a not found, using dummy regulator
[    3.412813] dwc2 1e101000.usb: dwc2_core_reset() HANG! AHB Idle GRSTCTL=0
[    3.622953] dwc2 1e101000.usb: DWC OTG Controller
[    3.626304] dwc2 1e101000.usb: new USB bus registered, assigned bus number 1
[    3.633398] dwc2 1e101000.usb: irq 62, io mem 0x1e101000
[    3.640280] hub 1-0:1.0: USB hub found
[    3.642781] hub 1-0:1.0: 1 port detected
[    3.647937] dwc2 1e106000.usb: 1e106000.usb supply vusb_d not found, using dummy regulator
[    3.655005] dwc2 1e106000.usb: 1e106000.usb supply vusb_a not found, using dummy regulator
[    3.663508] dwc2 1e106000.usb: dwc2_core_reset() HANG! AHB Idle GRSTCTL=0
[    3.870807] dwc2 1e106000.usb: DWC OTG Controller
[    3.874116] dwc2 1e106000.usb: new USB bus registered, assigned bus number 2
[    3.881228] dwc2 1e106000.usb: irq 91, io mem 0x1e106000
[    3.888122] hub 2-0:1.0: USB hub found
[    3.890661] hub 2-0:1.0: 1 port detected
[    3.896624] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    3.908465] init: - preinit -
[    4.770355] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    4.800513] random: procd: uninitialized urandom read (4 bytes read)
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    8.039879] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" started, PID 503
[    8.093688] UBIFS (ubi0:1): recovery needed
[    8.239377] UBIFS (ubi0:1): recovery completed
[    8.242487] UBIFS (ubi0:1): UBIFS: mounted UBI device 0, volume 1, name "rootfs_data"
[    8.250256] UBIFS (ubi0:1): LEB size: 129024 bytes (126 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[    8.260171] UBIFS (ubi0:1): FS size: 120637440 bytes (115 MiB, 935 LEBs), journal size 6064128 bytes (5 MiB, 47 LEBs)
[    8.270783] UBIFS (ubi0:1): reserved for root: 4952683 bytes (4836 KiB)
[    8.277403] UBIFS (ubi0:1): media format: w4/r0 (latest is w5/r0), UUID 91A01E35-27FA-44A1-BDF0-EFF4C34C7189, small LPT model
[    8.293396] mount_root: loading kmods from internal overlay
[    8.381117] kmodloader: failed to open /tmp/overlay/upper/lib/modules/4.14.195/rt2800lib.ko
[    8.388711] kmodloader: failed to open /tmp/overlay/upper/lib/modules/4.14.195/rt2800mmio.ko
[    8.397493] kmodloader: failed to open /tmp/overlay/upper/lib/modules/4.14.195/rt2800pci.ko
[    8.405561] kmodloader: failed to open /tmp/overlay/upper/lib/modules/4.14.195/rt2x00lib.ko
[    8.413809] kmodloader: failed to open /tmp/overlay/upper/lib/modules/4.14.195/rt2x00mmio.ko
[    8.422443] kmodloader: failed to open /tmp/overlay/upper/lib/modules/4.14.195/rt2x00pci.ko
[    8.459523] kmodloader: invalid endianess: 1
[    8.462663] kmodloader: failed to load the .modinfo section from /tmp/overlay/upper/lib/modules/4.14.195/wl.ko
[    8.474315] kmodloader: invalid endianess: 1
[    8.477405] kmodloader: failed to load the .modinfo section from /tmp/overlay/upper/lib/modules/4.14.195/wl_glue.ko
[    8.511233] mount_root: failed to launch kmodloader from internal overlay
[    8.673787] block: attempting to load /tmp/ubifs_cfg/upper/etc/config/fstab
[    8.683480] block: extroot: device not present, retrying in 5 seconds
[   13.765380] block: extroot: cannot find device with UUID 8ea09fb4-7d75-427f-a9cf-8d7ac6760cb2
[   13.792301] mount_root: switching to ubifs overlay
[   13.834055] urandom-seed: Seeding with /etc/urandom.seed
[   13.988788] procd: - early -
[   13.990410] procd: - watchdog -
[   14.670790] procd: - watchdog -
[   14.673130] procd: - ubus -
[   14.785290] random: ubusd: uninitialized urandom read (4 bytes read)
[   14.793222] random: ubusd: uninitialized urandom read (4 bytes read)
[   14.798975] random: ubusd: uninitialized urandom read (4 bytes read)
[   14.806469] procd: - init -
Please press Enter to activate this console.
[   16.025235] kmodloader: invalid endianess: 1
[   16.028368] kmodloader: failed to load the .modinfo section from /lib/modules/4.14.195/wl.ko
[   16.037522] kmodloader: invalid endianess: 1
[   16.041016] kmodloader: failed to load the .modinfo section from /lib/modules/4.14.195/wl_glue.ko
[   16.293618] urngd: v1.0.2 started.
[   16.534938] random: crng init done
[   16.536906] random: 6 urandom warning(s) missed due to ratelimiting
[   28.876554] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   28.906054] device eth0 entered promiscuous mode
[   28.914005] br-lan: port 1(eth0.1) entered blocking state
[   28.918145] br-lan: port 1(eth0.1) entered disabled state
[   28.924093] device eth0.1 entered promiscuous mode
[   28.936966] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready



BusyBox v1.30.1 () built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 19.07.4, r11208-ce6496d796
 -----------------------------------------------------
root@OpenWRT_VRV9519:/# 

I've tried to copile the module, from:
Broadcom's site

But I always end up with the same compilation error (at first I thought it was because of being using Arch, but it also fails on Ubuntu):

[tulio@Tulainas hybrid-v35-nodebug-pcoem-6_30_223_271]$ make cross -j1 V=sc
KBUILD_NOPEDANTIC=1 make CROSS_COMPILE=/Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/staging_dir/toolchain-mips_24kc_gcc-7.5.0_musl -C /Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base/ M=`pwd`
make[1] : on entre dans le répertoire « /Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base »
make[2]: Entering directory '/Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base'
make[3]: Entering directory '/Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base'
make[3]: Leaving directory '/Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base'
WARNING: Makefile 'package/utils/busybox/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/busybox/Makefile' has a build dependency on 'libpam', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libgnutls', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libopenldap', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libidn2', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libssh2', which does not exist
WARNING: Makefile 'package/network/utils/iproute2/Makefile' has a dependency on 'libcap', which does not exist
WARNING: Makefile 'package/network/utils/iproute2/Makefile' has a dependency on 'libcap', which does not exist
WARNING: Makefile 'package/network/utils/iproute2/Makefile' has a dependency on 'libcap', which does not exist
WARNING: Makefile 'package/network/utils/iproute2/Makefile' has a dependency on 'libcap', which does not exist
WARNING: Makefile 'package/network/utils/iproute2/Makefile' has a dependency on 'libcap', which does not exist
WARNING: Makefile 'package/network/utils/iproute2/Makefile' has a dependency on 'libcap', which does not exist
WARNING: Makefile 'package/network/utils/iproute2/Makefile' has a dependency on 'libcap', which does not exist
WARNING: Makefile 'package/network/utils/iproute2/Makefile' has a dependency on 'libcap', which does not exist
WARNING: Makefile 'package/boot/kexec-tools/Makefile' has a dependency on 'liblzma', which does not exist
WARNING: Makefile 'package/network/services/lldpd/Makefile' has a dependency on 'libnetsnmp', which does not exist
WARNING: Makefile 'package/network/utils/nftables/Makefile' has a dependency on 'jansson', which does not exist
make[3]: Entering directory '/Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base'
make[3]: Leaving directory '/Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base'
make[2]: Leaving directory '/Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base'
make[2]: Entering directory '/Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base'
make[3]: Entering directory '/Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base'
+ mkdir -p /Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base/staging_dir/target-mips_24kc_musl
+ cd /Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base/staging_dir/target-mips_24kc_musl
+ mkdir -p bin lib include stamp
mkdir -p /Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base/build_dir/target-mips_24kc_musl/stamp
touch /Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base/staging_dir/target-mips_24kc_musl/.prepared
+ mkdir -p /Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base/staging_dir/host
+ cd /Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base/staging_dir/host
+ mkdir -p bin lib include stamp
mkdir -p /Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base/build_dir/host/stamp /Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base/staging_dir/host/include/sys
install -m0644 /Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base/tools/include/*.h /Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base/staging_dir/host/include/
install -m0644 /Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base/tools/include/sys/*.h /Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base/staging_dir/host/include/sys/
ln -sf lib /Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base/staging_dir/host/lib64
touch /Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base/staging_dir/host/.prepared
make[4]: Entering directory '/Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base/tools/flock'
make[4]: Leaving directory '/Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base/tools/flock'
time: tools/flock/compile#0.04#0.07#0.27
make[4]: Entering directory '/Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base/tools/xz'
CFLAGS="-O2 -I/Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base/staging_dir/host/include " CPPFLAGS="-I/Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base/staging_dir/host/include " CXXFLAGS="" LDFLAGS="-L/Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base/staging_dir/host/lib " make  -C /Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base/build_dir/host/xz-5.2.4  
make[5]: Entering directory '/Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base/build_dir/host/xz-5.2.4'
CDPATH="${ZSH_VERSION+.}:" && cd . && /usr/bin/env bash /Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base/build_dir/host/xz-5.2.4/build-aux/missing aclocal-1.15 -I m4
/Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base/build_dir/host/xz-5.2.4/build-aux/missing: line 81: aclocal-1.15: command not found
WARNING: 'aclocal-1.15' is missing on your system.
         You should only need it if you modified 'acinclude.m4' or
         'configure.ac' or m4 files included by 'configure.ac'.
         The 'aclocal' program is part of the GNU Automake package:
         <http://www.gnu.org/software/automake>
         It also requires GNU Autoconf, GNU m4 and Perl in order to run:
         <http://www.gnu.org/software/autoconf>
         <http://www.gnu.org/software/m4/>
         <http://www.perl.org/>
make[5]: *** [Makefile:514: aclocal.m4] Error 127
make[5]: Leaving directory '/Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base/build_dir/host/xz-5.2.4'
make[4]: *** [Makefile:36: /Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base/build_dir/host/xz-5.2.4/.built] Error 2
make[4]: Leaving directory '/Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base/tools/xz'
time: tools/xz/compile#0.06#0.07#0.37
make[3]: *** [tools/Makefile:159: tools/xz/compile] Error 2
make[3]: Leaving directory '/Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base'
make[2]: *** [tools/Makefile:155: /Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base/staging_dir/target-mips_24kc_musl/stamp/.tools_compile_yynyynnyyynyyyyynyynnyyyynyyyyyyyyyyyyyyynyynynnyyynnyyy] Error 2
make[2]: Leaving directory '/Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base'
make[1]: *** [/Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base/include/toplevel.mk:227 : world] Erreur 2
make[1] : on quitte le répertoire « /Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base »
make: *** [Makefile:162 : cross] Erreur 2

Here's the Makefile's final lines filled with openWRT's Lantiq SDK path:

# Cross compile setup.  Tool chain and kernel tree, replace with your own.
CROSS_TOOLS        = /Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/staging_dir/toolchain-mips_24kc_gcc-7.5.0_musl

CROSS_KBUILD_DIR   = /Storage/Workshop/OpenWRT/Lantiq/openwrt-sdk-19.07.4-lantiq-xrx200_gcc-7.5.0_musl.Linux-x86_64/feeds/base/

all:
	KBUILD_NOPEDANTIC=1 make -C $(KBUILD_DIR) M=`pwd`

cross:
	KBUILD_NOPEDANTIC=1 make CROSS_COMPILE=${CROSS_TOOLS} -C $(CROSS_KBUILD_DIR) M=`pwd`

clean:
	KBUILD_NOPEDANTIC=1 make -C $(KBUILD_DIR) M=`pwd` clean

install:
	install -D -m 755 wl.ko $(MDEST_DIR)

What am I doing wrong?

And, i've got to say: aclocal is installed in version 1.16.

[tulio@Tulainas ~]$ aclocal --version
aclocal (GNU automake) 1.16.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv2+: GNU GPL version 2 or later <https://gnu.org/licenses/gpl-2.0.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Tom Tromey <tromey@redhat.com>
       and Alexandre Duret-Lutz <adl@gnu.org>.