-
Notifications
You must be signed in to change notification settings - Fork 126
[WIP] Add firmware exclusion class #3794
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
Draft
acostach
wants to merge
16
commits into
master
Choose a base branch
from
wip_firmware_exclusion
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 11 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
1ab5a28
classes/image-balena: Perform audit of installed linux-firmware packages
acostach 8397d38
meta-balena-common/recipes-kernel: Add a local WHENCE for linux-firmware
acostach e0d10cb
classes: Add non-essential firmware exclusion class
acostach 7185c8c
recipes-core/packagegroups: Separate and avoid including BT firmware …
acostach 07334af
recipes-kernel/linux-firmware: Override qca packaging
acostach 4d4ca35
classes/balena-firmware-exclusion: Create report of all packages and …
acostach 617a24e
recipes-core/packagegroups: Centralize shipped firmware
acostach f7c9e49
distro: Categorize linux-firmware by interfaces
acostach 43dc291
packagegroups/packagegroup-balena-connectivity: Filter connectivity i…
acostach 3253dac
classes/balena-firmware-exclusion: Add extra check for linux-firmware…
acostach 941a100
include/balena-os: Switch to using upstream MACHINE_FEATURES where ap…
acostach 64d641b
classes/image-balena: Don't fail build if non-essential firmware is f…
acostach ed0af9b
classes/balena-firmware-exclusion: Do not fail build package is not l…
acostach 9bb4778
initial sorting mechanism
ycardaillac 1b6dc0d
refacto
ycardaillac f8d5aae
fail at the first error
ycardaillac File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
586 changes: 586 additions & 0 deletions
586
meta-balena-common/classes/balena-firmware-exclusion.bbclass
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,6 +8,120 @@ DISTRO_NAME = "balenaOS" | |
| DISTRO_VERSION = "6.11.0" | ||
| HOSTOS_VERSION = "${DISTRO_VERSION}" | ||
|
|
||
| # This list of packages is common for all | ||
| # meta-balena-<yocto_release> layers | ||
| COMMON_CONNECTIVITY_FIRMWARES = " \ | ||
| linux-firmware-bcm43143 \ | ||
| linux-firmware-iwlwifi-135-6 \ | ||
| linux-firmware-iwlwifi-3160 \ | ||
| linux-firmware-iwlwifi-6000-4 \ | ||
| linux-firmware-iwlwifi-6000g2a-6 \ | ||
| linux-firmware-iwlwifi-6000g2b-6 \ | ||
| linux-firmware-iwlwifi-6050-5 \ | ||
| linux-firmware-iwlwifi-7260 \ | ||
| linux-firmware-iwlwifi-7265 \ | ||
| linux-firmware-iwlwifi-7265d \ | ||
| linux-firmware-iwlwifi-8000c \ | ||
| linux-firmware-iwlwifi-8265 \ | ||
| linux-firmware-rtl8188eu \ | ||
| linux-firmware-wl12xx \ | ||
| " | ||
|
|
||
| # This list is set by meta-balena-common | ||
| CORE_CONNECTIVITY_FIRMWARES = " \ | ||
| linux-firmware-ath9k \ | ||
| linux-firmware-mt7601u \ | ||
| linux-firmware-ralink \ | ||
| linux-firmware-rtl8192cu \ | ||
| linux-firmware-rtl8192su \ | ||
| linux-firmware-rtl8723 \ | ||
| ${COMMON_CONNECTIVITY_FIRMWARES} \ | ||
| " | ||
|
|
||
| # Firmware packages which are used by | ||
| # wifi modules with an M.2 interface | ||
| LINUX_FIRMWARE_PACKAGES[pci] ?= " \ | ||
| linux-firmware-iwlwifi-9260 \ | ||
| linux-firmware-iwlwifi-3160 \ | ||
| linux-firmware-iwlwifi-7260 \ | ||
| linux-firmware-iwlwifi-7265d \ | ||
| linux-firmware-iwlwifi-7265 \ | ||
| linux-firmware-iwlwifi-8000c \ | ||
| linux-firmware-iwlwifi-8265 \ | ||
| linux-firmware-rtl8723 \ | ||
| linux-firmware-iwlwifi-7260 \ | ||
| linux-firmware-iwlwifi-7265d \ | ||
| linux-firmware-iwlwifi-7265 \ | ||
| linux-firmware-iwlwifi-8000c \ | ||
| linux-firmware-iwlwifi-8265 \ | ||
| linux-firmware-rtl8723 \ | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TODO: Remove duplicates, must be a typo |
||
| " | ||
|
|
||
| # Firmware packages used by wifi modules | ||
| # that use SDIO or UART. The wifi chip | ||
| # usually comes soldered in this case. | ||
| LINUX_FIRMWARE_PACKAGES[sdio] ?= " \ | ||
| linux-firmware-iwlwifi-8265 \ | ||
| linux-firmware-rtl8723 \ | ||
| " | ||
|
|
||
| # Firmware packages for modules which use a | ||
| # Half MINI PCIE interface | ||
| LINUX_FIRMWARE_PACKAGES[pci] ?= " \ | ||
| linux-firmware-iwlwifi-6000-4 \ | ||
| linux-firmware-iwlwifi-6000g2a-6 \ | ||
| linux-firmware-iwlwifi-6000g2b-6 \ | ||
| linux-firmware-iwlwifi-6050-5 \ | ||
| linux-firmware-iwlwifi-7260 \ | ||
| linux-firmware-iwlwifi-135-6 \ | ||
| linux-firmware-rtl8723 \ | ||
| " | ||
|
|
||
| # Firmware packages for USB wifi dongles | ||
| LINUX_FIRMWARE_PACKAGES[usbhost] ?= " \ | ||
| linux-firmware-ath9k \ | ||
| linux-firmware-rtl8723 \ | ||
| linux-firmware-ralink \ | ||
| linux-firmware-bcm43143 \ | ||
| linux-firmware-rtl8192cu \ | ||
| linux-firmware-mt7601u \ | ||
| linux-firmware-rtl8188eu \ | ||
| " | ||
|
|
||
| # Firmware packages for PCIE Wifi adapters | ||
| LINUX_FIRMWARE_PACKAGES[pci] ?= " \ | ||
| linux-firmware-ath9k \ | ||
| " | ||
|
|
||
| # Firmware packages for mini PCIE Wifi adapters | ||
| LINUX_FIRMWARE_PACKAGES[pci] ?= " \ | ||
| linux-firmware-ath9k \ | ||
| linux-firmware-ralink \ | ||
| " | ||
|
|
||
| # Firmware packages used by the TI WiLink8 WL1835MOD / 1837MOD | ||
| # wifi chipsets. These are not detachable | ||
| # from the device, they are soldered. | ||
| # Commonly used by Beaglebone boards | ||
| LINUX_FIRMWARE_PACKAGES[features_TI_WiLink8] ?= " \ | ||
| linux-firmware-wl18xx \ | ||
| linux-firmware-wlcommon \ | ||
| " | ||
|
|
||
| # Firmware for TI wilink 6.0 / 7.0 - WL1271 / WL1273 | ||
| # wifi chipsets, used on the VAR-SOM-MX6 and BeagleXM | ||
| LINUX_FIRMWARE_PACKAGES[features_TI_WiLink_6_7] ?= " \ | ||
| linux-firmware-wl12xx \ | ||
| " | ||
|
|
||
| # Firmware for the Realtek RTL8192SU chipset, | ||
| # found in USB dongles. Has been discontinued | ||
| # since 2012 and can only be purchased from | ||
| # pulled parts. | ||
| LINUX_FIRMWARE_PACKAGES[rtl8192su] ?= " \ | ||
| linux-firmware-rtl8192su \ | ||
| " | ||
|
|
||
| # Allowed kernel cmdline arguments, used by balena-bootloader and the bootloader configuration scripts | ||
| ALLOWED_BOOTARGS_LIST=" \ | ||
| firmware_class.path=/var/lib/docker/volumes/extra-firmware/_data \ | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
meta-balena-common/recipes-kernel/linux-firmware/linux-firmware/extra_WHENCE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| -------------------------------------------------------------------------- | ||
|
|
||
| Driver: iwlwifi - Intel Wireless Wifi | ||
|
|
||
| File: iwlwifi-3160-12.ucode | ||
| File: iwlwifi-3160-7.ucode | ||
| File: iwlwifi-3160-8.ucode | ||
| File: iwlwifi-3160-9.ucode | ||
| File: iwlwifi-3160-10.ucode | ||
| File: iwlwifi-3160-12.ucode | ||
| File: iwlwifi-3160-13.ucode | ||
| File: iwlwifi-3160-16.ucode | ||
| File: iwlwifi-6000g2a-5.ucode | ||
| File: iwlwifi-6000g2b-5.ucode | ||
| File: iwlwifi-6050-4.ucode | ||
|
|
||
| -------------------------------------------------------------------------- | ||
|
|
||
| Driver: qcom_q6v5_pas - Qualcomm remoteproc firmware | ||
|
|
||
| File: qcom/LENOVO/21BX | ||
|
|
||
| -------------------------------------------------------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Can you confirm that this is making any firmware present in nonessential_firmware.txt, that would have ended up in the image, caught and added to BAD_RECOMMENDATIONS, and hence not installed?
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.
@ycardaillac adding files to BAD_RECOMMENDATIONS only removes packages from RRECOMENDS, packages installed through other methods still end up in the image, but they are included in the nonessential_firmware.txt and when the files in this file are found in the image manifest, the build fails.
The alternative would be adding them to PACKAGES_EXCLUDE, but that may trigger build failures which are reportedly more difficult to debug, so we compare the non-essential firmware list to the final manifest and report the packages which shouldn't have been installed, so we can either add them to the WHITELIST or find what installs them and do the removal