cancel
Showing results for 
Search instead for 
Did you mean: 

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

KChoj.2312
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions

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

It might be the last one in the MACHINEOVERRIDES list.

Olivier

Olivier GALLIEN
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.

View solution in original post

15 REPLIES 15
Olivier GALLIEN
ST Employee

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

Olivier GALLIEN
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.
KChoj.2312
Associate II

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

Olivier GALLIEN
ST Employee

Hi @Community member​ 

Did you still have the issue ?

If yes can you please share your layer.conf ?

Thx

Olivier

Olivier GALLIEN
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.

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"

Olivier GALLIEN
ST Employee

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

Olivier GALLIEN
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.

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

Olivier GALLIEN
ST Employee

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

Olivier GALLIEN
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.

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

Olivier GALLIEN
ST Employee

Can you please share result of :

bitbake -e | grep ^EULA_FILE_ST

and

bitbake-layers show-layers

Thanks

Olivier

Olivier GALLIEN
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.