From: Zoltan B. <zb...@fr...> - 2004-05-31 11:16:42
|
Zoltan Boszormenyi =EDrta: >=20 > --- dummycon.c.old 2004-05-31 11:48:34.137610128 +0200 > +++ dummycon.c 2004-05-31 11:51:39.421442704 +0200 > @@ -103,16 +103,21 @@ > const char *display_desc =3D NULL; > struct vt_struct *vt; > =20 > +printk("%s() called\n", __FUNCTION__); > + > vt =3D (struct vt_struct *) kmalloc(sizeof(struct vt_struct),G= FP_KERNEL); > =20 > if (!vt) return -ENOMEM; > =20 > +printk("%s() kmalloc successful\n", __FUNCTION__); > + > memset(vt, 0, sizeof(struct vt_struct)); > vt->vt_kmalloced =3D 1; > vt->vt_sw =3D &dummy_con; > display_desc =3D vt_map_display(vt, 1, MIN_NR_CONSOLES); > if (!display_desc) { > kfree(vt); > +printk("%s() vt_map_display() failed\n", __FUNCTION__); > return -ENODEV; > } > printk("Console: mono %s %dx%d vc:%d-%d\n", display_desc, >=20 OK, running make clean make make install modprobe dumdum after putting these into the tree's drivers/video/console/dummycon.c, I got this: dumdum: module license 'unspecified' taints kernel. dumbcon_add() called dumbcon_add() kmalloc successful invalid operand: 0000 [1] CPU 0 Modules linked in: dumdum snd_emu10k1 snd_util_mem snd_hwdep ... I don't quote it entirely again, seems like a NULL pointer deref. Next round of changes attached. # modprobe dumdum # dmesg ... dumdum: module license 'unspecified' taints kernel. dumbcon_add() called dumbcon_add() kmalloc successful vt_map_display() called vt_map_display() before ->con_startup() vt_map_display() after ->con_startup() vt_map_display() con_startup() was successful() Console: mono dummy device 80x25 vc:17-17 Now what? Miscompilation? Mis-linkage? # rpm -q gcc binutils gcc-3.3.3-7 binutils-2.15.90.0.3-5 Anyway, after # echo "isa0060/serio0/input0" >/proc/bus/console/01/keyboard # dmesg ... keyboard: [AT Translated Set 2 keyboard] bound to [dummy device] vc:17-17 Putting these into /etc/rc.d/rc.local now I have a dual-head 64-bit Linux machine! :-D Thanks, Aivil, for the starting point. Next time I will try to compile this with gcc-3.4.0, that may give some difference. Best regards, Zolt=E1n B=F6sz=F6rm=E9nyi |