From patchwork Wed Jun 5 06:35:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Gnistrup X-Patchwork-Id: 1943670 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=LK1wtf70; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=hZqn+UXJ; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::43e; helo=mail-wr1-x43e.google.com; envelope-from=swupdate+bncbdjmjrvvs4ibbu4oqczqmgqemy2v53q@googlegroups.com; receiver=patchwork.ozlabs.org) Received: from mail-wr1-x43e.google.com (mail-wr1-x43e.google.com [IPv6:2a00:1450:4864:20::43e]) (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 4VvHm90WYZz20KL for ; Wed, 5 Jun 2024 16:36:08 +1000 (AEST) Received: by mail-wr1-x43e.google.com with SMTP id ffacd0b85a97d-35e808b1db8sf278117f8f.1 for ; Tue, 04 Jun 2024 23:36:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717569365; cv=pass; d=google.com; s=arc-20160816; b=pMYMKzNpa1KfpbkBG6iV4SeiiArC9h5l7sq2a9IIRbhAcdjJX9UDOKa+HrXud7jyUi myTs15XfGflmOju+Qpwso0zF4s8GhMVpx8ql4S4ltreLqL4SOHbUUrcH8ZV2mpxWc0ry RHOqmdPqUqf58R8mu2lnVz70J3Ln/CsodIKlnxdJIBp+EBPSeOF4HL5fQsWP7mEQ0Sql 6p02ZLfol8msEI2C4TNy/7nsfjPwHRMDro1x4pKD1HjWAW9jtZq+hbjXpNXLAESJRv66 1kpI+fPDrLak03CHYfUh+8SrmKKLZe7QwxLEQZiGngctT8KPVcOZ+b2EVD7Jz1HEzvA1 D70A== 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 :mime-version:sender:dkim-signature:dkim-signature; bh=2CFHSPSxPEJfmuDr9gk2tHAyrTZAFDdqwEQIfdLeQoY=; fh=Vym4NjTyHoRGp59yTQBwmkjgSvFckrp8PJoOyUqaNc0=; b=rYrsqSaOC9yAshjuwsT0Jg7ETDxBbExO4NqzakJwSXX/r96GOq+jJjAvu7vX8vEqL0 xvwIie+upIgZnckEYxT4iNskMS9cPyD1VDKQpFoBMxYaMX9zbX2b//TBYbTQ10mM6cXF egwBL4cHey1IpoCEBsckOZ25kTC+c5lHQ5D1h1sTm3Ulh47Nukg0yf8p83r/a4nYbvl1 fPSzacZJhdNzYLy8CgCnDGxcYHjjTwCKmMArVihwnN+ZSJt5i3AHVxfFnPSyTWG5jzSN /TTDt7q5oPdTgdUoMVJTfIs0kEM3KjDqdlAGc3qWT54lSEJh/bdehbcxuDnuU3s+L+fj dGug==; darn=patchwork.ozlabs.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=NKi49msD; spf=pass (google.com: domain of a.gnistrup@gmail.com designates 2a00:1450:4864:20::62e 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=1717569365; x=1718174165; 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:mime-version :sender:from:to:cc:subject:date:message-id:reply-to; bh=2CFHSPSxPEJfmuDr9gk2tHAyrTZAFDdqwEQIfdLeQoY=; b=LK1wtf70mYOFh0LERVSvoA1D8ZSDuXHxr+hfRq0yZutLvgBceBZSgrpj78KilQ2R1L dT9iqzbQKNmAAi/eODsZpJvNVF1oGVyWGQAhy3xHUcA+yYOkZNyWAXduibw1BJB8Nltm 2OlV8dNEmKVsghQdKA3+oDDFbu/W55rTGxqSIPubuhVPoirk7O54WTDhYTtFGWmqJ2z4 E0O2mMm4CbGNwIAnyK3dyeO/KJn6YpiLKD2r5dnFg8bZRS2yo1UgMV+OwblvtSrL8m05 KtiU9g0CF21BUeJxzSJ+N9mc522pcIA0533EF6tZTI7a/wMWG6kzcBBPM6P4pkE9LPAD C1Gw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717569365; x=1718174165; 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:mime-version:from :to:cc:subject:date:message-id:reply-to; bh=2CFHSPSxPEJfmuDr9gk2tHAyrTZAFDdqwEQIfdLeQoY=; b=hZqn+UXJb+XKvtrreqqLlzq0ehSW4LhFQgu94JhEjmlYt4KPFt88onrHCvM+AR+S+o YcDYYTHXcYsf7UrBO7G4Xp0Hfs8vvvOoYcxUtar8DwEDRgH9f0Sblaa8G8dJZqg5UxBQ G08IoQVRAtkd954tKRzhfmkwvzXj4k6QxTKktx8fxNvXcuG88VlZR8Mwsk8gps0lmhgw T2t+aiXLmECzAx8Ffa4beLHFPoDTrXii2ziO9jBsxSBh/dbNt0QG5XybWpoeHopxyDYK ePA8cy86xV/JxQrYdBXB5voOWsWRk1n3lg88NM5VOJBwDTU05uAQT5Lg1LPoEXCHoKIv nqvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717569365; x=1718174165; 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:mime-version:x-beenthere:x-gm-message-state :sender:from:to:cc:subject:date:message-id:reply-to; bh=2CFHSPSxPEJfmuDr9gk2tHAyrTZAFDdqwEQIfdLeQoY=; b=DPOxgUs7w1VG75+DwIQNq4TQipWZtulJPxMIQxuYIU08FXvlGqETWiTt5qtTIdPrbw 7ptw/FkWACTXeSKBVVglwiabph2krjAtKSXkxClTAmudLmW20Y7N5wl1izA2wvGCTDOZ vyB19F4JT1olw40iDFvllOieXj9bZu16HUuglzh1/OoAr9TdpyvRDOmqLcRIMiEKjBaw VAMldYpwSTS1GneRFaS5XRzlFC265ZA4ufNx0f5F253nCtls2SIp63heeumLo4pf1Z40 P/nTCnbTxHQp1SuWsK1vw/2dRLdcDypBgkK5NGgsYbLnVCRbhABfCFji4XtZ/3vn405p 9q1w== Sender: swupdate@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCVp3Q012HFNRvSIEpv7OI6iQtMz2yaQm60od830Dd3U5Kvlv4jEoIiCaCEjxkZhce4konHedf2R+HAJV7puEeXFP+6A9QNYSeZmwhJ9Rw== X-Gm-Message-State: AOJu0YzMQJX6o044B9BUl/eC1dkynEAPzSX3+DMaIL/7RInt1XGPr98D Pft9536wLJrXRcyZDgW+JIxvQF+qAP7fd+zv/HFsisfdlbDD6mbj X-Google-Smtp-Source: AGHT+IGE4FgR4I7xMXiwyVD/3V4ASlzJ6vOkIN2bRREgji00uviweYKYx6UY50EY0+Rgqs9aXK4RQw== X-Received: by 2002:adf:fc0d:0:b0:35e:60e6:c8a6 with SMTP id ffacd0b85a97d-35e7c51a039mr4380225f8f.6.1717569364128; Tue, 04 Jun 2024 23:36:04 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a05:600c:3b9f:b0:421:290c:4427 with SMTP id 5b1f17b1804b1-4215696c14cls2294695e9.0.-pod-prod-00-eu; Tue, 04 Jun 2024 23:36:01 -0700 (PDT) X-Received: by 2002:a05:600c:138f:b0:421:2f1c:be6a with SMTP id 5b1f17b1804b1-4214513b9femr36125085e9.20.1717569361177; Tue, 04 Jun 2024 23:36:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717569361; cv=none; d=google.com; s=arc-20160816; b=i6iLWln+ztQcV4r+fCneMUzXR9cFId5uB+0UdlrSxwsAh04TVKJTpJQ1L+9ym4nzrz uP/ykwHKI9v2mqBJtG7ZHvWXG6fhrc2RQWx7AC5MHRbtS6nWNJTEEi84uzk68f8npkvM X6Vk643q7z2OqTPsE/MVO8/qnQrb0hdOcmMryiocHPscW6ZCp0rC7K83C6OSGck1U54r 9MCdtOEICr5umFzcheJjfXbRomnqQi57L2FXcnDt2keBvg2F+HfqvF6z9Mrrk5DSCAhX EiLwDshX3dbAl1ROoOhhST8dUGSdlWhH7kmwl5beE2L4gdxJ25E5rE2Sph5/rCSEJ89n W7WQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:mime-version:dkim-signature; bh=VeAzq07Nvl0iRES04Y5YJUIfK+ViGsBKotBSBLs/dOA=; fh=nvZsCFpxgpf+fsVXzjnWA8g1K3V/kNbRAKogjNDW4HY=; b=cTTDeaxBfjTbsdw3Al7Mys//iFKryD31m0ltR8DzTIe83e6TjOiuLmu6Uhd/thA46A kkjsWTZto4+77rLAoXZWaKsz3Wu91zFqsmI22eJoMiR0VfwHb0XRJIMhFxJXdWZ1rcdz mE4kDQaQ9RdwH9bBDaCVJEVugwUQtSEr2YSxU8X81TAgq5GSUdyhq5ShsYewbwNG1m97 mN4XADpYw2S0js0Y3pjfsv42QqcDsO9dz8hIF98PVduHHsmUdK3yNqnoRs0asz8DTIba SAnsczROb18jmkZBYL4o3xdqq6YAOY9fxf9lOsBLgCfkciX9g5bdaDGlIQb7plGrzDu7 Ejtw==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=NKi49msD; spf=pass (google.com: domain of a.gnistrup@gmail.com designates 2a00:1450:4864:20::62e 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-x62e.google.com (mail-ej1-x62e.google.com. [2a00:1450:4864:20::62e]) by gmr-mx.google.com with ESMTPS id 5b1f17b1804b1-421580ff007si130815e9.2.2024.06.04.23.36.01 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 04 Jun 2024 23:36:01 -0700 (PDT) Received-SPF: pass (google.com: domain of a.gnistrup@gmail.com designates 2a00:1450:4864:20::62e as permitted sender) client-ip=2a00:1450:4864:20::62e; Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-a626919d19dso105140766b.0 for ; Tue, 04 Jun 2024 23:36:01 -0700 (PDT) X-Received: by 2002:a17:906:cd1b:b0:a68:31a9:6003 with SMTP id a640c23a62f3a-a69546b0d4fmr345074266b.23.1717569360280; Tue, 04 Jun 2024 23:36:00 -0700 (PDT) MIME-Version: 1.0 From: Anders Gnistrup Date: Wed, 5 Jun 2024 08:35:49 +0200 Message-ID: Subject: [swupdate] [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=NKi49msD; spf=pass (google.com: domain of a.gnistrup@gmail.com designates 2a00:1450:4864:20::62e 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: , 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(-) 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..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))