From patchwork Mon May 22 09:30:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Dechesne X-Patchwork-Id: 100272 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp158972qge; Mon, 22 May 2017 02:30:33 -0700 (PDT) X-Received: by 10.84.204.133 with SMTP id b5mr28098023ple.56.1495445433481; Mon, 22 May 2017 02:30:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1495445433; cv=none; d=google.com; s=arc-20160816; b=FoAtNHuYKuFnhhxqjmI2V2UWFyl5/A0savNind1yuvY7YvP+ztYZBCJFBwDRnRmEcI dQA96VyDS3cKBJNlhgNvrdZe1/1w2Ecof4LG4xgGvYnYffRnW2e4MkwSzlnn2JFYQW4y EWN7n6rnSO+r6jCkq435uPqQ4yksYGebmIlDFtIkE90QCbyy5Y3u/3MnWhuQqzPfK7eQ /rK8FmJUMogqKhIIUNEzIeyQvqwsHWGyNi7JflSY2BksMRmn8XVIgoKWhH+wU3MtLxD5 RLBw1pwYAAosSLIlLCKXAKpjuziyFNbNaKkftrXfCOpsLJKLNWd2HDw4J6wiwqoeVtnA ltxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to:arc-authentication-results; bh=8XpTTzCylo7xBxiV5EQHg2NZm8FGjuiBFt8Ih3JHhBw=; b=IcMAOGhUj8xr3qV3V5JQIAUFJM0pGaW1900A85hXV1wUqKVksCCAGv2zCdtL6EmZNY Z4CktQNKoI+bH3z7MfDe+1x7gEcEGY8DkZ/bXnWluX3ZAiXiMmWHnvVcgsN/K2/NSO3f JnblhKdf7KXmC6iHRfoKLO5+mDzKGmCaCdzUVyZ7DbsSytiOlZhOcgpHbkw0/M8PdC5j HIRLPd7Ck+OmP1E/jQJxoELgp9SmcebiAgNM6MFDJgOpMeF0MsfRD1/iFy8nTEjzGvz0 b0juFdmLN/gyIw6TeGr5FLLfIalHxruxBxC5qeR8MclDLCXivaqZ34wfx4Fi0vu7zdss uivg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id d187si16720122pfg.263.2017.05.22.02.30.33; Mon, 22 May 2017 02:30:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 17FC777F9F; Mon, 22 May 2017 09:30:29 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-qt0-f170.google.com (mail-qt0-f170.google.com [209.85.216.170]) by mail.openembedded.org (Postfix) with ESMTP id D1ACF77F7A for ; Mon, 22 May 2017 09:30:26 +0000 (UTC) Received: by mail-qt0-f170.google.com with SMTP id v27so96884215qtg.2 for ; Mon, 22 May 2017 02:30:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=4mG8bgXSDWr7G2UzBmjSBxNz2jFr3co/l4d/hl01ZiU=; b=NTU/aJHoqzQUtbJWoOlQJjPkrXXWIfSeF55OjYwkzYfgu74eJbEalMQuo978Mpvw2c kNBtgX/0+KsrLfbo5FSe6OzLoRN0LsKAG9OsG5PytlGfvMbLKL2K7Omk5CvtFBiFxm74 zjfIvFiShlBJJlZwcXQqOn13RUEPJBEo70F04= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=4mG8bgXSDWr7G2UzBmjSBxNz2jFr3co/l4d/hl01ZiU=; b=iIEaVuIP1NjiB3knMd6lmDKtZwrMYlpO5SRqUlmcnT3kv3Dah2OTvK413EftZb6B3F uFXhy2qV5HOrHPmlIDj3VF9cJ5v2urDOO2PfhCse2Kjzb1DFUuxGO9KSMprPgCcQymSd 9WmTmR6oebheOq9j23A4IjBn9n2jCO8fAzmTiTJALbdHQtb/NVKRy4No/6GvufXhRb90 QTqCzxUb2OGlcStgw6lKZD/Nn2ZTYUPxYPpyL/E6Fl5DEzvLWarWpEfJ7x6bd5UzsIa2 TY4APc3maja6DjqC3Ra7XCQ2Po484dI3RCQ1CsRC3LBbfWkstHFp/R5DPBmHj17Dki+k fmGQ== X-Gm-Message-State: AODbwcCY+sEVGhAQRTUNx6Sq0tXwcz+Wudvb+61p4wQokZfynpq4c9sB 7dCa1tYIqScgatsm X-Received: by 10.237.54.193 with SMTP id f59mr19516126qtb.63.1495445427902; Mon, 22 May 2017 02:30:27 -0700 (PDT) Received: from localhost.localdomain (static.8.26.4.46.clients.your-server.de. [46.4.26.8]) by smtp.gmail.com with ESMTPSA id n17sm11667604qtb.6.2017.05.22.02.30.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 22 May 2017 02:30:27 -0700 (PDT) From: Nicolas Dechesne To: openembedded-core@lists.openembedded.org Date: Mon, 22 May 2017 11:30:02 +0200 Message-Id: <20170522093003.17711-3-nicolas.dechesne@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170522093003.17711-1-nicolas.dechesne@linaro.org> References: <20170522093003.17711-1-nicolas.dechesne@linaro.org> Cc: Nicolas Dechesne Subject: [OE-core] [PATCH 2/3] image_types: oe_mkext234fs: add arguments to customize output file extension X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org Add a function argument to allow users of this fonction to specify the output file extension. This commit as it is, is a no-op, and this new feature will be used in the future. Signed-off-by: Nicolas Dechesne --- meta/classes/image_types.bbclass | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) -- 2.11.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass index 7749b00098..efdcfed843 100644 --- a/meta/classes/image_types.bbclass +++ b/meta/classes/image_types.bbclass @@ -56,9 +56,11 @@ IMAGE_CMD_cramfs = "mkfs.cramfs ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME}${I oe_mkext234fs () { fstype=$1 + ext=$2 extra_imagecmd="" - if [ $# -gt 1 ]; then + if [ $# -gt 2 ]; then + shift shift extra_imagecmd=$@ fi @@ -72,15 +74,15 @@ oe_mkext234fs () { eval COUNT=\"$MIN_COUNT\" fi # Create a sparse image block - dd if=/dev/zero of=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype seek=$ROOTFS_SIZE count=$COUNT bs=1024 - mkfs.$fstype -F $extra_imagecmd ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype -d ${IMAGE_ROOTFS} + dd if=/dev/zero of=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$ext seek=$ROOTFS_SIZE count=$COUNT bs=1024 + mkfs.$fstype -F $extra_imagecmd ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$ext -d ${IMAGE_ROOTFS} # Error codes 0-3 indicate successfull operation of fsck (no errors or errors corrected) - fsck.$fstype -pvfD ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype || [ $? -le 3 ] + fsck.$fstype -pvfD ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$ext || [ $? -le 3 ] } -IMAGE_CMD_ext2 = "oe_mkext234fs ext2 ${EXTRA_IMAGECMD}" -IMAGE_CMD_ext3 = "oe_mkext234fs ext3 ${EXTRA_IMAGECMD}" -IMAGE_CMD_ext4 = "oe_mkext234fs ext4 ${EXTRA_IMAGECMD}" +IMAGE_CMD_ext2 = "oe_mkext234fs ext2 ext2 ${EXTRA_IMAGECMD}" +IMAGE_CMD_ext3 = "oe_mkext234fs ext3 ext3 ${EXTRA_IMAGECMD}" +IMAGE_CMD_ext4 = "oe_mkext234fs ext4 ext4 ${EXTRA_IMAGECMD}" MIN_BTRFS_SIZE ?= "16384" IMAGE_CMD_btrfs () {