From patchwork Thu Jun 6 06:34:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anders Gnistrup X-Patchwork-Id: 1944445 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20230601 header.b=qjcJ93Su; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=FKDLKUg0; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::53f; helo=mail-ed1-x53f.google.com; envelope-from=swupdate+bncbdjmjrvvs4ibbgnrqwzqmgqehewlrty@googlegroups.com; receiver=patchwork.ozlabs.org) Received: from mail-ed1-x53f.google.com (mail-ed1-x53f.google.com [IPv6:2a00:1450:4864:20::53f]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vvvhg2tQKz20PW for ; Thu, 6 Jun 2024 16:35:13 +1000 (AEST) Received: by mail-ed1-x53f.google.com with SMTP id 4fb4d7f45d1cf-57a5af3e160sf247800a12.2 for ; Wed, 05 Jun 2024 23:35:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717655707; cv=pass; d=google.com; s=arc-20160816; b=AXSvc+R5xl1eiBtzcW47fgGGw0KPTD9rTYXbzy+90Q//vB3YST4YbxyqVRxfRSfcWU V1l7G28wZK53Y5p+qstF9BJc2J4qHaufBnkx0DvLVqsUq4oUnJINevH5YYL7oRHYn24s AaxGVReI+Ii94zJBPb6iRr9b6mSo+165bjl7BX9nw62tzzIfQql/MDus5O8P0WPEgc/8 SGaqXFvtxA4Vu9GP+05gDbXJ6lJveDpvmIKPjXthpbBtjSu1n1mb60hOwdW+ZJnHrEXz +D4MObMjn3Zt46jK1rtx5FTlUPS+ix3BV3oKh96v0/K5cQ9Vlxk2IVNDW6+uFHscvBpG wn8w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:to:subject:message-id:date:from :in-reply-to:references:mime-version:sender:dkim-signature :dkim-signature; bh=+lSsvj6UVXBM2a5JrkAWkG0de2syd7WM8MHdoF5ONpw=; fh=spE7Vq/lbhOs1hT0lZGaIG8cA8cd0fN+Pv5RhDlN1jo=; b=O+eJpDRkGNagEv0QByYis6jTdTqHc5+NeX1Qvb/fRbQZdcodUD085YQw/eLnUm2dDH 0ss3xibPJoUWKGCyD9TsItrYG5fayJK1SXIbZBeYHfeiAQAhhLch1S5mVBsEMP1U7z72 qwehh3obh84URNe6t5tzwzTh3I1dhg9KAprU+ptphzBij8ZJZDj7tu5CcZQWnl4/eTzJ A9++uElJoERiOc5qMhuyHSo10xZak3W5mc8XTPgWUoz9e9DArWqgBv59lMsRnFwwWKYU xVle8SVoVOi8OyvIjITOSiiDt+ouBwbZVlnexTUWtuojeUzwLESUo92FnReoi9YUoyI8 nsIg==; darn=patchwork.ozlabs.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="HS05BK/Z"; spf=pass (google.com: domain of a.gnistrup@gmail.com designates 2a00:1450:4864:20::632 as permitted sender) smtp.mailfrom=a.gnistrup@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1717655707; x=1718260507; darn=patchwork.ozlabs.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:to:subject:message-id:date:from:in-reply-to :references:mime-version:sender:from:to:cc:subject:date:message-id :reply-to; bh=+lSsvj6UVXBM2a5JrkAWkG0de2syd7WM8MHdoF5ONpw=; b=qjcJ93SuQhWZxWuNyO3XuBhWGV1Eq+hmy+NfvzkQc6Ctn4mM6EnN9TVB5TSYMZBU+t tBcQvNDS4ZeHSnOTMvWj5tO6806uNJTfuNOHYxNsFPyfPK4w9RHnXLvCL8dXO33W+mwd QPyFL3AtRptxRn8Z68JMdp2g/geH4nAsbGg4gisIjtTZOZrxk8I6xSARbZ9mmik/jqSN sR1AU4LqTIFkFSnVffLM36d4zarurOVgdC7uxY2/x9tHBMfFFKCOUJRzwMbb8Hq6WITS 7bFz+E3SSkhDpu4eu2C5UL7jqNiMz8wat8xRCyr2Fs28wBk8/lmovtWLMewQaj7tvuwp mSMQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717655707; x=1718260507; darn=patchwork.ozlabs.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:to:subject:message-id:date:from:in-reply-to :references:mime-version:from:to:cc:subject:date:message-id:reply-to; bh=+lSsvj6UVXBM2a5JrkAWkG0de2syd7WM8MHdoF5ONpw=; b=FKDLKUg0tWOk0w61bas3Ymq8qWJYWCbUVd0fa6a/Ckzc9znhs7DIwVbM2u9u65WTpc 9QK0apYr5zf9ugZOh/NKNRZo18lqW1MipIbay57kz8o0gwPsgym35JNB8VFWvAUgFF/6 Ys29rL5LuA1saEG+n5F3v2gpzqt06F2CzXvETW9YoTX/2zuhehgNw+1gtyjtKqYWvvs0 ckypOSvOxIbut3pROenkzc0RpTrPcFy22OIH5+jRTOa1FbxkHOoqJAn4TK55v+e+wKBU MHOswNx8VOPYUyGUUT2OTqUufz7tR4J+xoIPUr154QX+IdLmh2JLN+GP9DhhYz9oe5y6 9e8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717655707; x=1718260507; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:to:subject :message-id:date:from:in-reply-to:references:mime-version :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=+lSsvj6UVXBM2a5JrkAWkG0de2syd7WM8MHdoF5ONpw=; b=RiHxxdnpKucx+KFaO83ss/hXbsJcUcskiITp0+APMVWqMtJHok4Y8tqBVbNFct1Eja 7YRwhNwutTTYCG/bmlxteeW09Q6pQBdMO7Mfh/SFRFE+XDvPbpweVUuSwjoEpt+R7XqP piEMFa7saJe68o+qsc99/RqYN4J7Olrp9i+OM1xrExCoAT+SIKv1ijJFFSBLQc9i/Hs7 W5xO2+Y1xvlCljQ8dTEl6IJQ03aVXWBZ0X1uN33M3+h8+i7rCFIHeVCgNlW3JIrD9hHq t7i8gj036ty6BPrtZF+WwkkTE++DphnlcqbkDl1iq3OOuDStjFS+TRgFIxlwhcIbzm0M LOcg== Sender: swupdate@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCVJfgdmE+8cYsCpYdSe7SpxZpT47AXRSq3kFevIXhQF2eFStexDkL3HgS5lrhriaB4nDw+4crKFTQvrKJ8zifSRXrKo/p98OQOfU+fcqw== X-Gm-Message-State: AOJu0Ywmt0xvd13jOg6xZh8p1cwBae6X0eBtzB8HZ/S4B8fD7wHOQzto paMEeU7yx5pjbGjChinVN0P92cQ71KSLvTLZbZQMEul6VfNWHrXY X-Google-Smtp-Source: AGHT+IH9Gf1yrXWXGAh0R6b+cPfMXmwfMLsk8knybC1TL7eMhY+kZ8lAjRiPMopCyueT5y5QUZTx6A== X-Received: by 2002:a50:8d1a:0:b0:578:61c6:b779 with SMTP id 4fb4d7f45d1cf-57a8bcb4228mr2809016a12.38.1717655706527; Wed, 05 Jun 2024 23:35:06 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a05:6402:538d:b0:575:d5f:1db0 with SMTP id 4fb4d7f45d1cf-57a79d2c4b5ls157779a12.2.-pod-prod-03-eu; Wed, 05 Jun 2024 23:35:03 -0700 (PDT) X-Received: by 2002:a50:bb02:0:b0:56a:ae8a:acc0 with SMTP id 4fb4d7f45d1cf-57a8b6fc2e4mr2773829a12.21.1717655703114; Wed, 05 Jun 2024 23:35:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717655703; cv=none; d=google.com; s=arc-20160816; b=Ju1MIDaMfBbpzUfTReS9tzHiCrAZYpSvNZr19mLALs0trj1nY6P5QKvIcEEaVGfX+3 JsM9paZgzHzANFySADBcpBEMej9WF+Aws3GNUPyKlbEEEcpbWFYEz2jR10nBtrjO4SOK bt91HRm5BwJqA7qwVKNxUP41qJRZJF7uVT25Y4FKdY5vAWFgmxRGtmU/r8T6ktvQb5DN 4zoXQoU2MoFqcZaAQNDXs5uMvRX+qQ4iDgWsBbfJcCZpYx1uiOUprl5e88MJT+pt9W/5 4VDWc1hLf2UkFFwuJ6s/dfMTWn/T+bUJvlNhZdYmHvK79tVrxgcRXnPKk8+8x3uBKnGo jlTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=9ldm7uA6Z3Hhy+jgSEMpmcWaWPJ/u7ZkzgQf/HkkyL0=; fh=nvZsCFpxgpf+fsVXzjnWA8g1K3V/kNbRAKogjNDW4HY=; b=eCsYSqvfU5NAmNsK7lbMNFAjhcik4bpgYmpfWFsViZTkMEO0BiU6fKLwW5EC0GJ2UL //ec+SXu482UZAvbjjVULBu5blNaxSq05SJgqsYjLhTNZa8RwzLlp4XJ9nCDCXDtnbY3 TN80R57Y+6dCxuEFp3DgKbjTz2wKD8VCC6GFDPPPoKNe86+4zJvGpnqgSVIDo9fpVR2/ FfsDMtYtZRvjsPadSAaow0GfDZvEbPPoRYUba24hp6eFTWnov58FL2vTX5zRZoTuiXol 6azMP+UAzKQGAnGiSD2HqSCdj6oHnsod4sQ+ULlzmJxJL6+nqX8h1HqeAbhlUb2Lsyaz nMDA==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="HS05BK/Z"; spf=pass (google.com: domain of a.gnistrup@gmail.com designates 2a00:1450:4864:20::632 as permitted sender) smtp.mailfrom=a.gnistrup@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com. [2a00:1450:4864:20::632]) by gmr-mx.google.com with ESMTPS id 4fb4d7f45d1cf-57aae25b55dsi17438a12.5.2024.06.05.23.35.03 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 05 Jun 2024 23:35:03 -0700 (PDT) Received-SPF: pass (google.com: domain of a.gnistrup@gmail.com designates 2a00:1450:4864:20::632 as permitted sender) client-ip=2a00:1450:4864:20::632; Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-a66e9eac48fso52792366b.2 for ; Wed, 05 Jun 2024 23:35:03 -0700 (PDT) X-Received: by 2002:a17:907:2d28:b0:a6c:8076:1a5f with SMTP id a640c23a62f3a-a6c80761bd7mr65020766b.40.1717655702301; Wed, 05 Jun 2024 23:35:02 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Anders Gnistrup Date: Thu, 6 Jun 2024 08:34:51 +0200 Message-ID: Subject: [swupdate] Re: [meta-swupdate] Building mete-tegra-demo distro. To: swupdate@googlegroups.com X-Original-Sender: a.gnistrup@gmail.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="HS05BK/Z"; spf=pass (google.com: domain of a.gnistrup@gmail.com designates 2a00:1450:4864:20::632 as permitted sender) smtp.mailfrom=a.gnistrup@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Minor update and a cleanup. But there are still some issues. When I try to install an image it is installed, but the installer emits an error: [INFO ] : SWUPDATE running : [lua_handlers_init] : External Lua handler(s) not found. [INFO ] : SWUPDATE running : Installation in progress [INFO ] : SWUPDATE running : [lua_handlers_init] : External Lua handler(s) not found. [INFO ] : SWUPDATE running : [lua_handlers_init] : External Lua handler(s) not found. I have to manually set the active boot partition using nvbootctrl set-active-boot-sloot After a reboot the correct boot slot is booting. But the lua backend should take care of it. Anyone have a hint for this? From effee362ce2c196b91d7fe5a905ec26e52727b8e Mon Sep 17 00:00:00 2001 From: Anders Gnistrup Date: Wed, 5 Jun 2024 08:13:22 +0200 Subject: [PATCH] Fix for yocto 5.1 Using S = ${WORKDIR} is no longer supported This introduced some changes in classes-recipe/swupdate-common.bbclass where it was assumed that workdir=S It seems that device tree's is now saved in a subdirectory in the unpacked source folder but the function swupdate_add_artifacts in classes-recipe/swupdate-common.bbclass assumes that the file dir is flat --- classes-recipe/swupdate-common.bbclass | 17 +++++++++-------- classes-recipe/swupdate-image.bbclass | 3 ++- classes-recipe/swupdate.bbclass | 3 ++- .../swupdate-lualoader_1.0.bb | 4 ++-- 4 files changed, 15 insertions(+), 12 deletions(-) SRC_URI = "file://swupdate_handlers.lua" @@ -10,7 +10,7 @@ inherit pkgconfig do_install() { LUAVER=$(pkg-config --modversion lua | grep -o '^[0-9]\+\.[0-9]\+') - install -D -m 0644 ${WORKDIR}/swupdate_handlers.lua ${D}${libdir}/lua/$LUAVER/swupdate_handlers.lua + install -D -m 0644 ${UNPACKDIR}/swupdate_handlers.lua ${D}${libdir}/lua/$LUAVER/swupdate_handlers.lua sed -e 's,@libdir@,${libdir},g' \ -i ${D}${libdir}/lua/$LUAVER/swupdate_handlers.lua -- 2.40.1 On Wed, Jun 5, 2024 at 8:35 AM Anders Gnistrup wrote: > Hello > > I have managed to build the meta-tegra-demo distro for the > target jetson-orin-nano-devkit-nvme, including the meta-swupdate layer. > But, I had to make some changes regarding yocto 5.1 handling of some errors > in meta-swupdate > 1) "Using S = ${WORKDIR} is no longer supported" > This introduced some changes in classes-recipe/swupdate-common.bbclass > where it was assumed that workdir=S. > 2) It seems that device tree's is now saved in a subdirectory in the > unpacked source folder but the function swupdate_add_artifacts in > classes-recipe/swupdate-common.bbclass assumes that the file dir is "flat". > > I can optimize the commit but it could be that some work is in progress. > At least this commit can be used as a base. > > From 240c4e020961a9836f168a20b1e5b55c79ba8f6c Mon Sep 17 00:00:00 2001 > From: Anders Gnistrup > Date: Wed, 5 Jun 2024 08:13:22 +0200 > Subject: [PATCH] Fix for yocto 5.1 > > Using S = ${WORKDIR} is no longer supported > This introduced some changes in classes-recipe/swupdate-common.bbclass > where it was assumed that workdir=S > > It seems that device tree's is now saved in a subdirectory in the > unpacked source folder but the function swupdate_add_artifacts in > classes-recipe/swupdate-common.bbclass assumes that the file dir is flat > --- > classes-recipe/swupdate-common.bbclass | 25 ++++++++++++++++--------- > 1 file changed, 16 insertions(+), 9 deletions(-) > > diff --git a/classes-recipe/swupdate-common.bbclass > b/classes-recipe/swupdate-common.bbclass > index > ad3c0a02393688d9bdeeba19c2912a1419775db0..62e8a06edd32a8fd2d0a2b14a9115922b4190e14 > 100644 > --- a/classes-recipe/swupdate-common.bbclass > +++ b/classes-recipe/swupdate-common.bbclass > @@ -169,7 +169,7 @@ def prepare_sw_description(d): > import shutil > import subprocess > > - s = d.getVar('S', True) > + s = d.getVar('UNPACKDIR', True) > swupdate_expand_bitbake_variables(d, s) > > swupdate_write_sha256(s) > @@ -228,7 +228,7 @@ def prepare_sw_description(d): > def swupdate_add_src_uri(d, list_for_cpio): > import shutil > > - s = d.getVar('S', True) > + s = d.getVar('UNPACKDIR', True) > exclude = (d.getVar("SWUPDATE_SRC_URI_EXCLUDE") or "").split() > > fetch = bb.fetch2.Fetch([], d) > @@ -276,11 +276,13 @@ def swupdate_add_artifacts(d, list_for_cpio): > # Search for images listed in SWUPDATE_IMAGES in the DEPLOY directory. > images = (d.getVar('SWUPDATE_IMAGES', True) or "").split() > deploydir = d.getVar('DEPLOY_DIR_IMAGE', True) > + > imgdeploydir = d.getVar('SWUDEPLOYDIR', True) > - s = d.getVar('S', True) > + s = d.getVar('UNPACKDIR', True) > for image in images: > fstypes = (d.getVarFlag("SWUPDATE_IMAGES_FSTYPES", image, True) > or "").split() > encrypted = (d.getVarFlag("SWUPDATE_IMAGES_ENCRYPTED", image, > True) or "") > + #bb.warn("Looking in image=%s fstypes=%s encrypted=%s" % (image, > fstypes, encrypted)) > if fstypes: > noappend_machine = > d.getVarFlag("SWUPDATE_IMAGES_NOAPPEND_MACHINE", image, True) > if noappend_machine == "0": # Search for a file explicitly > with MACHINE > @@ -291,19 +293,24 @@ def swupdate_add_artifacts(d, list_for_cpio): > imagebases = [ image + '-' + d.getVar('MACHINE', True), > image ] > for fstype in fstypes: > image_found = False > + bb.warn("Looking in fstype=%s" % (fstype)) > for imagebase in imagebases: > + bb.warn("Looking in imagebase + fstype = %s + %s" % > (imagebase, fstype)) > image_found = add_image_to_swu(d, deploydir, > imagebase + fstype, s, encrypted, list_for_cpio) > if image_found: > break > if not image_found: > - bb.fatal("swupdate cannot find image file: %s" % > os.path.join(deploydir, imagebase + fstype)) > + bb.fatal("swupdate cannot find dsfzxf image file: %s" > % os.path.join(deploydir, imagebase + fstype)) > else: # Allow also complete entries like "image.ext4.gz" in > SWUPDATE_IMAGES > + bb.warn("add_image_to_swu deploydir=%s image=%s" % > (deploydir, image)) > if not add_image_to_swu(d, deploydir, image, s, encrypted, > list_for_cpio): > - bb.fatal("swupdate cannot find %s image file" % image) > + devicetreedir = os.path.join(deploydir ,"devicetree") > + if not add_image_to_swu(d, devicetreedir, image, s, > encrypted, list_for_cpio): > + bb.fatal("swupdate cannot find %s image file" % image) > > > def swupdate_create_cpio(d, swudeploydir, list_for_cpio): > - s = d.getVar('S', True) > + s = d.getVar('UNPACKDIR', True) > os.chdir(s) > updateimage = d.getVar('IMAGE_NAME', True) + '.swu' > line = 'for i in ' + ' '.join(list_for_cpio) + '; do echo $i;done | > cpio -ov -H crc --reproducible > ' + os.path.join(swudeploydir, updateimage) > @@ -320,13 +327,13 @@ python do_swuimage () { > > list_for_cpio = ["sw-description"] > workdir = d.getVar('WORKDIR', True) > - s = d.getVar('S', True) > + unpackdir = d.getVar('UNPACKDIR', True) > imgdeploydir = d.getVar('SWUDEPLOYDIR', True) > - shutil.copyfile(os.path.join(workdir, "sw-description"), > os.path.join(s, "sw-description")) > - > + shutil.copyfile(os.path.join(unpackdir, "sw-description"), > os.path.join(workdir, "sw-description")) > if d.getVar('SWUPDATE_SIGNING', True): > list_for_cpio.append('sw-description.sig') > > + bb.warn("workdir=%s" % (workdir)) > # Add artifacts added via SRC_URI > if not d.getVar('INHIBIT_SWUPDATE_ADD_SRC_URI', True): > swupdate_add_src_uri(d, list_for_cpio) > -- > 2.40.1 > diff --git a/classes-recipe/swupdate-common.bbclass b/classes-recipe/swupdate-common.bbclass index ad3c0a02393688d9bdeeba19c2912a1419775db0..366aec8a3c3d2d12988ed127b4b432b3d221ac8a 100644 --- a/classes-recipe/swupdate-common.bbclass +++ b/classes-recipe/swupdate-common.bbclass @@ -169,7 +169,7 @@ def prepare_sw_description(d): import shutil import subprocess - s = d.getVar('S', True) + s = d.getVar('UNPACKDIR', True) swupdate_expand_bitbake_variables(d, s) swupdate_write_sha256(s) @@ -228,7 +228,7 @@ def prepare_sw_description(d): def swupdate_add_src_uri(d, list_for_cpio): import shutil - s = d.getVar('S', True) + s = d.getVar('UNPACKDIR', True) exclude = (d.getVar("SWUPDATE_SRC_URI_EXCLUDE") or "").split() fetch = bb.fetch2.Fetch([], d) @@ -277,7 +277,7 @@ def swupdate_add_artifacts(d, list_for_cpio): images = (d.getVar('SWUPDATE_IMAGES', True) or "").split() deploydir = d.getVar('DEPLOY_DIR_IMAGE', True) imgdeploydir = d.getVar('SWUDEPLOYDIR', True) - s = d.getVar('S', True) + s = d.getVar('UNPACKDIR', True) for image in images: fstypes = (d.getVarFlag("SWUPDATE_IMAGES_FSTYPES", image, True) or "").split() encrypted = (d.getVarFlag("SWUPDATE_IMAGES_ENCRYPTED", image, True) or "") @@ -299,11 +299,13 @@ def swupdate_add_artifacts(d, list_for_cpio): bb.fatal("swupdate cannot find image file: %s" % os.path.join(deploydir, imagebase + fstype)) else: # Allow also complete entries like "image.ext4.gz" in SWUPDATE_IMAGES if not add_image_to_swu(d, deploydir, image, s, encrypted, list_for_cpio): - bb.fatal("swupdate cannot find %s image file" % image) + devicetreedir = os.path.join(deploydir ,"devicetree") + if not add_image_to_swu(d, devicetreedir, image, s, encrypted, list_for_cpio): + bb.fatal("swupdate cannot find %s image file" % image) def swupdate_create_cpio(d, swudeploydir, list_for_cpio): - s = d.getVar('S', True) + s = d.getVar('UNPACKDIR', True) os.chdir(s) updateimage = d.getVar('IMAGE_NAME', True) + '.swu' line = 'for i in ' + ' '.join(list_for_cpio) + '; do echo $i;done | cpio -ov -H crc --reproducible > ' + os.path.join(swudeploydir, updateimage) @@ -320,10 +322,9 @@ python do_swuimage () { list_for_cpio = ["sw-description"] workdir = d.getVar('WORKDIR', True) - s = d.getVar('S', True) + unpackdir = d.getVar('UNPACKDIR', True) imgdeploydir = d.getVar('SWUDEPLOYDIR', True) - shutil.copyfile(os.path.join(workdir, "sw-description"), os.path.join(s, "sw-description")) - + shutil.copyfile(os.path.join(unpackdir, "sw-description"), os.path.join(workdir, "sw-description")) if d.getVar('SWUPDATE_SIGNING', True): list_for_cpio.append('sw-description.sig') diff --git a/classes-recipe/swupdate-image.bbclass b/classes-recipe/swupdate-image.bbclass index e9c67a6ff1a54bf1d9c0c33729a51484978566f3..22df58070aadc0b025377e8f8f8ea99946b86eab 100644 --- a/classes-recipe/swupdate-image.bbclass +++ b/classes-recipe/swupdate-image.bbclass @@ -13,7 +13,8 @@ inherit swupdate-common inherit image-artifact-names -S = "${WORKDIR}/${PN}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" SRC_URI += "file://sw-description" SWUPDATE_IMAGES += "${IMAGE_LINK_NAME}" diff --git a/classes-recipe/swupdate.bbclass b/classes-recipe/swupdate.bbclass index 3656b1cb9d8bd55a9561feeffb9f19711846a4e4..ae000854f7728b429f1403b014c83330f51e8e3e 100644 --- a/classes-recipe/swupdate.bbclass +++ b/classes-recipe/swupdate.bbclass @@ -36,7 +36,8 @@ inherit swupdate-common inherit image-artifact-names -S = "${WORKDIR}/${PN}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" IMAGE_DEPENDS ?= "" diff --git a/recipes-lua/swupdate-lualoader/swupdate-lualoader_1.0.bb b/recipes-lua/swupdate-lualoader/swupdate-lualoader_1.0.bb index 044cad2171387ffd25536ef88c83c13dac339644..5da4c6424530aca1077bf01d7d8fda6b52e58011 100644 --- a/recipes-lua/swupdate-lualoader/swupdate-lualoader_1.0.bb +++ b/recipes-lua/swupdate-lualoader/swupdate-lualoader_1.0.bb @@ -2,7 +2,7 @@ SUMMARY = "Loader for swupdate" LICENSE = "MIT" SECTION = "devel/lua" DEPENDS = "lua" -LIC_FILES_CHKSUM = "file://${WORKDIR}/swupdate_handlers.lua;md5=354cf4af377edd962d2e8d78085d3ed7;beginline=1;endline=19" +LIC_FILES_CHKSUM = "file://${UNPACKDIR}/swupdate_handlers.lua;md5=354cf4af377edd962d2e8d78085d3ed7;beginline=1;endline=19"