Since https://gitlab.com/kernel-firmware/linux-firmware/-/merge_requests/319
and https://gitlab.com/kernel-firmware/linux-firmware/-/merge_requests/331 ,
doing `make COPYOPTS="blahblah" install` does not fail, but does
not do what it did before. This is a surprising and possibly
undesired result (in Fedora, it led to our firmware suddenly
taking up 500MB more space on disk, and that led to a bunch of
live image builds failing).
To make the change more apparent, let's just fail out with an
explanatory message if invoked with COPYOPTS set.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Co-authored by: Emil Velikov <emil.l.velikov@gmail.com>
Recently we started running check_whence.py to validate WHENCE before
installing files with copy-firmware.sh. It did not consider the fact
that people may be using the distribution tarball, which lacks the
relevant git metadata.
Throw a warning and skip the relevant validation.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
DMCUB updaes for DCN314, DCN351, DCN35, Yellow Carp
From internal git commit 358f90a77c62e560cb40b578b86ec09a2f69b99f
Firmware release 0.0.239.0
Tested with DC 3.2.306
Release notes:
- Fix USB4
- Avoid SDP in VActive
Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
The current version is copied from latest Jetson Linux BSP and it's for
P3310 (TX2) module. While both TX1 and TX2 have same wireless chip,
possibly the SDIO module slightly differ and both have different NVRAM
files provided in separate BSP archives. Although TX1 module wireless
inteface can be brought up with TX2 NVRAM file, the performance is
slightly degraded, simple download test yielded extra 4MiB/s with proper
NVRAM file. Thus, replace it with proper file from R32.7.5 BSP, while
also droping commented-out values, since those are not parsed by the
driver.
Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
This firmware was extracted from the vendor driver
rtl8192FU_rtl8725AU_WiFi_linux_v5.15.2-53-g9bfbc74cf.20230615_COEX20220422-2b07
provided by Realtek developer.
Signed-off-by: Zenm Chen <zenmchen@gmail.com>
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>