From a58c5926377ac245bb50f23ec4f7ed978f224c8c Mon Sep 17 00:00:00 2001 From: Dmitry Ilyin <6576495+widgetii@users.noreply.github.com> Date: Sun, 13 Sep 2026 13:20:06 +0300 Subject: [PATCH 1/2] hi3518ev300: one USB Wi-Fi stack, and drop the SCSI stack nothing can reach hi3518ev300_lite is 4KB over its 5120KB squashfs cap on master, so every pull request in the repository has a red build. The overflow itself is upstream drift -- majestic and majestic-webui are unpinned moving refs, and the two of them grew ~20KB between the 2026-09-11 and 2026-09-13 publishes, which is exactly the 16KB of headroom #2397 had bought. This buys headroom back by removing things the board ships but cannot use. THE IN-TREE 8188EU DRIVER WAS NEVER REACHABLE. /etc/wireless/usb's rtl8188eu-generic profile runs `modprobe 8188eu`; that module name belongs to the out-of-tree rtl8188eus-openipc package, which this board does not select. The in-tree staging module is called r8188eu and no profile modprobes it, there is no USB hotplug modprobe rule in mdev.conf, and S40network only ever dispatches on the `wlandev` U-Boot variable. So 431,588 B of .ko and the 15,262 B rtlwifi/rtl8188eufw.bin blob it requests shipped on every hi3518ev300 image with nothing able to load them. OpenIPC/builder had already worked this out camera-by-camera: both hi3518ev300 device profiles list r8188eu.ko in their per-device excludes, as do five hi3518ev200 ones. Of the two adapters the board carried, MT7601U is the one the tree standardises on -- its firmware is enabled on four times as many defconfigs, and every board carrying the 8188EU blob carries the MT7601U one too. 8188EU keeps a home in OpenIPC/builder, where a profile can select rtl8188eus-openipc and get the module the dispatch script has been naming all along. WIRELESS EXTENSIONS GO WITH IT, deliberately. R8188EU was the only enabled symbol selecting WIRELESS_EXT here, and CFG80211_WEXT cannot stand in -- it selects WEXT_CORE, while net_device.wireless_handlers is #ifdef CONFIG_WIRELESS_EXT. Nothing on these images needs it: - mt7601u is a mac80211 driver, and interfaces.d/wlan0 runs `wpa_supplicant -D nl80211,wext`, which tries nl80211 first; - the WebUI's Wi-Fi scan (cgi-bin/j/network.cgi) uses wpa_cli, with iwlist only as a fallback behind `command -v`; - rtl8188fu-openipc and rtl8189fs-openipc, which hi3518ev300_ultimate selects, are both compiled with -DCONFIG_IOCTL_CFG80211 in their active platform block, so they register a wiphy and keep working over nl80211. Both also guard .private on CONFIG_WEXT_PRIV and wireless_handlers on CONFIG_WIRELESS_EXT, so neither build breaks. What is lost is iwconfig/iwlist/iwpriv, which already did nothing for mt7601u because CFG80211_WEXT is off. This is #2404 in reverse: there R8188EU had to stay on hi3519v101 because out-of-tree drivers needed the wext ABI. SCSI. USB_STORAGE and USB_EHCI_HCD are both off, there is no ATA and no MMC block, and no module in the image depends on scsi_mod or sd_mod -- 184,916 B of .ko with no transport behind it. Same removal as #2399 for hi3518ev200. MEASURED, full clean rebuild of hi3518ev300_lite: before (master de5352647) rootfs.squashfs 5,246,976 B [5124KB/5120KB] 4KB OVER after rootfs.squashfs 5,025,792 B [4908KB/5120KB] 212KB free uImage 1,918,672 B [1873KB/2048KB] 175KB free, no kernel cost Verified in the built rootfs: r8188eu.ko, scsi_mod.ko, sd_mod.ko and rtlwifi/rtl8188eufw.bin are gone; mt7601u.ko, mac80211.ko (still its dep), mediatek/mt7601u.bin, wireguard.ko and camhi-motor.ko all still ship. The kernel config is shared by hi3518ev300_lite and _ultimate and by no other board, so this reaches those two and nothing else. NOT TESTED ON A CAMERA -- I have no hi3518ev300. Someone with the board should confirm an MT7601U dongle still associates, and that an 8188FU or 8189FS dongle on the ultimate still comes up now that it goes through nl80211 rather than wext. --- .../hi3516ev200/hi3518ev300.generic.config | 72 ++++++++----------- .../configs/hi3518ev300_lite_defconfig | 1 - .../configs/hi3518ev300_ultimate_defconfig | 1 - 3 files changed, 30 insertions(+), 44 deletions(-) diff --git a/br-ext-chip-hisilicon/board/hi3516ev200/hi3518ev300.generic.config b/br-ext-chip-hisilicon/board/hi3516ev200/hi3518ev300.generic.config index bdd17ea972..8d7474ecfe 100644 --- a/br-ext-chip-hisilicon/board/hi3516ev200/hi3518ev300.generic.config +++ b/br-ext-chip-hisilicon/board/hi3516ev200/hi3518ev300.generic.config @@ -806,10 +806,17 @@ CONFIG_BQL=y # CONFIG_AF_KCM is not set # CONFIG_STREAM_PARSER is not set CONFIG_WIRELESS=y -CONFIG_WIRELESS_EXT=y -CONFIG_WEXT_CORE=y -CONFIG_WEXT_PROC=y -CONFIG_WEXT_PRIV=y +# Wireless extensions went with R8188EU below, which was the only symbol here +# that selected WIRELESS_EXT. CFG80211_WEXT cannot stand in for it: it selects +# WEXT_CORE, while net_device.wireless_handlers is #ifdef CONFIG_WIRELESS_EXT. +# Nothing on these images needs it. mt7601u is a mac80211 driver and +# wpa_supplicant drives it over nl80211; the WebUI's Wi-Fi scan calls wpa_cli +# first and only falls back to iwlist behind a `command -v` guard; and the +# out-of-tree rtl8188fu/rtl8189fs the ultimate ships are compiled with +# -DCONFIG_IOCTL_CFG80211, so they register a wiphy and keep working. What goes +# is iwconfig/iwlist/iwpriv, which already did nothing for mt7601u because +# CFG80211_WEXT is off below. This is #2404 in reverse -- there R8188EU had to +# stay on hi3519v101 because out-of-tree drivers needed the wext ABI. CONFIG_CFG80211=y # CONFIG_NL80211_TESTMODE is not set # CONFIG_CFG80211_DEVELOPER_WARNINGS is not set @@ -1103,43 +1110,13 @@ CONFIG_BLK_DEV_RAM_SIZE=65536 # # SCSI device support # -CONFIG_SCSI_MOD=m +# Nothing on this SoC can reach a SCSI disk: USB_STORAGE and USB_EHCI_HCD are +# both off, there is no ATA and no MMC block, and no module in the image depends +# on scsi_mod or sd_mod. They shipped as 185KB of .ko that no code path could +# load. Same removal as #2399 made for hi3518ev200. +CONFIG_SCSI_MOD=y # CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=m -CONFIG_SCSI_DMA=y -CONFIG_SCSI_NETLINK=y -# CONFIG_SCSI_MQ_DEFAULT is not set -# CONFIG_SCSI_PROC_FS is not set - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -# CONFIG_CHR_DEV_SG is not set -# CONFIG_CHR_DEV_SCH is not set -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set -# CONFIG_SCSI_SCAN_ASYNC is not set - -# -# SCSI Transports -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set -# CONFIG_SCSI_SAS_LIBSAS is not set -# CONFIG_SCSI_SRP_ATTRS is not set -CONFIG_SCSI_LOWLEVEL=y -# CONFIG_ISCSI_TCP is not set -# CONFIG_ISCSI_BOOT_SYSFS is not set -# CONFIG_SCSI_UFSHCD is not set -# CONFIG_LIBFC is not set -# CONFIG_SCSI_DEBUG is not set -# CONFIG_SCSI_DH is not set +# CONFIG_SCSI is not set # CONFIG_SCSI_OSD_INITIATOR is not set # CONFIG_ATA is not set # CONFIG_MD is not set @@ -2048,8 +2025,19 @@ CONFIG_STAGING=y # CONFIG_COMEDI is not set # CONFIG_RTLLIB is not set # CONFIG_R8712U is not set -CONFIG_R8188EU=m -CONFIG_88EU_AP_MODE=y +# The in-tree staging driver was never reachable here. /etc/wireless/usb's +# rtl8188eu-generic profile runs `modprobe 8188eu`, which is the out-of-tree +# rtl8188eus-openipc module; nothing ever modprobes `r8188eu`, there is no USB +# hotplug modprobe rule, and S40network only dispatches on the `wlandev` U-Boot +# variable. So 431KB of .ko and the 15KB rtlwifi/rtl8188eufw.bin blob that feeds +# it shipped on every hi3518ev300 image with no path that could load them. +# MT7601U is the adapter this tree standardises on: its firmware is enabled on +# four times as many defconfigs, and every board that carries the 8188EU blob +# carries the MT7601U one too. So the SoC keeps one USB Wi-Fi stack, and an +# 8188EU dongle is served by an OpenIPC/builder camera profile selecting +# rtl8188eus-openipc -- which builds `8188eu`, the module the rtl8188eu-generic +# profile has been modprobing all along. +# CONFIG_R8188EU is not set # CONFIG_VT6656 is not set # diff --git a/br-ext-chip-hisilicon/configs/hi3518ev300_lite_defconfig b/br-ext-chip-hisilicon/configs/hi3518ev300_lite_defconfig index 1f9e1f0a87..4d2358bad9 100644 --- a/br-ext-chip-hisilicon/configs/hi3518ev300_lite_defconfig +++ b/br-ext-chip-hisilicon/configs/hi3518ev300_lite_defconfig @@ -60,7 +60,6 @@ BR2_PACKAGE_LIBEVENT_OPENIPC=y BR2_PACKAGE_LIBOGG_OPENIPC=y BR2_PACKAGE_LINUX_FIRMWARE_OPENIPC=y BR2_PACKAGE_LINUX_FIRMWARE_OPENIPC_MEDIATEK_MT7601U=y -BR2_PACKAGE_LINUX_FIRMWARE_OPENIPC_RTL_8188EU=y BR2_PACKAGE_MAJESTIC_WEBUI=y BR2_PACKAGE_MAJESTIC=y BR2_PACKAGE_MBEDTLS_OPENIPC=y diff --git a/br-ext-chip-hisilicon/configs/hi3518ev300_ultimate_defconfig b/br-ext-chip-hisilicon/configs/hi3518ev300_ultimate_defconfig index 15bc9dc1cc..abec911fdf 100644 --- a/br-ext-chip-hisilicon/configs/hi3518ev300_ultimate_defconfig +++ b/br-ext-chip-hisilicon/configs/hi3518ev300_ultimate_defconfig @@ -69,7 +69,6 @@ BR2_PACKAGE_LIBOGG_OPENIPC=y BR2_PACKAGE_LIBWEBSOCKETS_OPENIPC=y BR2_PACKAGE_LINUX_FIRMWARE_OPENIPC=y BR2_PACKAGE_LINUX_FIRMWARE_OPENIPC_MEDIATEK_MT7601U=y -BR2_PACKAGE_LINUX_FIRMWARE_OPENIPC_RTL_8188EU=y BR2_PACKAGE_AWS_WEBRTC=y BR2_PACKAGE_MAJESTIC_FONTS=y BR2_PACKAGE_MAJESTIC_WEBUI=y From e8f1e641ccc19b42aafeac0addbf3fd2621bf0f6 Mon Sep 17 00:00:00 2001 From: Dmitry Ilyin <6576495+widgetii@users.noreply.github.com> Date: Sun, 13 Sep 2026 13:36:38 +0300 Subject: [PATCH 2/2] hi3518ev300: correct the SCSI comment, which denied MMC support The board has CONFIG_MMC=y, CONFIG_MMC_BLOCK=y and CONFIG_MMC_SDHCI_HISI=y, and mmc_block is in modules.builtin, so "no MMC block" was simply wrong and would have read as "this SoC has no SD/eMMC support" to the next person. The removal it justifies is unaffected -- MMC_BLOCK serves cards as mmcblk and never goes through the SCSI layer, so SCSI still has no transport behind it. Comment only; kconfig strips comments, so the built artifacts are identical. --- .../board/hi3516ev200/hi3518ev300.generic.config | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/br-ext-chip-hisilicon/board/hi3516ev200/hi3518ev300.generic.config b/br-ext-chip-hisilicon/board/hi3516ev200/hi3518ev300.generic.config index 8d7474ecfe..8534433dca 100644 --- a/br-ext-chip-hisilicon/board/hi3516ev200/hi3518ev300.generic.config +++ b/br-ext-chip-hisilicon/board/hi3516ev200/hi3518ev300.generic.config @@ -1110,10 +1110,12 @@ CONFIG_BLK_DEV_RAM_SIZE=65536 # # SCSI device support # -# Nothing on this SoC can reach a SCSI disk: USB_STORAGE and USB_EHCI_HCD are -# both off, there is no ATA and no MMC block, and no module in the image depends -# on scsi_mod or sd_mod. They shipped as 185KB of .ko that no code path could -# load. Same removal as #2399 made for hi3518ev200. +# Nothing on this SoC can reach a SCSI disk. USB_STORAGE and USB_EHCI_HCD are +# both off and CONFIG_ATA is unset, so not one SCSI transport is built, and no +# module in the image depends on scsi_mod or sd_mod. The SD/eMMC controller +# further down is not a counter-example: MMC_BLOCK serves those cards as mmcblk, +# which never enters the SCSI layer. So this was 185KB of .ko that no code path +# could load. Same removal as #2399 made for hi3518ev200. CONFIG_SCSI_MOD=y # CONFIG_RAID_ATTRS is not set # CONFIG_SCSI is not set