From patchwork Tue Feb 16 09:52:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anatolij Gustschin X-Patchwork-Id: 1440858 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::239; helo=mail-lj1-x239.google.com; envelope-from=swupdate+bncbda3zhwu2icrb7vlv2aqmgqeuu43wjq@googlegroups.com; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20161025 header.b=FxfAlV6Q; dkim-atps=neutral Received: from mail-lj1-x239.google.com (mail-lj1-x239.google.com [IPv6:2a00:1450:4864:20::239]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Dfx9g0nKjz9sVV for ; Tue, 16 Feb 2021 20:53:08 +1100 (AEDT) Received: by mail-lj1-x239.google.com with SMTP id d25sf5170421ljc.5 for ; Tue, 16 Feb 2021 01:53:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1613469183; cv=pass; d=google.com; s=arc-20160816; b=ifJvjzoCYBe5cDh7NrVBezLASQKIS4FdW8FG4O3t4HonWSALt7wRLBuymc2gTk3A04 7B9MK1pXR84dlqSx81NarUI5CR++ejw5kotXTrCJsWfZOQw0c4l2AQJ97kDReJ1D7QlT EwZKMgfMv4wu4+hFVWS058VuKGY2HIZ88UgPJ06XjvrIj7KkdtyV9cTW4/+E0nzYzixv LC3dTuIvyZCswgmIPWUz7f4EtBzV6dC9SvM3N8vK5Cb/1YZDHdGZmnmuwRWz/Ov/KUNv k9lGzfUyima1lOqWtBjbCgYyB2CZm7bLApaKyYaAG30dkCzIPnQvLZTpO483uR1zZ++/ ojSQ== 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:references:in-reply-to:message-id :date:subject:to:from:mime-version:sender:dkim-signature; bh=PJ6rck+gbl+OH8011XeKzWNJyE1LwO5rnOply1o87ow=; b=DVkoGmVriu+3TqDsCAba8b5eHh0HC+xl7xPlZF7KO2rJNr+5JJckyBbTnDrzeFxWIn 9vhRYAV556omVMIuhEgksf7aZsxhzkDyFoFNUS9G7MSDzoT24L04/XXzCB08SFuu1n8k JW5xwqij+ua8x1uKnFff4aAR7HfVxSVyYn/Z96U95wvjmGf1eFTuOs8/IFasXQWnoBdX wfA8ib+1SdPy+SGPT1PII6byfRCKlPMITUximVwJkDFAtqi4iDCPJ085RNBExYH9CxK/ TuqI7hMIbhMlsn6mkE3se3Jy/6ByasGNaIsyxJtKk73CTY3zFEVHBi7H1X60LMKqgW/S ENpQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 is neither permitted nor denied by best guess record for domain of agust@denx.de) smtp.mailfrom=agust@denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:mime-version:from:to:subject:date:message-id:in-reply-to :references:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=PJ6rck+gbl+OH8011XeKzWNJyE1LwO5rnOply1o87ow=; b=FxfAlV6QYccXfHvxgMji/EDeryUdnADFqPpaCVfAdCHZAtUsagTbJIGLfg2fX4Bkp4 5nlB8y84n1IzkGnDAtB0gKPbr9kibzExL5dm1NU8pjZXkigNBOu1p51Ln+emSwRA4L1O dnMOHUtt5ZWUi/hoKGtcR54J8jHM47YlATK/8ibJewO5/l6P5ytZ6c3QIKLpyeBu6oiT DJMGkbII8GHHDQMuRbbZopyTQOtC8HeVy4VsGK4eKrmsgEuXneu0vAOMg87sQcjJywO1 LuGnmOLMsgkclanY9cDOOHZwHIcVGnIBLOpQ+7sEyWxGa6ZY+raMj3BxnJfohOoQjEKl z6iA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:mime-version:from:to:subject:date :message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=PJ6rck+gbl+OH8011XeKzWNJyE1LwO5rnOply1o87ow=; b=S+4avmQKVl0HXxW8kSQ3JiLNZopDgAsR/gLXHLcV853C2S7HMY06qOGuh7bRK5t3Kv snPu5nzQJH9be6Y0w4e/b26/c/X1/61nFszgYMcnDPbGq2AIkwuvA0xCW+/+HxGp9VV5 H7AIdgeRyN0eLcArZOPiI1bOvOg3WlapsPE7R6E5dS8DGi+pydEUaN9IJedQqgkXtj42 8Fiuw7w1JVz4MKarF5+JYGgFbpqYzspRGgPKfDuzdPcRLHYmTlG5OFKqbu+/ofM4jhv7 79hf1MQF/BGM0HkomOIzM81y0qX0CnSUJjQR1bJfR085IHClgv/1KNmGMoPAtzK2JoNz 797g== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM530NcHFx3mTQYzINTjtxL2D4x6dHwbZoj+Kb26fstfpmbf0WuLww iRN+kZWDT1Eh2VQjgmP8roE= X-Google-Smtp-Source: ABdhPJyOqT6sKT35j6d5m2iAe80kuIZLf/QE6HueLp+SgRaEqDa8onViJ6ew40/omThFpvZ3uHdVVg== X-Received: by 2002:a05:651c:1257:: with SMTP id h23mr11149407ljh.125.1613469183154; Tue, 16 Feb 2021 01:53:03 -0800 (PST) MIME-Version: 1.0 X-BeenThere: swupdate@googlegroups.com Received: by 2002:a05:6512:6d4:: with SMTP id u20ls1750092lff.1.gmail; Tue, 16 Feb 2021 01:53:02 -0800 (PST) X-Received: by 2002:ac2:51a1:: with SMTP id f1mr11704695lfk.659.1613469182177; Tue, 16 Feb 2021 01:53:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613469182; cv=none; d=google.com; s=arc-20160816; b=gXoW8qzp5135zOtFt1MdcCxULrB5Ho8heMXdbV/MWRYvNq76DQTyikpU/irOyysdjR bh3an5keiZ4p+RzeMiTT9w3YbQWYcmt/n7BdKdclaToSkP/c41tw4dvLfxLkgghbiX1o 5Bq/5DASsV68Yooki10yzUhwFOmu6yyqmJIQvl8fC3OHjmsLQyPx/FWrm+KWYv25AlP1 5Cbxsv+Vb/BUfTmxBNdNuIDJh1rcRaRukN0lBUAixpOMCe49qUQ+8AjTaySgt5Hum5/D R7Cw2fHSKY9AqfUQ1h/VumrTY4XkjMyXOelDmBBYlNZJvrqo7BL4nHUuxBHR3NGsqMJj pfxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:to:from; bh=p4HQU7oEBeVvJdVkUfy8L3HePCSms7/Ua9XTgI9VRnc=; b=mErjeLARNfUaDSng/cEqIh/DLjxHDN8rhIH6pfvhosb423FDn6VhmPBmEnrZsnQ9y1 Dyky6MLwNvlHz2a7rkxs7V78d9VFljT66gNRWbJpGr2RZFQS1lG15Ws5W5GBrFvb/ETQ zPen9gQmabucVQ12EPFYYTw69C2jDArwnRSEXjGEcdLAMtHD1vN4wZFRYK0I62EMHEjX PFva6BVKfoGqAT59vUnDOQfX7lO+1PxWXWAU1c+23JSDxRwM7uTOjYCx6Bn8BkJVlxo7 cprGt5lzhurvaDuVyr7UjNY8zAvmAG8NzmxGIC4JeVgB3t9D/4WylLW10LC+93tcxZmO VBTA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 is neither permitted nor denied by best guess record for domain of agust@denx.de) smtp.mailfrom=agust@denx.de Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.10]) by gmr-mx.google.com with ESMTPS id j2si702235lfe.5.2021.02.16.01.53.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Feb 2021 01:53:02 -0800 (PST) Received-SPF: neutral (google.com: 212.18.0.10 is neither permitted nor denied by best guess record for domain of agust@denx.de) client-ip=212.18.0.10; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4Dfx9T4k2pz1s0fh for ; Tue, 16 Feb 2021 10:53:01 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4Dfx9T4Zhpz1r13k for ; Tue, 16 Feb 2021 10:53:01 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id tuMN9ip-jnwa for ; Tue, 16 Feb 2021 10:53:00 +0100 (CET) X-Auth-Info: itclf+6YDQaC70FiB7wJ6/c0gBjy+hPuweDodZcSlVI= Received: from crub.agik.hopto.org (p508b6a6d.dip0.t-ipconnect.de [80.139.106.109]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA for ; Tue, 16 Feb 2021 10:53:00 +0100 (CET) From: Anatolij Gustschin To: swupdate@googlegroups.com Subject: [swupdate] [meta-swupdate][PATCH v2 2/3] Enable building .swu images via swu image fstype Date: Tue, 16 Feb 2021 10:52:57 +0100 Message-Id: <20210216095258.514-3-agust@denx.de> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210216095258.514-1-agust@denx.de> References: <20210216095258.514-1-agust@denx.de> X-Original-Sender: agust@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 is neither permitted nor denied by best guess record for domain of agust@denx.de) smtp.mailfrom=agust@denx.de 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: , Add image_types_swu class to support swu image type. To use this in an image recipe following changes should be added in it: - inherit image_types_swu class - add SRC_URI with sw-description (and more required files) - add IMAGE_FSTYPES, i.e. "ext4.gz swu" or "ext4.gz.enc swu" - SWUPDATE_IMAGES_FSTYPES[core-image-full-cmdline] = ".ext4.gz" - IMAGE_DEPENDS = "core-image-full-cmdline" - SWUPDATE_IMAGES = "core-image-full-cmdline" Signed-off-by: Anatolij Gustschin --- classes/image_types_swu.bbclass | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 classes/image_types_swu.bbclass diff --git a/classes/image_types_swu.bbclass b/classes/image_types_swu.bbclass new file mode 100644 index 0000000..6b5c6b5 --- /dev/null +++ b/classes/image_types_swu.bbclass @@ -0,0 +1,21 @@ +inherit swupdate +inherit swupdate-enc +inherit image_types + +IMAGE_CMD_swu () { + # We cannot use existing python swupdate class code here, + # so this is a dummy command to make image_types class work. + # The .swu image generation is in separate do_swuimage task. +} + +clean_swuimages () { + cd ${DEPLOY_DIR_IMAGE} + rm -rf ${IMAGE_LINK_NAME}*.swu +} + +do_clean_swuimage[doc] = "Removes .swu output files from image deploy dir" +do_clean_swuimage[nostamp] = "1" +python do_clean_swuimage () { + bb.build.exec_func('clean_swuimages', d) +} +addtask clean_swuimage after do_rootfs before do_image