-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
kernel-firmware: use copy-firmware.sh #4329
Conversation
This could be considered for back porting. |
As commented on Slack the brcmfmac oatch and as a consequence also the WHENCE patch in this PR should be dropped and the brcmfmac nvram files should be moved to another patckage that can then be included by the projects that need/want it. This allows us to have a clean, patch free kernel-firmware package without having to worry about patch rebasing on bumps |
That sounds good. Can we merge this first, and handle that in a follow up PR? |
Is this PR that urgent? I'd rather avoid adding yet another patch that then needs to be removed in a subsequent PR. Remember: every patch added is bad :-) |
I'd view this PR as a bug fix. If we decide to bump |
Does this fix an urgent bug like some user reported breakage or a build breakage? If not there's no need to hurry and it's better to do it properly. Then we won't have to backport 2 PRs. |
OK. I don't have any plans to expand this PR beyond what it currently does. If you'd like to push commits to this PR you're most welcome. |
Sorry, don't have time to dig into this ATM. |
I now had a closer look at the brcmfmac firmware loader and the solution is quite easy: drop patches/kernel-firmware-02-add-brcmfmac-43xxx-configs.patch and also the WHENCE patch. The nvram files are board specific and included in the kernel firmware repo. The fallback to some non-board-specific nvram file won't work in general so there's not much point in adding these. See also this kernel commit: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=eae8e50669e15002b195177212a6e25afbe7cf4d |
That isn't how I understand the original problem, to be honest. This is the original forum post that led us to add the "generic" nvram files as the user has this nvram-related error on an x86_64 system:
Granted this is with 4.19.4 which pre-dates the board-specific commit (added 5.0-rc1) however based on the wording of the commit if we don't include The forum user subsequently confirms that the addition of At least, this is all my understanding of the kernel commit - yes, there's a generic nvram fallback but that will only work if a generic nvram file exists (which it doesn't, by default, hence the patch in this package). |
No, this isn't quite how this works. The reason why no brcmfmac nvram files were in the kernel firmware repo back then is that there's no generic nvram file that will work with all boards (as the file is board specific). This was subsequently fixed in the kernel and nvram files were added to the kernel firmware repo. Back then we had no possibility to add firmware files via .config/firmware, which has been added, too. So what we basically did is add a random nvram file, that worked for this one specific user, and it probably will fail for everyone else. The correct solution now is that if there's no firmware available from the kernel repo the user will have to extract his nvram file from the windows driver and put it into .config/firmware - or nag the vendor to submit it to the firmware repo. TL;DR: there's a reason why there are not fallback nvram files in the repo, and we shouldn't add them either |
OK, thanks for bearing with me. 😄 Patches dropped. |
Thanks! Can you squash the WHENCE patch commit and the brcmfmac drop commit? Then it should be good to go IMO |
Squashed. |
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.
thanks!
I've added an additional commit so that the original problem of non-existent firmware files does not go unnoticed in future. Now, the package will fail:
|
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.
brcm/brcmfmac43455-sdio
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.
;)
Since this commit, the symbolic links for latest Intel DSP firmware are no longer included in the repository, but will instead be created by running
copy-firmware.sh
(which processes theWHENCE
file).This PR avoids the following issue:
The
copy-firmware.sh
script does a good job, however it is dependent on theWHENCE
file being correct. For this reason we need to add theWHENCE
entries for the Broadcom nvram configuration files that are added as a patch (which is why the call tocopy-firmware.sh
takes place inpost_patch()
and notpost_unpack()
). I've left theWHENCE
change as a separate patch in case it needs updating in future.When comparing the contents of the latest
linux-firmware
(see #4327) against a directory created bycopy-firmware.sh
I didn't find any issues ie. no missing files that were of any significance - LICENCE files, NOTICE.txt, authentication signatures and other non-firmware files are not copied by the script, which might save a smidgen of space.