{ "task": "the-mainline-shell-reaches-parity 6.1 (build the RTL8189FTV module against the mainline kernel)", "evidence_class": "actual-host-cross-compiled-riscv-ko-attempt-complete-source-port-modpost-blocked-on-headers-only-dev-tree", "started_utc": "2026-10-06T15:00:00Z", "completed_utc": "2026-10-06T15:45:00Z", "note": "First pass (summarized below under previous_attempt). This file now records the cfg80211_ops-port follow-up: same pinned driver source, same dev tree, no board/ttyACM0/build-lock access, no nix kernel/system build, no credential of any kind.", "previous_attempt": { "objects_compiled_ok": 51, "objects_failed": 6, "failed_objects": [ "hal/hal_com.o", "hal/hal_com_phycfg.o", "os_dep/linux/ioctl_cfg80211.o", "os_dep/linux/ioctl_linux.o", "os_dep/linux/os_intfs.o", "os_dep/linux/rtw_cfgvendor.o" ], "blocker": "CONFIG_CFG80211 not set in this dev tree's .config (struct net_device's ieee80211_ptr guarded by #if IS_ENABLED(CONFIG_CFG80211)), plus ~13 cfg80211_ops callback signature mismatches in os_dep/linux/ioctl_cfg80211.c against mainline's net/cfg80211.h at this pin. Both documented and left unattempted per this task's own 'stop and document if it needs deeper rework' instruction." }, "follow_up": { "driver_source": { "owner": "jwrdegoede", "repo": "rtl8189ES_linux", "rev": "94cc959d56c1425fbca4f6e49e949cf58ec5dc8d", "fetched_via": "git clone --depth 1, twice independently (network; matches nix/k230-wifi-driver.nix's fetchFromGitHub owner/repo/rev exactly; public unauthenticated GitHub clone, not a board or build-lock resource)" }, "mainline_reference_source": "/nix/store/79yd40jv8h4x866bm1vyw94cm948grax-linux-mainline-k230-init-exec-transition-src (read-only; include/net/cfg80211.h and net/wireless/*.c/rdev-ops.h read directly for exact current callback signatures and cookie-ownership semantics; never built or executed)", "patch_applied": { "path": "nix/patches/mainline/rtl8189fs-mainline-v7.3-rc5.patch", "sha256": "f11cb1e1c9cc596adceab0ad4b01ec286074940b2a44b0ba1aa5871b2f88e3bb", "regenerated_as": "a single combined patch (git diff against the pristine pinned rev) replacing the previous attempt's patch file in place -- still one patch file, now covering both the original 4 drift-class fixes and this follow-up's cfg80211_ops port + strncpy closures", "applies_cleanly_with": "patch -p1, verified against a second, fully independent fresh clone of the same pinned rev (separate from the clone the patch was authored against)", "cfg80211_ops_callbacks_ported": [ { "shape": "net_device* -> wireless_dev* parameter, body re-pointed via a new local `struct net_device *ndev = wdev->netdev;`", "callbacks": ["add_key", "get_key", "del_key", "set_default_mgmt_key", "get_station", "add_station", "del_station", "change_station", "dump_station"], "also_fixed_call_sites": ["cfg80211_new_sta() in rtw_cfg80211_indicate_sta_assoc()", "cfg80211_del_sta() in rtw_cfg80211_indicate_sta_disassoc()", "cfg80211_new_sta() in cfg80211_rtw_add_station()'s mesh branch"] }, { "shape": "new parameter added (multi-radio wiphy support), no pointer-type change; all three bodies are pre-existing #if 0 stubs that never read the new parameter", "callbacks": ["set_wiphy_params (+int radio_idx)", "set_tx_power (+int radio_idx)", "get_tx_power (+int radio_idx, unsigned int link_id)"] }, { "shape": "u64 *cookie (driver-generated out-param) -> u64 cookie (cfg80211-generated in-param); confirmed via net/wireless/nl80211.c's nl80211_tx_mgmt() calling cfg80211_assign_cookie() itself before invoking the driver", "callbacks": ["remain_on_channel (also gained trailing const u8 *rx_addr, unused by this driver)", "mgmt_tx"], "note": "driver's own cookie-generation lines deleted (ro_ch_cookie_gen / mgmt_tx_cookie counters left in their structs but no longer read); every remaining *cookie read replaced with cookie" } ], "callbacks_confirmed_already_correct_no_change": [ "update_mgmt_frame_registrations (cfg80211_rtw_mgmt_frame_register already used wireless_dev*/mgmt_frame_regs* in its >=5.8.0 branch)", "add_virtual_intf", "del_virtual_intf", "change_virtual_intf" ], "callbacks_confirmed_unchanged_left_alone": [ "set_default_key", "connect", "disconnect", "join_ibss", "leave_ibss", "set_power_mgmt", "set_pmksa", "del_pmksa", "flush_pmksa", "change_bss", "set_txq_params", "set_monitor_channel", "get_mesh_config", "update_mesh_config", "join_mesh", "leave_mesh", "add_mpath", "del_mpath", "change_mpath", "get_mpath", "dump_mpath", "get_mpp", "dump_mpp", "update_ft_ies", "tdls_oper", "sched_scan_start", "sched_scan_stop" ], "strncpy_to_strscpy_sites_closed": { "count": 11, "files": { "hal/hal_com.c": 1, "hal/hal_com_phycfg.c": 3, "hal/hal_hci/hal_sdio.c": 2, "hal/phydm/phydm_debug.c": 1, "os_dep/linux/ioctl_cfg80211.c": 2, "os_dep/linux/ioctl_linux.c": 2 }, "deliberately_left_untouched": { "hal/phydm/phydm_debug.c": "1 site inside #if 0 dead code", "os_dep/linux/rtw_cfgvendor.c": "2 sites behind #ifdef CONFIG_RTW_CFGVENDOR_WIFI_LOGGER, not defined by this Kconfig", "core/rtw_debug.c": "8 sites; file not compiled into this module at all under this config (absent from CC [M] log)", "core/rtw_wlan_util.c": "1 site; file not compiled into this module at all under this config (absent from CC [M] log)" }, "rationale": "task instruction: close strncpy sites only where they are errors (not warnings); files/sites confirmed neither compiled nor reachable were left alone rather than touched speculatively" } }, "compile_verification": [ { "method": "private scratch copy of this task's own dev tree, made writable", "dev_tree_original": "/nix/store/yz7s78rqdx216bk2kj27q8d9qsi2dap4-linux-riscv64-unknown-linux-gnu-7.3.0-rc5-dev (read-only; copied via cp -a to a writable /tmp location, 569M)", "config_change": "CONFIG_CFG80211=m added directly to the scratch copy's .config and `#define CONFIG_CFG80211_MODULE 1` added to include/generated/autoconf.h", "gotcha_found_and_fixed": "the dev tree's lib/modules//build/Makefile is a 5-line auto-generated wrapper that hardcodes absolute paths (KBUILD_OUTPUT, an `include` line) back to the ORIGINAL read-only nix store path; cp -a preserves this unedited, so edits to the scratch copy's own autoconf.h/.config were silently ignored until this wrapper file's paths were sed-rewritten to point at the scratch copy itself (and its nested build/source symlink, which kbuild itself rewrites on each invocation, was restored to point at the scratch copy's own source/ directory)", "command": [ "make", "-k", "-j4", "KSRC=/lib/modules/7.3.0-rc5/build", "ARCH=riscv", "CROSS_COMPILE=/bin/riscv64-unknown-linux-gnu-" ], "result": "0 compile errors; LD [M] 8189fs.o succeeds (5063760-byte ELF 64-bit LSB relocatable, RISC-V, not stripped); MODPOST fails with 10 shown + 18 suppressed 'undefined!' errors for genuine cfg80211/net-wireless exports, because this scratch dev tree never built net/wireless/cfg80211.ko and its Module.symvers has no real cfg80211 symbols to resolve against -- expected and inherent to this verification method, not a defect in the port" }, { "method": "second, fully independent fresh clone of the pinned driver rev with the final regenerated patch applied by patch -p1 (not the clone the patch was authored against)", "command": "identical to above, same scratch dev tree, `make clean` run first", "result": "identical: 0 compile errors, 131 CC [M] invocations in a full from-clean rebuild, 560 warnings (all pre-existing classes: -Wmissing-prototypes, -Waddress on fixed-size-array-decay comparisons, etc. -- no new warning class introduced), same MODPOST unresolved-symbol-only failure" } ], "modpost_unresolved_symbols_shown": [ "__cfg80211_alloc_event_skb", "wiphy_register", "cfg80211_remain_on_channel_expired", "cfg80211_vendor_cmd_reply", "cfg80211_del_sta_sinfo", "wiphy_unregister", "cfg80211_ch_switch_notify", "ieee80211_get_channel_khz", "cfg80211_ready_on_channel", "__cfg80211_get_bss" ], "modpost_unresolved_symbols_suppressed_count": 18, "returncode": 2, "returncode_meaning": "modpost failure only (unresolved real cfg80211 symbols against a headers-only dev tree); 0 compiler errors in either verification run", "authoritative_check_pending": "The coordinator's parallel kernel build at ~/tmp/k230-parity-build4/ (building kernelMainlineDrm and a plain mainline kernel with CFG80211=m live) is the authoritative check this task calls for -- it was still building vmlinux as of this evidence file's last update and had not yet produced a -dev result symlink. This file should be updated with that build's actual module-link result (ideally a clean 8189fs.ko with zero modpost errors) once available; until then, the real-kernel link result remains UNVERIFIED, though the source-level port against mainline's actual header declarations is proven by the two independent 0-compile-error runs above." }, "scope": "Completes the cfg80211_ops port and the error-causing strncpy closures the previous attempt stopped short of, proves both with two independent reproducible full rebuilds (0 compile errors, full module object linked), and narrows the one remaining gap to a single, well-identified, already-in-progress item: a kernel actually built with CONFIG_CFG80211=m so modpost has real cfg80211 symbols to resolve against. Does NOT itself run `nix build .#k230-wifi-driver-mainline` or exercise any board hardware; does NOT claim the authoritative new-dev-tree check (still running at evidence-file time) has completed." }