WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: fb1 as console  (Read 5395 times)

Offline andyj

  • Hero Member
  • *****
  • Posts: 1036
fb1 as console
« on: May 04, 2015, 12:00:17 AM »
How can I make a display on /dev/fb1 my console once it becomes available, about 2.9 seconds in the boot process?

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: fb1 as console
« Reply #1 on: May 04, 2015, 01:59:50 AM »
Why do you need /dev/fb1 instead of /dev/fb0?
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline andyj

  • Hero Member
  • *****
  • Posts: 1036
Re: fb1 as console
« Reply #2 on: May 04, 2015, 06:11:03 AM »
Because I have a little 2.8" screen that only works in X right now. It would be nice if it had some functionality when X isn't running and I don't have an HDMI monitor connected.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: fb1 as console
« Reply #3 on: May 05, 2015, 04:40:14 AM »
Read fbcon.txt in the kernel source documentation. Many ways from bootcodes to runtime.
The only barriers that can stop you are the ones you create yourself.

Offline andyj

  • Hero Member
  • *****
  • Posts: 1036
Re: fb1 as console
« Reply #4 on: May 05, 2015, 08:49:11 PM »
I decided the easiest way was to compile in the necessary modules and add fbcon=map:0 to cmdline.txt. Works like a charm. The rainbow splash is still on the HDMI display, after that the raspberries and text are on the TFT.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: fb1 as console
« Reply #5 on: May 06, 2015, 02:56:50 AM »
I decided the easiest way was to compile in the necessary modules ...

Which modules?
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline andyj

  • Hero Member
  • *****
  • Posts: 1036
Re: fb1 as console
« Reply #6 on: May 06, 2015, 06:34:44 PM »
This display: https://www.adafruit.com/products/1601 on a RPi 2.

I'm still on 6.1 alpha 2. I'll get around to upgrading someday. The modules I compiled into 3.18.9 I believe (guessing actually) are fbtft, fb_ili9340, stmpe-ts, spi_bcm2708, bcm2708_gpio and some console fonts. I can diff the .config once I get a hold of a stock one. The display itself (printing on the back) says its a stmpe610 and ili9341, but it detected as an ili9340 when I first got it working. I suppose I could try switching the ili9340 for ili9341 to see what happens.

In /mnt/mmcblk0p1/config.txt add:
dtparam=spi=on
dtparam=i2c1=on
dtparam=i2c_arm=on
dtoverlay=pitft28r,rotate=90,speed=32000000,fps=20

You can get a lot on the little screen with fbcon:font=MINI4x6 in the cmdline.txt. But after cheating death for over a half century I need some fairly strong glasses to read it.

Offline andyj

  • Hero Member
  • *****
  • Posts: 1036
Re: fb1 as console
« Reply #7 on: May 29, 2015, 06:16:45 PM »
With 3.18.14 I've learned that the required modules for the Adafruit 2.8" GPIO display are spi-bcm2835, fb_ili9340, and stmpe_ts. joydev and i2c_bcm2708 also get loaded but lsmod doesn't show a dependancy, so I don't know for sure that they are required. I didn't try blacklisting to find out, I just went ahead and compiled them all in along with some fonts so that I could use it as a console. There are probably some other GPIO parts compiled in but I don't remember which ones. I'm attaching my .config for anyone interested. Add the following to the end of config.txt:

device_tree=bcm2709-rpi-2-b.dtb
dtparam=spi,i2c,i2c1
dtoverlay=mmc-overlay.dtb
dtoverlay=sdhost-overlay.dtb
dtoverlay=spi-bcm2835-overlay.dtb

dtoverlay=pitft28r,rotate=90,speed=32000000,fps=20