LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 05-29-2018, 08:45 AM   #1
Astralix
LQ Newbie
 
Registered: Dec 2008
Location: Germany
Distribution: Ubuntu, Lubuntu, Armbian, Raspbian
Posts: 9

Rep: Reputation: 0
Fixed assignment of /dev/fb0 and /dev/fb1 possible?


Hi there!

I am developing a unit, based on Freescale iMX6 SOC, that has an internal OLED display connected via a SPI interface and is driven by the simple LCD / framebuffer driver framework.

In addition the user can optionally connect a HDMI monitor, mouse and keyboard to the unit and is then able to control the unit on that way.

Unfortunately the internal display switches its framebuffer device number, depending if a monitor has been connected on boot off the unit.

As a side-effect two things happen now, if HDMI is not used on boot. On one hand, the application does not run anymore, as it fails to get hold of /dev/fb1. Instead the graphical desktop is starting on /dev/fb0, showing a little bit of a desktop and a mouse pointer on a 480x128 OLED grayscale display.

System platform is Armbian (Debian / Ubuntu remix) with kernel 4.15.15.

Two things are needed for me:
- how to either lock /dev/fb0 and /dev/fb1 in place or how to identify the SPI connected device in a safe way.
- how to avoid the desktop running if no HDMI is connected or how to run the desktop even when HDMI is not connected.

Any help welcomed.
 
Old 05-29-2018, 10:18 AM   #2
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 8,305
Blog Entries: 21

Rep: Reputation: 4802Reputation: 4802Reputation: 4802Reputation: 4802Reputation: 4802Reputation: 4802Reputation: 4802Reputation: 4802Reputation: 4802Reputation: 4802Reputation: 4802
That kind of thing is usually done by udev. You can find out the pci device paths of the two devices and then make a udev rule using the DEVPATH variable to assign a fixed fb device to each. But writing udev rules is very tricky.
 
Old 05-30-2018, 08:40 AM   #3
Astralix
LQ Newbie
 
Registered: Dec 2008
Location: Germany
Distribution: Ubuntu, Lubuntu, Armbian, Raspbian
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks hazel!

I wonder if there is an option to find the OLED display by using sys tree? There are many options to find devices from different directions. But I can't quite remember that I have seen any links between /dev/spi and /dev/fb using paths inside /sys/class/...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
trying to create /dev/fb0 node rahulpr Linux - Newbie 2 02-12-2012 08:22 AM
How to take a screenshot with /dev/fb0 raypen Slackware 4 12-15-2011 04:30 AM
/dev/fb0: No such file or directory hellocatfood Linux - Software 4 01-17-2011 07:16 AM
/dev/fb0: No such device but i can see it marius_c Linux - Software 5 02-17-2010 11:58 PM
/dev/fb0: No such file or directory mukeshj Linux - Software 2 09-04-2005 11:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 09:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration