The demo code worked well on both Linux desktop, as described by @cbrake above, as well as on Windows desktop.
Windows desktop
Linux desktop (Ubuntu 20.04) with frame buffer:
Embedded Linux - cross compiling on Ubuntu for aarch64
git clone git@github.com:lvgl/lv_port_linux_frame_buffer.git
cd lv_port_linux_frame_buffer
git submodule update --init --recursive
mkdir build && cd build
download the “aarch64-linux-musl” option from https://musl.cc/ and place in the build/
directory
export CC="aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc"
cmake -DCMAKE_EXE_LINKER_FLAGS="-static -Os" ..
make
The following error results:
[ 41%] Built target lvgl
[ 46%] Built target lv_drivers
[ 60%] Built target lvgl_demos
[ 99%] Built target lvgl_examples
[100%] Linking C executable lvgl_fb
/home/******/lv_port_linux_frame_buffer/build/aarch64-linux-musl-cross/bin/../lib/gcc/aarch64-linux-musl/11.2.1/../../../../aarch64-linux-musl/bin/ld: cannot find -lwayland-client
/home/******/lv_port_linux_frame_buffer/build/aarch64-linux-musl-cross/bin/../lib/gcc/aarch64-linux-musl/11.2.1/../../../../aarch64-linux-musl/bin/ld: cannot find -lwayland-cursor
/home/******/lv_port_linux_frame_buffer/build/aarch64-linux-musl-cross/bin/../lib/gcc/aarch64-linux-musl/11.2.1/../../../../aarch64-linux-musl/bin/ld: cannot find -lxkbcommon
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/lvgl_fb.dir/build.make:104: lvgl_fb] Error 1
make[1]: *** [CMakeFiles/Makefile2:124: CMakeFiles/lvgl_fb.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
If anyone has an idea, please let me know. Thanks!
khem
September 1, 2022, 4:26am
6
@collinbrake if you want to cross compile using ubuntu you will need all dependencies cross-compiled as well. Its needing wayland
and xkbcommon
but these inturn might need more so it can be a bit more packages and they should be compiled for musl since thats what you are using. See this article also on how cross-compiling would work on a native linux distro
https://jensd.be/1126/linux/cross-compiling-for-arm-or-aarch64-on-debian-or-ubuntu
You can also take advantage of ubuntu/debian multiarch support, so add arm64 to your base distro
sudo dpkg --add-architecture arm64
sudo touch /etc/apt/sources.list.d/arm64-cross-compile-sources.list
The add the apt sources to /etc/apt/sources.list.d/arm64-cross-compile-sources.list
deb [arch=arm64] http://ports.ubuntu.com/ focal main restricted
deb [arch=arm64] http://ports.ubuntu.com/ focal-updates main restricted
deb [arch=arm64] http://ports.ubuntu.com/ focal universe
deb [arch=arm64] http://ports.ubuntu.com/ focal-updates universe
deb [arch=arm64] http://ports.ubuntu.com/ focal multiverse
deb [arch=arm64] http://ports.ubuntu.com/ focal-updates multiverse
deb [arch=arm64] http://ports.ubuntu.com/ focal-backports main restricted universe multiverse
add following to /etc/apt/sources.list
deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
run sudo apt update
now you can install arm64 packages
sudo apt-get install gcc-aarch64-linux-gnu
sudo apt install wayland:arm64
sudo apt install xkbcommon:arm64
Now you can use the cross compiler to build your packages use.
CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ in env
I would think it will be better to use Yocto SDK, perhaps with all dependencies built into SDK
maybe @cbrake can generate one for you using yoe
bitbake -cpopulate_sdk yoe-sdk-image
will generate it and then you can simply install it on your ubuntu box via the self installer that it will generate.
also see
https://docs.yoctoproject.org/sdk-manual/using.html
@khem Thank you very much - I am working on it, and should go the yocto route from the beginning, as you said.
cbrake
September 9, 2022, 6:13pm
8
Start of a lvgl recipe here:
It has some packaging problems, but does build a binary that I can scp over to the target i.MX8 device. The result is not perfect but runs:
Probably need to configure the FB size or something …
cbrake
September 9, 2022, 6:47pm
9
Recipe for the LVGL PC demo :
Again, builds fine, but has some packaging issues.
Copied libsdl over to the target and installed it:
root@imx8qxp-var-som:~# opkg install libsdl2-2.0-0_2.0.22-r0.0_cortexa35-mx8.ipk
Installing libsdl2-2.0-0 (2.0.22) on root
Configuring libsdl2-2.0-0.
Then scp’d the LVGL binary and ran it:
root@imx8qxp-var-som:~# ./main
[Warn] (0.000, +0) lv_init: Memory integrity checks are enabled via LV_USE_ASSERT_MEM_INTEGRITY which makes LVGL much slower (in lv_obj.c line #160)
[Warn] (0.000, +0) lv_init: Object sanity checks are enabled via LV_USE_ASSERT_OBJ which makes LVGL much slower (in lv_obj.c line #164)
[Warn] (0.000, +0) lv_init: Style sanity checks are enabled that uses more RAM (in lv_obj.c line #168)
But, nothing on the screen – probably need X/Wayland, etc.
cbrake
September 10, 2022, 8:09pm
10
Asked for help on the LVGL forum, and the author suggested changing the color format – it works!
[cbrake@ceres git]$ git diff
diff --git a/lv_conf.h b/lv_conf.h
index 6bfe50f..e83dc55 100644
--- a/lv_conf.h
+++ b/lv_conf.h
@@ -24,7 +24,7 @@
*====================*/
/*Color depth: 1 (1 byte per pixel), 8 (RGB332), 16 (RGB565), 32 (ARGB8888)*/
-#define LV_COLOR_DEPTH 32
+#define LV_COLOR_DEPTH 16
/*Swap the 2 bytes of RGB565 color. Useful if the display has an 8-bit interface (e.g. SPI)*/
#define LV_COLOR_16_SWAP 0
Touchscreen is not working yet, so that is the next project …
1 Like
khem
September 12, 2022, 6:43am
11
for touchscreen perhaps we need to look into
Some porting docs on input drivers
https://docs.lvgl.io/master/porting/indev.html
cbrake
September 15, 2022, 4:45pm
12
with the latest yoe/master, we are using Clang 15 and now getting a compile error in the fb demo, so opened an issue here:
opened 04:43PM - 15 Sep 22 UTC
We are using clang 15 in the latest version of [Yoe](https://yoedistro.org) and … getting the following compile error:
```
[cbrake@ceres yoe-distro]$ ./build/tmp/work/cortexa35-yoe-linux/lvgl-demo-fb/1.0-r0/temp/run.do_compile
NOTE: cmake --build /scratch/yoe/yoe-distro/build/tmp/work/cortexa35-yoe-linux/lvgl-demo-fb/1.0-r0/lvgl-demo-fb-1.0/ --target all --
[129/441] Building C object lvgl/CMakeFiles/lvgl.dir/src/hal/lv_hal_tick.c.o
FAILED: lvgl/CMakeFiles/lvgl.dir/src/hal/lv_hal_tick.c.o
/scratch/yoe/yoe-distro/build/tmp/work/cortexa35-yoe-linux/lvgl-demo-fb/1.0-r0/recipe-sysroot-native/usr/bin/aarch64-yoe-linux/aarch64-yoe-linux-clang -DLV_CONF_INCLUDE_SIMPLE -DLV_LVGL_H_INCLUDE_SIMPLE -I/scratch/yoe/yoe-distro/workspace/sources/lvgl-demo-fb/. -isystem /scratch/yoe/yoe-distro/workspace/sources/lvgl-demo-fb/lvgl -target aarch64-yoe-linux -mcpu=cortex-a35 -march=armv8-a+crc+crypto -mlittle-endian --dyld-prefix=/usr -Qunused-arguments -ffile-compilation-dir=. -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/scratch/yoe/yoe-distro/build/tmp/work/cortexa35-yoe-linux/lvgl-demo-fb/1.0-r0/recipe-sysroot -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/scratch/yoe/yoe-distro/workspace/sources/lvgl-demo-fb=/usr/src/debug/lvgl-demo-fb/1.0-r0 -fdebug-prefix-map=/scratch/yoe/yoe-distro/workspace/sources/lvgl-demo-fb=/usr/src/debug/lvgl-demo-fb/1.0-r0 -fmacro-prefix-map=/scratch/yoe/yoe-distro/build/tmp/work/cortexa35-yoe-linux/lvgl-demo-fb/1.0-r0/lvgl-demo-fb-1.0/=/usr/src/debug/lvgl-demo-fb/1.0-r0 -fdebug-prefix-map=/scratch/yoe/yoe-distro/build/tmp/work/cortexa35-yoe-linux/lvgl-demo-fb/1.0-r0/lvgl-demo-fb-1.0/=/usr/src/debug/lvgl-demo-fb/1.0-r0 -fdebug-prefix-map=/scratch/yoe/yoe-distro/build/tmp/work/cortexa35-yoe-linux/lvgl-demo-fb/1.0-r0/recipe-sysroot= -fmacro-prefix-map=/scratch/yoe/yoe-distro/build/tmp/work/cortexa35-yoe-linux/lvgl-demo-fb/1.0-r0/recipe-sysroot= -fdebug-prefix-map=/scratch/yoe/yoe-distro/build/tmp/work/cortexa35-yoe-linux/lvgl-demo-fb/1.0-r0/recipe-sysroot-native= -MD -MT lvgl/CMakeFiles/lvgl.dir/src/hal/lv_hal_tick.c.o -MF lvgl/CMakeFiles/lvgl.dir/src/hal/lv_hal_tick.c.o.d -o lvgl/CMakeFiles/lvgl.dir/src/hal/lv_hal_tick.c.o -c /scratch/yoe/yoe-distro/workspace/sources/lvgl-demo-fb/lvgl/src/hal/lv_hal_tick.c
/scratch/yoe/yoe-distro/workspace/sources/lvgl-demo-fb/lvgl/src/hal/lv_hal_tick.c:77:12: error: call to undeclared function 'custom_tick_get'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
return LV_TICK_CUSTOM_SYS_TIME_EXPR;
^
/scratch/yoe/yoe-distro/workspace/sources/lvgl-demo-fb/./lv_conf.h:91:43: note: expanded from macro 'LV_TICK_CUSTOM_SYS_TIME_EXPR'
#define LV_TICK_CUSTOM_SYS_TIME_EXPR (custom_tick_get()) /*Expression evaluating to current system time in ms*/
^
1 error generated.
[152/441] Building C object lvgl/CMakeFiles/lvgl.dir/src/extra/widgets/chart/lv_chart.c.o
ninja: build stopped: subcommand failed.
WARNING: ./build/tmp/work/cortexa35-yoe-linux/lvgl-demo-fb/1.0-r0/temp/run.do_compile:152 exit 1 from 'eval ${DESTDIR:+DESTDIR=${DESTDIR} } cmake --build '/scratch/yoe/yoe-distro/build/tmp/work/cortexa35-yoe-linux/lvgl-demo-fb/1.0-r0/lvgl-demo-fb-1.0/' "$@" -- ${EXTRA_OECMAKE_BUILD}'
WARNING: Backtrace (BB generated script):
#1: cmake_runcmake_build, ./build/tmp/work/cortexa35-yoe-linux/lvgl-demo-fb/1.0-r0/temp/run.do_compile, line 152
#2: cmake_do_compile, ./build/tmp/work/cortexa35-yoe-linux/lvgl-demo-fb/1.0-r0/temp/run.do_compile, line 146
#3: do_compile, ./build/tmp/work/cortexa35-yoe-linux/lvgl-demo-fb/1.0-r0/temp/run.do_compile, line 141
#4: main, ./build/tmp/work/cortexa35-yoe-linux/lvgl-demo-fb/1.0-r0/temp/run.do_compile, line 165
```
If I set LV_TICK_CUSTOM to 0 in lv_conf.h, then it compiles and runs.
Not sure the best way to fix this up, so thought I would start a discussion here.
khem
September 15, 2022, 5:14pm
13
Clang is trying to get rid of pre-c99 constructs which is nice to clean up but its everywhere There is fix I proposed
lvgl:master
← kraj:master
opened 05:08PM - 15 Sep 22 UTC
Clang 15+ is strict about missing protoypes.
Fixes #25
Signed-off-by: Khem… Raj <raj.khem@gmail.com>
cbrake
September 15, 2022, 6:05pm
14
yeah, forces everyone to clean up their code – not a bad thing. Works, thanks!
khem
September 15, 2022, 7:42pm
15
These diagnostics have been demoted into warnings in clang 15.0.1 release which we will have shortly for Yoe too.
Hello, We’ve noticed some worrying problems resulting from the late change in Clang that causes implicit function declarations to be errors by default. It seems that many configure (e.g. autoconf) scripts were silently relying on the old behavior,...
Reading time: 18 mins 🕑
Likes: 35 ❤
nevertheless, I agree that 20 years is enough of a time to migrate
1 Like
Even though “bitbake lvgl-demo-fb” works, I get the following
error after addin lvgl-demo-gb into IMAGE_INSTALL of my BSP:
NOTE: Executing Tasks
ERROR: imx8mmevk-image-demo-1.0-r0 do_rootfs: Could not invoke dnf. Command ‘/work/festevam/imx8mmevk/oe/poky/build/tmp/work/imx8mmevk-imx8mmevklinux-linux/imx8mmevk-image-demo/1.0-r0/recipe-sysroot-native/usr/bin/dnf -v --rpmverbosity=info -y -c /work/festevam/imx8mmevk/oe/poky/build/tmp/work/imx8mmevk-imx8mmevklinux-linux/imx8mmevk-image-demo/1.0-r0/rootfs/etc/dnf/dnf.conf --setopt=reposdir=/work/festevam/imx8mmevk/oe/poky/build/tmp/work/imx8mmevk-imx8mmevklinux-linux/imx8mmevk-image-demo/1.0-r0/rootfs/etc/yum.repos.d --installroot=/work/festevam/imx8mmevk/oe/poky/build/tmp/work/imx8mmevk-imx8mmevklinux-linux/imx8mmevk-image-demo/1.0-r0/rootfs --setopt=logdir=/work/festevam/imx8mmevk/oe/poky/build/tmp/work/imx8mmevk-imx8mmevklinux-linux/imx8mmevk-image-demo/1.0-r0/temp --repofrompath=oe-repo,/work/festevam/imx8mmevk/oe/poky/build/tmp/work/imx8mmevk-imx8mmevklinux-linux/imx8mmevk-image-demo/1.0-r0/oe-rootfs-repo --nogpgcheck install beep btrfs-tools ca-certificates canutils devmem2 dropbear ethtool evtest freerdp gstreamer1.0 gstreamer1.0-plugins-bad gstreamer1.0-plugins-base gstreamer1.0-plugins-good i2c-tools init-ifupdown iperf3 iproute2 iw kernel-devicetree kernel-modules kmscube libdrm libegl-mesa libgbm libglapi libgles1-mesa libgles2-mesa libgpiod libgpiod-tools libubootenv-bin lvgl-demo-fb mesa mesa-megadriver mmc-utils mtd-utils nano openssl-engines packagegroup-base-extended packagegroup-core-boot packagegroup-core-sdk packagegroup-core-standalone-sdk-target packagegroup-core-tools-debug packagegroup-core-tools-profile pciutils rng-tools run-postinsts stress-ng swupdate-keys swupdate-tools swupdate-www systemd-conf u-boot-default-env u-boot-fw-utils virtual/bootloader weston weston-examples weston-init wireless-regdb-static wpa-supplicant locale-base-en-us locale-base-en-gb’ returned 1:
DNF version: 4.11.1
cachedir: /work/festevam/imx8mmevk/oe/poky/build/tmp/work/imx8mmevk-imx8mmevklinux-linux/imx8mmevk-image-demo/1.0-r0/rootfs/var/cache/dnf
Added oe-repo repo from /work/festevam/imx8mmevk/oe/poky/build/tmp/work/imx8mmevk-imx8mmevklinux-linux/imx8mmevk-image-demo/1.0-r0/oe-rootfs-repo
User-Agent: falling back to ‘libdnf’: could not detect OS or basearch
repo: using cache for: oe-repo
oe-repo: using metadata from Fri 13 Jan 2023 05:08:39 PM UTC.
Last metadata expiration check: 0:00:01 ago on Fri 13 Jan 2023 05:08:39 PM UTC.
No match for argument: lvgl-demo-fb
Error: Unable to find a match: lvgl-demo-fb
ERROR: Logfile of failure stored in: /work/festevam/imx8mmevk/oe/poky/build/tmp/work/imx8mmevk-imx8mmevklinux-linux/imx8mmevk-image-demo/1.0-r0/temp/log.do_rootfs.1775660
ERROR: Task (/work/festevam/imx8mmevk/oe/meta-imx8mmevk-extras/dynamic-layers/core/recipes-core/images/imx8mmevk-image-demo.bb:do_rootfs) failed with exit code ‘1’
NOTE: Tasks Summary: Attempted 5083 tasks of which 5082 didn’t need to be rerun and 1 failed.
Any suggestions?
Thanks
Hi @cbrake and @khem
I tried to build cbrake’s lvgl-demo-fb.bb recipe:
but I am getting the following build error in kirkstone:
ERROR: lvgl-demo-fb-1.0-r0 do_package_write_rpm: ExecutionError(‘/work/festevam/imx8mmevk/oe/poky/build/tmp/work/aarch64-imx8mmevklinux-linux/lvgl-demo-fb/1.0-r0/temp/run.BUILDSPEC.1710793’, 1, None, None)
ERROR: Logfile of failure stored in: /work/festevam/imx8mmevk/oe/poky/build/tmp/work/aarch64-imx8mmevklinux-linux/lvgl-demo-fb/1.0-r0/temp/log.do_package_write_rpm.1710793
Log data follows:
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are [‘virtual:native:/work/festevam/imx8mmevk/oe/poky/meta/recipes-devtools/pseudo/pseudo_git.bb:do_populate_sysroot’, ‘virtual:native:/work/festevam/imx8mmevk/oe/poky/meta/recipes-devtools/rpm/rpm_4.17.1.bb:do_populate_sysroot’]
| NOTE: Installed into sysroot: []
| NOTE: Skipping as already exists in sysroot: [‘pseudo-native’, ‘rpm-native’, ‘libgcrypt-native’, ‘elfutils-native’, ‘sqlite3-native’, ‘bzip2-native’, ‘lua-native’, ‘xz-native’, ‘popt-native’, ‘file-native’, ‘python3-native’, ‘zstd-native’, ‘gettext-minimal-native’, ‘libtool-native’, ‘libcap-native’, ‘libgpg-error-native’, ‘texinfo-dummy-native’, ‘zlib-native’, ‘readline-native’, ‘libffi-native’, ‘gdbm-native’, ‘ncurses-native’, ‘libnsl2-native’, ‘libtirpc-native’, ‘openssl-native’, ‘util-linux-libuuid-native’, ‘perl-native’, ‘make-native’]
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing python function sstate_task_prefunc
| DEBUG: Python function sstate_task_prefunc finished
| DEBUG: Executing python function do_package_write_rpm
| DEBUG: Executing python function read_subpackage_metadata
| DEBUG: Python function read_subpackage_metadata finished
| DEBUG: Executing python function do_package_rpm
| DEBUG: Executing python function write_specfile
| NOTE: Creating RPM package for lvgl-demo-fb-src
| NOTE: Creating empty RPM package for lvgl-demo-fb-dbg
| NOTE: Creating RPM package for lvgl-demo-fb-staticdev
| NOTE: Creating RPM package for lvgl-demo-fb-dev
| NOTE: Not creating empty RPM package for lvgl-demo-fb-doc
| NOTE: Not creating empty RPM package for lvgl-demo-fb-locale
| NOTE: Not creating empty RPM package for lvgl-demo-fb
| DEBUG: Python function write_specfile finished
| DEBUG: PKGWRITEDIR: /work/festevam/imx8mmevk/oe/poky/build/tmp/work/aarch64-imx8mmevklinux-linux/lvgl-demo-fb/1.0-r0/deploy-rpms/aarch64
| DEBUG: Executing shell function BUILDSPEC
| error: line 6: Empty tag: Group:
| Building target platforms: aarch64-imx8mmevklinux-linux
| Building for target aarch64-imx8mmevklinux-linux
| WARNING: /work/festevam/imx8mmevk/oe/poky/build/tmp/work/aarch64-imx8mmevklinux-linux/lvgl-demo-fb/1.0-r0/temp/run.BUILDSPEC.1710793:145 exit 1 from ‘rpmbuild --noclean --nodeps --short-circuit --target aarch64-imx8mmevklinux-linux --buildroot /work/festevam/imx8mmevk/oe/poky/build/tmp/work/aarch64-imx8mmevklinux-linux/lvgl-demo-fb/1.0-r0/package --define ‘_topdir /work/festevam/imx8mmevk/oe/poky/build/tmp/work/aarch64-imx8mmevklinux-linux/lvgl-demo-fb/1.0-r0’ --define ‘_rpmdir /work/festevam/imx8mmevk/oe/poky/build/tmp/work/aarch64-imx8mmevklinux-linux/lvgl-demo-fb/1.0-r0/deploy-rpms/aarch64’ --define ‘_builddir /work/festevam/imx8mmevk/oe/poky/build/tmp/work/aarch64-imx8mmevklinux-linux/lvgl-demo-fb/1.0-r0/build’ --define ‘_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm’ --define ‘_use_internal_dependency_generator 0’ --define ‘_binaries_in_noarch_packages_terminate_build 0’ --define ‘_build_id_links none’ --define ‘_binary_payload w19T64.zstdio’ --define ‘_source_payload w19T64.zstdio’ --define ‘clamp_mtime_to_source_date_epoch 1’ --define ‘use_source_date_epoch_as_buildtime 1’ --define ‘_buildhost reproducible’ --define ‘__font_provides %{nil}’ --define ‘__find_requires %{nil}’ --define ‘__find_provides %{nil}’ --define ‘_unpackaged_files_terminate_build 0’ --define ‘debug_package %{nil}’ --define ‘_tmppath /work/festevam/imx8mmevk/oe/poky/build/tmp/work/aarch64-imx8mmevklinux-linux/lvgl-demo-fb/1.0-r0’ -bb /work/festevam/imx8mmevk/oe/poky/build/tmp/work/aarch64-imx8mmevklinux-linux/lvgl-demo-fb/1.0-r0/lvgl-demo-fb.spec’
| WARNING: Backtrace (BB generated script):
| #1: BUILDSPEC, /work/festevam/imx8mmevk/oe/poky/build/tmp/work/aarch64-imx8mmevklinux-linux/lvgl-demo-fb/1.0-r0/temp/run.BUILDSPEC.1710793, line 145
| #2: main, /work/festevam/imx8mmevk/oe/poky/build/tmp/work/aarch64-imx8mmevklinux-linux/lvgl-demo-fb/1.0-r0/temp/run.BUILDSPEC.1710793, line 149
| DEBUG: Python function do_package_rpm finished
| DEBUG: Python function do_package_write_rpm finished
ERROR: Task (/work/festevam/imx8mmevk/oe/meta-imx8mmevk-extras/recipes-graphics/lvgl/lvgl-demo-fb.bb:do_package_write_rpm) failed with exit code ‘1’
NOTE: Tasks Summary: Attempted 566 tasks of which 565 didn’t need to be rerun and 1 failed.
Would you have any suggestions?
Thanks
Interesting, removing the SECTION line from the recipe made it to work fine.
With the version below, it builds without errors:
# Copyright (C) 2022 Cliff Brake <cbrake@bec-systems.com>
# Released under the MIT license (see COPYING.MIT for the terms)
SUMMARY = "LVGL Demo Application (FB)"
HOMEPAGE = "https://github.com/lvgl/lv_port_linux_frame_buffer"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
inherit cmake
SRC_URI = "gitsm://github.com/lvgl/lv_port_linux_frame_buffer.git;branch=master;protocol=https"
SRCREV = "a2384b74cec9ffd7407d12ed64a8326b5696f309"
S = "${WORKDIR}/git"
I can try to upstream it.
Thanks
khem
January 13, 2023, 6:15pm
19
Hi @khem
Thanks.
I was not subscribed and I think my posts went a bit out of order. Sorry about that.
I will adjust LIC_FILES_CHKSUM as per your suggestion.
Here is the current status:
“bitbake lvgl-demo-fb” works fine.
After I add lvgl-demo-fb into IMAGE_INSTALL, the following error is seen:
NOTE: Executing Tasks
ERROR: imx8mmevk-image-demo-1.0-r0 do_rootfs: Could not invoke dnf. Command ‘/work/festevam/imx8mmevk/oe/poky/build/tmp/work/imx8mmevk-imx8mmevklinux-linux/imx8mmevk-image-demo/1.0-r0/recipe-sysroot-native/usr/bin/dnf -v --rpmverbosity=info -y -c /work/festevam/imx8mmevk/oe/poky/build/tmp/work/imx8mmevk-imx8mmevklinux-linux/imx8mmevk-image-demo/1.0-r0/rootfs/etc/dnf/dnf.conf --setopt=reposdir=/work/festevam/imx8mmevk/oe/poky/build/tmp/work/imx8mmevk-imx8mmevklinux-linux/imx8mmevk-image-demo/1.0-r0/rootfs/etc/yum.repos.d --installroot=/work/festevam/imx8mmevk/oe/poky/build/tmp/work/imx8mmevk-imx8mmevklinux-linux/imx8mmevk-image-demo/1.0-r0/rootfs --setopt=logdir=/work/festevam/imx8mmevk/oe/poky/build/tmp/work/imx8mmevk-imx8mmevklinux-linux/imx8mmevk-image-demo/1.0-r0/temp --repofrompath=oe-repo,/work/festevam/imx8mmevk/oe/poky/build/tmp/work/imx8mmevk-imx8mmevklinux-linux/imx8mmevk-image-demo/1.0-r0/oe-rootfs-repo --nogpgcheck install beep btrfs-tools ca-certificates canutils devmem2 dropbear ethtool evtest freerdp gstreamer1.0 gstreamer1.0-plugins-bad gstreamer1.0-plugins-base gstreamer1.0-plugins-good i2c-tools init-ifupdown iperf3 iproute2 iw kernel-devicetree kernel-modules kmscube libdrm libegl-mesa libgbm libglapi libgles1-mesa libgles2-mesa libgpiod libgpiod-tools libubootenv-bin lvgl-demo-fb mesa mesa-megadriver mmc-utils mtd-utils nano openssl-engines packagegroup-base-extended packagegroup-core-boot packagegroup-core-sdk packagegroup-core-standalone-sdk-target packagegroup-core-tools-debug packagegroup-core-tools-profile pciutils rng-tools run-postinsts stress-ng swupdate-keys swupdate-tools swupdate-www systemd-conf u-boot-default-env u-boot-fw-utils virtual/bootloader weston weston-examples weston-init wireless-regdb-static wpa-supplicant locale-base-en-us locale-base-en-gb’ returned 1:
DNF version: 4.11.1
cachedir: /work/festevam/imx8mmevk/oe/poky/build/tmp/work/imx8mmevk-imx8mmevklinux-linux/imx8mmevk-image-demo/1.0-r0/rootfs/var/cache/dnf
Added oe-repo repo from /work/festevam/imx8mmevk/oe/poky/build/tmp/work/imx8mmevk-imx8mmevklinux-linux/imx8mmevk-image-demo/1.0-r0/oe-rootfs-repo
User-Agent: falling back to ‘libdnf’: could not detect OS or basearch
repo: using cache for: oe-repo
oe-repo: using metadata from Fri 13 Jan 2023 05:08:39 PM UTC.
Last metadata expiration check: 0:00:01 ago on Fri 13 Jan 2023 05:08:39 PM UTC.
No match for argument: lvgl-demo-fb
Error: Unable to find a match: lvgl-demo-fb
ERROR: Logfile of failure stored in: /work/festevam/imx8mmevk/oe/poky/build/tmp/work/imx8mmevk-imx8mmevklinux-linux/imx8mmevk-image-demo/1.0-r0/temp/log.do_rootfs.1775660
ERROR: Task (/work/festevam/imx8mmevk/oe/meta-imx8mmevk-extras/dynamic-layers/core/recipes-core/images/imx8mmevk-image-demo.bb:do_rootfs) failed with exit code ‘1’
NOTE: Tasks Summary: Attempted 5083 tasks of which 5082 didn’t need to be rerun and 1 failed.
If you have any suggestions as to how to fix this error, please let me know.
Thanks
cbrake
January 13, 2023, 10:13pm
21
@Fabio_Estevam thanks for sharing your experiences. Running a build here to see if I can duplicate your issues.
Hi @cbrake and @khem
I made some progress and now I can add lvgl-demo-fb into IMAGE_INSTALL.
Here is the recipe that I am using now:
# Copyright (C) 2022 Cliff Brake <cbrake@bec-systems.com>
FILESEXTRAPATHS:append := "${THISDIR}/files:"
SUMMARY = "LVGL Demo Application for Framebuffer"
HOMEPAGE = "https://github.com/lvgl/lv_port_linux_frame_buffer"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=802d3d83ae80ef5f343050bf96cce3a4 \
file://lv_drivers/LICENSE;md5=d6fc0df890c5270ef045981b516bb8f2 \
file://lvgl/LICENCE.txt;md5=bf1198c89ae87f043108cea62460b03a"
SRC_URI = "gitsm://github.com/lvgl/lv_port_linux_frame_buffer.git;branch=master;protocol=https"
SRC_URI += "file://0001-improvemakefile.patch"
SRCREV = "a2384b74cec9ffd7407d12ed64a8326b5696f309"
S = "${WORKDIR}/git"
EXTRA_OEMAKE = "DESTDIR=${D}"
do_install() {
oe_runmake install
}
and the lv_port_linux_frame_buffer patch is
From 5462a44c91e1605a73c98ea689ce0c6824f6460e Mon Sep 17 00:00:00 2001
From: Fabio Estevam <festevam@denx.de>
Date: Fri, 13 Jan 2023 14:38:57 -0300
Subject: [PATCH] lvgl_fb: Add a Makefile
Add a Makefile to make installation and uninstallation
process easier.
Signed-off-by: Fabio Estevam <festevam@denx.de>
---
Makefile | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/Makefile b/Makefile
index ba6972b..c05746d 100644
--- a/Makefile
+++ b/Makefile
@@ -8,6 +8,8 @@ CFLAGS ?= -O3 -g0 -I$(LVGL_DIR)/ -Wall -Wshadow -Wundef -Wmissing-prototypes -Wn
LDFLAGS ?= -lm
BIN = demo
+prefix ?= /usr
+bindir ?= $(prefix)/bin
#Collect the files to compile
MAINSRC = ./main.c
@@ -41,3 +43,9 @@ default: $(AOBJS) $(COBJS) $(MAINOBJ)
clean:
rm -f $(BIN) $(AOBJS) $(COBJS) $(MAINOBJ)
+install:
+ install -d $(DESTDIR)$(bindir)
+ install $(BIN) $(DESTDIR)$(bindir)
+
+uninstall:
+ $(RM) -r $(addprefix $(DESTDIR)$(bindir)/,$(BIN))
--
2.25.1
The rootfs/usr/bin/demo binary is getting installed.
I don’t have my board at the moment to try a run-time test.
Thanks
Running the “demo” binary shows the LVGL application successfully on the display
Also, sent the Makefile improvement patch:
lvgl:master
← fabioestevam:master
opened 11:57AM - 14 Jan 23 UTC
Improve the Makefile by adding the install/uninstall hooks.
This makes it eas… ier for packaging the project when using OpenEmbedded, for example.
Signed-off-by: Fabio Estevam <festevam@denx.de>
2 Likes
cbrake
January 23, 2023, 3:09pm
24
Nice work @Fabio_Estevam – thanks for sharing!