Intel PRO/Wireless 3945ABG y SMP en NetBSD
2008-05-01 22:14:29-05
Hacks
Preámbulo
Por alguna extraña razón el firmware de la tarjeta de red inalámbrica solamente funciona con el kernel GENERIC_LAPTOP de la serie de kernels que el proyecto de NetBSD provee.
Con este kernel solamente puedo usar un sólo CPU ya que el procesador de mi laptop es un Intel Duo, además de que por alguna razón, la conexión inalámbrica tiende a “desfallecer” de forma aleatoria dejando sólo el siguiente mensaje como despedida:
[$] dmesg | grep wpi
wpi0: Device timeout.
wpi0: Device timeout.
y la única forma de revivirla es reiniciar el equipo.
Un día fastidiando a la gente del canal de NetBSD en el FreeNode me puse a platicar con un usuario de nombre ficovh acerca de este problema, él me recomendo que compilara un kernel usando el código reciente ya sea de la rama estable o de la experimental.
Viendo cómo me había ido con el kernel de Linux decidí dejarlo para luego pero, lamentablemente, el problema aún persistía.
Ya entrando en más confianza con el usuario, luego de las clásicas preguntas que de dónde era, cuánto tiempo tenía usando NetBSD y todo eso, resulta que es mexicano el chavo, que él fue el iniciador del Wiki de NetBSD de México y que además es mi paisano.
Con tal que, animado por el usuario y por las pláticas que había tenido con mi maestro pro bono, Malditron, decidí agarrar la vida por los cuernos.
Después de varios intentos he aquí el relato de mi experiencia.
Procedimiento
- Primero configuramos el CVS:
[#] vi ~/.cvsrc
# recommended CVS configuration file from the pkgsrc guide
checkout -P
update -dP
release -d
diff -upN
cvs -q -z3
rdiff -u
# recommended CVS configuration file from the pkgsrc guide
checkout -P
update -dP
release -d
diff -upN
cvs -q -z3
rdiff -u
- Ahora descargamos la rama STABLE:
[#] cd /usr
[#] cvs -q chekout -r netbsd-4 -P src
[#] cvs -q chekout -r netbsd-4 -P src
- Nos situamos en donde están los kernels:
[#] cd /usr/src/sys/arch/i386/conf
- Creamos nuestro kernel
[#] cp GENERIC.MP wanda
- El contenido del kernel GENERIC_LAPTOP lo copiamos a nuestro kernel:
[#] cat GENERIC_LAPTOP >> wanda
- Configuramos nuestro kernel:
[#] config wanda
y vamos a obtener los siguientes errores:
wanda:20: already have options `INCLUDE_CONFIG_FILE=1'
wanda:24: duplicate maxusers parameter
wanda:28: already have options `I486_CPU=1'
wanda:29: already have options `I586_CPU=1'
wanda:30: already have options `I686_CPU=1'
wanda:32: already have makeoptions `CPUFLAGS=-march=i486 -mtune=pentiumpro'
wanda:37: already have options `VM86=1'
wanda:38: already have options `USER_LDT=1'
wanda:41: already have options `ENHANCED_SPEEDSTEP=1'
wanda:45: already have options `POWERNOW_K7=1'
wanda:48: already have options `POWERNOW_K8=1'
wanda:50: already have options `MTRR=1'
wanda:53: already have options `MULTIBOOT=1'
wanda:75: already have options `INSECURE=1'
wanda:77: already have options `RTC_OFFSET=0'
wanda:78: already have options `NTP=1'
wanda:80: already have options `KTRACE=1'
wanda:83: already have options `SYSVMSG=1'
wanda:84: already have options `SYSVSEM=1'
wanda:89: already have options `SYSVSHM=1'
wanda:91: already have options `P1003_1B_SEMAPHORE=1'
wanda:93: already have options `LKM'
wanda:95: already have options `USERCONF=1'
wanda:103: already have options `DDB=1'
wanda:105: already have options `DDB_HISTORY_SIZE=512'
wanda:111: already have options `COMPAT_NOMID=1'
wanda:112: already have options `COMPAT_09=1'
wanda:113: already have options `COMPAT_10=1'
wanda:114: already have options `COMPAT_11=1'
wanda:115: already have options `COMPAT_12=1'
wanda:116: already have options `COMPAT_13=1'
wanda:117: already have options `COMPAT_14=1'
wanda:118: already have options `COMPAT_15=1'
wanda:119: already have options `COMPAT_16=1'
wanda:120: already have options `COMPAT_20=1'
wanda:121: already have options `COMPAT_30=1'
wanda:122: already have options `COMPAT_43=1'
wanda:126: already have options `COMPAT_OSSAUDIO=1'
wanda:127: already have options `COMPAT_SVR4=1'
wanda:128: already have options `COMPAT_IBCS2=1'
wanda:129: already have options `COMPAT_LINUX=1'
wanda:130: already have options `COMPAT_FREEBSD=1'
wanda:134: already have options `COMPAT_BSDPTY=1'
wanda:137: already have file-system `FFS'
wanda:138: already have file-system `EXT2FS'
wanda:139: already have file-system `LFS'
wanda:140: already have file-system `MFS'
wanda:141: already have file-system `NFS'
wanda:142: already have file-system `NTFS'
wanda:143: already have file-system `CD9660'
wanda:144: already have file-system `MSDOSFS'
wanda:145: already have file-system `FDESC'
wanda:146: already have file-system `KERNFS'
wanda:147: already have file-system `NULLFS'
wanda:148: already have file-system `OVERLAY'
wanda:149: already have file-system `PORTAL'
wanda:150: already have file-system `PROCFS'
wanda:151: already have file-system `UMAPFS'
wanda:152: already have file-system `UNION'
wanda:153: already have file-system `CODA'
wanda:154: already have file-system `SMBFS'
wanda:155: already have file-system `PTYFS'
wanda:156: already have file-system `TMPFS'
wanda:160: already have options `QUOTA=1'
wanda:162: already have options `SOFTDEP=1'
wanda:163: already have options `NFSSERVER=1'
wanda:170: already have options `INET=1'
wanda:171: already have options `INET6=1'
wanda:180: already have options `NETATALK=1'
wanda:181: already have options `PPP_BSDCOMP=1'
wanda:182: already have options `PPP_DEFLATE=1'
wanda:183: already have options `PPP_FILTER=1'
wanda:184: already have options `PFIL_HOOKS=1'
wanda:185: already have options `IPFILTER_LOG=1'
wanda:186: already have options `IPFILTER_LOOKUP=1'
wanda:205: already have options `MIIVERBOSE=1'
wanda:206: already have options `PCIVERBOSE=1'
wanda:209: already have options `SCSIVERBOSE=1'
wanda:210: already have options `USBVERBOSE=1'
wanda:214: already have options `NFS_BOOT_DHCP=1'
wanda:214: already have options `NFS_BOOT_BOOTPARAM=1'
wanda:221: already have options `WSEMUL_VT100=1'
wanda:223: already have options `WSDISPLAY_CUSTOM_OUTPUT=1'
wanda:228: already have options `WS_KERNEL_FG=WSCOL_GREEN'
wanda:233: already have options `WSDISPLAY_CUSTOM_BORDER=1'
wanda:236: already have options `WSDISPLAY_COMPAT_PCVT=1'
wanda:237: already have options `WSDISPLAY_COMPAT_SYSCONS=1'
wanda:238: already have options `WSDISPLAY_COMPAT_USL=1'
wanda:239: already have options `WSDISPLAY_COMPAT_RAWKBD=1'
wanda:246: already have options `PCDISPLAY_SOFTCURSOR=1'
wanda:250: already have options `WSDISPLAY_SCROLLSUPPORT=1'
wanda:253: configuration `netbsd' already defined
wanda:787: already have options `UGEN_BULK_RA_WB=1'
wanda:938: `ccd' already defined
wanda:940: `raid' already defined
wanda:941: already have options `RAID_AUTOCONFIG=1'
wanda:950: `fss' already defined
wanda:952: `md' already defined
wanda:953: `vnd' already defined
wanda:957: `bpfilter' already defined
wanda:958: `ipfilter' already defined
wanda:959: `loop' already defined
wanda:960: `ppp' already defined
wanda:961: `pppoe' already defined
wanda:962: `sl' already defined
wanda:963: `strip' already defined
wanda:964: `irframetty' already defined
wanda:965: `tap' already defined
wanda:966: `tun' already defined
wanda:967: `gre' already defined
wanda:968: `gif' already defined
wanda:970: `stf' already defined
wanda:971: `vlan' already defined
wanda:972: `bridge' already defined
wanda:978: `pty' already defined
wanda:979: `sequencer' already defined
wanda:981: `rnd' already defined
wanda:983: `clockctl' already defined
wanda:986: `vcoda' already defined
wanda:989: `nsmb' already defined
wanda:992: `wsmux' already defined
wanda:993: `wsfont' already defined
*** Stop.
wanda:24: duplicate maxusers parameter
wanda:28: already have options `I486_CPU=1'
wanda:29: already have options `I586_CPU=1'
wanda:30: already have options `I686_CPU=1'
wanda:32: already have makeoptions `CPUFLAGS=-march=i486 -mtune=pentiumpro'
wanda:37: already have options `VM86=1'
wanda:38: already have options `USER_LDT=1'
wanda:41: already have options `ENHANCED_SPEEDSTEP=1'
wanda:45: already have options `POWERNOW_K7=1'
wanda:48: already have options `POWERNOW_K8=1'
wanda:50: already have options `MTRR=1'
wanda:53: already have options `MULTIBOOT=1'
wanda:75: already have options `INSECURE=1'
wanda:77: already have options `RTC_OFFSET=0'
wanda:78: already have options `NTP=1'
wanda:80: already have options `KTRACE=1'
wanda:83: already have options `SYSVMSG=1'
wanda:84: already have options `SYSVSEM=1'
wanda:89: already have options `SYSVSHM=1'
wanda:91: already have options `P1003_1B_SEMAPHORE=1'
wanda:93: already have options `LKM'
wanda:95: already have options `USERCONF=1'
wanda:103: already have options `DDB=1'
wanda:105: already have options `DDB_HISTORY_SIZE=512'
wanda:111: already have options `COMPAT_NOMID=1'
wanda:112: already have options `COMPAT_09=1'
wanda:113: already have options `COMPAT_10=1'
wanda:114: already have options `COMPAT_11=1'
wanda:115: already have options `COMPAT_12=1'
wanda:116: already have options `COMPAT_13=1'
wanda:117: already have options `COMPAT_14=1'
wanda:118: already have options `COMPAT_15=1'
wanda:119: already have options `COMPAT_16=1'
wanda:120: already have options `COMPAT_20=1'
wanda:121: already have options `COMPAT_30=1'
wanda:122: already have options `COMPAT_43=1'
wanda:126: already have options `COMPAT_OSSAUDIO=1'
wanda:127: already have options `COMPAT_SVR4=1'
wanda:128: already have options `COMPAT_IBCS2=1'
wanda:129: already have options `COMPAT_LINUX=1'
wanda:130: already have options `COMPAT_FREEBSD=1'
wanda:134: already have options `COMPAT_BSDPTY=1'
wanda:137: already have file-system `FFS'
wanda:138: already have file-system `EXT2FS'
wanda:139: already have file-system `LFS'
wanda:140: already have file-system `MFS'
wanda:141: already have file-system `NFS'
wanda:142: already have file-system `NTFS'
wanda:143: already have file-system `CD9660'
wanda:144: already have file-system `MSDOSFS'
wanda:145: already have file-system `FDESC'
wanda:146: already have file-system `KERNFS'
wanda:147: already have file-system `NULLFS'
wanda:148: already have file-system `OVERLAY'
wanda:149: already have file-system `PORTAL'
wanda:150: already have file-system `PROCFS'
wanda:151: already have file-system `UMAPFS'
wanda:152: already have file-system `UNION'
wanda:153: already have file-system `CODA'
wanda:154: already have file-system `SMBFS'
wanda:155: already have file-system `PTYFS'
wanda:156: already have file-system `TMPFS'
wanda:160: already have options `QUOTA=1'
wanda:162: already have options `SOFTDEP=1'
wanda:163: already have options `NFSSERVER=1'
wanda:170: already have options `INET=1'
wanda:171: already have options `INET6=1'
wanda:180: already have options `NETATALK=1'
wanda:181: already have options `PPP_BSDCOMP=1'
wanda:182: already have options `PPP_DEFLATE=1'
wanda:183: already have options `PPP_FILTER=1'
wanda:184: already have options `PFIL_HOOKS=1'
wanda:185: already have options `IPFILTER_LOG=1'
wanda:186: already have options `IPFILTER_LOOKUP=1'
wanda:205: already have options `MIIVERBOSE=1'
wanda:206: already have options `PCIVERBOSE=1'
wanda:209: already have options `SCSIVERBOSE=1'
wanda:210: already have options `USBVERBOSE=1'
wanda:214: already have options `NFS_BOOT_DHCP=1'
wanda:214: already have options `NFS_BOOT_BOOTPARAM=1'
wanda:221: already have options `WSEMUL_VT100=1'
wanda:223: already have options `WSDISPLAY_CUSTOM_OUTPUT=1'
wanda:228: already have options `WS_KERNEL_FG=WSCOL_GREEN'
wanda:233: already have options `WSDISPLAY_CUSTOM_BORDER=1'
wanda:236: already have options `WSDISPLAY_COMPAT_PCVT=1'
wanda:237: already have options `WSDISPLAY_COMPAT_SYSCONS=1'
wanda:238: already have options `WSDISPLAY_COMPAT_USL=1'
wanda:239: already have options `WSDISPLAY_COMPAT_RAWKBD=1'
wanda:246: already have options `PCDISPLAY_SOFTCURSOR=1'
wanda:250: already have options `WSDISPLAY_SCROLLSUPPORT=1'
wanda:253: configuration `netbsd' already defined
wanda:787: already have options `UGEN_BULK_RA_WB=1'
wanda:938: `ccd' already defined
wanda:940: `raid' already defined
wanda:941: already have options `RAID_AUTOCONFIG=1'
wanda:950: `fss' already defined
wanda:952: `md' already defined
wanda:953: `vnd' already defined
wanda:957: `bpfilter' already defined
wanda:958: `ipfilter' already defined
wanda:959: `loop' already defined
wanda:960: `ppp' already defined
wanda:961: `pppoe' already defined
wanda:962: `sl' already defined
wanda:963: `strip' already defined
wanda:964: `irframetty' already defined
wanda:965: `tap' already defined
wanda:966: `tun' already defined
wanda:967: `gre' already defined
wanda:968: `gif' already defined
wanda:970: `stf' already defined
wanda:971: `vlan' already defined
wanda:972: `bridge' already defined
wanda:978: `pty' already defined
wanda:979: `sequencer' already defined
wanda:981: `rnd' already defined
wanda:983: `clockctl' already defined
wanda:986: `vcoda' already defined
wanda:989: `nsmb' already defined
wanda:992: `wsmux' already defined
wanda:993: `wsfont' already defined
*** Stop.
- Lo que sigue es lo aburrido del proceso y es comentar todas esas líneas.
- Volvemos a configurar el kernel y vemos con satisfacción que ahora si funcionó:
[#] config wanda
Build directory is ../compile/wanda
Don't forget to run "make depend"
Build directory is ../compile/wanda
Don't forget to run "make depend"
- Creamos las dependencias y compilamos:
[#] cd ../compile/wanda
[#] make depend && make
[#] make depend && make
- Despues de un rato esto es lo que vamos a obtener:
[#] ls -lh netbsd
-rwxr-xr-x 1 root wheel 10622276 May 1 02:12 netbsd
-rwxr-xr-x 1 root wheel 10622276 May 1 02:12 netbsd
- Reemplazamos el viejo kernel:
[#] mv /netbsd /netbsd.old
y situamos nuestro nuevo kernel:
[#] mv netbsd /
Reiniciamos y esperamos.
- Probamos si ya podemos usar los dos CPUs:
[#] dmesg | grep cpu
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel Pentium M (Yonah) (686-class), 1828.89 MHz, id 0x6e8
cpu0: features bfe9fbff
cpu0: features bfe9fbff
cpu0: features bfe9fbff
cpu0: features2 c1a9
cpu0: "Genuine Intel(R) CPU T2400 @ 1.83GHz"
cpu0: I-cache 32 KB 64B/line 8-way, D-cache 32 KB 64B/line 8-way
cpu0: L2 cache 2 MB 64B/line 8-way
cpu0: using thermal monitor 1
cpu0: Enhanced SpeedStep (1404 mV) 1833 MHz
cpu0: unknown Enhanced SpeedStep CPU.
cpu0: using only highest and lowest power states.
cpu0: Enhanced SpeedStep frequencies available (MHz): 1833 1000
cpu0: calibrating local timer
cpu0: apic clock running at 166 MHz
cpu0: 64 page colors
cpu1 at mainbus0: apid 1 (application processor)
cpu1: starting
cpu1: Intel Pentium M (Yonah) (686-class), 1828.75 MHz, id 0x6e8
cpu1: features bfe9fbff
cpu1: features bfe9fbff
cpu1: features bfe9fbff
cpu1: features2 c1a9
cpu1: "Genuine Intel(R) CPU T2400 @ 1.83GHz"
cpu1: I-cache 32 KB 64B/line 8-way, D-cache 32 KB 64B/line 8-way
cpu1: L2 cache 2 MB 64B/line 8-way
cpu1: using thermal monitor 1
cpu1: CPU 1 running
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel Pentium M (Yonah) (686-class), 1828.89 MHz, id 0x6e8
cpu0: features bfe9fbff
cpu0: features bfe9fbff
cpu0: features bfe9fbff
cpu0: features2 c1a9
cpu0: "Genuine Intel(R) CPU T2400 @ 1.83GHz"
cpu0: I-cache 32 KB 64B/line 8-way, D-cache 32 KB 64B/line 8-way
cpu0: L2 cache 2 MB 64B/line 8-way
cpu0: using thermal monitor 1
cpu0: Enhanced SpeedStep (1404 mV) 1833 MHz
cpu0: unknown Enhanced SpeedStep CPU.
cpu0: using only highest and lowest power states.
cpu0: Enhanced SpeedStep frequencies available (MHz): 1833 1000
cpu0: calibrating local timer
cpu0: apic clock running at 166 MHz
cpu0: 64 page colors
cpu1 at mainbus0: apid 1 (application processor)
cpu1: starting
cpu1: Intel Pentium M (Yonah) (686-class), 1828.75 MHz, id 0x6e8
cpu1: features bfe9fbff
cpu1: features bfe9fbff
cpu1: features bfe9fbff
cpu1: features2 c1a9
cpu1: "Genuine Intel(R) CPU T2400 @ 1.83GHz"
cpu1: I-cache 32 KB 64B/line 8-way, D-cache 32 KB 64B/line 8-way
cpu1: L2 cache 2 MB 64B/line 8-way
cpu1: using thermal monitor 1
cpu1: CPU 1 running
- Checamos el dmesg:
[#] uname -a
NetBSD cosmo 4.0_STABLE NetBSD 4.0_STABLE (wanda) #0:
Thu May 1 02:12:13 CDT 2008
root@cosmo:/usr/src/sys/arch/i386/compile/wanda i386
NetBSD cosmo 4.0_STABLE NetBSD 4.0_STABLE (wanda) #0:
Thu May 1 02:12:13 CDT 2008
root@cosmo:/usr/src/sys/arch/i386/compile/wanda i386
Y listo, Cosmo y Wanda en mi laptop:

Permalink: http://www.mononeurona.org/users/entry/asarch/1309
Comentblogs:1.-
Jose Luis Romero wrote:
muy bueno
2008-05-05 00:41:23-05
muy bueno
2008-05-05 00:41:23-05










