4

I'm working with a limited embedded device - Linux environment - that uses a custom DirectFB implementation to draw a user interface in its video output.

I would like to exchange this method by a raw framebuffer device at /dev/fb0. However, I'm failing to create the node. Enabling framebuffer device at the Linux kernel didn't make it appear and using mknod is giving me a file that most applications won't be able to use. For example:

# mknod /dev/fb0 c 29 0

# ls -l /dev/fb0
crw-r--r--    1 root     root       29,   0 Dec 31 22:04 /dev/fb0

# fbdump
Failed to open /dev/fb0: No such device

Also, I don't know how to create it automatically at boot. I've added the vga=0x101 kernel option to my bootloader to no good.

How's this usually done? Am I missing some requirements?

My Linux version is 3.3.8.

EDIT

More info about the device (Broadcom 97356):

# cat /proc/devices 
Character devices:
  1 mem
  4 /dev/vc/0
  4 tty
  4 ttyS
  5 /dev/tty
  5 /dev/console
  5 /dev/ptmx
  7 vcs
 10 misc
 13 input
 21 sg
 29 fb
 33 nexus
 34 base
 90 mtd
128 ptm
136 pts
180 usb
189 usb_device
231 linker
232 inject
233 audout
234 bmoca
235 pdwriter
236 hdmi
237 stb
238 smartcard
239 led
239 led
239 led
240 fpchar
241 nocs
242 crypto
243 videnc
244 viddec
245 auddec
246 demux
246 demux
246 demux
246 demux
246 demux
246 demux
247 tuner
247 tuner
247 tuner
247 tuner
248 custom
249 fusion
250 soc
251 galaxy_base_log
251 galaxy_base_log
251 galaxy_base_log
252 BaseRemoteCtl
253 ubi0
254 usbmon

Block devices:
  1 ramdisk
259 blkext
  7 loop
  8 sd
 11 sr
 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

# cat /proc/fb
ivarec
  • 255
  • 3
  • 8
  • 1
    possible duplicate of [No framebuffer device: how to enable it?](http://unix.stackexchange.com/questions/33596/no-framebuffer-device-how-to-enable-it) – eyoung100 Oct 07 '14 at 13:48
  • I don't have the vesafb module in my environment. I'll give this a look before closing it as duplicate – ivarec Oct 07 '14 at 13:53
  • Are you allowed to rebuild the kernel? – eyoung100 Oct 07 '14 at 13:56
  • Yes. I've tried enabling framebuffer support and it gets listed in /proc/devices, but the results is the same: no fb0 is created automatically and creating it manually won't work as well – ivarec Oct 07 '14 at 13:57
  • 1
    Does [this post](http://forums.justlinux.com/showthread.php?16559-dev-fb0-no-such-devicce) help? If so, I'll form tackat's post into an answer... – eyoung100 Oct 07 '14 at 14:02
  • 2
    Framebuffer is controlled via `ioctl()`, so there has to be something (the driver) on kernel side interpreting the requests. Just creating the device file won't make kernel respond to it. Double-check your kernel config, maybe another (specialised) driver is taking over the device, leaving the framebuffer one without any device to attach to. Providing a bit more information about the hardware in question might also be helpful. – peterph Oct 07 '14 at 14:13
  • It's a Broadcom 97356 chipset. Are there files in /proc that would detail it more? – ivarec Oct 07 '14 at 14:16
  • @eyoung100 unfortunately the link doesn't help: creating further nodes with multiples of 32 showed the same issues for each new device node. – ivarec Oct 07 '14 at 15:15
  • Can you not output to device 236 - HDMI? – eyoung100 Oct 07 '14 at 15:25
  • Yes, that would be fine. How do I do it? Should I create a fb0 device for it? – ivarec Oct 07 '14 at 15:32
  • No 236 is already its own device. No need to create another device. You just need to set the output device to `/dev/hdmi`, I believe. – eyoung100 Oct 07 '14 at 15:41
  • It's already taken by another process. I'll try to clear the path for my new app. – ivarec Oct 07 '14 at 15:53
  • Well, I don't know how to setup the output device for video without X. I'll look into it :( – ivarec Oct 09 '14 at 14:22

0 Answers0