This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/BEAGLEBK: Yocto Linux build adding scripts to /usr

Part Number: BEAGLEBK

Tool/software: Linux

Hi,

I thought this would be trivial but it is not quite...

I was trying to copy a few customized scripts to the root file system under /usr. I tried two options but both had some problems:

1. Installing the scripts in the initscripts_%.bbappend. This causes conflicts with other recipes that installs files in /usr.

2. Installing the scripts in ROOTFS_POSTPROCESS_COMMAND in the my image recipe that includes the core-image-minimal. I got some license checksum problem by doing this:

...

ERROR: my-image-1.0-r0 do_populate_lic: QA Issue: my-image: Recipe file fetches files and does not have license file information (LIC_FILES_CHKSUM)

...

Question:

Where is the proper place to add my own scripts in the root file system and how do I add them?

Thank you for your help!

  • Hello Matt,

    The proper place to add your custom scripts in the rootfs is /usr/local/bin/.
    According the OE build law, it is mandatory to have a LICENSE and LIC_FILES_CHKSUM variables in your recipes. Please, see this page for more details.

    Best regards,
    Kemal

  • Hi Kemal,

    Thank you for the answer. So ROOTFS_POSTPROCESS_COMMAND is the proper place to add my own scripts.

    Another follow-up question for my educational purpose, if LIC_FILES_CHKSUM is mandatory for very recipe, where is it for core-image-minimal? I searched for a while and was able to find the LICENSE variable. However, not sure where LIC_FILES_CHKSUM is set (or not set).

    Thank you!
  • Hello Matt,

    The core-image-minimal is an intermediary target recipe, which unites the other packagegroups and does some ROOTFS size and space pinches, without directly fetching any source files with SRC_URI variable and exploiting them. So that it only requires the LICENSE variable. It can not be completely considered as a real recipe. If you add SRC_URI = "file://any-file.txt" on it, you will see how it starts to require the LIC_FILES_CHKSUM.

    Best regards,
    Kemal

  • Hi Kemal,

    Thank you. That is very informative.