For better or worse some distributions cannot have the firmware
de-duplication happen automatically.
In addition, when it was introduced it changed the default behaviour
leaving people with no firmware in their systems.
Revert to the original behaviour: in the worst case, people will have a
few MB extra of duplicate firmware, yet their systems will continue to
work.
To make things stand out, we print a message at the end of install so
that everyone can opt-in as needed.
In addition, I've went ahead and opened tentative MR/PR with Alpine,
Arch, CentOS Stream, Debian, Gentoo, informing them of this change.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
A handful of in-tree scripts must have the execute bit, as well as all
directories. Everything else should not.
In the past we had multiple commits adding and removing execute bit(s),
so instead we can check before things get in-tree.
With all the firmware files updated to drop the bit (as of last commit),
we can add some tests to enforce it going forward.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Remove the dummy and unused configure file. Glancing across distributions (Alpine, Arch,
Fedora, CentOS Stream, Gentoo, Debian, Ubuntu) - they don't use it.
It's not mentioned in our README either, so let's just remove it.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
This patch adds the firmware files for the Cirrus CS35L56 smart
amplifier used in a Lenovo laptop.
- 17aa380e
Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
This patch adds the firmware files for the Cirrus CS35L56 smart
amplifier used in two ASUS laptops.
- 10431e13
- 10431f43
Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Currently we use f(ile) and d(irectory), over the more common ones t(arget) and
l(ink). Rename things appropriately.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
The check_whence.py script ensures that links defined in WHENCE are not in-tree.
Since we're calling the script, we no longer need the convoluted path and
associated --prune tag.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
With previous commit we call check_whence.py, which ensures that all files
listed are available. Drop the now dead code.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Currently ./check_whence.py is used when submitting new firmware, while
copy-firmware.sh when the firmware is to be consumed.
Since the latter does (very little) validation, having a malformed WHENCE file
can lead to all sorted of problems. From the obvious, where it errors out, to
more serious one where it overwrites or executes something it should not have.
Just call check_whence.py and error out. It takes 0.2s on my 5 year old
mid-range laptop, so the overhead is negligible.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
If the user provides an existing non-empty folder (their /usr/lib/firmware/ or otherwise)
there is a high chance we'll silently overwrite existing files. That may or may not be what
they wanted, so throw a warning so highlight that.
v2:
- use printf instead of echo
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Currently we don't reset/override the destdir variable, so we end up inheriting
whatever the caller's environment has for it. While it may work, it's not
particularly consistent (be that within the script or other tools) nor is it
obvious.
While in here, ensure we handle the variable with test -z/-n instead of varying
other constructs.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
This reverts commit 2bad80e7ed.
The commit effectively added accidental command injection, while it was aiming
to control the compression flags.
In practise you'd want to use ZSTD_CLEVEL and ZSTD_NBTHREADS for zstd. As
documented in zstd(1) it allows for up-to level 19, which is fine since the
kernel does not support higher levels.
Arch, Alpine and likely other distributions have been using this approach
since day one.
The other compressors like xz have equivalent.
Cc: Juerg Haefliger <juerg.haefliger@canonical.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Flesh out the de-duplication logic in separate script. The copy-firmware.sh is
already complex enough and de-duplication doesn't really fit in there.
In the process we migrate away from the open-coded `ln --relative`. We also
avoid touching symlinks, which are not created by rdfind. Otherwise we end up
"fixing" the folder to folder symlinks (created earlier in the process) and
things explode.
As result we also get a few bonuses:
- the COPYOPTS shell injection is gone - the variable was never used
- people can dedup as separate step if/when they choose to do so
Aside: based on the noise in git log and around distros ... I'm wondering if
having the de-duplication as opt-in, would have been better. Is it too late to
change or the ship has sailed?
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
It's a simple format handled by practically every supported platform or program
out there.
Add an initial configuration file, so we reduce the style variation of the files
in-tree.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Using link-to-a-link reduces legibility and changes to the root link,
also changes the leafs. Where the latter may be undesired and in some
cases just wrong.
We have a couple of instances in-tree, so fix them up and ban the
combination.
One particularly good example, why we'd want this is:
https://gitlab.com/kernel-firmware/linux-firmware/-/merge_requests/272
In there we have the following:
File: ti/tas2781/TAS2XXX1EB30.bin
[snip]
Link: TAS2XXX1EB3.bin -> ti/tas2781/TAS2XXX1EB3.bin
Link: ti/tas2781/TAS2XXX1EB3.bin -> TAS2XXX1EB30.bin
Link: TAS2XXX1EB30.bin -> ti/tas2781/TAS2XXX1EB30.bin
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Namely: file(name) and sym(link) ... which were swapped in a few places.
One of which by yours truly 🤦
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
This allows compatibility with old and new TAS drivers.
Suggested-by: Antheas Kapenekakis <lkml@antheas.dev>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
The new rtl8192du driver will support this chip.
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
This reverts commit 82318c966f.
This has caused regressions for a number of users and will be
fixed by a future firmware from Qualcomm.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=219282
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Add below required Bluetooth firmware files for Qualcomm SoC WCN785x
which uses UART as HCI transport, and the firmware version is 2.0.1-00349.
qca/hmtbtfw20.tlv : RAMPATCH
qca/hmtnv20.b10f : NVM
qca/hmtnv20.b112 : NVM
qca/hmtnv20.bin : NVM
Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>