[oi-dev] Broadcom BCM4312 wireless on OpenIndiana 64-bit

Jim Klimov jimklimov at cos.ru
Sat Mar 23 10:33:37 UTC 2013


On 2013-03-22 15:54, Jean-Pierre wrote:
> Also, in your log there are missing symbols which cannot
> be caused by the ndis emulator. For instance the symbol
> IoRegisterPlugPlayNotification is mentioned as unresolved,
> but this symbol appears nowhere in the emulator, you were
> probably using a recent driver with requires more functions
> to be emulated.

It seems that most of those symbols are defined in the source
code and the built module ndisapi, so either they are not
properly exported as new kernel capabilities (or imported
by bcmndis) or, in more cases, the ndisapi module fails to
load - likely due to those relocations you've noticed.

>>> There is another kind of error in your message.zip about
>>> illegal relocations : this is probably caused by driver.s
>>> being assembled in 32-bit mode. Try using option -m64.
>>
>> Makes sense, I'll see if that helps. However, about other object
>> files (made from *.c) the linker did complain explicitly if they
>> were ELFCLASS32 trying to combine with ELFCLASS64, that's how
>> most of those -m64 flags got into my fixed Makefile ;)
>
> Oh yes. The log mentions a relocation of type R_AMD64_32, which is
> a relocation in 64-bit mode, but it is a 32-bit relocation which
> cannot be used in a driver (it can only be used in the lower 2GB
> of memory), so some compilation option must be missing.

One suggestion I found in the internet was to try -mcmodel=large
and my OI's gcc-3.4.3 compiler said it is not yet supported. Duh.

I added il-gcc-444 (from Rich Lowe's tarball of 2012) and mpfr
and gmp libraries as that wanted, and tried to recompile the
project with gcc-444. It had a lot more warnings about function
declarations and even fatal conflicts that gcc-343 did not care
to find or report. Very weird.

I attach my current makefile (also automates creation of ndis.sys
and ndis.inf from Broadcom files) and the gcc-444 build log, just
in case you make more sense out of it.

In reality I'm more looking forward to trying your rework based
on ndis-1.2.6 as it seems to implement more of those "missing"
functions, indeed. Further on, maybe, some text would have to
be snatched from FreeBSD's compat/ndis sources ;)

//Jim





More information about the oi-dev mailing list