History log of /freebsd-current/sys/tools/fw_stub.awk
Revision Date Author Comments
# 031beb4e 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line sh pattern

Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/


# fa12e8fe 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

fw_stub: Don't add $FreeBSD$ to generated file

Sponsored by: Netflix


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix


# 628a4156 14-Jun-2022 John Baldwin <jhb@FreeBSD.org>

firmware: Map '@' in filenames to '_' in symbols.

'@' is not a valid character in symbol names and can sometimes appear
in path names.

Reviewed by: imp, markj
Obtained from: CheriBSD
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D35480


# b394e16e 30-Nov-2021 Bjoern A. Zeeb <bz@FreeBSD.org>

fw_stub: fix -Wunused-but-set-variable for firmware files

In case we are only embedding a single firmware image the variable
"parent" gets set but never used. Add checks for the number of files
for it and only print it out if we are exceeding the single file count.
This fixes -Wunused-but-set-variable warnings for the majority of
firmware files in the tree.

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks


# a0953903 17-Dec-2020 John Baldwin <jhb@FreeBSD.org>

Use a template assembly file for firmware object files.

Similar to r366897, this uses the .incbin directive to pull in a
firmware file's contents into a .fwo file. The same scheme for
computing symbol names from the filename is used as before to maximize
compatiblity and not require rebuilding existing .fwo files for
NO_CLEAN builds. Using ld -o binary requires extra hacks in linkers
to either specify ABI options (e.g. soft- vs hard-float) or to ignore
ABI incompatiblities when linking certain objects (e.g. object files
with only data). Using the compiler driver avoids the need for these
hacks as the compiler driver is able to set all the appropriate ABI
options.

Reviewed by: imp, markj
Obtained from: CheriBSD
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D27579


# 9a069ff5 11-Sep-2019 Ed Maste <emaste@FreeBSD.org>

fw_stub.awk: use @generated tag in generated files

Multiple tools use @generated to identify generated files (for example,
in a review Phabricator will by default hide diffs in enerated files).
Use the @generated tag in makesyscalls.sh as we've done for other
generated files.


# fe267a55 27-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

sys: general adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

No functional change intended.


# cada39d8 15-Oct-2015 Bryan Drewery <bdrewery@FreeBSD.org>

Rename the /usr/share/doc/legal files to driver.LICENSE to work around
bug of installing 'realtek' and 'intel_iwn' as files rather then as
a 'LICENSE' file in their directories.

Also add obsolete entries for the older names and names that existed in head
for a period of time.

Suggested by: jmg
X-MFC-With: r289391
MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division


# 9823d527 10-Oct-2012 Kevin Lo <kevlo@FreeBSD.org>

Revert previous commit...

Pointyhat to: kevlo (myself)


# a10cee30 09-Oct-2012 Kevin Lo <kevlo@FreeBSD.org>

Prefer NULL over 0 for pointers


# 04af6e96 31-Mar-2011 Ryan Stone <rstone@FreeBSD.org>

GNU awk does not output escaped newlines in multi-line printc statements. This
leads to compile errors when trying to compile firmware(9) stubs created with
gawk, as multiple #include statements end up on the same line. Replace the
multi-line printc statement that outputs all of the #includes with one printc
per #include. This allows modules compatible with firmware(9) to be cross-built
from a Linux machine without requiring the one true awk to be installed.

I've intentionally done the minimal set of changes necessary to make gawk
produce valid (but not pretty) C code, to reduce the churn and keep fw_stubs.awk
as readable as possible.

Approved by: emaste (mentor)
MFC after: 2 weeks


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# fd6bbf04 02-Nov-2009 Max Khon <fjoe@FreeBSD.org>

MFC: Allow KMOD with hypens and dots.


# f91c218b 25-Oct-2009 Rui Paulo <rpaulo@FreeBSD.org>

Output a comment on top of each generated file explaining where it came
from.


# b352b7cc 20-Oct-2009 Max Khon <fjoe@FreeBSD.org>

Allow KMOD with hypens and dots.

MFC after: 1 week


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 7bd6fde3 02-Mar-2007 Florent Thoumie <flz@FreeBSD.org>

- Add Intel firmwares for Intel PRO/Wireless LAN 2100/2200/2915 cards in a
uuencoded format along with their respective LICENSE files.
- Add new share/doc/legal directory to BSD.usr.dist mtree file. This is the
place we install LICENSE files for restricted firmwares.
- Teach firmware(9) and kmod.mk about licensed firmwares. Restricted firmwares
won't load properly unless legal.<name>.license_ack is set to 1, either
via kenv(1) or /boot/loader.conf.

Reviewed by: mlaier, sam
Permitted by: Intel (via Andrew Wilson)
MFC after: 1 month


# 4af453db 27-Feb-2007 Florent Thoumie <flz@FreeBSD.org>

Fix obvious typo (use long name if short name isn't provided).

Reviewed by: sam
MFC after: 3 days


# 33d54970 15-Feb-2007 Luigi Rizzo <luigi@FreeBSD.org>

Cleanup and document the implementation of firmware(9) based on
a version that i posted earlier on the -current mailing list,
and subsequent feedback received.

The core of the change is just in sys/firmware.h and kern/subr_firmware.c,
while other files are just adaptation of the clients to the ABI change
(const-ification of some parameters and hiding of internal info,
so this is fully compatible at the binary level).

In detail:
- reduce the amount of information exported to clients in struct firmware,
and constify the pointer;

- internally, document and simplify the implementation of the various
functions, and make sure error conditions are dealt with properly.

The diffs are large, but the code is really straightforward now (i hope).

Note also that there is a subtle issue with the implementation of
firmware_register(): currently, as in the previous version, we just
store a reference to the 'imagename' argument, but we should rather
copy it because there is no guarantee that this is a static string.
I realised this while testing this code, but i prefer to fix it in
a later commit -- there is no regression with respect to the past.

Note, too, that the version in RELENG_6 has various bugs including
missing locks around the module release calls, mishandling of modules
loaded by /boot/loader, and so on, so an MFC is absolutely necessary
there. I was just postponing it until this cleanup to avoid doing
things twice.

MFC after: 1 week


# c3e7da2b 16-Jun-2006 John Baldwin <jhb@FreeBSD.org>

Check for errors when registering and unregistering firmware modules. This
prevents the unfortunate situation whereby one might kldload a firmware
module by hand and later kldunload it while a driver still has an open
reference to it.

MFC after: 1 week
Glanced at by: iedowse


# 6afd356e 30-Jan-2006 Max Laier <mlaier@FreeBSD.org>

Fix a leftover "iwi_boot" string.

Submitted by: gallatin


# 6aec1278 28-Jan-2006 Max Laier <mlaier@FreeBSD.org>

firmware(9) is a subsystem to load binary data into the kernel via a
specially crafted module. There are several handrolled sollutions to this
problem in the tree already which will be replaced with this. They include
iwi(4), ipw(4), ispfw(4) and digi(4).

No objection from: arch
MFC after: 2 weeks
X-MFC after: some drivers have been converted