Conversation
|
Website deployed to CF Pages, 👀 preview link https://a382a4ff.balena-os.pages.dev |
7c4ad43 to
071a6bc
Compare
There was a problem hiding this comment.
I've a few remark regarding the tools to create the non essential file.
I'm also wondering if we couldn't use external tools to create a non essential firmware list and/or a essential firmware list, and just use those as explicit list of packages that should end up in our distro. Would that be possible? Would that simplify things a bit?
| ] | ||
| } | ||
|
|
||
| # Parse WHENCE files to obtain the list of firmware files |
There was a problem hiding this comment.
@acostach, can we add a comment about the whence_map that is returned? It would be overkill to extract even more function to make it more readable, but it would be great to have the bigger picture right ahead, and know what data format is returned.
There was a problem hiding this comment.
Sure, the whence map is a dictionary of drivers and their associated firmware files:
whence_map = {
"iwlwifi": [
"iwlwifi-9260-th-b0-jf-b0-34.ucode",
"iwlwifi-9260-th-b0-jf-b0-38.ucode",
...
],
"ath9k": [
"ar9271.fw",
"htc_9271.fw"
]
}
| d.appendVar('BAD_RECOMMENDATIONS', " " + bad_str) | ||
| bb.note(f"Policy applied: Excluded {len(extra_bad)} firmware packages.") | ||
| except Exception as e: | ||
| bb.fatal(f"Failed to enforce firmware exclusion policy: {str(e)}") |
There was a problem hiding this comment.
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.
@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
|
/rebase |
During linux-firmware recipe build a list of non-essential packages is created. After the rootfs is generated we compare that to the image manifest and fail the build if any of them made it into the image. These packages can be installed by adding them to the BALENA_ALLOWED_FIRMWARE_PACKAGES whitelist. Change-type: patch Signed-off-by: Alexandru Costache <alexandru@balena.io>
This extends the linux-firmware WHENCE and provides file paths for drivers which are not correctly specified in the upstream WHENCE, or not listed at all. Signed-off-by: Alexandru Costache <alexandru@balena.io>
We add a new class which maps all packages provided by the linux-firmware recipe to drivers and categories, and creates a list of packages which should be excluded from the final OS image. Mapping is performed by comparing the files shipped by packages to the WHENCE listing. Signed-off-by: Alexandru Costache <alexandru@balena.io>
…by default Signed-off-by: Alexandru Costache <alexandru@balena.io>
.. to check if any non BT firmware gets included in the package. The qca and btqca drivers handle Bluetooth only, and this helps us check if any device repository introduces connectivity firmware in it. Signed-off-by: Alexandru Costache <alexandru@balena.io>
…their sizes ... after compression is run. Some devices may disable compression in their board repository, if they run older kernels. Signed-off-by: Alexandru Costache <alexandru@balena.io>
We bring all the common firmware from the rest of the layers to the common layer, for easier management. Signed-off-by: Alexandru Costache <alexandru@balena.io>
Some firmware packages are used by M.2, or USB or Mini PCIE Wifi modules, so let's group them into such categories, so we can later remove them for device-types which don't have the required interfaces. For example, a RaspberryPi Zero has an USB port but no M.2 or PCIE connectors. Signed-off-by: Alexandru Costache <alexandru@balena.io>
…nstalled by meta-balena based on available hardware interfaces In this commit we dinamically update the linux-firmware packages installed by meta-balena for each device-type based on the hardware interfaces it supports. This assumes each device type defines a list of supported hardware interfaces at device integration repository level. Signed-off-by: Alexandru Costache <alexandru@balena.io>
… packages We add the linux-firmware packages installed by meta-balena and which are not supported by the device-type specific interfaces to the list of blacklisted packages, to ensure the final audit catches any packages which should not have been installed. Signed-off-by: Alexandru Costache <alexandru@balena.io>
|
For Pi4-64 the following packages are removed, because it lacks the required features (only has features_USB). Device-repository branch used: https://github.com/balena-os/balena-raspberrypi/tree/acostach/add_machine_features |
|
Following packges are removed from iot-gate-imx8. Device repository branch used: https://github.com/balena-os/balena-iot-gate-imx8 |
|
For RPI CM4 IO-BOARD, the following packages are removed, using the following branch: https://github.com/balena-os/balena-raspberrypi/tree/acostach/add_machine_features |
…plicable We no longer diferentiate by form factor for PCI devices, and thus include all PCI firmware where upstream sets "pci" in MACHINE_FEATURES. Signed-off-by: Alexandru Costache <alexandru@balena.io>
| linux-firmware-iwlwifi-7265 \ | ||
| linux-firmware-iwlwifi-8000c \ | ||
| linux-firmware-iwlwifi-8265 \ | ||
| linux-firmware-rtl8723 \ |
There was a problem hiding this comment.
TODO: Remove duplicates, must be a typo
…ound Signed-off-by: Alexandru Costache <alexandru@balena.io>
…isted in WHENCE This speeds up testing, because the issues can be extracted from the build outputs. Also, if the build passes, the manifest is made available for checking. Signed-off-by: Alexandru Costache <alexandru@balena.io>
Signed-off-by: Yann CARDAILLAC <yann.cardaillac@balena.io>
Contributor checklist
Change-typepresent on at least one commitSigned-off-byis presentReviewer Guidelines