From patchwork Sun Oct 13 00:22:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Santos X-Patchwork-Id: 1175776 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.136; helo=silver.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="S0mGhdX3"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46rMpp6pqKz9sP6 for ; Sun, 13 Oct 2019 11:22:56 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 13C0020483; Sun, 13 Oct 2019 00:22:51 +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 QND+qGgjFa96; Sun, 13 Oct 2019 00:22:50 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 29AD12076E; Sun, 13 Oct 2019 00:22:50 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 0F1191BF95E for ; Sun, 13 Oct 2019 00:22:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 0C16F8701E for ; Sun, 13 Oct 2019 00:22:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id H-kxxlKjiqf9 for ; Sun, 13 Oct 2019 00:22:48 +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 whitealder.osuosl.org (Postfix) with ESMTPS id 4E71D86FEA for ; Sun, 13 Oct 2019 00:22:48 +0000 (UTC) Received: by mail-qk1-f195.google.com with SMTP id u22so12389505qkk.11 for ; Sat, 12 Oct 2019 17:22:48 -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=RDaM1Ve1klToLIkpo9LgkzBmG9owU66QzMyLhLdbFJc=; b=S0mGhdX3QG68DL3O4hP7k4dIRrOYZjVykdT0wAQU7K57Fp0RuM3HrBHRqgWaRIEP52 m+5VYcgVJAewAbrtUp77g4/Qjw2CDq1r+hnYFd2sL/D9GOhGpUdDz7wIzUJw7Ilo0TN7 jI5B10/zKeebtL5z5w2pr59mWuanbTacHkT9WiIcun2EaKTsRDVeWu6tjpjNqaoeNK5Q VOEkkVI+thqmGPpknCGObQz/ZqyARnddE7be7iH0VbK/ejmg2Oc0l8MbgEokUPRDfCuh t05LolHKIhBHOzYSMBmmGjPtz59ctzW+Y3BlOkA6xOZWrY0TlyRZ2aA80Nr02O3u53jK PD8w== 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=RDaM1Ve1klToLIkpo9LgkzBmG9owU66QzMyLhLdbFJc=; b=trOVTKa7k8N5wfNTGIy7ikEch2285Oacg/udnPde2RvAmWbduFtL1uT/KlwApvRSXV KY0N+BfcoReQkKMuw7nVIm0E5kH1vYhvVEOXqGEiwMy6fxkcA7b0Vw+XoPdDkW0BcOOV lej7xrmEjX1CI/zFbRzlKsufUqW5DlxLIRwNSUABsDM4uqctbSPEjqA+5tONilAU3Pi4 oI0INLxjtogaHeaQn6vCK1W7YdGYkVPn0r/YeKqNMBwtFprj7BT/1SsatdiwmgQ6hIWh 6GI9GxV08+fpbZHHDdFtsL60zkGpM3ryT9Vt2k3Gg8Yjz+/R098lCU+MWsQRDFBILqzr S0pQ== X-Gm-Message-State: APjAAAVYR/cfkhl6BxfdAFvxrzEeVPnYvRJ8uo1caU02UQUr3O78jQp1 o/P2hNk9hTeaxoCH8nOJFx688ZVDdT4= X-Google-Smtp-Source: APXvYqxl1Dhcy+MEx4FFRgIdRfymkWs1ykqWBdzHQoGye7QTnS/FhTOY2qhz7ZXzrKH1xowdIg3IBg== X-Received: by 2002:a37:8dc2:: with SMTP id p185mr23530702qkd.7.1570926167043; Sat, 12 Oct 2019 17:22:47 -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.22.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Oct 2019 17:22:46 -0700 (PDT) From: unixmania@gmail.com To: buildroot@buildroot.org Date: Sat, 12 Oct 2019 21:22:24 -0300 Message-Id: <20191013002232.1045-2-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 1/9] support/scripts/genimage.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 --- support/scripts/genimage.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/support/scripts/genimage.sh b/support/scripts/genimage.sh index 039b3fef1d..2796e19eb7 100755 --- a/support/scripts/genimage.sh +++ b/support/scripts/genimage.sh @@ -30,10 +30,18 @@ done [ -n "${GENIMAGE_CFG}" ] || die "Missing argument" +# 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}" \ + --rootpath "${ROOTPATH_TMP}" \ --tmppath "${GENIMAGE_TMP}" \ --inputpath "${BINARIES_DIR}" \ --outputpath "${BINARIES_DIR}" \