Skip to main content
Visitor II
November 14, 2019
Solved

License file (EULA) for new machine in custom layer not found

  • November 14, 2019
  • 6 replies
  • 4129 views

Hi, I try to add a new layer and a new machine to the STM32MP1 Distribution Image. i followed the following tutorials tutorials:

https://wiki.st.com/stm32mpu/wiki/How_to_create_a_new_open_embedded_layer

https://wiki.st.com/stm32mpu/wiki/How_to_compile_the_device_tree_with_the_Distribution_Package

However, I am still getting the following error:

WARNING: st-image-core-1.0-r0 do_populate_lic: Could not copy license file /home/user/workspace/STM32MP1/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/layers/meta-st/meta-st-stm32mp-addons/conf/eula/stm32mp1-mymachine to /home/user/workspace/STM32MP1/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/build-openstlinuxeglfs-stm32mp1-mymachine/tmp-glibc/work/stm32mp1_mymachine-openstlinux_eglfs-linux-gnueabi/st-image-core/1.0-r0/license-destdir/st-image-core/stm32mp1-mymachine: [Errno 2] No such file or directory: '/home/user/workspace/STM32MP1/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/layers/meta-st/meta-st-stm32mp-addons/conf/eula/stm32mp1-mymachine'
ERROR: st-image-core-1.0-r0 do_populate_lic: QA Issue: st-image-core: LIC_FILES_CHKSUM points to an invalid file: /home/user/workspace/STM32MP1/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/layers/meta-st/meta-st-stm32mp-addons/conf/eula/stm32mp1-mymachine [license-checksum]
ERROR: st-image-core-1.0-r0 do_populate_lic: Fatal QA errors found, failing task.
ERROR: st-image-core-1.0-r0 do_populate_lic: Function failed: populate_lic_qa_checksum
ERROR: Logfile of failure stored in: /home/user/workspace/STM32MP1/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/build-openstlinuxeglfs-stm32mp1-mymachine/tmp-glibc/work/stm32mp1_mymachine-openstlinux_eglfs-linux-gnueabi/st-image-core/1.0-r0/temp/log.do_populate_lic.30716
ERROR: Task (/home/user/workspace/STM32MP1/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/layers/meta-st/meta-st-openstlinux/recipes-st/images/st-image-core.bb:do_populate_lic) failed with exit code '1'

So it looks that the bibtake still looks for the license file in the meta-st-stm32mp-addons, but not in my layer directory. Is there something I need to add to the configuration described in the tutorials from stm32mp1 wiki? I have already created the conf/eula directory in my layer with the link stm32mp1-mymachine -> ST_EULA_SLA.

Best regards,

Krzysztof

    This topic has been closed for replies.
    Best answer by Olivier GALLIEN

    Pay attention to put MACHINEOVERRIDES .= ":stm32mpmydemo" at the end of your conf file.

    It might be the last one in the MACHINEOVERRIDES list.

    Olivier

    6 replies

    Technical Moderator
    November 19, 2019

    Hi @Community member​ 

    Reading this page :

    https://wiki.st.com/stm32mpu/wiki/How_to_create_your_own_machine

    Did you do the symbolic link as described in Chapter 3.3 ?

    Error message looks obvious that stm32mp1-mymachine -> ST_EULA_SLA. is missing in <path of STM32MP1_Distribution_Package>/layers/meta-st/meta-st-stm32mp-addons/conf/eula

    Hope it help

    Olivier

    Visitor II
    November 19, 2019

    Hi Olivier,

    thanks for the response. I have also tried the intrustions in the mentioned link, but without any success. If I create the symbolic link with my machine name in the meta-st-stm32mp-addons layer it works, however when I put it in the eula directory in my own layer and create the license symbolic link there I get the No such file or directory error. I have also added the layers/meta-st/meta-st-stm32mp-addons layer as needed bsp in my machine conf file (NEEDED_BSPLAYERS).

    So it looks like my layer path is not searched for the license. I probably missed something to add it to the path but cannot find what.

    Krzysztof

    Technical Moderator
    November 28, 2019

    Hi @Community member​ 

    Did you still have the issue ?

    If yes can you please share your layer.conf ?

    Thx

    Olivier

    Visitor II
    December 3, 2019

    Hi Olivier,

    Yes - the problem still exists. i tried a few more changes in the layer and machine configs but without success.

    My layer.conf file looks like this:

    # We have a conf and classes directory, add to BBPATH
    BBPATH .= ":${LAYERDIR}"
     
    # We have recipes-* directories, add to BBFILES
    BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
     ${LAYERDIR}/recipes-*/*/*.bbappend"
     
    BBFILE_COLLECTIONS += "meta-mylayer"
    BBFILE_PATTERN_meta-mylayer = "^${LAYERDIR}/"
    BBFILE_PRIORITY_meta-mylayer = "7"
     
    # Set a variable to get the STM32MP MX BSP location
    STM32MP_MYLAYER_BASE = "${LAYERDIR}"
     
    # This should only be incremented on significant changes that may
    # cause compatibility issues with other layers
    LAYERVERSION_meta-mylayer = "1"
    LAYERSERIES_COMPAT_meta-mylayer = "thud"
    LAYERDEPENDS_meta-mylayer = "stm-st-stm32mp-mx"

    Technical Moderator
    December 4, 2019

    Hi @Community member​ 

    Did you follow wiki page https://wiki.st.com/stm32mpu/wiki/How_to_compile_the_device_tree_with_the_Distribution_Package ?

    Seems that your layer.conf does not contain lines related to EULA :

    EULA_FILE_ST_stm32mpmylayer = "${LAYERDIR}/conf/eula/${MACHINE}"

    EULA_FILE_ST_MD5SUM_stm32mpmylayer = "8b505090fb679839cefbcc784afe8ce9"

    #Inform bitbake for adding another location to search for licenses

    LICENSE_PATH += "${LAYERDIR}/files/licenses"

    And in your machine .conf add :

    MACHINEOVERRIDES .= ":stm32mpmylayer"

    Hope it help

    Olivier

    Visitor II
    December 4, 2019

    Hi Olivier,

    I'm sorry - I sent you the version of layer.conf after I removed the license entries and created the license link in the meta-st-stm32mp-addons/conf/eula directory (this is the only way I can make it work). I added back the lines you've mentioned and now it looks like this:

    # We have a conf and classes directory, add to BBPATH
    BBPATH .= ":${LAYERDIR}"
     
    # We have recipes-* directories, add to BBFILES
    BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
     ${LAYERDIR}/recipes-*/*/*.bbappend"
     
    BBFILE_COLLECTIONS += "meta-mylayer"
    BBFILE_PATTERN_meta-mylayer = "^${LAYERDIR}/"
    BBFILE_PRIORITY_meta-mylayer = "7"
     
    EULA_FILE_ST_stm32mpmylayer = "${LAYERDIR}/conf/eula/${MACHINE}"
    EULA_FILE_ST_MD5SUM_stm32mpmylayer = "8b505090fb679839cefbcc784afe8ce9"
     
    #Inform bitbake for adding another location to search for licenses
    LICENSE_PATH += "${LAYERDIR}/files/licenses"
     
    # Set a variable to get the STM32MP MX BSP location
    STM32MP_MYLAYER_BASE = "${LAYERDIR}"
     
    # This should only be incremented on significant changes that may
    # cause compatibility issues with other layers
    LAYERVERSION_meta-mylayer = "1"
    LAYERSERIES_COMPAT_meta-mylayer = "thud"
    LAYERDEPENDS_meta-mylayer = "stm-st-stm32mp-mx"

    my machine conf has also the line:

    MACHINEOVERRIDES .= ":stm32mpmylayer"

    However I still have the same error and bitbake looks for the license file in the meta-st/meta-st-stm32mp-addons/conf/eula/ directory. Are there some requirements regarding the layer and the machine names (for example the *-layer suffix in the layer name)? My layer is called meta-mylayer and is located in the meta-st directory.

    Krzysztof

    Technical Moderator
    December 4, 2019

    Hi @Community member​ 

    To match with this layer.conf EULA link has to be done inside your own layer.

    As per describe in section 2.3 of the wiki https://wiki.st.com/stm32mpu/wiki/How_to_compile_the_device_tree_with_the_Distribution_Package#Associate_EULA_with_the_new_demo_machine

    First copy /conf/eula from Adds-on to your layer and then do the link

    Olivier

    Visitor II
    December 4, 2019

    That's right - I have already copied the eula directory to my own layer and created a link there, but bitbake still checks for it in the meta-st-stm32mp-addons layer. The only way I can get rid of this error is to create the link with my machine name in the meta-st-stm32mp-addons.

    Krzysztof

    Technical Moderator
    December 4, 2019

    Can you please share result of :

    bitbake -e | grep ^EULA_FILE_ST

    and

    bitbake-layers show-layers

    Thanks

    Olivier

    Visitor II
    December 4, 2019

    I created the layer once again according to the wiki posts with the same directory names. It is located in the meta-st/meta-my-demo-layer/ directory/ - the error is still the same.

    ll ../layers/meta-st/meta-my-demo-layer/conf/eula/
    total 64
    drwxrwxr-x 2 krzysiek krzysiek 4096 gru 4 14:23 ./
    drwxrwxr-x 4 krzysiek krzysiek 4096 gru 4 14:23 ../
    -rw-rw-r-- 1 krzysiek krzysiek 5533 gru 4 14:23 en.SLA0048.txt
    -rw-rw-r-- 1 krzysiek krzysiek 4178 gru 4 14:23 LICENCE.broadcom_bcm43xx
    -rw-rw-r-- 1 krzysiek krzysiek 8997 gru 4 14:23 LICENCE.cypress
    -rw-rw-r-- 1 krzysiek krzysiek 21707 gru 4 14:23 ST_EULA_SLA
    lrwxrwxrwx 1 krzysiek krzysiek 11 gru 4 14:23 stm32mp1-demo -> ST_EULA_SLA
    -rw-rw-r-- 1 krzysiek krzysiek 2757 gru 4 14:23 Vivante_GPU_drivers-End_User_Software_License_Terms.txt
    cat ../layers/meta-st/meta-my-demo-layer/conf/layer.conf 
    # We have a conf and classes directory, add to BBPATH
    BBPATH .= ":${LAYERDIR}"
     
    # We have recipes-* directories, add to BBFILES
    BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
     ${LAYERDIR}/recipes-*/*/*.bbappend"
     
    BBFILE_COLLECTIONS += "meta-my-demo-layer"
    BBFILE_PATTERN_meta-my-demo-layer = "^${LAYERDIR}/"
    BBFILE_PRIORITY_meta-my-demo-layer = "7"
     
    EULA_FILE_ST_stm32mpmydemo = "${LAYERDIR}/conf/eula/${MACHINE}"
    EULA_FILE_ST_MD5SUM_stm32mpmydemo = "8b505090fb679839cefbcc784afe8ce9"
     
    #Inform bitbake for adding another location to search for licenses
    LICENSE_PATH += "${LAYERDIR}/files/licenses"
     
    # Set a variable to get the STM32MP MX BSP location
    STM32MP_MY_DEMO_BASE = "${LAYERDIR}"
     
    # This should only be incremented on significant changes that may
    # cause compatibility issues with other layers
    LAYERVERSION_meta-my-demo-layer = "1"
    LAYERDEPENDS_meta-my-demo-layer = "stm-st-stm32mp-mx"
    LAYERSERIES_COMPAT_meta-my-demo-layer = "thud"
    bitbake-layers show-layers
    NOTE: Starting bitbake server...
    layer path priority
    ==========================================================================
    meta-my-demo-layer /home/krzysiek/workspace/STM32MP1/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/layers/meta-st/meta-my-demo-layer 7
    meta-st-stm32mp-addons /home/krzysiek/workspace/STM32MP1/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/layers/meta-st/meta-st-stm32mp-addons 7
    meta-python /home/krzysiek/workspace/STM32MP1/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/layers/meta-openembedded/meta-python 7
    meta-oe /home/krzysiek/workspace/STM32MP1/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/layers/meta-openembedded/meta-oe 6
    meta-oe /home/krzysiek/workspace/STM32MP1/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/layers/meta-openembedded/meta-oe 6
    meta-gnome /home/krzysiek/workspace/STM32MP1/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/layers/meta-openembedded/meta-gnome 7
    meta-xfce /home/krzysiek/workspace/STM32MP1/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/layers/meta-openembedded/meta-xfce 7
    meta-initramfs /home/krzysiek/workspace/STM32MP1/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/layers/meta-openembedded/meta-initramfs 8
    meta-multimedia /home/krzysiek/workspace/STM32MP1/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/layers/meta-openembedded/meta-multimedia 6
    meta-networking /home/krzysiek/workspace/STM32MP1/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/layers/meta-openembedded/meta-networking 5
    meta-webserver /home/krzysiek/workspace/STM32MP1/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/layers/meta-openembedded/meta-webserver 6
    meta-filesystems /home/krzysiek/workspace/STM32MP1/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/layers/meta-openembedded/meta-filesystems 6
    meta-perl /home/krzysiek/workspace/STM32MP1/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/layers/meta-openembedded/meta-perl 6
    meta-python /home/krzysiek/workspace/STM32MP1/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/layers/meta-openembedded/meta-python 7
    meta-st-stm32mp /home/krzysiek/workspace/STM32MP1/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/layers/meta-st/meta-st-stm32mp 6
    meta-qt5 /home/krzysiek/workspace/STM32MP1/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/layers/meta-qt5 7
    meta-st-openstlinux /home/krzysiek/workspace/STM32MP1/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/layers/meta-st/meta-st-openstlinux 5
    meta /home/krzysiek/workspace/STM32MP1/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/layers/openembedded-core/meta 5
    bitbake -e | grep ^EULA_FILE_ST
    EULA_FILE_ST="/home/krzysiek/workspace/STM32MP1/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/layers/meta-st/meta-st-stm32mp-addons/conf/eula/stm32mp1-demo"
    EULA_FILE_ST_MD5SUM="8b505090fb679839cefbcc784afe8ce9"
    EULA_FILE_ST_MD5SUM_stm32mpcommon="8b505090fb679839cefbcc784afe8ce9"
    EULA_FILE_ST_MD5SUM_stm32mpcommonmx="8b505090fb679839cefbcc784afe8ce9"
    EULA_FILE_ST_MD5SUM_stm32mpmydemo="8b505090fb679839cefbcc784afe8ce9"
    EULA_FILE_ST_stm32mpcommon="/home/krzysiek/workspace/STM32MP1/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/layers/meta-st/meta-st-stm32mp/conf/eula/stm32mp1-demo"
    EULA_FILE_ST_stm32mpcommonmx="/home/krzysiek/workspace/STM32MP1/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/layers/meta-st/meta-st-stm32mp-addons/conf/eula/stm32mp1-demo"
    EULA_FILE_ST_stm32mpmydemo="/home/krzysiek/workspace/STM32MP1/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/layers/meta-st/meta-my-demo-layer/conf/eula/stm32mp1-demo"

     Krzysztof

    Technical Moderator
    December 4, 2019

    It looks like you didn't set MACHINEOVERRIDES .= ":stm32mpmydemo" in your new machine.

    When properly set you should get :

    $> bitbake -e | grep ^MACHINEOVERRIDES

    MACHINEOVERRIDES="armv7ve:stm32mp1-demo:stcommon:stm32mpcommon:stm32mpmydemo"

    $> bitbake -e | grep ^EULA_FILE_ST

    EULA_FILE_ST="<my path>/layers/meta-st/meta-my-demo-layer/conf/eula/stm32mp1-demo"

    Olivier