From patchwork Sun Jul 8 09:36:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 940927 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4010:c07::23c; helo=mail-lf0-x23c.google.com; envelope-from=swupdate+bncbcxploxj6ikrbqvwq7nakgqeeptt2dq@googlegroups.com; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.b="rPhCYPu6"; dkim-atps=neutral Received: from mail-lf0-x23c.google.com (mail-lf0-x23c.google.com [IPv6:2a00:1450:4010:c07::23c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41NjzV0h9mz9s0W for ; Sun, 8 Jul 2018 19:37:09 +1000 (AEST) Received: by mail-lf0-x23c.google.com with SMTP id r1-v6sf3565395lfi.16 for ; Sun, 08 Jul 2018 02:37:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1531042626; cv=pass; d=google.com; s=arc-20160816; b=bl7iKKbWSayjtx9hnl4/UOtXMFfapZFADOYu66ctwZbnZnloQkSdsNb0h8ywJLk7Mb jSyYY7cnpo7im8Su6EgqzdCcMcG29Ev/dsVtcSSgJ5jvZoVG0MbEmzxE5eUfiPOpzjkn k9KxDZ1IAftnNiEXospI4MHG507KIi4eSMfOqLy8NJsRL0KyO+aKiXHW6F9lCn1qRIOw OeBxJvl2eKUSudHyVP/1AHLkFpVCEckKbKrLThoz154jkjBAQYYXL8rA/cQqIIENP6Dv 04xmPns13/N62sR/DEVNXR71BKVCQ3S12liunQQEcyXZSYdmniQiDMAphExH/37ScdRB NQqA== 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:message-id:date:subject:cc:to:from :arc-authentication-results:arc-message-signature:mime-version :sender:dkim-signature:arc-authentication-results; bh=IgkGsjgnnz+sin9aLM6rYQz3B6XwGI3YkmPPZuDuMQo=; b=cQNDBrI/AMlEXJwLGF+VnZdb+pI0aT1wIwPay1CVvgSDjTLv+Hr6Kc9Gh7ZwmW27Di nWROurYJipIwzQLKL1vnaHKQB/hmezyavlZRjSDZzs5iucO+SNH7dMID8JN58juhOuZT TMob/ZJf0L09TD4itpim58x3pyLhjP9qawqEQV7ORoMv7ssBIQOBqDX5JfFoqLpKqaNX 7e/+5MBeEUSn8RO9Tmqswf1QRYyeYpC6PqQcDmzNvx5jEaq1JbJ1NhMIAmbZrJtiX4NH K/UVDzNx3de+ozDaetnFitDn66H/kjaPXSzNWj27KktY44Vu0obdOzNFf+ENwk5ycCnT 6Z7Q== 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 sbabic@denx.de) smtp.mailfrom=sbabic@denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:mime-version:from:to:cc:subject:date:message-id :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=IgkGsjgnnz+sin9aLM6rYQz3B6XwGI3YkmPPZuDuMQo=; b=rPhCYPu6gcD7VAw0uh2J6cBUlJqR/YjcXOw1pYJe9iR1LpqcoAAzkPFJJo/JjOHPvA 9MXoKDuIGyK/xmVw2MLoMBAUoa/O6QV7X1YXn7Tfp7Kdqcn0TD1kWQonP4xhpUOCWCy9 qR60JLEH+92++9JkOM9G2XnbNNcJPJi+yuwcs46DWTRKZ53LBCwEwmN27FZ3LYkRAAN3 rsaShXYyweK7IJd2P+40JCaiDjz7mlYpx1MeTT7oPBmQnf8Wz+1XryM1wzmoHS3tRqf2 Lg4bBJB+LM1DCt9EOAUiyX9e4UQUJswb+C9o5jpf1niYSXAp7pPlNP5PZvavEDt/vAgg RmPA== 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:cc:subject:date :message-id: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=IgkGsjgnnz+sin9aLM6rYQz3B6XwGI3YkmPPZuDuMQo=; b=sSn3I0vaxvMawld9wLfPFOygOGeeIzNcRp2Jmi2z5A4uFpk21EzO0cdbeGYfN4p+te SQzaWR1lB87rda7xOa7mbJh/wlKpY2cYZq9n1c7BEZ7fTLBQ1lkjYmFq6yYOIe++ANnk VFkXHGwPWKxj80IQBPZKTJlq6qVSevHpKkbvoko99qqvFpNdh+OSiqp0QOw5FPPjCnvq l2qBbr8gJ4RMSnps2xMZ4MkKuCmMGIO2/HnE4VDWfb6/6m1TPKTpD15xifibxdYfoNts dkQdjT5M4TIRJO9bGeF+ywbX06MxZCJzj3tDCvvwdIDWnjgppTvntBDCV//J5Plj/H2q hzxA== Sender: swupdate@googlegroups.com X-Gm-Message-State: APt69E3Hxe2enI+zE/kUERjIjViD+9ejNacA4e/D78w6WEB3lYGa+qQR pxShPqNThXVOvR0yYtTf6gU= X-Google-Smtp-Source: AAOMgpfSJOWNHNzUwMHq26jTvKMhPF+zAwPqcr0iz0jiGj3UZsMsE+ju/Ug6CrtH9Zazu3+tq7JqWw== X-Received: by 2002:a2e:9782:: with SMTP id y2-v6mr96913lji.4.1531042626520; Sun, 08 Jul 2018 02:37:06 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: swupdate@googlegroups.com Received: by 2002:a19:cd14:: with SMTP id d20-v6ls1188485lfg.16.gmail; Sun, 08 Jul 2018 02:37:05 -0700 (PDT) X-Received: by 2002:a19:1289:: with SMTP id 9-v6mr859742lfs.7.1531042625981; Sun, 08 Jul 2018 02:37:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531042625; cv=none; d=google.com; s=arc-20160816; b=ZoKx6UIn6TNH3yqXADukAxveBs1xubs2ojViWNK6GMfE8/f1Cmp5nS3ZIm20I6Cnaa XxWYnOzLratD/prHdzZkJ6oTiuRt4wtDUdPbtvUZkE8X2haFmNoLM1tA5YCWhanIpIic H56E9iSUbOijyxKn4iaEPnkCbZhihAZy24waW79XE2SqEu06kfORTlr3JDkTI/itZu1Z RDH4GT+4iCY/w/TDW6IqHNY3l67JdGerPU79DyoG72pC2P9fQObBH7TpU991TXYgfYYj UmOQhIzZ16fxPEVQVS4nz2X1RQopcbzqMqqGWCpWzsipeIqw6r63sbENKY3wqcstBbqn RHcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:arc-authentication-results; bh=SLfF/TgREdwzGAEbdtF8yur0idpEBCIp0V++ezPpKY0=; b=SN1Zy/+0VqoTJ8v3dIX9X+IrbyNpKKK4R8+N8Y1/FPwr7QJBeRcji+3HltMmxAIC2v a4kbHqLfL+bHo5aTudRpkkhY5QtasQqCsyTH4LdxHfNroqnROtFNPX9nbGJKVEEDroYz xhxtXSmog6WHWh00ILLrAkRdyGXau1h5E9Xge3G6KpRGvVF6sQksAuchQkG4yYNccC+B RsNnyanrlO3Se7W7Utph+J73jP9tHZX0qCD00/C8CkhVdG+qpy0B5Po8XVaJvzcuubQA mCW4Usnz8PuCr7sU3/zu20phsCcpr9LvHjwyYo+xOzp/m7XMbgmt3+uEsbs5Vs6qxNkF wINQ== 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 sbabic@denx.de) smtp.mailfrom=sbabic@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 s14-v6si203158ljh.0.2018.07.08.02.37.05 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 08 Jul 2018 02:37:05 -0700 (PDT) Received-SPF: neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@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 41NjzP2bnXz1qtdd; Sun, 8 Jul 2018 11:37:05 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 41NjzP2QXSz1qqkC; Sun, 8 Jul 2018 11:37:05 +0200 (CEST) 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 FAmkZrRo8RE3; Sun, 8 Jul 2018 11:37:04 +0200 (CEST) Received: from babic.homelinux.org (host-88-217-136-221.customer.m-online.net [88.217.136.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Sun, 8 Jul 2018 11:37:04 +0200 (CEST) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id DF10D4540650; Sun, 8 Jul 2018 11:37:03 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([127.0.0.1]) by localhost (mail.babic.homelinux.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GzG_lNom8CAP; Sun, 8 Jul 2018 11:37:01 +0200 (CEST) Received: from papero.fritz.box (papero.fritz.box [192.168.178.132]) by babic.homelinux.org (Postfix) with ESMTP id A3804454038F; Sun, 8 Jul 2018 11:37:01 +0200 (CEST) From: Stefano Babic To: swupdate@googlegroups.com Cc: Stefano Babic Subject: [swupdate] [[meta-swupdate] [PATCH] 1/7] Split swupdate-image with a common part Date: Sun, 8 Jul 2018 11:36:51 +0200 Message-Id: <1531042617-6503-1-git-send-email-sbabic@denx.de> X-Mailer: git-send-email 2.7.4 X-Original-Sender: sbabic@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 sbabic@denx.de) smtp.mailfrom=sbabic@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: , This is in preparation to add further images. Signed-off-by: Stefano Babic --- recipes-extended/images/swupdate-image.bb | 36 +----------------------------- recipes-extended/images/swupdate-image.inc | 35 +++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 35 deletions(-) create mode 100644 recipes-extended/images/swupdate-image.inc diff --git a/recipes-extended/images/swupdate-image.bb b/recipes-extended/images/swupdate-image.bb index 8bda297..6b99bbe 100644 --- a/recipes-extended/images/swupdate-image.bb +++ b/recipes-extended/images/swupdate-image.bb @@ -1,42 +1,8 @@ SUMMARY = "Root filesystem for swupdate as rescue system" DESCRIPTION = "Root FS to start swupdate in rescue mode \ " - -IMAGE_INSTALL = "base-files \ - base-passwd \ - busybox \ - mtd-utils \ - mtd-utils-ubifs \ - libconfig \ - swupdate \ - swupdate-www \ - ${@bb.utils.contains('SWUPDATE_INIT', 'tiny', 'initscripts-swupdate', 'initscripts sysvinit', d)} \ - util-linux-sfdisk \ - " - -USE_DEVFS = "1" - -# This variable is triggered to check if sysvinit must be overwritten by a single rcS -export SYSVINIT = "no" - LICENSE = "MIT" -IMAGE_FSTYPES = "ext4.gz.u-boot" +require swupdate-image.inc IMAGE_ROOTFS_SIZE = "8192" - -inherit image - -IMAGE_LINGUAS = " " - -fix_inittab_swupdate () { - sed -e 's/1\:2345.*/1\:2345:respawn:\/bin\/sh/' \ - "${IMAGE_ROOTFS}${sysconfdir}/inittab" | \ - sed -e 's/^z6/#&/' | \ - sed -e 's/.*getty.*//' \ - > "${IMAGE_ROOTFS}${sysconfdir}/inittab.swupdate" - rm ${IMAGE_ROOTFS}${sysconfdir}/inittab - mv ${IMAGE_ROOTFS}${sysconfdir}/inittab.swupdate ${IMAGE_ROOTFS}${sysconfdir}/inittab -} - -ROOTFS_POSTPROCESS_COMMAND += "${@bb.utils.contains('SWUPDATE_INIT', 'tiny', 'fix_inittab_swupdate', '', d)}" diff --git a/recipes-extended/images/swupdate-image.inc b/recipes-extended/images/swupdate-image.inc new file mode 100644 index 0000000..3ef94b1 --- /dev/null +++ b/recipes-extended/images/swupdate-image.inc @@ -0,0 +1,35 @@ + +USE_DEVFS = "1" + +# This variable is triggered to check if sysvinit must be overwritten by a single rcS +export SYSVINIT = "no" + +IMAGE_INSTALL = "base-files \ + base-passwd \ + busybox \ + mtd-utils \ + mtd-utils-ubifs \ + libconfig \ + swupdate \ + swupdate-www \ + ${@bb.utils.contains('SWUPDATE_INIT', 'tiny', 'initscripts-swupdate', 'initscripts sysvinit', d)} \ + util-linux-sfdisk \ + " + +IMAGE_FSTYPES = "ext4.gz.u-boot" + +inherit image + +IMAGE_LINGUAS = " " + +fix_inittab_swupdate () { + sed -e 's/1\:2345.*/1\:2345:respawn:\/bin\/sh/' \ + "${IMAGE_ROOTFS}${sysconfdir}/inittab" | \ + sed -e 's/^z6/#&/' | \ + sed -e 's/.*getty.*//' \ + > "${IMAGE_ROOTFS}${sysconfdir}/inittab.swupdate" + rm ${IMAGE_ROOTFS}${sysconfdir}/inittab + mv ${IMAGE_ROOTFS}${sysconfdir}/inittab.swupdate ${IMAGE_ROOTFS}${sysconfdir}/inittab +} + +ROOTFS_POSTPROCESS_COMMAND += "${@bb.utils.contains('SWUPDATE_INIT', 'tiny', 'fix_inittab_swupdate', '', d)}"