Commit Graph

21 Commits

Author SHA1 Message Date
Mario Limonciello 4d6190714d Add a script for a robot to open up pull requests
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
2023-10-13 13:50:00 -05:00
Mario Limonciello cef80743ca Add new Makefile target to build a deb and rpm package
The package would put all files into /lib/firmware/updates to avoid
conflicting with distro packages.

The package is also intentionally named to avoid conflicts with
distro packages.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
2023-10-02 14:19:30 -05:00
Juerg Haefliger 80de4d8a41
check_whence: Recognize RawFile keyword
WHENCE and copy_firmware.sh now support a new keyword RawFile to list
files that must not be compressed. Update check_whence.py to recognize
that.

Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
Signed-off-by: Josh Boyer <jwboyer@kernel.org>
2023-09-05 12:51:05 -04:00
Mario Limonciello 69e68cde08 Add gitlab ci for calling pre-commit and ci-fairy
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
2023-08-30 22:58:36 -05:00
Mario Limonciello 792115b20c Add Dockerfile used to build CI image
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
2023-08-30 22:58:36 -05:00
Mario Limonciello 408eb34a78 Rewrite README in markdown
This will make it render more nicely if linux-firmware.git moves
to Gitlab or a fork of it is hosted in Gitlab.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
2023-08-30 07:54:49 -05:00
Mario Limonciello c442a5002c Add pre-commit hooks and codespell template
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
2023-08-29 17:02:23 -05:00
Mario Limonciello 27fb2f6368 check_whence: reformat using python black
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
2023-08-29 16:57:24 -05:00
Adam Sampson 9e0343cf92
check_whence: Check link targets are valid
This should catch a couple of common errors: reversing the two arguments
to Link, and not making the second argument relative to the first.

Signed-off-by: Adam Sampson <ats@offog.org>
Signed-off-by: Josh Boyer <jwboyer@kernel.org>
2023-07-06 15:35:25 -04:00
Emil Velikov 77f92e0b9d
check_whence: error if symlinks are in-tree
Currently we have no symlinks in-tree. Add a simple check, ensuring they
don't get added in the future.

This allows us to remove the clunky symlink checking code in
copy-firmware.sh

v2:
 - tweak helper to produce link and target (based off Adam's patch)

v3:
 - honour quoted target/linkname

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Josh Boyer <jwboyer@kernel.org>
2023-06-25 11:57:45 -04:00
Emil Velikov f2671b1f50
check_whence: error if File: is actually a link
Commits from a few years ago added support for Link entries, over having
the symlinks in-tree.

At the same time, it didn't add a check whether one didn't add a File
entry that is actually a symlink. Do so now, to be on the safe side.

v2:
 - drop copy-firmware.sh changes

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Josh Boyer <jwboyer@kernel.org>
2023-06-25 11:57:07 -04:00
Emil Velikov 4b539e7a32
check_whence: strip quotation marks
Earlier commit added check for duplicate entries. Although the commit
was picked without one of its dependencies which removes the quotation
marks in the File entries.

Since the quotation marks are here to stay, escape them as needed in the
script.

Cc: Emil Velikov <emil.l.velikov@gmail.com>
Fixes: 05183b7b ("check_whence: error on duplicate file entries")
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Josh Boyer <jwboyer@kernel.org>
2023-06-25 11:56:43 -04:00
Emil Velikov 6c9e0ed536
check_whence: error on directory listed as File
No occurrences in-tree, but it makes sense to sanity check that.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Josh Boyer <jwboyer@kernel.org>
2023-05-08 08:38:18 -04:00
Emil Velikov 05183b7bd5
check_whence: error on duplicate file entries
There's little point in copying (or compressing with later patches) the
same files multiple times. So let's error out when duplicate entries are
present.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Josh Boyer <jwboyer@kernel.org>
2023-05-08 08:37:54 -04:00
Josh Boyer 6de0c03ff0
Merge branch 'dg2_dmc_v2.8' of git://anongit.freedesktop.org/drm/drm-firmware
Signed-off-by: Josh Boyer <jwboyer@kernel.org>
2022-11-30 07:52:25 -05:00
Brian Norris 94cb0a6837
check_whence: python3/utf-8 support
WHENCE contains non-ASCII characters, so we should specify an encoding.
To get the encoding= arg in python2, we pull open from 'io' directly.

Signed-off-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Josh Boyer <jwboyer@kernel.org>
2020-03-02 08:06:45 -05:00
Brian Norris 7fa32bcc68
Makefile: improve `make check` usefulness
Silence the make echo'ing, so the output is cleaner.

Add an exit code to check_whence.py, so we can get a real failure for
bad WHENCE files.

Signed-off-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Josh Boyer <jwboyer@kernel.org>
2020-03-02 08:06:26 -05:00
Thierry Reding 9cfefbd7fb
Remove duplicate symlinks
Now that the copy-firmware.sh script can create symlinks from the Link:
entries in the WHENCE file on the fly, remove the duplicate symlinks
from the filesystem.

One odd entry was intel/dsp_fw_cnl.bin which was listed both as symlink
and as a regular file. Both entries can be removed since the it's really
a symlink, so it will be recreated at installation time.

While at it, update the check_whence.py script to not look for the
existence of symlinks in the filesystem because they are created on the
fly at installation time by the copy_firmware.sh script.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Josh Boyer <jwboyer@kernel.org>
2019-10-04 18:34:07 -04:00
Josh Boyer c0fb3d9862
check_whence: Add copy-firmware.sh to the list of ignored files
This was added recently as the script to install the firmware files.
Add it to the ignored list so check_whence doesn't complain about it.

Signed-off-by: Josh Boyer <jwboyer@kernel.org>
2019-08-21 08:03:43 -04:00
Hans de Goede be15035deb check_whence.py: Add support for filenames with spaces in them
Some vendors save a couple of cents by not including an eeprom for
wifi parameters on their boards. Instead the driver loads these board
specific parameters through the request_firmware mechanism.

Since these are board specific the filenames also must be board specific,
on x86 DMI strings are used for this and the wifi chipname is postfixed
with $sys_vendor-$product_name from the DMI tables. These DMi variables
may contain spaces.

This commit adds support to check_whence.py for filenames with spaces
in them, after this commit these can be specified by putting double-quotes
around them, e.g "name with spaces.bin".

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Josh Boyer <jwboyer@kernel.org>
2018-12-18 15:35:55 -05:00
Ben Hutchings 7d88736093 Add a metadata consistency check script
The script compares the files listed in WHENCE (or otherwise expected)
and the files known to git, and reports all differences as errors.

Add a 'check' rule to the Makefile that runs this.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2016-09-26 01:28:45 +01:00