2009-06-11 12:05:49     Charcter driver open error

Document created by Aaronwu Employee on Aug 15, 2013
Version 1Show Document
  • View in full screen mode

2009-06-11 12:05:49     Charcter driver open error

Harbhajan Singh (INDIA)

Message: 75544   

 

Hi,

 

I am working with uClinux distribution 2008R1.5 and BF527 Ezkit.

 

I am trying to port a working character driver from bf533 kernel to bf527.

 

driver init function is called succesfully. but the device node is not created. when i try to open the device driver i am getting the error.

 

please help me where i am doing mistake.

 

please find the log details.

 

syntax for opening the device driver.

 

drv_fd = open("dev/drv",O_RDWR);

 

in the device_table.txt file i have added the code as follows

 

/dev/drv       c       664     0       0       245     10      0       0       -

 

root:/> ./testapp

Cannot open drv, error: 2 No such file or directory

drv_fd = -1

 

 

root:/> ls dev/

kmsg            ram1            ram4            tty

log             ram10           ram5            ttyBF0

audio           mem             ram11           ram6            urandom

console         mixer           ram12           ram7            usbdev1.1

dsp             null            ram13           ram8            usbdev1.1_ep00

fb0             otp             ram14           ram9            usbdev1.1_ep81

full            ptmx            ram15           random          watchdog

i2c-0           pts             ram2            rtc0            zero

kmem            ram0            ram3            snd

 

 

root:/> cat proc/devices

Character devices:

  1 mem

  5 /dev/tty

  5 /dev/console

  5 /dev/ptmx

10 misc

13 input

14 sound

29 fb

89 i2c

116 alsa

128 ptm

136 pts

180 usb

189 usb_device

204 ttyBF

245 /dev/drv

251 usbmon

252 otp

253 rtc

254 usb_endpoint

 

Block devices:

  1 ramdisk

  8 sd

31 mtdblock

65 sd

66 sd

67 sd

68 sd

69 sd

70 sd

71 sd

128 sd

129 sd

130 sd

131 sd

132 sd

133 sd

134 sd

135 sd

 

Thankyou.

QuoteReplyEditDelete

 

 

2009-06-11 17:24:33     Re: Charcter driver open error

Mike Frysinger (UNITED STATES)

Message: 75560   

 

please review the documentation:

  docs.blackfin.uclinux.org/doku.php?id=uclinux-dist:dev-management

Attachments

    Outcomes