-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve wired/wireless NICs support #2761
Conversation
Signed-off-by: Jiaxun Yang <[email protected]>
Signed-off-by: Jiaxun Yang <[email protected]>
Signed-off-by: Jiaxun Yang <[email protected]>
Signed-off-by: Jiaxun Yang <[email protected]>
Signed-off-by: Jiaxun Yang <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, in Home Assistant OS we so far have been enabling drivers on a as-needed basis. I am not against bulk enabling drivers, where it make sense. But we should avoid unnecessary kernel bloat to keep things clean as much as possible.
CONFIG_IWLMVM=m | ||
|
||
CONFIG_WLAN_VENDOR_REALTEK=y | ||
CONFIG_RTL_CARDS=m |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also required by some USB adapters, so I think this and the above should stay in here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@agners I think OVA included device-support.config
as well? Those are moved to device-support.config
.
CONFIG_RTL_CARDS=m | ||
CONFIG_RTL8723BE=y | ||
|
||
CONFIG_BCMA=m |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this driver can be used on non PCIe targets as well. Not sure if that is actually the case though.
CONFIG_BT_HCIBTUSB=m | ||
CONFIG_BT_HCIBTUSB_AUTOSUSPEND=y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure that this doesn't lead to problems?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debian is doing that for years, if it doesn't sound right I'll just remove this :-)
I was a little bit frustrated finding that either BCM4356 on my BarTrail mini-PC and a MediaTek USB wireless adaptar won't work with HAOS, so I spent my time on align HAOS NIC support with other Linux distros. I think NIC, as are essential device for HAOS to work, shouldn't give user any suprise on driver issues. After bulk enabling NIC drivers HAOS can reassure users like "if your ethernet card works on other distros, it will work for us as well". |
Hmm, ouch I just notified that I'm enabling some extra drivers that is not in kernel 6.1 yet. |
I'd prefer if you could list those elsewhere, so we can add them on next kernel update. |
related: #2776 Please, copy all firmware files for mediatek. |
I've created two builds to check the impact of this change: The kernel image size got about 500KiB smaller (from 14803808 bytes to 14803808 bytes, presumably because some drivers changed from built-in to modules). The compressed size of the rootfs squashfs changed from 228MB to 246MB, so a growth of 18MB. The rootfs partition where the rootfs squashfs is stored is 256MB (for A slot as well as B slot). Without re-partitioning we cannot grow beyond that. That means we have less than 10MB spare after this change, which is really making me a bit uncomfortable. 😰 |
@agners You can enable Right now it is disabled in HAOS:
|
That doesn't help much as the whole squashfs based rootfs is compressed already. |
CONFIG_DUMMY=m | ||
CONFIG_NET_FC=y | ||
CONFIG_NET_SB1000=m | ||
CONFIG_VMXNET3=m |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This driver is used on VMs only and already enabled in the ova kernel config.
CONFIG_VMXNET3=m |
CONFIG_PCI_HYPERV=y | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
CONFIG_PCI_HYPERV=y |
BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_22000=y | ||
BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_22260=y | ||
BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_3160=y | ||
BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_3168=y | ||
BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_3945=y | ||
BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_4965=y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the reason for removing those?
We should split up this PR a bit. The wired NIC support probably doesn't add as much as there is no additional firmware required typically. I am inclined to merge such a change, even when it enables things in bulk. However, on the wireless end we might need to filter out a bit more what is actively used. |
Yes that was something I'm trying to investigate in past weeks. The problem is, 6.1 LTS doesn't support some of very popular wireless NICs especially 11ax one. I was messing around linux-backport with buildroot bit that's probably too much hassle. |
While I prefer to use the LTS versions of the kernel, we did use non-LTS in the past for particular boards to get the latest versions of certain drivers. So before doing to much work on backports etc, probably moving to a regular stable kernel is the better approach. That said, this should be the third step 😄 Enabling what is available on 6.1 should be first. FYI, we intend to release a first 11.0.rc1 probably tomorrow. |
Preemptively enable larger set of WiFi drivers for all platforms and add more firmwares for them with the aim to harmonize WiFi device support among all boards and to have implicit support of devices that users might want to use. Targets `generic_aarch64`, `generic_x86_64` and `ova` also include options and firmwares for cards that are using PCI/PCIe bus - support for these is in a separate config fragment. Especially the `generic_x86_64` is currently very tight with the rootfs space, so I had to do some triaging and select only sensible drivers and firmwares - especially archaic PCMCIA devices or devices not supporting only 802.11g or lower standards were among the first that I removed during the triaging - we can consider enabling those but this time on an someone's explicit need to have them enabled. This closes #2815 and replaces large part of #2761, also potentially addresses (at least) these: #2806, #2783, #2841, #2776, #2725, #2600 ------------- * Remove WiFi options from generic and board kernel config fragments * Enable MMC in OVA kernel This is needed for SDIO drivers to work. Use the same options as we currently use for generic_x86_64. * Add CRYPTO_MICHAEL_MIC to the common kernel config This is requirement for TKIP and is a dependency of ATH11K driver. * Add kernel config fragments with wireless cards support * Add firmwares for WiFi cards * Enable more Bluetooth device drivers
Most of the aim of this PR has been addressed by the PR's linked. HAOS 11.3 will support many more WiFi devices as well as a couple more USB/PCIe network devices. If anything is still missing, please feel free to send a PR and enable the driver as required. |
Hi,
This PR enabled various USB/PCIe wired/wireless NICs in Kconifg and their firmware in buildroot config, so there will be no suprise on ethernet support for OS users.
All configs are derivived from debian's kernel config: https://salsa.debian.org/kernel-team/linux/-/blob/master/debian/config/config
Please review, thanks!