cancel
Showing results for 
Search instead for 
Did you mean: 

Generating STM32MP1 Yocto weston image from yocto tool

JCasa.2
Associate

Hi everyone,

I'm stucked into generating a stm32mp1 image with weston support. I 've followed the ST WIKI trying to generate the image, I made sure to have any depedencies installed and tried to rebuild twice the overall image starting from a fresh directory but without any luck. I also tried to generate the st-image-core image resulting with the same issue.

I'm stucked into the last task called st-image-resize-initrd

st-image-resize-initrd-1.0-r0 do_rootfs: The postinstall intercept hook 'update_mime_database' failed, details in /yocto/openstlinux-5.10-dunfell-mp1-21-03-31/build-openstlinuxweston-stm32mp1/tmp-glibc/work/stm32mp1-ostl-linux-gnueabi/st-image-resize-initrd/1.0-r0/temp/log.do_rootfs
ERROR: Logfile of failure stored in: /yocto/openstlinux-5.10-dunfell-mp1-21-03-31/build-openstlinuxweston-stm32mp1/tmp-glibc/work/stm32mp1-ostl-linux-gnueabi/st-image-resize-initrd/1.0-r0/temp/log.do_rootfs.21295
ERROR: Task (/yocto/openstlinux-5.10-dunfell-mp1-21-03-31/layers/meta-st/meta-st-openstlinux/recipes-st/images/st-image-resize-initrd.bb:do_rootfs) failed with exit code '1'
ERROR: st-image-userfs-1.0-r0 do_rootfs: The postinstall intercept hook 'update_mime_database' failed, details in /yocto/openstlinux-5.10-dunfell-mp1-21-03-31/build-openstlinuxweston-stm32mp1/tmp-glibc/work/stm32mp1-ostl-linux-gnueabi/st-image-userfs/1.0-r0/temp/log.do_rootfs
ERROR: Logfile of failure stored in: /yocto/openstlinux-5.10-dunfell-mp1-21-03-31/build-openstlinuxweston-stm32mp1/tmp-glibc/work/stm32mp1-ostl-linux-gnueabi/st-image-userfs/1.0-r0/temp/log.do_rootfs.21557
ERROR: Task (/yocto/openstlinux-5.10-dunfell-mp1-21-03-31/layers/meta-st/meta-st-stm32mp/recipes-st/images/st-image-userfs.bb:do_rootfs) failed with exit code '1'
ERROR: st-image-vendorfs-1.0-r0 do_rootfs: The postinstall intercept hook 'update_mime_database' failed, details in /yocto/openstlinux-5.10-dunfell-mp1-21-03-31/build-openstlinuxweston-stm32mp1/tmp-glibc/work/stm32mp1-ostl-linux-gnueabi/st-image-vendorfs/1.0-r0/temp/log.do_rootfs
ERROR: Logfile of failure stored in: /yocto/openstlinux-5.10-dunfell-mp1-21-03-31/build-openstlinuxweston-stm32mp1/tmp-glibc/work/stm32mp1-ostl-linux-gnueabi/st-image-vendorfs/1.0-r0/temp/log.do_rootfs.21569

Each of these tasks are failing with the same error, looking at the details we can see there is an issue with update-mime-database.

NOTE: > Executing update_mime_database intercept ...
NOTE: Exit code 127. Output:
Updating MIME database... this may take a while.
/yocto/openstlinux-5.10-dunfell-mp1-21-03-31/build-openstlinuxweston-stm32mp1/tmp-glibc/work/stm32mp1-ostl-linux-gnueabi/st-image-vendorfs/1.0-r0/intercept_scripts-22c4095a94e4$
update-mime-database: not found

I make sure this binary is present on my computer and I checked If it has not been exported into the recipe-sysroot-native, result: there is no binary !

Then , i regenerated with success the shared-mime recipe giving us the update-mime-database binary and tried to rebuild, still no success.

Do you have any ideas ?

Regards

4 REPLIES 4
Kevin HUBER
ST Employee

Hello @JCasa.2​ ,

What is your linux distribution? Can you make:

uname -a

and

lsb_release -a

And please send me the traces.

Regarding the error update-mime-database: not found, it means that the package shared-mime-info is missing of your machine.

If the package was installed on your host machine, you must normally find it in:

$ which update-mime-database
/usr/bin/update-mime-database

This package is not listed in the packages that must be installed in the wiki page: https://wiki.st.com/stm32mpu/wiki/PC_prerequisites

because it is normally already installed on Ubuntu 18.04 and 20.04, which are the two recommended setup.

Since you do not have the package, please install it by doing:

sudo apt-get update
sudo apt-get install shared-mime-info

Hope it helps you,

Regards,

Kevin

In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'

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.
JCasa.2
Associate

Thanks a lot for your answer, here below you will find the following traces.

Distribution :

user@user:~$     uname -a
Linux user 5.8.0-59-generic #66~20.04.1-Ubuntu SMP Thu Jun 17 11:14:10 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
user@user:~$     lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.3 LTS
Release:        20.04
Codename:       focal

Like I said previously, mime-update-database had already been installed :

user@user:~$ which update-mime-database
/usr/bin/update-mime-database
@user:~$ sudo apt-get install shared-mime-info
[sudo] Mot de passe de user : 
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
shared-mime-info est déjà la version la plus récente (1.15-1).
shared-mime-info passé en « installé manuellement ».

What could I do ?

Hi @JCasa.2​ ,

Oh sorry, I didn't understand that you already checked shared-mime-info.

Okay so you are in 20.04 and already have the binary. I continue to search why you can have this error.

Just to be sure, do you have /usr/bin/ in your PATH?

Please can you try this command and send the traces.

echo $PATH | grep "/usr/bin"

Regards,

Kevin

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.

Hello @JCasa.2​ ,

Did you fix your postbuild issue?

The script that is called when the error occurs is update_mime_database, on my setup I can find it in the folder below, but the id after intercept_scripts can differs on your build.

$ cat build-openstlinuxweston-stm32mp1/tmp-glibc/work/stm32mp1-ostl-linux-gnueabi/st-image-vendorfs/1.0-r0/intercept_scripts-99beb1d2e8f241dd12a2141f46c2bb142d1a21e8c7dcf6ae629858be506bc38a/update_mime_database 
#!/bin/sh
#
# SPDX-License-Identifier: MIT
#
# Post-install intercept for mime.bbclass
 
echo "Updating MIME database... this may take a while."
update-mime-database $D${mimedir}

The file is very simple, so in my opinion, if update-mime-database is not found here, the only explanation is that the PATH is not correctly set.

You can edit the post-install intercept file above and echo the content of $PATH just before the call to update-mime-database.

Regards,

Kevin

In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'

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.