2024-02-11 03:39 PM
I am trying to create a GUI on the LCD of the STM32MP157C-DK2 but I get errors.
For example, when I try the code from Shail in this thread, I get:
root@stm32mp1:/tmp# su -l weston -c "env QT_QPA_PLATFORM=wayland-egl python3 /home/weston/filename.py"
[ 1] Failed to open device: No such file or directory, Try again...
[ 2] Failed to open device: No such file or directory, Try again...
[ 3] Failed to open device: No such file or directory, Try again...
[ 4] Failed to open device: No such file or directory, Try again...
[ 5] _OpenDevice(1111): FATAL: Failed to open device, errno=No such file or directory.
[ 6] Failed to open device: No such file or directory, Try again...
[ 7] Failed to open device: No such file or directory, Try again...
[ 8] Failed to open device: No such file or directory, Try again...
[ 9] Failed to open device: No such file or directory, Try again...
[ 10] _OpenDevice(1111): FATAL: Failed to open device, errno=No such file or directory.
-------------------------------
The display works ok and I am able to execute the GTK "hello world" example.
I am using the kernel from stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21.
I haven't found a guide/tutorial on this topic. Any help would be appreciated.
2024-02-15 07:18 AM
Hi @VTorr.1
I am sorry but I followed exactly your commands and can not reproduce your issue :(
In your environment, could you type the following commands please?
bitbake -c cleanall m4-native
bitbake m4-native
Best regards,
--JM
2024-02-15 07:40 AM
2024-02-22 08:32 AM
Hi @VTorr.1
What is the installed version of gcc on your ubuntu machine ?
$ gcc --version
Could you provide us the file config.log please? It should be in the directory tmp-glibc/work/x86_64-linux/m4-native/1.4.19-r0/build from the location where you type the bitbake command.
Best regards,
--JM
2024-02-22 08:42 AM
Hi Jean-Marc,
thank you for your help.
I attach config.log.
This is the output from the command:
$ gcc --version
gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
2024-02-23 07:39 AM
Hi @VTorr.1
Honestly, I don't know what happens here.
I created a Docker image from Ubuntu 22.04 and ran your commands. The result is always successful.
Here my Dockerfile:
FROM ubuntu:22.04
RUN echo 'APT::Install-Suggests "0";' >> /etc/apt/apt.conf.d/00-docker
RUN echo 'APT::Install-Recommends "0";' >> /etc/apt/apt.conf.d/00-docker
RUN DEBIAN_FRONTEND="noninteractive" apt-get update \
&& DEBIAN_FRONTEND="noninteractive" apt-get install -y ca-certificates ssl-cert gnupg2 ca-certificates locales
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
RUN DEBIAN_FRONTEND="noninteractive" apt-get update \
&& DEBIAN_FRONTEND="noninteractive" TZ="Europa/Paris" apt-get install -y openssh-client python3 bsdmainutils chrpath diffstat gcc-multilib libegl1-mesa libgmp-dev libmpc-dev libsdl1.2-dev libssl-dev lz4 pylint python3-git python3-jinja2 python3-pip socat texinfo build-essential cpio gawk file iputils-ping python3-pexpect unzip xterm xz-utils zstd emacs wget \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -ms /bin/bash appuser
USER appuser
To build and run the docker image:
$ docker build . -t yocto_ub22
$ docker run -it yocto_ub22
And the commands once in the docker:
$ cd /home/appuser
$ git config --global user.email "appuser@mail.me"
$ git config --global user.name "App User"
$ mkdir bin
$ wget -O /home/appuser/bin/repo-2.39 --no-check-certificate https://storage.googleapis.com/git-repo-downloads/repo-2.39
$ cd bin
$ chmod +x repo-2.39
$ sed -i 's/env python/env python3/' repo-2.39
$ ln -s repo-2.39 repo
$ export PATH=$HOME/bin:$PATH
$ cd ..
$ mkdir ostl
$ cd ostl
$ repo init -u https://github.com/STMicroelectronics/oe-manifest.git -b refs/tags/openstlinux-6.1-yocto-mickledore-mp1-v23.06.21
$ repo sync
$ DISTRO=openstlinux-weston MACHINE=stm32mp15-disco source layers/meta-st/scripts/envsetup.sh
$ bitbake m4-native
Best regards,
--JM
2024-02-24 03:49 AM
Hi Jean-Marc,
thank you for your help.
I am going to do the same. I will create a virtual machine and run the commands. I will tell you how it goes.
2024-02-24 02:08 PM - edited 2024-02-24 03:18 PM
Hi Jean-Marc,
it worked in the VM. Yocto finished the compilation after a few hours.
I booted the system with the newly created SD card (after having problems with a corrupt SD image).
I couldn't installed the required packages:
-------------------------------------------------------------
root@stm32mp15-disco:~# apt-get install qtwayland python3-pyqt5
Reading package lists... Done
Building dependency tree... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libgstgl-1.0-0 : Depends: libegl-mesa (>= 23.0.3) but it is not installable
E: Unable to correct problems, you have held broken packages.
----------------------------------------------------------------------
Any help would be appreciated.
2024-02-25 11:37 PM
Hi Jean-Marc,
I was finally able to run the python script in the STM32MP1DK2 without errors. I attach a screnshot of the outcome.
I tried all combinations in yocto I could think of. I believe the image that is working was created accepting the EULA. I also tried to increase the ROOTFS partition up to 2GB because I wanted to include the build tools (gcc) in the image and the default size (around 760MB) seemed to be not enough. I did something wrong because the build tools are not included and the ROOTFS partition size is 4GB, not 2GB.
If you want to check anything about this image, do not hesitate to ask.
Thank you for all your help,
Vicente
2024-02-26 02:44 AM
Hi @VTorr.1
I am glad you successfully reach your goal.
About your last results:
- Running the bitbake commands without errors in your virtual machine means you have some configuration problems with your Ubuntu machine. You have to check if all required packages are installed.
- To include gcc into your image, you can update the file conf/local.conf by adding the line:
IMAGE_INSTALL:append = " gcc"
(see https://docs.yoctoproject.org/ref-manual/variables.html?highlight=image_install#term-IMAGE_INSTALL)
- I would recommend to use a local package repository. Please follow the wiki page: https://wiki.st.com/stm32mpu/wiki/Package_repository_for_OpenSTLinux_distribution#How_to_activate_a_local_package_repository
- For the root file system size, please refer to https://community.st.com/t5/stm32-mpus-embedded-software/increasing-the-rootfs-size-on-a-stm32mp157f-dk2/td-p/205665
Hope it helps.
Best regards,
--JM
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
2024-02-26 09:52 AM
Hi Jean-Marc B,