From patchwork Sun Oct 13 00:22:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Santos X-Patchwork-Id: 1175782 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="uNWCjbNe"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46rMqF2tRtz9sP4 for ; Sun, 13 Oct 2019 11:23:21 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id BA5E485F8E; Sun, 13 Oct 2019 00:23:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wXTeA_iWCJ2l; Sun, 13 Oct 2019 00:23:19 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id DD7E985FA0; Sun, 13 Oct 2019 00:23:18 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 59EDF1BF95E for ; Sun, 13 Oct 2019 00:23:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 49AE42047A for ; Sun, 13 Oct 2019 00:23:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hUFjhTxYgt02 for ; Sun, 13 Oct 2019 00:23:10 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qk1-f195.google.com (mail-qk1-f195.google.com [209.85.222.195]) by silver.osuosl.org (Postfix) with ESMTPS id 70D5620012 for ; Sun, 13 Oct 2019 00:23:10 +0000 (UTC) Received: by mail-qk1-f195.google.com with SMTP id h126so12407426qke.10 for ; Sat, 12 Oct 2019 17:23:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=buulCCTT5CYW7HUwNscy/KxRCZlZyHJAcNSzIDUVWQs=; b=uNWCjbNeGzqiLtGP+97rMpb7WnBES+njH1dOZU+T5nDduueaq12fD5fXOLLSg8ZTtT tlEvlG+GP+S2ALU5Omq4EMjaFRMWQqXT1tN6krMGkzmlIh3xAApAAgRyCl88DEylrJYK Tga2InI8/evpVHY45h9nZzIeNY359IDoyhZCZ9FQwnDHvl89p1oIVhbG78vT5PYPHWrE wf3GozgUbVPo+BazQCX+JRWG2HxZVkeUw2pCY9t20vu++IsbGDDVLFMi0LByd9YObiyL NPGywWErdnS8pqLQRIcI70ZrZ/ZdoGxvT/VY0wUX0EgsV3KQym8zqvAJnh71m18y+XcH p93g== 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=buulCCTT5CYW7HUwNscy/KxRCZlZyHJAcNSzIDUVWQs=; b=ulR2PUZRQLiEUGZMwhkiKRkJm/zF+rRq7Pcxc0iflEiX4PTQK6c0tCo6EzaOicyFo7 Na2DmG+d/WzeeVDyIzWrQ/p8ydb7WZ3Kmx/dZ+H0P8G21B4Axnjem+nyYNMuDoe/017f UaKCEXH1VCMGDfLR+JlUwArpZy4M+XCqURzHwO4++ZbCv4b/zE5c6SAsWwSFwGBEl8Qj Wz6oEBCKxugTOA/2I035t8M5eJHiVJGwmTYygzR7WxQ3UNUYjcx+FNx7UWPH7yiSBcg3 QKomJiNgRrF6T07VDfU0swcq7TkFGslpfnX89rwbdNtBVA9oH1ShrWy3UYuijeASTG5e tFCA== X-Gm-Message-State: APjAAAVJIOSCcDiCwk+qCC0d0xVOQ3xmHk7hoiDGlkI1nesRP7GBwUnx o69pL5p+4Rj6ySomZ9uRg09BJvwC1ck= X-Google-Smtp-Source: APXvYqyqdqoY16lYJYlRuirBhY6IpY6BzvSjNro6d3F1kVJzwrXpMZXNAZTDwQbow5Klcs44mnI2Fw== X-Received: by 2002:a37:e503:: with SMTP id e3mr23647189qkg.491.1570926189201; Sat, 12 Oct 2019 17:23:09 -0700 (PDT) Received: from casantos.remote.csb (177.204.230.17.dynamic.adsl.gvt.net.br. [177.204.230.17]) by smtp.gmail.com with ESMTPSA id k54sm9373533qtf.28.2019.10.12.17.23.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Oct 2019 17:23:08 -0700 (PDT) From: unixmania@gmail.com To: buildroot@buildroot.org Date: Sat, 12 Oct 2019 21:22:30 -0300 Message-Id: <20191013002232.1045-8-unixmania@gmail.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20191013002232.1045-1-unixmania@gmail.com> References: <20191013002232.1045-1-unixmania@gmail.com> Subject: [Buildroot] [PATCH 7/9] board/raspberrypi/post-image.sh: pass an empty rootpath to genimage X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Carlos Santos , Peter Korsgaard , Peter Seiderer , Fabio Estevam , Martin Bark MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Carlos Santos genimage makes a full copy of the given rootpath to ${GENIMAGE_TMP}/root so passing TARGET_DIR would be a waste of time and disk space. We don't rely on genimage to build the rootfs image, just to insert a pre-built one in the disk image. Signed-off-by: Carlos Santos --- board/raspberrypi/post-image.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/board/raspberrypi/post-image.sh b/board/raspberrypi/post-image.sh index 70447cd48b..bf9af5dc60 100755 --- a/board/raspberrypi/post-image.sh +++ b/board/raspberrypi/post-image.sh @@ -49,10 +49,18 @@ __EOF__ done +# Pass an empty rootpath. genimage makes a full copy of the given rootpath to +# ${GENIMAGE_TMP}/root so passing TARGET_DIR would be a waste of time and disk +# space. We don't rely on genimage to build the rootfs image, just to insert a +# pre-built one in the disk image. + +trap 'rm -rf "${ROOTPATH_TMP}"' EXIT +ROOTPATH_TMP="$(mktemp -d)" + rm -rf "${GENIMAGE_TMP}" -genimage \ - --rootpath "${TARGET_DIR}" \ +genimage \ + --rootpath "${ROOTPATH_TMP}" \ --tmppath "${GENIMAGE_TMP}" \ --inputpath "${BINARIES_DIR}" \ --outputpath "${BINARIES_DIR}" \