[BPI-R2] Hdmi in uboot and linux

(Alex R.) #21

I’ve finally done with it! I’ve ported fbdev from 4.4 kernel, and looks like it works.

photo and video

(Alex R.) #22

I need some time to check and describe it.

Bad news - the sd-card slot on my R2 has been broken - it can’t hold sdcard anymore (You can see “waiting for root” on video ). It has contact only while i’m pushing to card. I probably can bot from EMMC, but i steel need sd to install image.:frowning:

So i’m out of buissnes for some time.

(Alex R.) #23

And we steel need more tests. As for me - both Xorg and framebuffer work!

(Frank W.) #24

can you share your ported fbdev and xserver-config?

(Alex R.) #25

I’ve created the pull request on github, check it please. (it’s a bit draft, so if @Ryder.Lee or someone qualified will can to audit it, that would be great! As I’m not a driver developer :slight_smile: )

I didn’t made any scpecial chandes to Xorg config. It’s default.

(Alex R.) #26

And also CONFIG_DRM_FBDEV_EMULATION=y should be activated

(Frank W.) #27

the pull-request from Alex: https://github.com/frank-w/BPI-R2-4.14/pull/23/files

@Ryder.Lee can you take a look on it? if you say it’s right i merge it to hdmi-branch so i can also test it…my hdmi-cable should arrive today (needed a longer one)

@DeadMeat imho you can add CONFIG_DRM_FBDEV_EMULATION=y to fwu_defconfig in your branch and the pullrequest should be updated…

(Alex R.) #28

Done. The pull request has been updated.


Looks good to me. You can take this through your tree.

(Frank W.) #30

have included it into 4.16-hdmi branch. @DeadMeat have you additional settings in uEnv.txt to get console-output over hdmi like i mentioned above?

(Alex R.) #31

@frank-w, sorry, no. For now my R2 is turned off, until I figure out what to do with SD-card slot.

(Frank W.) #32

ok, you used the default uEnv.txt from ubuntu-image…

is card recognized on host-pc? what says badblocks?

(Alex R.) #33


The card is OK, it’s a mechanical problem - ‘click&hold’ mechanism seems to be broken, so card slot can’t hold the card.

(Frank W.) #34

oh, thats very bad :frowning:

does the card hold inside or is it thrown out a bit?

can you send me the uEnv.txt, so that i can compare with my own?

(Alex R.) #35
## uEnv.txt
root=/dev/mmcblk0p2 rootfstype=ext4 rootwait
console=earlyprintk console=tty1 fbcon=map:0 console=ttyS0,115200
bootopts=vmalloc=496M debug=7 initcall_debug=0
abootargs=setenv bootargs board=${board} console=${console} root=${root} service=${service} ${bootopts}
ahello=echo Banana Pi ${board} chip: $chip Service: $service
aboot=if fatload $device $partition $rdaddr ${bpi}/berryboot.img; then bootm $kaddr $rdaddr ; else bootm $kaddr; fi
aload_kernel=fatload $device $partition $kaddr ${bpi}/${board}/${service}/${kernel}
uenvcmd=run ahello abootargs aload_kernel aboot
## END

(Frank W.) #36

you have the related settings set (in my uEnv missing):

console=tty1 fbcon=map:0

(Alex R.) #37

Probably it’s OS image related.

The card drops on any inaccurate movement.

(Frank W.) #38

got my cable, and i see fb-console-output (have not yet xserver installed)…


only issue i have is that screen is not centered (login-prompt not visible), now i search a configuration option to fix this…most instructions are for grub :frowning:


[16:50] root@bpi-r2:~# cat /sys/class/graphics/fb0/modes                                      
[16:51] root@bpi-r2:~# fbset -fb /dev/fb0 -g 1920 1080 1920 1080 16                           
ioctl FBIOPUT_VSCREENINFO: Invalid argument
[16:53] root@bpi-r2:~# echo U:1920x1080p-0 > /sys/class/graphics/fb0/mode                     
[16:53] root@bpi-r2:~# 

still no change

installed xserver-xorg and xinit

[16:57] root@bpi-r2:~# less /var/log/Xorg.0.log |grep EE                                      
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.                         
[   931.136] (EE) AIGLX: reverting to software rendering                                      
[   931.137] (EE) AIGLX error: dlopen of /usr/lib/arm-linux-gnueabihf/dri/swrast_dri.so faile)
[   931.137] (EE) GLX: could not load software renderer                                       
[   931.729] (EE) Server terminated successfully (0). Closing log file.

after installing libgl1-mesa-dri

[17:02] root@bpi-r2:~# less /var/log/Xorg.0.log |grep EE                                      
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.                         
[  1319.003] (EE) AIGLX: reverting to software rendering                                      
[  1319.495] (EE) Server terminated successfully (0). Closing log file.

playing around with disp-options in uenv.txt from here [how to]the final solution of compulsive modification of HDMI output resolution, but also no success

it’s a long time ago i have configured last time a x-server manually :stuck_out_tongue:

my servers are headless, maybe only a vncserver, which have not to be configured, clients are all ubuntu

logs showing no real error as far as i see

Xorg.0.log (21,0 KB) dmesg.log (85,0 KB)

after installing lxde i got a graphical interface, still not correctly aligned, but a step further. Problem before is fixed (i guess missing displaymanager)

additionally i had to install “policykit-1”

the alignment-problem is also fixed by realigning-function of the TV…nothing to do on bpi-r2

(Alex R.) #39

Hello, Frank

As i know driver supports only 32bit color depth, so u probably should try

fbset -fb /dev/fb0 -g 1920 1080 1920 1080 32

If I get you right, You’ve finnaly solved your aligment problem by TV-settings? So now You have both framebuffer and Xserver?

(Frank W.) #40

Right,both working…but it will be nice to set the resolution of console (make font larger).

I need to know how to set Resolution (hdmi mode) in uboot (if cec fails). I will try out vga and dvi-adapters next days.