[DEV] Kernel framebuffer console / kernel cmdline

Cpasjuste

Senior Member
Jun 8, 2007
962
1,358
0
Hi, i'm actually playing with my new galaxy S phone, and i was trying to get a kernel framebuffer console output for debugging purpose. Has anyone succeed in this ? I saw that the "universal lagfix kernel" is using a graphs application, even this application do not output correctly to the framebuffer on my galaxy S. It seems the bootloader logo is running on top of the framebuffer, preventing a correct blitting. Some help here would be very helpful.

Else it seems the bootloader is overriding the kernel command line, does someone take a look at this ?

Thanks,
Cpasjuste.


Edit : take a look at post #3
 
Last edited:

RyanZA

Senior Member
Jan 21, 2006
2,023
777
0
JHB
Hi, i'm actually playing with my new galaxy S phone, and i was trying to get a kernel framebuffer console output for debugging purpose. Has anyone succeed in this ? I saw that the "universal lagfix kernel" is using a graphs application, even this application do not output correctly to the framebuffer on my galaxy S. It seems the bootloader logo is running on top of the framebuffer, preventing a correct blitting. Some help here would be very helpful.

Else it seems the bootloader is overriding the kernel command line, does someone take a look at this ?

Thanks,
Cpasjuste.
Agreed, it seems a bit strange. I've also tried this without much luck so far.
So basically, bump! :D
 

Cpasjuste

Senior Member
Jun 8, 2007
962
1,358
0
Just a little update, it's now easy to get framebuffer console working with the gingerthing kernel port found here :

- Initramfs : https://github.com/project-voodoo/nsonsgs-initramfs
- Kernel : https://github.com/galaxys-kernel/linux_samsung_galaxys_port/

In short :

Force the kernel cmdline in .config :

CONFIG_CMDLINE="console=tty0,115200 fbcon=rotate:1 fbcon=font:VGA8x8"
CONFIG_CMDLINE_FORCE=y

Then enable fb console :

CONFIG_VT=y
CONFIG_DUMMY_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
CONFIG_FONTS=y
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
CONFIG_LOGO=y
CONFIG_LOGO_LINUX_MONO=y

(if it ask for vga console reply No)

It should now be easier to port your favorite distribution :)
 
Last edited:

kenkitt

Senior Member
Jul 16, 2013
114
37
0
Thanks

Most. BTW: Date...
I'm now compiling for MTK 6573 Alcatel OT-918D :) , hope it works.
About the kernel commandline what should I put, or maybe the one used here will work ?

---------- Post added at 10:10 AM ---------- Previous post was at 10:05 AM ----------

Building failed :(
drivers/video/console/fbcon.c:638: note: expected 'struct file *' but argument is of type 'struct fb_info *'
drivers/video/console/fbcon.c:638: error: too few arguments to function 'info->fbops->fb_open'
drivers/video/console/fbcon.c: In function 'con2fb_release_oldinfo':
drivers/video/console/fbcon.c:670: warning: passing argument 1 of 'oldinfo->fbops->fb_release' from incompatible pointer type
drivers/video/console/fbcon.c:670: note: expected 'struct file *' but argument is of type 'struct fb_info *'
drivers/video/console/fbcon.c:670: error: too few arguments to function 'oldinfo->fbops->fb_release'
drivers/video/console/fbcon.c:673: warning: passing argument 1 of 'newinfo->fbops->fb_release' from incompatible pointer type
drivers/video/console/fbcon.c:673: note: expected 'struct file *' but argument is of type 'struct fb_info *'
drivers/video/console/fbcon.c:673: error: too few arguments to function 'newinfo->fbops->fb_release'
drivers/video/console/fbcon.c: In function 'fbcon_startup':
drivers/video/console/fbcon.c:868: warning: passing argument 1 of 'info->fbops->fb_open' from incompatible pointer type
drivers/video/console/fbcon.c:868: note: expected 'struct file *' but argument is of type 'struct fb_info *'
drivers/video/console/fbcon.c:868: error: too few arguments to function 'info->fbops->fb_open'
drivers/video/console/fbcon.c: In function 'fbcon_exit':
drivers/video/console/fbcon.c:3388: warning: passing argument 1 of 'info->fbops->fb_release' from incompatible pointer type
drivers/video/console/fbcon.c:3388: note: expected 'struct file *' but argument is of type 'struct fb_info *'
drivers/video/console/fbcon.c:3388: error: too few arguments to function 'info->fbops->fb_release'
make[3]: *** [drivers/video/console/fbcon.o] Error 1
make[2]: *** [drivers/video/console] Error 2
make[1]: *** [drivers/video] Error 2
make: *** [drivers] Error 2
make: *** Waiting for unfinished jobs....
CC [M] ../mediatek/source/kernel/drivers/lttng/probes/net-extended-trace.o
CC [M] ../mediatek/source/kernel/drivers/lttng/probes/block-trace.o
CC ../mediatek/source/kernel/kernel/trace_mt65xx_mon.o
LD [M] ../mediatek/source/kernel/drivers/lttng/ltt-relay.o
CC ../mediatek/source/kernel/drivers/m4u/m4u_kernel.o
../mediatek/source/kernel/drivers/m4u/m4u_kernel.c: In function 'm4u_user_v2p':
../mediatek/source/kernel/drivers/m4u/m4u_kernel.c:66: warning: format '%d' expects type 'int', but argument 3 has type 'struct task_struct *'
 

nexolight

Senior Member
Nov 7, 2013
343
748
0
Olten
I'm trying to do this as well. It compiles fine but the device is stuck with a black screen, LCD backlight on and warming up after the bootloader logo.

This thread needs to be resurrected it's still a thing and an alternate to USB/Serial or JTAG debugging
 

htimsxela

Senior Member
Sep 18, 2011
110
54
0
Arroio do Meio
I'm trying to do this as well. It compiles fine but the device is stuck with a black screen, LCD backlight on and warming up after the bootloader logo.

This thread needs to be resurrected it's still a thing and an alternate to USB/Serial or JTAG debugging
You are right. My kernel compiles, but when it boots, it changes directly from the bootloader (penguin in the middle of the screen) to the boot logo (TWRP, in my case). I'm compiling the kernel for a Letv LeMax 1 (X900/Max1).
 

MLX

Senior Member
Mar 12, 2016
131
23
18
18
Buenos Aires
Just for getting the Linux penguin on screen at boot time, you can enable BOOT_LOGO on defconfig.
For getting the text to show up it's a different story, I'll try to compile a kernel for my device (pretty old, 2012) but that should be possible, after all the linux kernel is there and has native support for doing that kind of things!