Pagina 1 di 1

Fase di compilazione driver molto travagliata!

Inviato: lun 25 lug 2005, 23:29
da legionario
Ciao a tutti!

Al momendo della compilazione del driver per la mia scheda video ottengo la marea di errori sottoriportati. Secondo voi quale potrebbe essere il problema? Non riesco proprio a venirne a capo... Ho la slack 10.1 e kernel 2.6.11.7

Grazie per l'attenzione!

Un saluto a tutti.

-------------------------------
make -C /usr/src/linux-2.6.11.7 SUBDIRS=/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203 modules
make[1]: Entering directory `/usr/src/linux-2.6.11.7'
CC [M] /usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.o
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c: In function `viafb_setcolreg':
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1070: warning: passing arg 2 of `writeb' makes pointer from integer without a cast
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1071: warning: passing arg 2 of `writeb' makes pointer from integer without a cast
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1073: warning: passing arg 2 of `writeb' makes pointer from integer without a cast
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1074: warning: passing arg 2 of `writeb' makes pointer from integer without a cast
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1075: warning: passing arg 2 of `writeb' makes pointer from integer without a cast
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c: In function `viafb_fillrect':
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1411: warning: passing arg 2 of `writel' makes pointer from integer without a cast
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1413: warning: passing arg 2 of `writel' makes pointer from integer without a cast
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1415: warning: passing arg 2 of `writel' makes pointer from integer without a cast
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1417: warning: passing arg 2 of `writel' makes pointer from integer without a cast
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1420: warning: passing arg 2 of `writel' makes pointer from integer without a cast
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1422: warning: passing arg 2 of `writel' makes pointer from integer without a cast
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1424: warning: passing arg 2 of `writel' makes pointer from integer without a cast
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1426: warning: passing arg 2 of `writel' makes pointer from integer without a cast
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c: In function `viafb_copyarea':
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1458: warning: passing arg 2 of `writel' makes pointer from integer without a cast
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1460: warning: passing arg 2 of `writel' makes pointer from integer without a cast
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1462: warning: passing arg 2 of `writel' makes pointer from integer without a cast
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1465: warning: passing arg 2 of `writel' makes pointer from integer without a cast
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1467: warning: passing arg 2 of `writel' makes pointer from integer without a cast
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1469: warning: passing arg 2 of `writel' makes pointer from integer without a cast
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1471: warning: passing arg 2 of `writel' makes pointer from integer without a cast
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c: In function `viafb_imageblit':
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1503: warning: passing arg 2 of `writel' makes pointer from integer without a cast
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1505: warning: passing arg 2 of `writel' makes pointer from integer without a cast
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1507: warning: passing arg 2 of `writel' makes pointer from integer without a cast
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1510: warning: passing arg 2 of `writel' makes pointer from integer without a cast
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1512: warning: passing arg 2 of `writel' makes pointer from integer without a cast
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1514: warning: passing arg 2 of `writel' makes pointer from integer without a cast
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1516: warning: passing arg 2 of `writel' makes pointer from integer without a cast
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1518: warning: passing arg 2 of `writel' makes pointer from integer without a cast
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1520: warning: passing arg 2 of `writel' makes pointer from integer without a cast
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1524: warning: passing arg 2 of `writel' makes pointer from integer without a cast
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c: In function `viafb_cursor':
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1550: error: structure has no member named `cursor'
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1551: error: structure has no member named `cursor'
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1551: error: structure has no member named `cursor'
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1552: warning: passing arg 2 of `writel' makes pointer from integer without a cast
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1557: error: structure has no member named `cursor'
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1558: error: structure has no member named `cursor'
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1563: warning: passing arg 2 of `writel' makes pointer from integer without a cast
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1568: warning: passing arg 1 of `readl' makespointer from integer without a cast
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1585: warning: passing arg 2 of `writel' makes pointer from integer without a cast
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1587: error: structure has no member named `cursor'
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1588: error: structure has no member named `cursor'
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1593: error: structure has no member named `cursor'
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1594: error: structure has no member named `cursor'
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1599: error: structure has no member named `cursor'
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1600: error: structure has no member named `cursor'
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1603: error: structure has no member named `cursor'
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1605: error: structure has no member named `cursor'
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1609: error: structure has no member named `cursor'
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1610: error: structure has no member named `cursor'
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1614: warning: passing arg 2 of `writel' makes pointer from integer without a cast
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1615: warning: passing arg 2 of `writel' makes pointer from integer without a cast
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1620: error: structure has no member named `cursor'
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1620: error: structure has no member named `cursor'
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1643: error: structure has no member named `cursor'
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1648: error: structure has no member named `cursor'
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1655: error: structure has no member named `cursor'
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1681: warning: passing arg 1 of `__constant_memcpy3d' makes pointer from integer without a cast
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1681: warning: passing arg 1 of `__memcpy3d' makes pointer from integer without a cast
/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.c:1684: error: structure has no member named `cursor'
make[2]: *** [/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203/viafbdev.o] Error 1
make[1]: *** [_module_/usr/src/linux-2.6.11.7/Linux-FBDev-kernel-src_20050203] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.11.7'
make: *** [Default] Error 2

Inviato: mar 26 lug 2005, 8:17
da gohanz
Hai provato a copiare gli header del kernel 2.6 che si trovano nei sorgenti in linux -2.6.11.7/include/linux in /usr/include/linux

Inviato: mar 26 lug 2005, 22:59
da legionario
Si'...quando ho installato il kernel, a suo tempo, ho creato il seguente collegamento simbolico:

----------------------------------------------------------
root@legionario-pc_fisso:~# ls -l /usr/include/

[...............]

lrwxrwxrwx 1 root root 37 2005-04-27 22:19 linux -> /usr/src/linux-2.6.11.7/include/linux/

[...............]
----------------------------------------------------------

Non capisco proprio quale possa essere il problema..
Qualche idea?

Inviato: mar 26 lug 2005, 23:17
da gohanz
Io quando copio gli Header del 2.6 non creo un link simbolico ma cancello completamente la directory /usr/include/linux e poi ci copio su la directory degli header del 2.6. E' statta l'unica maniera con cui sono riuscito a compilare correttamente i driver Nvidia.

Inviato: mar 26 lug 2005, 23:59
da legionario
Io quando copio gli Header del 2.6 non creo un link simbolico ma cancello completamente la directory /usr/include/linux e poi ci copio su la directory degli header del 2.6. E' statta l'unica maniera con cui sono riuscito a compilare correttamente i driver Nvidia.
Niente da fare...anche in questo modo la situazione non cambia...il mistero si infittisce.. 8O

Inviato: mer 27 lug 2005, 12:02
da legionario
Qualche suggerimento? La ricerca in google non mi ha aiutato... :cry:

Inviato: gio 28 lug 2005, 16:59
da achukito
Hi, I've found this post while I was googleing because of I had the same error as you. Finally I have been able to solve it :P

Note that the error in compilation says this:

fbdev.c:xxxx error: structure has no member named `cursor'

where xxxx is the number line in the file

Well, if we go to the file in that lines (for example line 1550), we'll see that it's trying to access to the field "cursor" in structure "info" (info->cursor...) but the error indicates that structure don't have that field. Looking the profile of the function we are in, we see that "info" is a "struct fb_info" type and looking the function we see that the inexistent field "cursor" will be probably a "struct fb_cursor" type. OK, now we have to locate where the type "struct fb_info" is declared and add a new field called "struct fb_cursor cursor" to it ;) Looking for this type I've found it in fb.h file, so then, the solution is this:

1. Move to your kernel headers directory, in my case:
# cd /usr/src/kernel-headers-2.6.11-1

2. Move there the directory with the via drivers. Supposing it is called viafb:
# mv ......../viafb .

3. Correct the bug in the file fb.h (with kwrite, emacs, vim...):
# kwrite /usr/src/kernel-headers-2.6.11-1/include/linux/fb.h

And here we move to the struct fb_info, I have it around line 700 and it is like this:
struct fb_info {
int node;
int flags;
struct fb_var_screeninfo var; /* Current var */
struct fb_fix_screeninfo fix; /* Current fix */
struct fb_monspecs monspecs; /* Current Monitor specs */
struct work_struct queue; /* Framebuffer event queue */
struct fb_pixmap pixmap; /* Image hardware mapper */
struct fb_pixmap sprite; /* Cursor hardware mapper */
struct fb_cmap cmap; /* Current cmap */
struct list_head modelist; /* mode list */

struct fb_ops *fbops;
struct device *device;
#ifdef CONFIG_FB_TILEBLITTING
struct fb_tile_ops *tileops; /* Tile Blitting */
#endif
char __iomem *screen_base; /* Virtual address */
unsigned long screen_size; /* Amount of ioremapped VRAM or 0 */
void *pseudo_palette; /* Fake palette of 16 colors */
#define FBINFO_STATE_RUNNING 0
#define FBINFO_STATE_SUSPENDED 1
u32 state; /* Hardware state i.e suspend */
void *fbcon_par; /* fbcon use-only private area */
/* From here on everything is device dependent */
void *par;
};


HAVE YOU FOUND IT?? If yes, you only have to add into the function, wherever you want, the next line:
struct fb_cursor cursor;

For example the function could appears like:
struct fb_info {
int node;
int flags;
struct fb_var_screeninfo var; /* Current var */
struct fb_fix_screeninfo fix; /* Current fix */
struct fb_monspecs monspecs; /* Current Monitor specs */
struct work_struct queue; /* Framebuffer event queue */
struct fb_pixmap pixmap; /* Image hardware mapper */
struct fb_pixmap sprite; /* Cursor hardware mapper */
struct fb_cmap cmap; /* Current cmap */
struct list_head modelist; /* mode list */
struct fb_cursor cursor;
struct fb_ops *fbops;
struct device *device;
#ifdef CONFIG_FB_TILEBLITTING
struct fb_tile_ops *tileops; /* Tile Blitting */
#endif
char __iomem *screen_base; /* Virtual address */
unsigned long screen_size; /* Amount of ioremapped VRAM or 0 */
void *pseudo_palette; /* Fake palette of 16 colors */
#define FBINFO_STATE_RUNNING 0
#define FBINFO_STATE_SUSPENDED 1
u32 state; /* Hardware state i.e suspend */
void *fbcon_par; /* fbcon use-only private area */
/* From here on everything is device dependent */
void *par;
};

Now save the file and it's all.

4. Now try to compile the driver:
# cd /usr/src/kernel-headers-2.6.11-1/viafb
# make clean
# make


And the errors should dissappear. If all has gone well, you'll have your lovely module viafb.ko built ;)

5. Continue with the instructions that come with the driver (file Readme.txt)


It's probably that if you don't know C programming language my explication sounds you as Chinese :P but you don't have to understand it, only follow the instructions I have put. I hope they are useful to you, I've been breaking my head for an hour to solve the problem. Good luck!!

Inviato: gio 28 lug 2005, 17:40
da samiel
Hi achukito. sei anglofono?
Vedo che questo è il tuo primo post.
Non ho ben capito come mai
la tua risposta è tutta in inglese.
Considera che qui non siamo
in alt.os.linux.slackware,
e credo diversi utenti di slacky.it
non sappiano l'inglese.
Ma se hai replicato a legionario,
ipotizzo che tu l'itailano lo capisca
Per cui: ti crea problemi
postare in italiano?

Grazie
M.

Inviato: ven 29 lug 2005, 20:47
da legionario
Amazza ao'! 'Sto Achukito e' proprio un mostro! Aveva ragione! Sono finalmente riuscito a compilare il driver!

Sicuramente, mentre cercava di risolvere il problema, e' capitato su slacky e, pur non conoscendo l'italiano, ha intuito il mio problema...sinceramente non credo che lo rivedremo piu'...

--------------------------------
Hi Achukito! Thank you very very much! Finally, I've just solved my problem thanks to your suggestions... :)
At soon!
-----------------------------

Scusate la digressione anglosassone ma ho sentito doveroso ringraziare il mio amico giappo-anglofono!

Saluti a tutti!

Inviato: ven 29 lug 2005, 20:59
da clodo
Mamma legionario,
che botta di (|) :D !!!!!!!!
E' anche stato un caso davvero fortuito che il tuo "solutore" abbia beccato gli errori da google.
Curiosità: che scheda via è la tua?

Inviato: ven 29 lug 2005, 21:03
da legionario
Mamma legionario,
che botta di (|) Very Happy !!!!!!!!
Si', in effetti lo credevo anch'io...il driver si compila ma quando installo il modulo si blocca tutto il sistema...a questo punto mi arrendo. Vuol dire che passero' ai drivers sourceforge.
Curiosità: che scheda via è la tua?
Unichrome

Ciao ciao

Inviato: ven 29 lug 2005, 21:11
da clodo
Te lo chiedevo perchè dove mi servo abitualmente trovo solo ati e nvidia, non che voglia la via, ma ultimamente non esiste altro che quelle due.
Non ti garba nvidia?

Inviato: ven 29 lug 2005, 21:21
da legionario
Non ti garba nvidia?
In realta' la unichrome e' integrata. Visto l'utilizzo che faccio del pc (internet e smanettamento linux) sarebbe una spesa inutile comprare una scheda video...