[prev in list] [next in list] [prev in thread] [next in thread]
List: opensolaris-driver-discuss
Subject: Re: [driver-discuss] Error building ndis-1.2.5 on OpenSolaris
From: Michael Li <Mikore.Li () Sun ! COM>
Date: 2009-12-06 14:49:06
Message-ID: 4B1BC462.70408 () Sun ! COM
[Download RAW message or body]
Hi, Eugene,
Eugene ??:
> mikore,
> gcc from b127 (gcc 3.4.3 (csl-sol210-3_4-20050802)) compiles ndis-1.2.5. And the driver works.
> Thank you for help.
>
> The problem with gcc-4.4.2 is that it doesn't put DW_AT_name inside
> some Debugging Information Entries (DIE)
>
You'd better to use default 3.4.3 gcc, no test was run against new
version gcc.
> Example:
> dwarfdump if_ndis.o (if_ndis.o is produced by gcc-4.4.2)
> gives:
> <1>< 80> DW_TAG_base_type
> DW_AT_byte_size 4
> DW_AT_encoding DW_ATE_unsigned
> <1>< 83> DW_TAG_base_type
>
> dwarfdump if_ndis.o (if_ndis.o is produced by gcc-3.4.3)
> <1>< 80> DW_TAG_base_type
> DW_AT_name unsigned int
> DW_AT_byte_size 4
> DW_AT_encoding DW_ATE_unsigned
> <1>< 87> DW_TAG_base_type
>
> In the file that was produced by gcc-4.4.2 there is no line "DW_AT_name unsigned int"
> that is why I got an error:
> /opt/onbld/bin/i386/ctfconvert -g -l NDISWRAPPER if_ndis.o
> ERROR: ctfconvert: die 80: base type without name
>
>
> Also I'd like to say that ndis-1.2.5 contains some errors
> 1.
> ../if_ndis.c:156: error: static declaration of 'wifi_bcastaddr' follows non-static declaration
> ../include/sys/mac_wifi.h:114: note: previous declaration of 'wifi_bcastaddr' was here
>
I believe it should only happen at the time when you try to use Sun CC
compiler or when you modified some source codes.
wifi_bcastaddr in module mac_wifi is not referenced by bcmndis module.
But it's always a better implementation to avoid the same name.
> 2.
> excessive | in the file inf-parse.y that leads to reduce/reduce error
> *** ndis-1.2.5/inf-parse.y Thu Jul 17 13:08:26 2008
> --- ndis-1.2.5-patch/inf-parse.y Thu Dec 3 16:08:02 2009
> ***************
> *** 95,101 ****
> { push_word(NULL); }
> | COMMA
> { push_word(NULL); }
> - |
> ;
>
> regkey
> --- 95,100 ----
>
Yes, this result to compile warning, should be fixed as what you suggested.
> 3.
> prinf should has "hh" modificator
> *** ndis-1.2.5/ndiscvt.c Thu Jul 17 13:08:26 2008
> --- ndis-1.2.5-patch/ndiscvt.c Thu Dec 3 14:22:44 2009
>
> *** 392,404 ****
> for (i = 0; i < 10; i++) {
> cnt++;
> if (cnt == fsize) {
> ! fprintf(outfp, "0x%.2X};\n", ptr[i]);
> goto done;
> } else {
> if (i == 9)
> ! fprintf(outfp, "0x%.2X,\n", ptr[i]);
> else
> ! fprintf(outfp, "0x%.2X, ", ptr[i]);
> }
> }
> ptr += 10;
> --- 397,409 ----
> for (i = 0; i < 10; i++) {
> cnt++;
> if (cnt == fsize) {
> ! fprintf(outfp, "0x%.2hhX};\n", ptr[i]);
> goto done;
> } else {
> if (i == 9)
> ! fprintf(outfp, "0x%.2hhX,\n", ptr[i]);
> else
> ! fprintf(outfp, "0x%.2hhX, ", ptr[i]);
> }
> }
> ptr += 10;
>
Because of ".2", there is no need for the length modificator "hh", it's
not error.
Thanks,
Michael
_______________________________________________
driver-discuss mailing list
driver-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/driver-discuss
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic