[Previo por Fecha] [Siguiente por Fecha] [Previo por Hilo] [Siguiente por Hilo]
[Hilos de Discusión] [Fecha] [Tema] [Autor]Ok, la salida del error del compilador significa que hay una estructura (input_dev) que no contiene una variabe (o estructura) llamada "input", lo que debes hacer es localizar ese elemento en el codigo fuente del kernel, por ejemplo con grep: grep -e input /usr/src/linux-2.4.22-10mdk -r y cuando la encuentres le agregas el -I a la linea del compilador (a tu Makefile o lo que uses para invocarlo), de manera que te quede mas o menos asi: gcc -D__KERNEL__ -I/usr/src/linux-2.4.22-10mdk/include-Wall -I/usr/src/linux-2.4.22-10mdk/include-Wall/AQUI_VA_EL_PATH_PATH_DONDE_ESTA_INPUT -Wstrict-prototypes -Wno-trigraphs -O2-fno-strict-aliasing -fno-common -pipe-mpreferred-stack-boundary=2 -march=i686 -DMODULE-DMODVERSIONS -include/usr/src/linux-2.4.22-10mdk/include/linux/modversions.h -nostdinc -iwithprefix include-DKBUILD_BASENAME=hid_core -c hid-core.c -o suerte On Sat, 2004-01-10 at 21:27, Kuroi wrote: > Hola, > > Estoy tratando de compilar un módulo, pero tengo > algunos problemas, mi versión de kernel es la 2.4.22, > la situación es la siguiente: > > Compré una tableta digitalizadora, la WizardPen de > Genius, en la red localizé un documento que explica > como instalar el controlador para Linux, el problema > viene aquí, me hizo el siguiente comentario: > > The procedure to install the driver is the same as > described in the > mini-howto, but after you have patched your kernel, > you just have to > look hid-core.c for : > > 8<-------------------------- > input->evbit[0] |= BIT(EV_MSC); > input->mscbit[0] |= BIT(MSC_SERIAL); > input_event(input, EV_MSC, MSC_SERIAL, 0); > 8<--------------------------- > > And replace it by : > > 8<-------------------------- > struct hid_input* hidinput = > list_entry(hid->inputs.next, struct > hid_input, > list); > struct input_dev* input = &hidinput->input; > > input->evbit[0] |= BIT(EV_MSC); > input->mscbit[0] |= BIT(MSC_SERIAL); > input_event(input, EV_MSC, MSC_SERIAL, 0); > 8<--------------------------- > > > > Lo más cercano que encontré fue > > hid->input.evbit[0] |= BIT(EV_MSC=; > hid->input.mscbit[0] |= BIT(MSC_SERIAL); > input_event(&hid->input, EV_MSC, MSC_SERIAL, 0); > > así que puse lo siguiente: > > struct hid_input* hidinput = > list_entry(hid->inputs.next, struct hid_input, list); > struct input_dev* input = &hidinput->input; > > hid->input.evbit[0] |= BIT(EV_MSC=; > hid->input.mscbit[0] |= BIT(MSC_SERIAL); > input_event(&hid->input, EV_MSC, MSC_SERIAL, 0); > > Intenté hacer la compilación del módulo y obtuve esto: > > gcc -D__KERNEL__ -I/usr/src/linux-2.4.22-10mdk/include > -Wall -Wstrict-prototypes -Wno-trigraphs -O2 > -fno-strict-aliasing -fno-common -pipe > -mpreferred-stack-boundary=2 -march=i686 -DMODULE > -DMODVERSIONS -include > /usr/src/linux-2.4.22-10mdk/include/linux/modversions.h > -nostdinc -iwithprefix include > -DKBUILD_BASENAME=hid_core -c hid-core.c -o > hid-core.o > hid-core.c: In function `hid_input_report': > hid-core.c:945: error: structure has no member named > `input' > hid-core.c:946: error: structure has no member named > `input' > hid-core.c:947: error: structure has no member named > `input' > hid-core.c:943: warning: unused variable `input' > make[2]: *** [hid-core.o] Error 1 > make[2]: Leaving directory > `/usr/src/linux-2.4.22-10mdk/drivers/usb' > make[1]: *** [_modsubdir_usb] Error 2 > make[1]: Leaving directory > `/usr/src/linux-2.4.22-10mdk/drivers' > make: *** [_mod_drivers] Error 2 > > > El documento con las instrucciones y el código para > crear el controlador del WizardPen lo pueden encontrar > aquí: > > http://www.afturgurluk.org/~informancer/wizardpen/ > > Lo interesante de todo esto, es que Mandrake detecta > la tarjeta como un ratón USB de tres botones, pero el > botón derecho no lo detecta y tampoco puedo utilizar > las características de presión con el GIMP, por lo que > intento utilizar el controlador adecuado. > > Mi distribución es Mandrake 9.2, mi compilador es el > gcc 3.3.1, el mensaje original que me envió el creador > del FAQ es el siguiente: > > Actually, the problem is that I didn't updated the doc > for a while ;) > > The procedure to install the driver is the same as > described in the > mini-howto, but after you have patched your kernel, > you just have to > look hid-core.c for : > > 8<-------------------------- > input->evbit[0] |= BIT(EV_MSC); > input->mscbit[0] |= BIT(MSC_SERIAL); > input_event(input, EV_MSC, MSC_SERIAL, 0); > 8<--------------------------- > > And replace it by : > > 8<-------------------------- > struct hid_input* hidinput = > list_entry(hid->inputs.next, struct > hid_input, > list); > struct input_dev* input = &hidinput->input; > > input->evbit[0] |= BIT(EV_MSC); > input->mscbit[0] |= BIT(MSC_SERIAL); > input_event(input, EV_MSC, MSC_SERIAL, 0); > 8<--------------------------- > > You should then add a few -Ipath in the gcc command > line when you launch the compilation, but I don't know > which ones exactly. > > I haven't tested this myself, but it has worked for > the two people who > have tried it (2.4.22 and 2.4.23). > > ¿ALGUNA IDEA? > > _________________________________________________________ > Do You Yahoo!? > Información de Estados Unidos y América Latina, en Yahoo! Noticias. > Visítanos en http://noticias.espanol.yahoo.com > > _______________________________________________ > Ayuda mailing list > Ayuda en linux org mx > Para salir de la lista: http://mail.linux.org.mx/mailman/listinfo/ayuda/ -- Javier Díaz <javierdiazm en yahoo com mx> _______________________________________________ Ayuda mailing list Ayuda en linux org mx Para salir de la lista: http://mail.linux.org.mx/mailman/listinfo/ayuda/