Home > front end >  how to get LIC_FILES_CHKSUM for a github link?
how to get LIC_FILES_CHKSUM for a github link?

Time:12-24

Given below is the link for which I am creating a recipe, i want to add lic_files_chksum in .bb file how to find it or generate it. LIC_FILES_CHKSUM = ??????

https://github.com/kuscsik/streamfs/blob/master/LICENSE

How to get like these stuff "md5=801f80980d171dd6425610833a22dbe6" for any github links?? I have checked the license file in the link it only has License name and version(GLP 3.0) but i dint find LIC_FILES_CHKSUM.

Please give me details on how to find it for my link.

CodePudding user response:

The chksum is based on the md5 sum of the license file in any given repository. If you do 'md5sum [license-filename]', you will end up with your answer. There's a section in the yocto reference doc that explains this. https://www.yoctoproject.org/docs/1.2/poky-ref-manual/poky-ref-manual.html

CodePudding user response:

If your package have a license you need to specify it with its md5 checksum using:

LICENSE = ""
LIC_FILES_CHKSUM = ""

If you have no license, just specify the license to be closed, and no checksum is required:

LICENSE = "CLOSED"

If you specify a license file, it needs to be exists in the working directory of the recipe.

Then, you need to calculate the md5 checksum of the license file:

md5 LICENSE

And then, specify it in the recipe:

LICENSE = "GPL-3.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=xxxxx"

In addition, if you have a license in another file that contains other things, for example a header file with a commented license, you can specify the begin and the end line of the license, along with the checksum value as well:

LICENSE = "GPL-3.0"
LIC_FILES_CHKSUM = "file://example.h;beginline=1;endline=10;md5=xxxx"

Also, make note that the LIC_FILES_CHKSUM can hold many license files, like:

LIC_FILES_CHKSUM = "file://LICENSE;md5=xxxxx \
                    file://COPYING;md5=xxxxx
"
  • Related