[uClinux-dev] m68k-bdm-elf-gdb device open failed (post again)

Gavin Lambert gavinl at compacsort.com
Sun Aug 7 18:28:27 EDT 2005


Well, this probably won't help, but I don't even have /dev/bdmcf0 (the
file doesn't exist) and yet I can still open it just fine with the BDM
tools.  from what I vaguely recall reading in the past, the tools will
try to access it through the user-mode BDM library if the device file
doesn't exist (rather than the kernel-mode driver, if it does exist).  I
haven't even installed the driver -- just the library.

> -----Original Message-----
> From: John Raz
> Sent: Sunday, 7 August 2005 10:02
> Subject: Re: [uClinux-dev] m68k-bdm-elf-gdb device open 
> failed (post again)
> 
> 
> Brad,
> 
> Thanks for your input. I think I'm in over my head. Although I've 
> written a couple of drivers for uClinux(2.4) I can't really 
> understand 
> what's going on with this bdm program/drivers. Anyways...
> 
> I did the depmod and noticed that the "make install" had put 
> the module 
> bdm.ko in /lib/modules/2.6.11-1.27_FC3/extra. After depmod 
> there was a 
> corresponding entry in the modules.dep file. It still 
> wouldn't load it 
> without giving the full path name. At this point I just load 
> it that way.
> 
> I used the file local_scripts/MAKEDEV which creates the device file 
> /dev/bdmcf0 with maj=34, minor=4 which is supposed to be 
> correct for the 
> coldfire.
> 
> In /proc/devices the bdm is on major 34.
> 
> When I run the "bdm-chk /dev/bdmcf0" command I use "cat 
> /proc/kmsg" to 
> see the driver's output. Note that I added a few printk's:
> 
> [root at work1 ~]# cat /proc/kmsg
> <4>bdm_init_module 2.11, Aug  6 2005, 17:39:30
> <4>linux_bdm_init: nminor=12
> <4>linux_bdm_init: minor=0  BDM_IFACE_MINOR(minor)=0   port=378
> <4>BDM driver cannot detect LPT1.
> <4>linux_bdm_init: minor=1  BDM_IFACE_MINOR(minor)=1   port=278
> <4>BDM driver cannot detect LPT2.
> <4>linux_bdm_init: minor=2  BDM_IFACE_MINOR(minor)=2   port=3bc
> <4>BDM driver cannot detect LPT3.
> <4>linux_bdm_init: minor=3  BDM_IFACE_MINOR(minor)=3   port=9400
> <4>BDM driver cannot detect LPT4.
> <4>linux_bdm_init: minor=4  BDM_IFACE_MINOR(minor)=0   port=378
> <4>BDM driver cannot detect LPT1.
> <4>linux_bdm_init: minor=5  BDM_IFACE_MINOR(minor)=1   port=278
> <4>BDM driver cannot detect LPT2.
> <4>linux_bdm_init: minor=6  BDM_IFACE_MINOR(minor)=2   port=3bc
> <4>BDM driver cannot detect LPT3.
> <4>linux_bdm_init: minor=7  BDM_IFACE_MINOR(minor)=3   port=9400
> <4>BDM driver cannot detect LPT4.
> <4>linux_bdm_init: minor=8  BDM_IFACE_MINOR(minor)=0   port=378
> <4>BDM driver cannot detect LPT1.
> <4>linux_bdm_init: minor=9  BDM_IFACE_MINOR(minor)=1   port=278
> <4>BDM driver cannot detect LPT2.
> <4>linux_bdm_init: minor=10  BDM_IFACE_MINOR(minor)=2   port=3bc
> <4>BDM driver cannot detect LPT3.
> <4>linux_bdm_init: minor=11  BDM_IFACE_MINOR(minor)=3   port=9400
> <4>BDM driver cannot detect LPT4.
> <4>bdm_open -- minor 4
> 
> It seems to get the open request for minor 4 and prints 
> "<4>bdm_open -- 
> minor 4" but then the result is still failure:
>     [raz at work1 test]$ ./bdm-chk /dev/bdmcf0
>     BDM Check for Coldfire processors.
>     Device: /dev/bdmcf0
>     trying kernel driver: /dev/bdmcf0
>     trying bdm server: localhost:/dev/bdmcf0
>     bdm-remote:open: localhost:6543:/dev/bdmcf0 failed
>     Open failed: No such device or address
> 
> As a final note of interest, I can't even figure out how the 
> driver is 
> compiled. There are several functions and structs which I can't see 
> where they are declared. The only includes are 
> <linux/config.h> etc and 
> yet these do not define, for example bdm_open(), or 
> bdm_device_info. I 
> guess I'm missing something here.
> 
> As before all comments are appreciated
> thanks
>     John
> 
> _______________________________________________
> uClinux-dev mailing list
> uClinux-dev at uclinux.org 
> http://mailman.uclinux.org/mailman/listinfo/uc> linux-dev
> This 
> message was resent by uclinux-dev at uclinux.org
> 




More information about the uClinux-dev mailing list