2022-09-08 02:46 PM
Hi,
I have a problem with installing any directory or any files into /usr/local folder.
Here my_receipt.bb
DESCRIPTION = "My receipt"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9"
SRC_URI = "file://reset_led.sh "
S = "${WORKDIR}"
do_configure[noexec] = "1"
do_compile[noexec] = "1"
do_install() {
install -d ${D}${prefix}/local/reset-led
install -m 0755 ${WORKDIR}/reset_led.sh ${D}${prefix}/local/reset-led/
}
FILES:${PN} += "${prefix}/local/reset-led/"
In OpenSTLinx, those folders and files go to st-image-userfs...tar.xz.
In /usr/local I can see only demos etc. folders and directories.
The compilation is going well without any errors or warnings. What was missed, and where is the problem?
Solved! Go to Solution.
2022-09-09 05:35 AM
Hi @Michał Wołowik ,
Yes understood, indeed this is a userfs mounting point issue.
What is happening here is that you tell the weston image to install your package in /usr/local.
However, we also have a userfs image that aims to install everything in this folder, so a complete clean is made before.
What you have to do is to tell this userfs image to install your package.
It is done in the following file: layers/meta-st/meta-st-stm32mp/recipes-st/images/st-image-userfs.bb
Then, modify the file to add your "my-receipt" package.
SUMMARY = "STM32MP userfs Image"
LICENSE = "MIT"
include recipes-st/images/st-image-partitions.inc
# Define to null ROOTFS_MAXSIZE
IMAGE_ROOTFS_MAXSIZE = ""
# Add specific package for our image:
PACKAGE_INSTALL += " \
${@bb.utils.contains('MACHINE_FEATURES', 'm4copro', 'm4projects-stm32mp1-userfs', '', d)} \
linux-examples-stm32mp1-userfs \
my_receipt \
"
# Add demo application described on specific packagegroup
PACKAGE_INSTALL += " \
packagegroup-st-demo \
"
Hope that it will help you.
Kind regards,
Erwan.
2022-09-09 01:02 AM
Hello @Michał Wołowik ,
Did you already compare with the /layers/meta-st/meta-st-stm32mp/recipes-extended/linux-examples/linux-examples-stm32mp1 bitbake file ?
Let me know if you understand your issue with the upper file that do the same thing as what you are looking for.
For now I am building a yocto image with your example to try to reproduce.
Kind regards,
Erwan.
2022-09-09 02:05 AM
Hi Erwan,
yes, I based on linux-examples-stm32mp1. The problem is that no folder reset-led is created into /usr/local. I also try to add a folder in for instance into /etc/systemd/system and working as it should. The problem is only with /usr/local. I predict a problem with userfs partition due it is the mounting point for /usr/local.
Thanks for the help.
BR Michal
2022-09-09 05:35 AM
Hi @Michał Wołowik ,
Yes understood, indeed this is a userfs mounting point issue.
What is happening here is that you tell the weston image to install your package in /usr/local.
However, we also have a userfs image that aims to install everything in this folder, so a complete clean is made before.
What you have to do is to tell this userfs image to install your package.
It is done in the following file: layers/meta-st/meta-st-stm32mp/recipes-st/images/st-image-userfs.bb
Then, modify the file to add your "my-receipt" package.
SUMMARY = "STM32MP userfs Image"
LICENSE = "MIT"
include recipes-st/images/st-image-partitions.inc
# Define to null ROOTFS_MAXSIZE
IMAGE_ROOTFS_MAXSIZE = ""
# Add specific package for our image:
PACKAGE_INSTALL += " \
${@bb.utils.contains('MACHINE_FEATURES', 'm4copro', 'm4projects-stm32mp1-userfs', '', d)} \
linux-examples-stm32mp1-userfs \
my_receipt \
"
# Add demo application described on specific packagegroup
PACKAGE_INSTALL += " \
packagegroup-st-demo \
"
Hope that it will help you.
Kind regards,
Erwan.
2022-09-09 07:04 AM
Hi Erwan,
I will try.
Thanks
BR Michal
2022-09-09 07:12 AM
Perfect answer. It is always good to ask, I spend almost half a day. Of course works. Many thanks
BR Michal
2022-09-09 07:26 AM
@Michał Wołowik ,
Glad to see that it solves your issue.
Have a nice day,
Erwan.