1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-25 07:49:18 +00:00
freebsd/sys/contrib
Bjoern A. Zeeb 96190b4fef LinuxKPI based WiFi drivers: scripts to extract fwget(8) and port details
Add a "zzz_fw_ports_fwget.sh" script to each LinuxKPI based wireless
driver which in essential are all the same and in detail all different.
The scripts have been referenced in fwget(8) sources since d33f5a0afa
but were never committed.

The scripts do the full job compared to `single-line-scripts` I tried to
use before to ease maintainance life.  Some use hacks like calling cpp
and extracting bits from the output to piece them together over multiple
files.  It will be left as an exercise for the future to see if what was
done (a longer while ago) for iwlwifi(4) would be a good idea for some
other drivers too, to have a FreeBSD-specific sysctl to export some of
the accumulated data in an easily processable way.
The scripts are written in the "perl spirit" -- "to get the job done" --
and not to be nice or neat or efficient.  For that we do not need them
often enough or in any critical path.  People are welcome to improve
them if they feel like.
I've used them for two version updates now and even if ports enforce
some other (manual) editing to keep support for multiple branches for
now they worked extremly well.

For the most the scripts extract 2 parts: PCI IDs and firmware name;
then they add "flavor"s to both and put the information together.

That output is then separated into:
- fwget(8) lines of PCI ID to port/package
  wifi-firmware-${name}-kmod-${flavor} mappings and
- distfiles per flavor for the ports.
- For iwlwififw(4) we also generate the tables for the man page
  (and the wiki) and hopefully the .Sh HARDWARE section for iwlwifi.4
  soon too.

Depending on driver various other checks are done, e.g.,
- does the PCI ID have one or more firmware files/flavors associated,
- does the referenced firmware exist in the linux-firmware.git repo,
- are there duplicates,
- find the latest version of the firmware API.

Sponsored by:	The FreeBSD Foundation
Suggested by:	imp (to have automation in D44918)
MFC after:	3 days
2024-10-17 17:26:28 +00:00
..
alpine-hal
ck
dev LinuxKPI based WiFi drivers: scripts to extract fwget(8) and port details 2024-10-17 17:26:28 +00:00
device-tree
dpdk_rte_lpm
edk2
ena-com ena: Upgrade ena-com to freebsd v2.8.0 2024-10-15 17:02:26 +00:00
libb2
libfdt
libnv
libsodium
ncsw
openzfs openzfs/freebsd: Use compiler.h from FreeBSD's base's linuxkpi 2024-10-15 15:05:49 -06:00
pcg-c/include
rdma/krping
v4l
vchiq/interface
x86emu
xen
xz-embedded
zlib
zstd