Page MenuHomeFreeBSD

brcmfmac: simplify conditional logic in module Makefile
Needs ReviewPublic

Authored by ngie on Fri, Jul 24, 10:47 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Aug 1, 3:24 PM
Unknown Object (File)
Sat, Aug 1, 5:41 AM
Unknown Object (File)
Fri, Jul 31, 5:57 AM
Unknown Object (File)
Fri, Jul 31, 5:56 AM
Unknown Object (File)
Fri, Jul 31, 2:48 AM
Unknown Object (File)
Thu, Jul 30, 3:26 AM
Unknown Object (File)
Wed, Jul 29, 6:55 PM
Unknown Object (File)
Tue, Jul 28, 9:03 PM
Subscribers

Details

Reviewers
bz
Summary

Use ${FOO:U0} as a shorthand default instead of trying to achieve
the same using a longform method, e.g., defined(FOO) && ${FOO} > 0.

This reduces Makefile complexity, making it easier for humans to read
what the code is doing and avoids potential errors in the Makefile
(typos, etc).

Test Plan

Built this change several times with mfsbsd successfully.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 75109
Build 71992: arc lint + arc unit

Event Timeline

ngie requested review of this revision.Fri, Jul 24, 10:47 PM
ngie added reviewers: bz, adrian.

The module is not built at all so I wonder if you actually built it with mfsbsd.

That said, If we do this we should similarly apply this to iwlwifi, rtw88, rtw89, mt76, ath1/2/3k Makefile BUT I do have outstanding changes to them in my local tree.
Would you mind if I do have a look at my local changes first before we apply this to all of them?

In D58448#1340980, @bz wrote:

The module is not built at all so I wonder if you actually built it with mfsbsd.

I have other outstanding diffs on a branch which are required to get brcm to build/install: https://github.com/ngie-eign/freebsd-src/tree/brcm-polish . I'm trying to get a working driver on my mid-2010s MacBooks.

That said, If we do this we should similarly apply this to iwlwifi, rtw88, rtw89, mt76, ath1/2/3k Makefile BUT I do have outstanding changes to them in my local tree.
Would you mind if I do have a look at my local changes first before we apply this to all of them?

Sure!

In D58448#1340980, @bz wrote:

The module is not built at all so I wonder if you actually built it with mfsbsd.

I have other outstanding diffs on a branch which are required to get brcm to build/install: https://github.com/ngie-eign/freebsd-src/tree/brcm-polish . I'm trying to get a working driver on my mid-2010s MacBooks.

brcmfmac compiles on arm64 and amd64; that's not the issue; loading firmware will fail on arm64 (and possibly amd64) because of trouble with copies to IO space.

BUT the driver will do NOTHING even if you get it loaded as a massive piece of compat code is missing, so there is little point in even trying to at this point... unless you want to go and write that code clean room.

In D58448#1341093, @bz wrote:
In D58448#1340980, @bz wrote:

The module is not built at all so I wonder if you actually built it with mfsbsd.

I have other outstanding diffs on a branch which are required to get brcm to build/install: https://github.com/ngie-eign/freebsd-src/tree/brcm-polish . I'm trying to get a working driver on my mid-2010s MacBooks.

brcmfmac compiles on arm64 and amd64; that's not the issue; loading firmware will fail on arm64 (and possibly amd64) because of trouble with copies to IO space.

BUT the driver will do NOTHING even if you get it loaded as a massive piece of compat code is missing, so there is little point in even trying to at this point... unless you want to go and write that code clean room.

Can you provide more details to help give me a head start? I have a bit of an abundance of free time on my hands currently and would like to get this working.