Port LVGL to EFI

Port LVGL 9 onto gnu-efi 3.0, to get GUI for a simple bootloader

gnu-efi is a lightweight UEFI developing environment, compared to edk2, that makes me not too nervous when playing around.

LVGL 9 has (and always do) made incompatible changes, with detailed document(LVGL Porting) and easier API, so I tried with the help from edk2 world.

Getting codes

git    submodule    add    gnu-efi    https://git.code.sf.net/p/gnu-efi/code    gnu-efi

git    submodule    add    lvgl    https://github.com/lvgl/lvgl    lvgl

Hello World

Main

Makefile can be borrowed from gnu-efi/apps/Makefile, add a test target:

Makefile

Be noticed of the dependencies on Qemu and OVMF.

Comes LVGL

Copy lvgl/lv_conf_template.h to lv_conf.h, and change the beginning switch "#if 0" into "#if 1", then set LV_COLOR_DEPTH to 32, for we want a colorful GUI. That's all for this file.

Lvgl

In LVGL 9, we simply create a display, set buffer and flush callback, that's all.  You may take 1280x800 as screen resolution when testing with Qemu.

Test

Let's look at this useless masterpiece:

Qemu

For current code, refer to https://github.com/rockrush/simple-boot


0/5 : Not rated