Skip to content
notro edited this page Jul 7, 2013 · 12 revisions

For those who want a boot console on their display, there are two options:

  1. Compile the driver into the kernel and provide device info in the platform file
    • displays kernel messages on an early stage in the boot process
    • requires kernel compilation
    • with SPI displays the BCM2708 SPI controller driver must be compiled into the kernel
  2. Compile the driver as a module and load it from /etc/modules
    • can use prebuild fbtft image
    • only shows the last few kernel boot messages

Enable Console

To use the display as a console, add this to the end of the line in /boot/cmdline.txt

fbcon=map:10 fbcon=font:VGA8x8

Other fonts: MINI4x6, VGA8x8, Acorn8x8, PEARL8x8, ProFont6x11, 7x14, VGA8x16, SUN8x16, 10x18, SUN12x22

fbcon=rotate:1 can be used to rotate the console.

fbcon.txt has more info.

Console blanking

By default the console goes blank after 30 minutes (on the Raspberry Pi).
The default is set in /etc/kbd/config:

BLANK_TIME=30

Change temporarily:

  • From console: setterm -blank 1
  • From SSH: sudo sh -c "TERM=linux setterm -blank 1 >/dev/tty0"

Kernel messages

Following is the kernel messages produced with the two options.
The only thing that differs, is when the fbtft driver is loaded.

Booting Linux on physical CPU 0
Initializing cgroup subsys cpu
Linux version 3.6.11+ (root@raspberrypi) (gcc version 4.6.3 (Debian 4.6.3-12+rpi1) ) #8 PREEMPT Wed Apr 10 16:17:55 CEST 2013
CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
Machine: BCM2708
Memory policy: ECC disabled, Data cache writeback
On node 0 totalpages: 49152
free_area_init_node: node 0, pgdat c053b39c, node_mem_map c05e3000
  Normal zone: 384 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 48768 pages, LIFO batch:15
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
pcpu-alloc: [0] 0
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 48768
Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708.boardrev=0x2 bcm2708.serial=0x298b2673 smsc95xx.macaddr=B8:27:EB:8B:26:73 sdhci-bcm2708.emmc_clock_freq=100000000 vc_mem.mem_base=0xec00000 vc_mem.mem_size=0x10000000  dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait fbcon=map:10 fbcon=font:ProFont6x11
PID hash table entries: 1024 (order: 0, 4096 bytes)
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 192MB = 192MB total
Memory: 188792k/188792k available, 7816k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xcc800000 - 0xff000000   ( 808 MB)
    lowmem  : 0xc0000000 - 0xcc000000   ( 192 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .text : 0xc0008000 - 0xc04e5c88   (4984 kB)
      .init : 0xc04e6000 - 0xc050622c   ( 129 kB)
      .data : 0xc0508000 - 0xc053bb00   ( 207 kB)
       .bss : 0xc053bb24 - 0xc05e20d8   ( 666 kB)
NR_IRQS:330
sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps every 4294967ms
Console: colour dummy device 80x30
console [tty1] enabled
Calibrating delay loop... 464.48 BogoMIPS (lpj=2322432)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
Initializing cgroup subsys cpuacct
Initializing cgroup subsys devices
Initializing cgroup subsys freezer
Initializing cgroup subsys blkio
CPU: Testing write buffer coherency: ok
hw perfevents: enabled with v6 PMU driver, 3 counters available
Setting up static identity map for 0x3a11e8 - 0x3a1244
devtmpfs: initialized
NET: Registered protocol family 16
DMA: preallocated 4096 KiB pool for atomic coherent allocations
bcm2708.uart_clock = 0
hw-breakpoint: found 6 breakpoint and 1 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
mailbox: Broadcom VideoCore Mailbox driver
bcm2708_vcio: mailbox at f200b880
bcm_power: Broadcom power driver
bcm_power_open() -> 0
bcm_power_request(0, 8)
bcm_mailbox_read -> 00000080, 0
bcm_power_request -> 0
Serial: AMBA PL011 UART driver
dev:f1: ttyAMA0 at MMIO 0x20201000 (irq = 83) is a PL011 rev3
console [ttyAMA0] enabled
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Switching to clocksource stc
FS-Cache: Loaded
CacheFiles: Loaded
NET: Registered protocol family 2
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP: reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
bcm2708_dma: DMA manager at f2007000
bcm2708_gpio: bcm2708_gpio_probe c0515e50
vc-mem: phys_addr:0x00000000 mem_base=0x0ec00000 mem_size:0x10000000(256 MiB)
audit: initializing netlink socket (disabled)
type=2000 audit(0.920:1): initialized
VFS: Disk quotas dquot_6.5.2
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
FS-Cache: Netfs 'nfs' registered for caching
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
msgmni has been set to 368
io scheduler noop registered
io scheduler deadline registered (default)
io scheduler cfq registered
Console: switching to colour frame buffer device 82x26

When the fbtft driver is compiled into the kernel, it will be loaded at this point:

graphics fb1: itdb28fb frame buffer, 150 KiB video memory, 4 KiB buffer memory, fps=20

Kernel loading continues

kgdb: Registered I/O driver kgdboc.
brd: module loaded
loop: module loaded
vchiq: vchiq_init_state: slot_zero = 0xcc804000, is_master = 0
usbcore: registered new interface driver smsc95xx
usbcore: registered new interface driver cdc_ncm
dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
Core Release: 2.80a
Setting default values for core params
Finished setting default values for core params
Using Buffer DMA mode
Periodic Transfer Interrupt Enhancement - disabled
Multiprocessor Interrupt Enhancement - disabled
OTG VER PARAM: 0, OTG VER FLAG: 0
Dedicated Tx FIFOs mode
dwc_otg: Microframe scheduler enabled
dwc_otg bcm2708_usb: DWC OTG Controller
dwc_otg bcm2708_usb: new USB bus registered, assigned bus number 1
dwc_otg bcm2708_usb: irq 32, io mem 0x00000000
Init: Port Power? op_state=1
Init: Power Port (0)
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: DWC OTG Controller
usb usb1: Manufacturer: Linux 3.6.11+ dwc_otg_hcd
usb usb1: SerialNumber: bcm2708_usb
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
dwc_otg: FIQ enabled
dwc_otg: NAK holdoff enabled
Module dwc_common_port init
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver libusual
mousedev: PS/2 mouse device common for all mice
bcm2835-cpufreq: min=700000 max=700000 cur=700000
bcm2835-cpufreq: switching to governor powersavebcm2835-cpufreq: switching to governor powersave
cpuidle: using governor ladder
cpuidle: using governor menu
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci: Enable low-latency mode
Registered led device: mmc0::
Indeed it is in host mode hprt0 = 00021501
mmc0: SDHCI controller on BCM2708_Arasan [platform] using platform's DMA
mmc0: BCM2708 SDHC host at 0x20300000 DMA 2 IRQ 77
sdhci-pltfm: SDHCI platform and OF driver helper
Registered led device: led0
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
TCP: cubic registered
Initializing XFRM netlink socket
mmc0: could read SD Status register (SSR) at the 3th attempt
NET: Registered protocol family 17
Key type dns_resolver registered
VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
mmc0: new high speed SDHC card at address 0007
registered taskstats version 1
mmcblk0: mmc0:0007 SD8GB 7.21 GiB
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
 mmcblk0: p1 p2
usb 1-1: new high-speed USB device number 2 using dwc_otg
Indeed it is in host mode hprt0 = 00001101
EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
VFS: Mounted root (ext4 filesystem) on device 179:2.
devtmpfs: mounted
Freeing init memory: 128K
usb 1-1: New USB device found, idVendor=0424, idProduct=9512
usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 3 ports detected
usb 1-1.1: new high-speed USB device number 3 using dwc_otg
usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
smsc95xx v1.0.4
smsc95xx 1-1.1:1.0: eth0: register 'smsc95xx' at usb-bcm2708_usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:8b:26:73
usb 1-1.2: new low-speed USB device number 4 using dwc_otg
usb 1-1.2: New USB device found, idVendor=045e, idProduct=0084
usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-1.2: Product: Basic Optical Mouse
usb 1-1.2: Manufacturer: Microsoft
input: Microsoft Basic Optical Mouse as /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2:1.0/input/input0
hid-generic 0003:045E:0084.0001: input: USB HID v1.10 Mouse [Microsoft Basic Optical Mouse] on usb-bcm2708_usb-1.2/input0
usb 1-1.3: new low-speed USB device number 5 using dwc_otg
usb 1-1.3: New USB device found, idVendor=046d, idProduct=c313
usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-1.3: Product: USB Multimedia Keyboard
usb 1-1.3: Manufacturer: LITEON Technology
input: LITEON Technology USB Multimedia Keyboard as /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3:1.0/input/input1
hid-generic 0003:046D:C313.0002: input: USB HID v1.10 Keyboard [LITEON Technology USB Multimedia Keyboard] on usb-bcm2708_usb-1.3/input0
input: LITEON Technology USB Multimedia Keyboard as /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3:1.1/input/input2
hid-generic 0003:046D:C313.0003: input: USB HID v1.10 Device [LITEON Technology USB Multimedia Keyboard] on usb-bcm2708_usb-1.3/input1
udevd[142]: starting version 175
EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)

Now the kernel starts loading modules in /etc/modules

bcm2835 ALSA card created!
bcm2835 ALSA chip created!
bcm2835 ALSA chip created!
bcm2835 ALSA chip created!
bcm2835 ALSA chip created!
bcm2835 ALSA chip created!
bcm2835 ALSA chip created!
bcm2835 ALSA chip created!

When the fbtft driver is compiled as a module, it will be loaded at this point:

fbtft_device:  SPI devices registered:
fbtft_device:  'fb' Platform devices registered:
fbtft_device:      bcm2708_fb id=-1 pdata? no
fbtft_device:  GPIOS used by 'itdb28fb':
fbtft_device:    'reset' = GPIO17
fbtft_device:    'dc' = GPIO1
fbtft_device:    'wr' = GPIO0
fbtft_device:    'cs' = GPIO21
fbtft_device:    'db00' = GPIO9
fbtft_device:    'db01' = GPIO11
fbtft_device:    'db02' = GPIO18
fbtft_device:    'db03' = GPIO23
fbtft_device:    'db04' = GPIO24
fbtft_device:    'db05' = GPIO25
fbtft_device:    'db06' = GPIO8
fbtft_device:    'db07' = GPIO7
fbtft_device:    'led' = GPIO4
fbtft_device:  'fb' Platform devices registered:
fbtft_device:      bcm2708_fb id=-1 pdata? no
fbtft_device:      itdb28fb id=0 pdata? yes
graphics fb1: itdb28fb frame buffer, 150 KiB video memory, 4 KiB buffer memory, fps=20

Kernel loading continues

smsc95xx 1-1.1:1.0: eth0: link up, 100Mbps, full-duplex, lpa 0xC1E1
Adding 102396k swap on /var/swap.  Priority:-1 extents:1 across:102396k SS

The boot scripts is now run.
Login is presented on the console.

piwik

Clone this wiki locally