Skip to main content
Visitor II
August 19, 2020
Solved

How do I configure additional rootfs(additional Directory, more Package like as lighttpd)?

  • August 19, 2020
  • 1 reply
  • 2742 views

Hello everyone.

I am modifying the distribution packages of 157C-DK2 and 157C-EV1 for my project.

When I previously configured my rootfs using buildroot and debian-jessie, I proceeded as follows(other boards).

Packages that can be configured using buildroot are configured, Debian-jessie is downloaded, and additional packages are downloaded using chroot, or the script under /etc/init.d is modified.

And I organized the directories I wanted in the chroot, and installed my application in the folder.

But I am not sure how to do it in this Distribution Package (or Development Package).

I guess I don't know how to modify the configured Yocto System.

I'm constantly looking at the Wiki Page, but I can't find a way.

(It is difficult to me to proceed with the Wiki Page alone..)

I need your help so I can get to know it little by little.

I think the questions below are similar questions, but I don't know how.

1. How can I further organize my desired directory in the area shown in the photo below?.

I want to configure separate directories for my application and scripts.

0693W000003PiZCQA0.png

2. How do I install any additional packages I want on this image (st-image-weston)?

(like as lighttpd -> for my internal Page, crontab)

3. I want the script I configured to run right after the board boots up.

How do I fix it on this system?

In the past, my script was registered in the SXX files in /etc/init.d to be executed.

* It's a separate question. I'm not to use the LCD on the DK2 or EV1.

Because of that, st-image-weston looks heavy.

Is there any problem with reconfiguring with st-image-core?

I desperately need your help.

thanks​

    This topic has been closed for replies.
    Best answer by KnarfB

    > However, when entering the board with ssh, the rc.d directory is not visible under /etc.

    The ST distros are not using SysVinit but systemd and running a script (systemd service) is done differently. Search the internet for "systemd startup script".

    > How can I modify it so that the desired directory is created on the board?.

    You have to create a new recipe and add that to the image.

    Search for "yocto copy directory to rootfs" E.g. https://stackoverflow.com/questions/36163173/bitbake-recipe-doing-a-simple-copy-of-the-image/36164901#36164901

    hth

    KnarfB

    1 reply

    Super User
    August 19, 2020

    For adding additional packages see e.g. https://wiki.yoctoproject.org/wiki/Building_your_own_recipes_from_first_principles or https://wiki.yoctoproject.org/wiki/Cookbook:Example:Adding_packages_to_your_OS_image

    The cleanest way doing such things is creating a separate layer containing your own recipes. This can be easy as there are lots of Yocto documentation and examples around. But it can also get hard to fix if "something" goes wrong.

    For the core image. take a look at th .bb file in STM32MPU_workspace/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/layers/meta-st/meta-st-openstlinux/recipes-st/images and check how the images differ.

    As a quick hack you may add a line

    CORE_IMAGE_EXTRA_INSTALL += "lighttpd"

    at the end of st-image-weston.bb to add lighttpd to the image.

    SPark.15Author
    Visitor II
    August 20, 2020

    Thanks for your answer.

    ​Using the last method you mentioned, I installed lighttpd and cron.

    Now I have 2 problems left.

    I want to organize the desired directory on my board to organize the files in it.

    How can I modify it so that the desired directory is created on the board?.

    In other words, I want to add the configuration and directory of the st-image-weston-openstlinux-weston-stm32mp1.tar.xz file under deploy/image/stm32mp1.

    I want the script I configured to run automatically.

    However, when entering the board with ssh, the rc.d directory is not visible under /etc.

    I think there is another way in this system.

    if I want the script to run automatically when the board is finished booting, how do I modify it?

    Or, I would like to know how to change st-image-weston-openstlinux-weston-stm32mp1.tar.xz under deploy/image/stm32mp1 and make it st-image-weston-openstlinux-weston-stm32mp1.ext4 .

    KnarfBAnswer
    Super User
    August 20, 2020

    > However, when entering the board with ssh, the rc.d directory is not visible under /etc.

    The ST distros are not using SysVinit but systemd and running a script (systemd service) is done differently. Search the internet for "systemd startup script".

    > How can I modify it so that the desired directory is created on the board?.

    You have to create a new recipe and add that to the image.

    Search for "yocto copy directory to rootfs" E.g. https://stackoverflow.com/questions/36163173/bitbake-recipe-doing-a-simple-copy-of-the-image/36164901#36164901

    hth

    KnarfB