From patchwork Thu Feb 11 10:38:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anatolij Gustschin X-Patchwork-Id: 1439390 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::23a; helo=mail-lj1-x23a.google.com; envelope-from=swupdate+bncbda3zhwu2icrbfesssaqmgqegdjmimy@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=qHVv4hlS; dkim-atps=neutral Received: from mail-lj1-x23a.google.com (mail-lj1-x23a.google.com [IPv6:2a00:1450:4864:20::23a]) (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 4DbtQ14VlKz9sBy for ; Thu, 11 Feb 2021 21:38:15 +1100 (AEDT) Received: by mail-lj1-x23a.google.com with SMTP id c1sf3368536ljj.8 for ; Thu, 11 Feb 2021 02:38:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1613039892; cv=pass; d=google.com; s=arc-20160816; b=FC2CFyHSPvn4kXieuPrMUbRz0t6mlhogH0mQkwIoYUfIt5YVZ82Nx2jU9ovBYWb/iB Uim5dZilHHGzVVNtxmmmByjs+LxBBkTypdKrMgmROsr9x0oTYjxMKkF27TkOzjG5iWXW y+IVyY1Gb131R6MauEfGdWbpexFzBi47uxM5YSbJ96lXfaxhD65U6fOnkT0XJbX7CMQ8 sGmyvFK3ZWlYqH814hxm+JvJdFIZsJLS83jLHMjcCGv6dx7fsMhP0WQ8GUsdfYlLCDSu f1YhUOptopzH45jzI1/1BFLBFm0G/2626CvXq83x7fCc1nVKRQDncx72Uu42DDr+TgUo Dv0Q== 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=oq5giFn7iCusKzyHmkMW803egsRXsrBifcA7xx+2bHw=; b=D//w10btN8G7dCkpawOfRKtl4GH/TQsOtql6F+Rszv2vaSItTtTIU6kXQeHwILDBdf Uwd/625r+dNtovhkn8VKgbskM4say6FCi7ym0V6uqRPUNls22JWyjViBS7aYZbgIJN0v Tr3ZhsPinyBVvpd09agmLA3Oay435bU1lKMbUhUAK6MSZyGhD14mc2V6+TNbEKwMY+Do z8H2kVD5fAfRAvWFljl0Xpa5iG4l0Kk/mtwBe6yWtji2jzD2wzrniasBALqrl5q1grRj FBfwOi1pN70atogk5OR7M7QxqDq6Oz+HWWF6QrW9x5dIDxHeayzheP9lIarLOG8x1oBu XSaQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 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=oq5giFn7iCusKzyHmkMW803egsRXsrBifcA7xx+2bHw=; b=qHVv4hlSFechz7oP1DX/5brvRc+zYqk6p6Ae5wyoW65uz6o7xxljGO/OSm26H+ce0y UQD3rzR4kVGyQ67qLodrgIQmPuHOvMpOl2u53/EvCj/StVlYgfmK39LzVx7qUfTSRA/h zLd/z1tUkE34yi2IB7XMO6El5ywp4ym7wnz/G1634L2YPHy1zwc5TbRCDmZQilUpJS+r PN/V+r3z7j3Pi2rELoGHhq43uZNzquRlmK8F1tlaDac7RAHAqzn5rGqPYFOvMgu9nBGJ kWX4QXPun73GANpEBzXLnzusdx/BGIXlzBi2WuwPdGsvmZAOO9zZaHgbBHI6v7Ik/mHD 89cw== 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=oq5giFn7iCusKzyHmkMW803egsRXsrBifcA7xx+2bHw=; b=kNhM4zvCAoDocT9opCmViHSSZlg4aUWpoW5tczrImS+tGldvkgzVsz83IYn+0SWoa5 YC41WdkaSd8Aa8uLkUcI9Wy0YsKBNTjoVxiwfzkpRPDSpADgKj37g30hrbHuoo7f6PtP O5ifzSRFUWebqFapk2DfadxgREorNnH58PMMye0CM6Jrqysq2wMn8yHQOAEDcV0TDPnc ca4b+C9P13yA3aj84tbr8MYCj/XeAmUmI5IrRlM0uT6FKYWbl6ILTZJJzpDZ6wHzZLMv QFWazh8tbStksiG0XzxdHTfnGzi1c8cK5p2R7rc2gWT7CtMqazktQ48pHbBQyJMfKyqE Vlug== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM533ndKcIkd4XSsbiHZv6STqiyBlybhfJkH/1W/6pAXoR2RskvkZb Qjaa4CEcw8T8MUMtEHtLKLk= X-Google-Smtp-Source: ABdhPJwaoknbVyByWATddIj5hY4zG0+lsKXKL2777Mz4X5LX2Sp+Uc4t55n6caXnrYhX9tfnUxJkYw== X-Received: by 2002:a2e:a58f:: with SMTP id m15mr4731716ljp.214.1613039892430; Thu, 11 Feb 2021 02:38:12 -0800 (PST) MIME-Version: 1.0 X-BeenThere: swupdate@googlegroups.com Received: by 2002:a2e:b4d1:: with SMTP id r17ls993584ljm.10.gmail; Thu, 11 Feb 2021 02:38:11 -0800 (PST) X-Received: by 2002:a2e:4c11:: with SMTP id z17mr4650950lja.364.1613039891458; Thu, 11 Feb 2021 02:38:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613039891; cv=none; d=google.com; s=arc-20160816; b=jaFTn8YnZKG+Xpj6MSE2ZMhSs3E1Z+hDRoxW87TbmH9Er1zvueVxncQEr/oyJfxt4S 8kzvPo7BuR9PD3CQjDFGz4S61abrliy+OdZoHdwqJgzLvb4jDPX//Tpku5R2FS7UvePH LePwr6ll7w29eu+YUHyka6pVy0PrFiZhsdk6lXWafllUWY9AqtRyYtnZpTNnD0s9Ckx2 wMcGho0/xRVw+pCf+bnzmVUA6WIVZR/ERwRRc1iMH+5rvuhaE3vRcKLpFN1X90tZilul gVgQPQ5H18ui11h2oxYAoX/9FdHbpgpNcF+e4AMifLleA8P4pwCCoHAB6vzBNSyBggwh aUeg== 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=Dkx55Kud2DyURUgIzM/7bwwPXgk2aw1bXRpe8lHOfIY=; b=Ss3/kXFO6BJOVufYiVwlEMOscsQ4NILMcTN++zYVYpYf1ZUCvpK8Kx1J8NeCL1u0JR jLbgNSim837SEv32vjsTKT1kwZTgfKcyT/zWWByNV4dv7ulAK7r5MpOhfcdwOf/h40NB aJhopB0Y17y6BJm3ClnYDdltk7a2UHdKARBNDZhin5/E3BMKgYx0rg5laiINxLtHROKR e7rZy02ZhgfYUxdtmQaDby/mGbyv1NvL1aFKfc3La8607ZHpRq6H4vspVATCR+3IrXby +hhsa+TCE72MgcwbBzl6ZFOnyFlgpScJPcfPEh1CgpXgjmE2ua7hT/3IKSW9cIpikp3W gGnw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 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.9]) by gmr-mx.google.com with ESMTPS id i190si228653lfi.8.2021.02.11.02.38.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Feb 2021 02:38:11 -0800 (PST) Received-SPF: neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of agust@denx.de) client-ip=212.18.0.9; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4DbtPv08KLz1qtd7 for ; Thu, 11 Feb 2021 11:38:11 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4DbtPv01Wkz1qqkj for ; Thu, 11 Feb 2021 11:38:10 +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 NTpTvtSq1nDU for ; Thu, 11 Feb 2021 11:38:10 +0100 (CET) X-Auth-Info: gE/fa8JC5BRQB9Lnz4vaLWIYXUwgq/DtEK3H0y7V9M0= Received: from crub.agik.hopto.org (p5483356f.dip0.t-ipconnect.de [84.131.53.111]) (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 ; Thu, 11 Feb 2021 11:38:10 +0100 (CET) From: Anatolij Gustschin To: swupdate@googlegroups.com Subject: [swupdate] [meta-swupdate][PATCH 3/4] swupdate_class: enable building .swu images via swu image fstype Date: Thu, 11 Feb 2021 11:38:06 +0100 Message-Id: <20210211103807.9022-4-agust@denx.de> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210211103807.9022-1-agust@denx.de> References: <20210211103807.9022-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.9 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: , Extend swupdate class to support swu image type. To use this in an image recipe following changes should be appended in it: - inherit swupdate 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/swupdate.bbclass | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/classes/swupdate.bbclass b/classes/swupdate.bbclass index 70b855f..4112970 100644 --- a/classes/swupdate.bbclass +++ b/classes/swupdate.bbclass @@ -32,6 +32,8 @@ # image file with exactly the name as specified in SWUPDATE_IMAGES is searched for. inherit swupdate-common.bbclass +inherit swupdate-enc +inherit image_types S = "${WORKDIR}/${PN}" @@ -190,3 +192,21 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" INHIBIT_DEFAULT_DEPS = "1" EXCLUDE_FROM_WORLD = "1" + +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