9

Where do I specify BB_STRICT_CHECKSUM = "0" in Yocto to disable checksum check of source code?

I get:

ERROR: No checksum specified for /PATH/TO/ti-linux-kernel.git, please add at least one to the     recipe:
SRC_URI[md5sum] = "e8e287fd725bea8b4220ebe9094cda86"
SRC_URI[sha256sum] = "4a4f522b05e6c1fcd1872f2fc7c82061dfdc4a19c5f866858005daa198f89bbb"
Mogsdad
  • 44,709
  • 21
  • 151
  • 275
JohnyTex
  • 3,323
  • 5
  • 29
  • 52

4 Answers4

17

Regarding this page BB_STRICT_CHECKSUM is a variable which can be used in .bb files. So, you can simply add the following line to the corresponding .bb file, which your SRC_URI has been set in it, to avoid the checksum checking error:

BB_STRICT_CHECKSUM = "0"

By adding this line the checksum check error (saying: No checksum specified for blah/blah/blah, please add at least one to the recipe OR the other error saying: Missing SRC_URI checksum) won't break the compile process anymore and just a warning will be thrown.

Hope it helps

Metacarpus
  • 15
  • 4
user3578181
  • 1,896
  • 2
  • 17
  • 12
  • 1
    This works. Instead of errors bitbake throws warnings (the checksums are still printed if you want to go back and secure your *successful* build). – naugler Oct 19 '17 at 19:38
  • This should be the real answer IMHO. – ADogg Apr 03 '19 at 13:43
15

I don't see a variable named BB_STRICT_CHECKSUM in the Yocto documentation.

As far as I can tell, you shouldn't need to specify the SRC_URI[...] checksums for a git repository. In your bitbake recipe, does /PATH/TO/ti-linux-kernel.git have a git:// at the front of it? Bitbake uses that to determine the type of SCM tool to use. If you want to access a git repo via http you would specify

SRC_URI = "git://server.com/PATH/TO/ti-linux-kernel.git;protocol=http"

Maddeningly, this is only hinted at in documentation for SRC_URI.

The SRC_URI[md5sum] and SRC_URI[sha256sum] are instead intended for ensuring downloaded tarballs are the same as when you write the recipe. If you were adding a tarball (say, http://server.com/path/to/some-project.tar.gz), the recommended way is to

... comment the statements out and then attempt to build the software. The build will produce an error for each missing checksum and as part of the error message provide the correct checksum string. Once you have the correct checksums, simply copy them into your recipe for a subsequent build.

You can see in your error message that in this case they have indeed been provided.

benf
  • 915
  • 1
  • 9
  • 28
1

If your cloning the repo with https://some_path you will need

SRC_URI[md5sum] = "e8e287fd725bea8b4220ebe9094cda86"
SRC_URI[sha256sum] = " 4a4f522b05e6c1fcd1872f2fc7c82061dfdc4a19c5f866858005daa198f89bbb"

while you clone the repo with git://some_path you will need md5sum of any other file like

LIC_FILES_CHKSUM = "file://LICENSE;md5=a77c327d4d1da3707d42dde9725d4769"
ashish
  • 361
  • 3
  • 8
  • 3
    No, that's wrong. It doesn't matter if you're using git, https, http, or ssh as the transport protocol; while cloning a repo, you don't need to specify a SRC_URI checksum. – Anders Jul 07 '15 at 11:42
  • @Anders Instead, I experienced that by changing the protocol from git to https, it started giving me this warning. – Mario Palumbo Jul 20 '23 at 10:32
0

Add

 BB_STRICT_CHECKSUM:forcevariable = "0"

In conf/local.conf inside build directory or in any other configuration metadata files e.g. site.conf or auto.conf

forcevariable is highest order override which will ensure that it will not entertain other settings of this variable found in other places e.g. in meta/conf/distro/include/default-distrovars.inc

Khem
  • 1,162
  • 8
  • 8