Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing frame buffer parameter passed by U-Boot to Kernel #8

Open
herry13 opened this issue Feb 10, 2018 · 0 comments
Open

Missing frame buffer parameter passed by U-Boot to Kernel #8

herry13 opened this issue Feb 10, 2018 · 0 comments

Comments

@herry13
Copy link
Contributor

herry13 commented Feb 10, 2018

Although U-Boot has a nice, correct screen size console, but the kernel always switches the display to (default) colour frame buffer device 100x30 lines, as shown in following log:

Console: switching to colour frame buffer device 100x30

Meanwhile Raspbian, that uses RaspberryPi Foundation's boot loader, switches the display to a correct frame buffer configuration by giving these parameters to the kernel:

bcm2708_fb.fbwidth=1920 bcm2708_fb.fbheight=1200 bcm2708_fb.fbswap=1

Maybe related, it also passes video card memory parameters:

vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000

The solution is that U-Boot should pass correct frame buffer parameters to the kernel. An example of obtaining the screen size can be found in function lcd_dt_simplefb_configure_node [2] called by ft_board_setup [1]. The latter can be modified to expose the screen width and height as environment variables fbwidth and fbheight respectively. These variables is then added into bootargs

An alternative, more complex solution would be reading the frame buffer parameters given by start.elf and expose them as above environment variables.

[1] https://github.com/u-boot/u-boot/blob/1811a928c6c7604d6d05a84b4d552a7c31b4994e/board/raspberrypi/rpi/rpi.c#L446
[2] https://github.com/u-boot/u-boot/blob/05b8dc5cd30a6d6cdfb29c9e718198692e12b4bf/common/lcd_simplefb.c#L19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant