Re: #swupdate integration error.
#swupdate
tomzy
Hi Vishal,
Cheers,
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[meta-zephyr][PATCH] README.txt: update for honister release
Naveen Saini
Signed-off-by: Naveen Saini <naveen.kumar.saini@...>
--- README.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.txt b/README.txt index 5a0ccc7..9889b01 100644 --- a/README.txt +++ b/README.txt @@ -9,9 +9,9 @@ Prerequisites: ============== This layer depends on: - Yocto distro (master) + Yocto distro (honister) git://git.yoctoproject.org/poky - Python layer (meta-openembedded/meta-python) + Python layer (meta-openembedded/meta-python) (honister) git://git.openembedded.org/meta-openembedded Modify local conf by adding: -- 2.17.1
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Re: Specified SDKMACHINE value is not valid
On 11/1/21 3:52 PM, Richard Purdie wrote:
On Mon, 2021-11-01 at 21:50 +0100, Josef Holzmayr wrote:at one point, I had ppc64le working as SDKMACHINE target as well.(re-adding list as I messed up)Not quite true, aarch64 is supported and tested as an SDKMACHINE value. But again, this is about the SDK. And you probably justRight, this sounds like MACHINE is wanted for raspberrypi.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Re: Specified SDKMACHINE value is not valid
Richard Purdie
On Mon, 2021-11-01 at 21:50 +0100, Josef Holzmayr wrote:
(re-adding list as I messed up)Not quite true, aarch64 is supported and tested as an SDKMACHINE value. But again, this is about the SDK. And you probably justRight, this sounds like MACHINE is wanted for raspberrypi. Cheers, Richard
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Re: Specified SDKMACHINE value is not valid
Josef Holzmayr
(re-adding list as I messed up)
Am Mo., 1. Nov. 2021 um 21:45 Uhr schrieb jchludzinski <jchludzinski@...>: MACHINE = "raspberrypi3" (for example, pick your specific one like http://git.yoctoproject.org/cgit/cgit.cgi/meta-raspberrypi/tree/conf/machine ) Is that not possible?Building the SDK for an architecture other than x86 is not supported at the moment. But again, this is about the SDK. And you probably just want to build the image, where the standard procedures apply. Add the BSP layer, set MACHINE. ---John
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
M+ & H bugs with Milestone Movements WW44
Stephen Jolley
All,
Thanks,
Stephen K. Jolley Yocto Project Program Manager ( Cell: (208) 244-4460 * Email: sjolley.yp.pm@...
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Enhancements/Bugs closed WW44!
Stephen Jolley
All,
Thanks,
Stephen K. Jolley Yocto Project Program Manager ( Cell: (208) 244-4460 * Email: sjolley.yp.pm@...
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Current high bug count owners for Yocto Project 3.5
Stephen Jolley
All,
Thanks,
Stephen K. Jolley Yocto Project Program Manager ( Cell: (208) 244-4460 * Email: sjolley.yp.pm@...
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Reminder: Yocto Project Technical Team Meeting @ Monthly from 8am on the first Tuesday (PDT)
Stephen Jolley
All,
Just a reminder we will hold the monthly Yocto Project Technical Meeting at 8am PST tomorrow. (11/2)
Yocto Project Technical Team Meeting: We encourage people attending the meeting to logon and announce themselves on the Yocto Project IRC chancel during the meeting (optional): Yocto IRC: https://web.libera.chat/#yocto Wiki: https://www.yoctoproject.org/public-virtual-meetings/
When Monthly from 8am to 9am on the first Tuesday Pacific Time Where Zoom Meeting: https://zoom.us/j/990892712?pwd=cHU1MjhoM2x6ck81bkcrYjRrcmJsUT09
We are tracking the minutes at: https://docs.google.com/document/d/1ly8nyhO14kDNnFcW2QskANXW3ZT7QwKC5wWVDg9dDH4/edit?pli=1 Please request access if you want to assist in editing them. The world should have view access.
Thanks,
Stephen K. Jolley Yocto Project Program Manager ( Cell: (208) 244-4460 * Email: sjolley.yp.pm@...
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Re: Specified SDKMACHINE value is not valid
Ross Burton <ross@...>
As per https://docs.yoctoproject.org/ref-manual/variables.html#term-SDKMACHINE
the value isn't a target MACHINE, but a name that is present in conf/machine-sdk: https://git.openembedded.org/openembedded-core/tree/meta/conf/machine-sdk If you want to build a SDK to run on an arm host, you most likely want aarch64. A 32-bit Arm SDK hasn't been tested, but writing a new configuration file for that shouldn't be that difficult. Ross On Mon, 1 Nov 2021 at 06:27, jchludzinski via lists.yoctoproject.org <jchludzinski=vivaldi.net@...> wrote:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Specified SDKMACHINE value is not valid
jchludzinski
NEWBIE question!
I tried building and I get: "Specified SDKMACHINE value is not valid"
pi@raspberrypi ~/p/build> bitbake core-image-minimal
/usr/lib/python3/dist-packages/html5lib/_trie/_base.py:3: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
from collections import Mapping
WARNING: Host distribution "raspbian-10" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
ERROR: OE-core's config sanity checker detected a potential misconfiguration.
Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
Following is the list of potential problems / advisories:
Specified SDKMACHINE value is not valid
Summary: There was 1 WARNING message shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
I've tried setting SDKMACHINE to 'arm' and 'qemuarm' but get the same message? Obviously I failed to do something (properly)? Ideas?
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[yocto-autobuilder-helper] [PATCH 4/4] shared-repos: Use tar instead of rsync for speed
Richard Purdie
The rysnc of 20,000 files (650MB) onto the nas is slow taking ~3 minutes
at idle and worse at load. This is due to the number of files which is a pain point for NFS. This piece of the build is also a bottleneck since the rest of a build depends on it happening. If we switch to zstd compressed tar, it takes 2.49s. Other compression methods were much slower but zstd seems 'accptable' and speeds things up too. Signed-off-by: Richard Purdie <richard.purdie@...> --- scripts/prepare-shared-repos | 4 ++-- scripts/send-qa-email | 6 ++++-- scripts/shared-repo-unpack | 5 ++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/scripts/prepare-shared-repos b/scripts/prepare-shared-repos index f34ba99..d60ad32 100755 --- a/scripts/prepare-shared-repos +++ b/scripts/prepare-shared-repos @@ -39,5 +39,5 @@ with tempfile.TemporaryDirectory(prefix="shared-repo-temp-", dir="/home/pokybuil if args.publish_dir: utils.publishrepo(tempdir, repo, args.publish_dir) - utils.printheader("Running rsync") - subprocess.check_call("rsync -a " + tempdir + "/* " + args.sharedsrcdir, shell=True) + utils.printheader("Creating shared src tarball") + subprocess.check_call("tar -I zstd -cf " + args.sharedsrcdir.rstrip("/") + ".tar.zst ./*", shell=True, cwd=tempdir) diff --git a/scripts/send-qa-email b/scripts/send-qa-email index 1b69307..fc34f7e 100755 --- a/scripts/send-qa-email +++ b/scripts/send-qa-email @@ -45,9 +45,11 @@ buildtoolsdir = os.path.dirname(args.repojson) + "/build/buildtools" if os.path.exists(buildtoolsdir): utils.enable_buildtools_tarball(buildtoolsdir) +repodir = os.path.dirname(args.repojson) + "/repos" + if 'poky' in repos and os.path.exists(resulttool) and args.results_dir: # Need the finalised revisions (not 'HEAD') - targetrepodir = "%s/poky" % (args.sharedrepodir) + targetrepodir = "%s/poky" % (repodir) revision = subprocess.check_output(["git", "rev-parse", "HEAD"], cwd=targetrepodir).decode('utf-8').strip() branch = repos['poky']['branch'] repo = repos['poky']['url'] @@ -116,7 +118,7 @@ if args.send.lower() != 'true' or not args.publish_dir or not args.release: buildhashes = "" for repo in sorted(repos.keys()): # Need the finalised revisions (not 'HEAD') - targetrepodir = "%s/%s" % (args.sharedrepodir, repo) + targetrepodir = "%s/%s" % (repodir, repo) revision = subprocess.check_output(["git", "rev-parse", "HEAD"], cwd=targetrepodir).decode('utf-8').strip() buildhashes += "%s: %s\n" % (repo, revision) diff --git a/scripts/shared-repo-unpack b/scripts/shared-repo-unpack index f08efa8..3dda5b3 100755 --- a/scripts/shared-repo-unpack +++ b/scripts/shared-repo-unpack @@ -50,11 +50,10 @@ needrepos_baseddirs = [r.split('/')[0] for r in needrepos] for repo in sorted(repos.keys()): if repo not in needrepos_baseddirs: continue - targetrepodir = "%s/%s" % (targetsubdir, repo) if args.cache_dir: utils.printheader("Copying in repo %s" % repo) - utils.mkdir(targetrepodir) - subprocess.check_call(["rsync", "-a", "%s/%s" % (args.cache_dir, repo), targetsubdir]) + utils.mkdir(targetsubdir) + subprocess.check_call(["tar", "-I", "zstd", "-C", targetsubdir, "-xf", "%s.tar.zst" % args.cache_dir, "./" + repo]) else: utils.printheader("Fetching repo %s" % repo) utils.fetchgitrepo(targetsubdir, repo, repos[repo], stashdir) -- 2.32.0
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[yocto-autobuilder-helper] [PATCH 3/4] prepare-shared-repo/utils: Limit HEAD clones to shallow depth to save time/space
Richard Purdie
By not syncing all the history is is possible to save some time/space
in the checkout process since we never use this data. This reduces data from 650MB to 400MB or with the tarball, 416MB to 55MB. The logic for the commands needs to be tweaked to handle this and as written it can't work in non-HEAD revision case but that isn't a commonly used situation. Signed-off-by: Richard Purdie <richard.purdie@...> --- scripts/prepare-shared-repos | 2 +- scripts/utils.py | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/scripts/prepare-shared-repos b/scripts/prepare-shared-repos index c221e69..f34ba99 100755 --- a/scripts/prepare-shared-repos +++ b/scripts/prepare-shared-repos @@ -35,7 +35,7 @@ stashdir = utils.getconfig("REPO_STASH_DIR", ourconfig) with tempfile.TemporaryDirectory(prefix="shared-repo-temp-", dir="/home/pokybuild/tmp") as tempdir: for repo in sorted(repos.keys()): utils.printheader("Intially fetching repo %s" % repo) - utils.fetchgitrepo(tempdir, repo, repos[repo], stashdir) + utils.fetchgitrepo(tempdir, repo, repos[repo], stashdir, depth=1) if args.publish_dir: utils.publishrepo(tempdir, repo, args.publish_dir) diff --git a/scripts/utils.py b/scripts/utils.py index 4c73f81..3c2622f 100644 --- a/scripts/utils.py +++ b/scripts/utils.py @@ -228,26 +228,34 @@ def runcmd(cmd): return subprocess.check_output(cmd, stderr=subprocess.STDOUT) -def fetchgitrepo(clonedir, repo, params, stashdir): +def fetchgitrepo(clonedir, repo, params, stashdir, depth=None): sharedrepo = "%s/%s" % (clonedir, repo) branch = params["branch"] revision = params["revision"] + if revision != "HEAD": + depth = None + fetchopt = [] + depthopt = [] + if depth: + fetchopt = ["--depth", str(depth), branch + ":origin/" + branch] + depthopt = ["--depth", str(depth), "--branch", branch] print("Checking for stash at: " + stashdir + "/" + repo) flush() if os.path.exists(stashdir + "/" + repo): print("Cloning from stash to %s..." % sharedrepo) flush() - subprocess.check_call(["git", "clone", "file://%s/%s" % (stashdir, repo), "%s/%s" % (clonedir, repo)]) + subprocess.check_call(["git", "clone", "file://%s/%s" % (stashdir, repo), "%s/%s" % (clonedir, repo)] + depthopt) subprocess.check_call(["git", "remote", "rm", "origin"], cwd=sharedrepo) subprocess.check_call(["git", "remote", "add", "origin", params["url"]], cwd=sharedrepo) print("Updating from origin...") flush() - subprocess.check_call(["git", "fetch", "origin"], cwd=sharedrepo) - subprocess.check_call(["git", "fetch", "origin", "-t"], cwd=sharedrepo) + subprocess.check_call(["git", "fetch", "origin"] + fetchopt, cwd=sharedrepo) + if not depth: + subprocess.check_call(["git", "fetch", "origin", "-t"], cwd=sharedrepo) else: print("Cloning from origin to %s..." % sharedrepo) flush() - subprocess.check_call(["git", "clone", params["url"], sharedrepo]) + subprocess.check_call(["git", "clone", params["url"], sharedrepo] + depthopt) print("Updating checkout...") flush() -- 2.32.0
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[yocto-autobuilder-helper] [PATCH 2/4] prepare-shared-repos: Make it clear when rsync starts in logs
Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@...>
--- scripts/prepare-shared-repos | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/prepare-shared-repos b/scripts/prepare-shared-repos index 1573f85..c221e69 100755 --- a/scripts/prepare-shared-repos +++ b/scripts/prepare-shared-repos @@ -39,4 +39,5 @@ with tempfile.TemporaryDirectory(prefix="shared-repo-temp-", dir="/home/pokybuil if args.publish_dir: utils.publishrepo(tempdir, repo, args.publish_dir) + utils.printheader("Running rsync") subprocess.check_call("rsync -a " + tempdir + "/* " + args.sharedsrcdir, shell=True) -- 2.32.0
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[yocto-autobuilder-helper] [PATCH 1/4] scripts/prepare-shared-repos: Use tmpfs for speed
Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@...>
--- scripts/prepare-shared-repos | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/prepare-shared-repos b/scripts/prepare-shared-repos index 8400d09..1573f85 100755 --- a/scripts/prepare-shared-repos +++ b/scripts/prepare-shared-repos @@ -32,7 +32,7 @@ with open(args.repojson) as f: stashdir = utils.getconfig("REPO_STASH_DIR", ourconfig) -with tempfile.TemporaryDirectory(prefix="shared-repo-temp-", dir="/tmp") as tempdir: +with tempfile.TemporaryDirectory(prefix="shared-repo-temp-", dir="/home/pokybuild/tmp") as tempdir: for repo in sorted(repos.keys()): utils.printheader("Intially fetching repo %s" % repo) utils.fetchgitrepo(tempdir, repo, repos[repo], stashdir) -- 2.32.0
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[yocto-autobuilder2] [PATCH] builders: Fix quarantine handling
Richard Purdie
The way the canStartBuild code was written, it inserted a delay between
each build starting of 2 minutes unconditionally. We only want to do this if the worker had run out of space so tweak the code accordingly. Signed-off-by: Richard Purdie <richard.purdie@...> --- builders.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/builders.py b/builders.py index 20ad0bb2..e575a1a6 100644 --- a/builders.py +++ b/builders.py @@ -69,16 +69,17 @@ def canStartBuild(builder, wfb, request): threshold = 60 # GB of space if int(cmd.stdout) < threshold: log.msg("Detected {0} GB of space available, less than threshold of {1} GB. Can't start build".format(cmd.stdout, threshold)) + wfb.worker.quarantine_timeout = 2 * 60 wfb.worker.putInQuarantine() return False - else: - log.msg("Detected {0} GB of space available, more than threshold of {1} GB. OK to build".format(cmd.stdout, threshold)) - - wfb.worker.quarantine_timeout = 120 - wfb.worker.putInQuarantine() - - wfb.worker.resetQuarantine() + log.msg("Detected {0} GB of space available, more than threshold of {1} GB. OK to build".format(cmd.stdout, threshold)) + if wfb.worker.isPaused: + # It was low on space so delay the builds starting a bit + wfb.worker.quarantine_timeout = 2 * 60 + wfb.worker.putInQuarantine() + else: + wfb.worker.exitQuarantine() return True def create_builder_factory(): -- 2.32.0
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Re: [yocto-autobuilder2][PATCH] builders.py: subtract builder weight instead of add
Richard Purdie
On Fri, 2021-10-29 at 11:39 -0400, Trevor Gamblin wrote:
Signed-off-by: Trevor Gamblin <trevor.gamblin@...>This didn't work (and wasn't merged) although I still think it is probably the correct thing to do with that code. I did some digging and the issue is that when we trigger builds, it triggers them one at a time as part of a buildSet and the prioritisation function therefore sees each build by itself and therefore gives it priority. That raises the question of the order the triggers are run in. A list of builder names is passed which is translated to a list of builderids. I think the order is therefore determined by the database ID of the builders. I did wonder if sorting the builders list would help but it does not. There is code in schedulers/base.py which does: builderids = list() for bldr in (yield self.master.data.get(('builders', ))): if bldr['name'] in builderNames: builderids.append(bldr['builderid']) which I think is where the sorting comes from. I think we're going to have discuss this with upstream. Cheers, Richard
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Re: [yocto-autobuilder2][PATCH] builders.py: Add canStartBuild disk space check
Richard Purdie
On Fri, 2021-10-29 at 09:22 -0400, Trevor Gamblin wrote:
We need a way to limit the builds for when a given worker has less thanUnfortunately this quarantine piece is causing problems. It means that even if there is free space on the builder and always was, a maximum of one build every 2 minutes can be started. I'll probably drop the quarantine piece as it was a nice to have soft start for recovery rather than an essential. Cheers, Richard
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[meta-security][PATCH] tpm2-pkcs11: update to 1.7.0
drop patch now included.
Signed-off-by: Armin Kuster <akuster808@...> --- .../recipes-tpm2/tpm2-pkcs11/files/677.patch | 295 ------------------ ...2-pkcs11_1.6.0.bb => tpm2-pkcs11_1.7.0.bb} | 3 +- 2 files changed, 1 insertion(+), 297 deletions(-) delete mode 100644 meta-tpm/recipes-tpm2/tpm2-pkcs11/files/677.patch rename meta-tpm/recipes-tpm2/tpm2-pkcs11/{tpm2-pkcs11_1.6.0.bb => tpm2-pkcs11_1.7.0.bb} (95%) diff --git a/meta-tpm/recipes-tpm2/tpm2-pkcs11/files/677.patch b/meta-tpm/recipes-tpm2/tpm2-pkcs11/files/677.patch deleted file mode 100644 index 5c91a5e..0000000 --- a/meta-tpm/recipes-tpm2/tpm2-pkcs11/files/677.patch +++ /dev/null @@ -1,295 +0,0 @@ -From 2b74d3df9b3b6932052ace627b21ff1352aa2932 Mon Sep 17 00:00:00 2001 -From: William Roberts <william.c.roberts@...> -Date: Wed, 5 May 2021 13:32:05 -0500 -Subject: [PATCH 1/4] test: fix build for gcc11 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Fixes 0 size regions by ignoring them. The test code intentionally does -bad things. - -test/unit/test_twist.c: In function ‘test_twistbin_aappend_twist_null’: -test/unit/test_twist.c:327:18: error: ‘twistbin_aappend’ accessing 16 bytes in a region of size 0 [-Werror=stringop-overflow=] - 327 | actual = twistbin_aappend(expected, (binarybuffer *) 0xDEADBEEF, 0); - | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Signed-off-by: William Roberts <william.c.roberts@...> - -Upstream-Status: Pending -Fix out for merge to offical repo - -Signed-off-by: Armin Kuster <akuster808@...> - ---- - test/unit/test_twist.c | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -diff --git a/test/unit/test_twist.c b/test/unit/test_twist.c -index ec66f69f..58d4530a 100644 ---- a/test/unit/test_twist.c -+++ b/test/unit/test_twist.c -@@ -244,15 +244,23 @@ void test_twistbin_create(void **state) { - void test_twistbin_new_overflow_1(void **state) { - (void) state; - -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wpragmas" -+#pragma GCC diagnostic ignored "-Wstringop-overflow" - twist actual = twistbin_new((void *) 0xDEADBEEF, ~0); - assert_null(actual); -+#pragma GCC diagnostic pop - } - - void test_twistbin_new_overflow_2(void **state) { - (void) state; - -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wpragmas" -+#pragma GCC diagnostic ignored "-Wstringop-overflow" - twist actual = twistbin_new((void *) 0xDEADBEEF, ~0 - sizeof(void *)); - assert_null(actual); -+#pragma GCC diagnostic pop - } - - void test_twistbin_new_overflow_3(void **state) { -@@ -318,8 +326,12 @@ void test_twistbin_aappend_twist_null(void **state) { - twist actual = twistbin_aappend(expected, NULL, 42); - assert_ptr_equal((void * )actual, (void * )expected); - -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wpragmas" -+#pragma GCC diagnostic ignored "-Wstringop-overflow" - actual = twistbin_aappend(expected, (binarybuffer *) 0xDEADBEEF, 0); - assert_ptr_equal((void * )actual, (void * )expected); -+#pragma GCC diagnostic pop - - twist_free(actual); - } - -From 5bea05613e638375b73e29e5d56a9dabcfd2269d Mon Sep 17 00:00:00 2001 -From: William Roberts <william.c.roberts@...> -Date: Wed, 5 May 2021 11:52:23 -0500 -Subject: [PATCH 2/4] utils: fix stringop-overread in str_padded_copy - -cc1: all warnings being treated as errors -| make: *** [Makefile:1953: src/lib/slot.lo] Error 1 -| make: *** Waiting for unfinished jobs.... -| In file included from src/lib/mutex.h:10, -| from src/lib/session_ctx.h:6, -| from src/lib/digest.h:13, -| from src/lib/tpm.c:28: -| In function 'str_padded_copy', -| inlined from 'tpm_get_token_info' at src/lib/tpm.c:742:5: -| src/lib/utils.h:42:5: error: 'strnlen' specified bound 32 exceeds source size 5 [-Werror=stringop-overread] -| 42 | memcpy(dst, src, strnlen((char *)(src), dst_len)); -| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -| src/lib/utils.h: In function 'tpm_get_token_info': -| src/lib/tpm.c:739:19: note: source object declared here -| 739 | unsigned char manufacturerID[sizeof(UINT32)+1] = {0}; // 4 bytes + '\0' as temp storage -| | ^~~~~~~~~~~~~~ -| cc1: all warnings being treated as errors -| make: *** [Makefile:1953: src/lib/tpm.lo] Error 1 -| WARNING: exit code 1 from a shell command. - -Fixes #676 - -Signed-off-by: William Roberts <william.c.roberts@...> ---- - src/lib/general.c | 8 ++++---- - src/lib/general.h | 2 +- - src/lib/slot.c | 4 ++-- - src/lib/token.c | 4 ++-- - src/lib/tpm.c | 7 +++---- - src/lib/utils.h | 6 ++++-- - 6 files changed, 16 insertions(+), 15 deletions(-) - -diff --git a/src/lib/general.c b/src/lib/general.c -index 9b7327c1..eaddaf82 100644 ---- a/src/lib/general.c -+++ b/src/lib/general.c -@@ -19,8 +19,8 @@ - #define VERSION "UNKNOWN" - #endif - --#define LIBRARY_DESCRIPTION (CK_UTF8CHAR_PTR)"TPM2.0 Cryptoki" --#define LIBRARY_MANUFACTURER (CK_UTF8CHAR_PTR)"tpm2-software.github.io" -+static const CK_UTF8CHAR LIBRARY_DESCRIPTION[] = "TPM2.0 Cryptoki"; -+static const CK_UTF8CHAR LIBRARY_MANUFACTURER[] = "tpm2-software.github.io"; - - #define CRYPTOKI_VERSION { \ - .major = CRYPTOKI_VERSION_MAJOR, \ -@@ -78,8 +78,8 @@ CK_RV general_get_info(CK_INFO *info) { - - static CK_INFO *_info = NULL; - if (!_info) { -- str_padded_copy(_info_.manufacturerID, LIBRARY_MANUFACTURER, sizeof(_info_.manufacturerID)); -- str_padded_copy(_info_.libraryDescription, LIBRARY_DESCRIPTION, sizeof(_info_.libraryDescription)); -+ str_padded_copy(_info_.manufacturerID, LIBRARY_MANUFACTURER); -+ str_padded_copy(_info_.libraryDescription, LIBRARY_DESCRIPTION); - - parse_lib_version(&_info_.libraryVersion.major, - &_info_.libraryVersion.minor); -diff --git a/src/lib/general.h b/src/lib/general.h -index 14a18e46..356c142d 100644 ---- a/src/lib/general.h -+++ b/src/lib/general.h -@@ -10,7 +10,7 @@ - #define TPM2_TOKEN_LABEL "TPM2 PKCS#11 Token" - #define TPM2_TOKEN_MANUFACTURER "Intel" - #define TPM2_TOKEN_MODEL "TPM2 PKCS#11" --#define TPM2_TOKEN_SERIAL_NUMBER "0000000000000000" -+static const CK_UTF8CHAR TPM2_TOKEN_SERIAL_NUMBER[] = "0000000000000000"; - #define TPM2_TOKEN_HW_VERSION { 0, 0 } - #define TPM2_TOKEN_FW_VERSION { 0, 0 } - -diff --git a/src/lib/slot.c b/src/lib/slot.c -index 548d22b5..6db5bb93 100644 ---- a/src/lib/slot.c -+++ b/src/lib/slot.c -@@ -119,8 +119,8 @@ CK_RV slot_get_info (CK_SLOT_ID slot_id, CK_SLOT_INFO *info) { - return CKR_GENERAL_ERROR; - } - -- str_padded_copy(info->manufacturerID, token_info.manufacturerID, sizeof(info->manufacturerID)); -- str_padded_copy(info->slotDescription, token_info.label, sizeof(info->slotDescription)); -+ str_padded_copy(info->manufacturerID, token_info.manufacturerID); -+ str_padded_copy(info->slotDescription, token_info.label); - - info->hardwareVersion = token_info.hardwareVersion; - info->firmwareVersion = token_info.firmwareVersion; -diff --git a/src/lib/token.c b/src/lib/token.c -index 6d7ebd27..c7211296 100644 ---- a/src/lib/token.c -+++ b/src/lib/token.c -@@ -317,8 +317,8 @@ CK_RV token_get_info (token *t, CK_TOKEN_INFO *info) { - } - - // Identification -- str_padded_copy(info->label, t->label, sizeof(info->label)); -- str_padded_copy(info->serialNumber, (unsigned char*) TPM2_TOKEN_SERIAL_NUMBER, sizeof(info->serialNumber)); -+ str_padded_copy(info->label, t->label); -+ str_padded_copy(info->serialNumber, TPM2_TOKEN_SERIAL_NUMBER); - - - // Memory: TODO not sure what memory values should go here, the platform? -diff --git a/src/lib/tpm.c b/src/lib/tpm.c -index 1639df48..7f9f052a 100644 ---- a/src/lib/tpm.c -+++ b/src/lib/tpm.c -@@ -740,15 +740,14 @@ CK_RV tpm_get_token_info (tpm_ctx *ctx, CK_TOKEN_INFO *info) { - unsigned char manufacturerID[sizeof(UINT32)+1] = {0}; // 4 bytes + '\0' as temp storage - UINT32 manufacturer = ntohl(tpmProperties[TPM2_PT_MANUFACTURER - TPM2_PT_FIXED].value); - memcpy(manufacturerID, (unsigned char*) &manufacturer, sizeof(uint32_t)); -- str_padded_copy(info->manufacturerID, manufacturerID, sizeof(info->manufacturerID)); -+ str_padded_copy(info->manufacturerID, manufacturerID); - - // Map human readable Manufacturer String, if available, - // otherwise 4 byte ID was already padded and will be used. - for (unsigned int i=0; i < ARRAY_LEN(TPM2_MANUFACTURER_MAP); i++){ - if (!strncasecmp((char *)info->manufacturerID, TPM2_MANUFACTURER_MAP[i][0], 4)) { - str_padded_copy(info->manufacturerID, -- (unsigned char *)TPM2_MANUFACTURER_MAP[i][1], -- sizeof(info->manufacturerID)); -+ (unsigned char *)TPM2_MANUFACTURER_MAP[i][1]); - } - } - -@@ -758,7 +757,7 @@ CK_RV tpm_get_token_info (tpm_ctx *ctx, CK_TOKEN_INFO *info) { - vendor[1] = ntohl(tpmProperties[TPM2_PT_VENDOR_STRING_2 - TPM2_PT_FIXED].value); - vendor[2] = ntohl(tpmProperties[TPM2_PT_VENDOR_STRING_3 - TPM2_PT_FIXED].value); - vendor[3] = ntohl(tpmProperties[TPM2_PT_VENDOR_STRING_4 - TPM2_PT_FIXED].value); -- str_padded_copy(info->model, (unsigned char*) &vendor, sizeof(info->model)); -+ str_padded_copy(info->model, (unsigned char*) &vendor); - - return CKR_OK; - } -diff --git a/src/lib/utils.h b/src/lib/utils.h -index 81c61fae..cf357464 100644 ---- a/src/lib/utils.h -+++ b/src/lib/utils.h -@@ -39,9 +39,11 @@ - - int str_to_ul(const char *val, size_t *res); - --static inline void str_padded_copy(CK_UTF8CHAR_PTR dst, const CK_UTF8CHAR_PTR src, size_t dst_len) { -+#define str_padded_copy(dst, src) _str_padded_copy(dst, sizeof(dst), src, strnlen((const char *)src, sizeof(src))) -+static inline void _str_padded_copy(CK_UTF8CHAR_PTR dst, size_t dst_len, const CK_UTF8CHAR *src, size_t src_len) { - memset(dst, ' ', dst_len); -- memcpy(dst, src, strnlen((char *)(src), dst_len)); -+ memcpy(dst, src, src_len); -+ LOGE("BILL(%zu): %.*s\n", dst_len, dst_len, dst); - } - - twist utils_hash_pass(const twist pin, const twist salt); - -From afeae8a3846e06152fafb180077fbad4381a124d Mon Sep 17 00:00:00 2001 -From: William Roberts <william.c.roberts@...> -Date: Wed, 5 May 2021 14:09:27 -0500 -Subject: [PATCH 3/4] general: drop unused macros - -Signed-off-by: William Roberts <william.c.roberts@...> ---- - src/lib/general.h | 10 ---------- - 1 file changed, 10 deletions(-) - -diff --git a/src/lib/general.h b/src/lib/general.h -index 356c142d..b3089554 100644 ---- a/src/lib/general.h -+++ b/src/lib/general.h -@@ -7,17 +7,7 @@ - - #include "pkcs11.h" - --#define TPM2_TOKEN_LABEL "TPM2 PKCS#11 Token" --#define TPM2_TOKEN_MANUFACTURER "Intel" --#define TPM2_TOKEN_MODEL "TPM2 PKCS#11" - static const CK_UTF8CHAR TPM2_TOKEN_SERIAL_NUMBER[] = "0000000000000000"; --#define TPM2_TOKEN_HW_VERSION { 0, 0 } --#define TPM2_TOKEN_FW_VERSION { 0, 0 } -- --#define TPM2_SLOT_DESCRIPTION "Intel TPM2.0 Cryptoki" --#define TPM2_SLOT_MANUFACTURER TPM2_TOKEN_MANUFACTURER --#define TPM2_SLOT_HW_VERSION TPM2_TOKEN_HW_VERSION --#define TPM2_SLOT_FW_VERSION TPM2_TOKEN_FW_VERSION - - CK_RV general_init(void *init_args); - CK_RV general_get_func_list(CK_FUNCTION_LIST **function_list); - -From 8b43a99c5ff604d890bdc23fd2fa5f98aa087d83 Mon Sep 17 00:00:00 2001 -From: William Roberts <william.c.roberts@...> -Date: Wed, 5 May 2021 14:11:04 -0500 -Subject: [PATCH 4/4] token: move TPM2_TOKEN_SERIAL_NUMBER local to use - -Signed-off-by: William Roberts <william.c.roberts@...> ---- - src/lib/general.h | 2 -- - src/lib/token.c | 2 ++ - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/lib/general.h b/src/lib/general.h -index b3089554..9afd61ec 100644 ---- a/src/lib/general.h -+++ b/src/lib/general.h -@@ -7,8 +7,6 @@ - - #include "pkcs11.h" - --static const CK_UTF8CHAR TPM2_TOKEN_SERIAL_NUMBER[] = "0000000000000000"; -- - CK_RV general_init(void *init_args); - CK_RV general_get_func_list(CK_FUNCTION_LIST **function_list); - CK_RV general_get_info(CK_INFO *info); -diff --git a/src/lib/token.c b/src/lib/token.c -index c7211296..63a9a71b 100644 ---- a/src/lib/token.c -+++ b/src/lib/token.c -@@ -20,6 +20,8 @@ - #include "token.h" - #include "utils.h" - -+static const CK_UTF8CHAR TPM2_TOKEN_SERIAL_NUMBER[] = "0000000000000000"; -+ - void pobject_config_free(pobject_config *c) { - - if (c->is_transient) { diff --git a/meta-tpm/recipes-tpm2/tpm2-pkcs11/tpm2-pkcs11_1.6.0.bb b/meta-tpm/recipes-tpm2/tpm2-pkcs11/tpm2-pkcs11_1.7.0.bb similarity index 95% rename from meta-tpm/recipes-tpm2/tpm2-pkcs11/tpm2-pkcs11_1.6.0.bb rename to meta-tpm/recipes-tpm2/tpm2-pkcs11/tpm2-pkcs11_1.7.0.bb index fdeda26..649338a 100644 --- a/meta-tpm/recipes-tpm2/tpm2-pkcs11/tpm2-pkcs11_1.6.0.bb +++ b/meta-tpm/recipes-tpm2/tpm2-pkcs11/tpm2-pkcs11_1.7.0.bb @@ -9,10 +9,9 @@ DEPENDS = "autoconf-archive pkgconfig dstat sqlite3 openssl libtss2-dev tpm2-too SRC_URI = "git://github.com/tpm2-software/tpm2-pkcs11.git;branch=master \ file://bootstrap_fixup.patch \ file://0001-remove-local-binary-checkes.patch \ - file://677.patch \ " -SRCREV = "c2d53cc1af6b9df13c832715442853b21048c273" +SRCREV = "862bdb845910342cd7b6e6da7495f6ee7d090a37" S = "${WORKDIR}/git" -- 2.25.1
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Re: How to set IMAGE_ROOTFS_SIZE ?
Michael Opdenacker
Hello,
Copying the docs@ mailing list. On 10/29/21 5:49 PM, Michael Opdenacker wrote: Hello Simone, All things considered, the documentation for some other parameters explains where they can typically be set. This should definitely help people just quickly reading the specific reference documentation for a given variable. I'll submit a documentation patch to address this need. Many thanks for asking! Michael. -- Michael Opdenacker, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|