From patchwork Wed Sep 26 22:37:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erico Nunes X-Patchwork-Id: 975480 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.138; helo=whitealder.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="Pqh0SORU"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42LCWQ3LB4z9s47 for ; Thu, 27 Sep 2018 08:37:54 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id CD75886A63; Wed, 26 Sep 2018 22:37: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 EKj7EToZ+Xtq; Wed, 26 Sep 2018 22:37:45 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 0610786A0C; Wed, 26 Sep 2018 22:37:45 +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 507031C14A4 for ; Wed, 26 Sep 2018 22:37:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 4CFB286785 for ; Wed, 26 Sep 2018 22:37:42 +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 Y9iNjGYfdEox for ; Wed, 26 Sep 2018 22:37:40 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by whitealder.osuosl.org (Postfix) with ESMTPS id AE322867F2 for ; Wed, 26 Sep 2018 22:37:39 +0000 (UTC) Received: by mail-wr1-f66.google.com with SMTP id v16-v6so484506wro.11 for ; Wed, 26 Sep 2018 15:37:39 -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=k+Y1Y797iwKfKt9ibln4+PDxLnZzlyn2zo/Li2Zr2xc=; b=Pqh0SORUe0SYb6QXK+O89d5ygAvc3KT/jiVwOYYy+wPrGr2h8QS20sAzetMg4owa3K b4uSHqGs/40V7HU+kjHCh6NwSdkf6soTRNJfAy4GawnhgjIwA7Eg5GNfcjediOy+0WTf NDYky/NVh/QUOL+r0WYu9QOlzuWLFai2gaS7WTdcyeEwml9VjFude170S0blTyA+XOcA sNWYngGNr0WOVn0vmoGGWDDJZAUyjQBiW41THdPDRfxtEvxFWmyAW7OXf2Y33S7P/oU5 jI5xf5eJxqgRuxrneDTCYDzVLBepvGFjxXLst4I86UcZLNz1zLxyF/1MHBFFHGcyI/p4 3KlQ== 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=k+Y1Y797iwKfKt9ibln4+PDxLnZzlyn2zo/Li2Zr2xc=; b=KI8EcYyvAQfvf+a7ooaGMR7+vDTA0LWxLcqp5l0aEZlqITA6bzHFfelYUj7ngqtXN5 dB06F/HxXb/uwkhzdKgLr4YhwL7PwdBeKCVx8r8VKcskJUbUquEmdgQpcw3bA3M9+yf9 E+9RsM/dvKcR9L3Pjy30ryhz9rUfbWTTpO5hRuf9wSb8nq1pBcx77BnhDGyzwLzUxxEx rTXIXHzLuU42nA4VTYDPMF2zNlVRo8Rid6DUOZoj+1lUm9r/JB0gj+yEUOgp2kn6gOMF ZDG9oarBbHsr0EYNU4bM2pMCU8awb+Bi1LQ8UEJv/MJCYctuqGEvlXdnME7eYSRWrLzg Qc8Q== X-Gm-Message-State: ABuFfojY7Qb2QwJXuAnCfeMFDBBr0nyG2Ub3XgvW/DQHys57iWt9iVCH NNr4iseKK62oxlstRDyx3Epp9Pk5 X-Google-Smtp-Source: ACcGV61vrhzVdbepvOOXKdVWF97hzBNtECEJ/QVSLJPVr2htGrQF3s5I91cwTnT2eLdsE2mrCmC8bA== X-Received: by 2002:adf:a352:: with SMTP id d18-v6mr6933191wrb.31.1538001457962; Wed, 26 Sep 2018 15:37:37 -0700 (PDT) Received: from localhost.localdomain (ip-78-102-114-60.net.upcbroadband.cz. [78.102.114.60]) by smtp.gmail.com with ESMTPSA id x132-v6sm6438230wmg.3.2018.09.26.15.37.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 26 Sep 2018 15:37:37 -0700 (PDT) From: Erico Nunes To: buildroot@buildroot.org Date: Thu, 27 Sep 2018 00:37:16 +0200 Message-Id: <20180926223719.12604-3-nunes.erico@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180926223719.12604-1-nunes.erico@gmail.com> References: <20180926223719.12604-1-nunes.erico@gmail.com> Subject: [Buildroot] [PATCH v3 2/5] grub2: add option to install tools X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Add an option to install grub2 support tools to the target. In the context of Buildroot, some useful target tools provided are grub2-editenv, grub2-reboot, which provide means to manage the grub2, environment, boot order, and others. Signed-off-by: Erico Nunes --- boot/grub2/Config.in | 8 ++++++++ boot/grub2/grub2.mk | 5 +++++ support/scripts/check-bin-arch | 4 ++++ 3 files changed, 17 insertions(+) diff --git a/boot/grub2/Config.in b/boot/grub2/Config.in index 9a61b3b633..f760f95e84 100644 --- a/boot/grub2/Config.in +++ b/boot/grub2/Config.in @@ -76,6 +76,14 @@ config BR2_TARGET_GRUB2_BUILTIN_CONFIG device and other configuration parameters, but however menu entries cannot be described in this embedded configuration. +config BR2_TARGET_GRUB2_INSTALL_TOOLS + bool "install grub2 tools" + help + Install support tools to interact with GNU GRUB Multiboot boot + loader. + This will also install the Grub 2 loadable modules to the + target. + endif # BR2_TARGET_GRUB2 comment "grub2 needs a toolchain w/ wchar" diff --git a/boot/grub2/grub2.mk b/boot/grub2/grub2.mk index 1b366d0407..bb678ef5de 100644 --- a/boot/grub2/grub2.mk +++ b/boot/grub2/grub2.mk @@ -12,7 +12,12 @@ GRUB2_LICENSE_FILES = COPYING GRUB2_DEPENDENCIES = host-bison host-flex host-grub2 HOST_GRUB2_DEPENDENCIES = host-bison host-flex GRUB2_INSTALL_IMAGES = YES + +ifeq ($(BR2_TARGET_GRUB2_INSTALL_TOOLS),y) +GRUB2_INSTALL_TARGET = YES +else GRUB2_INSTALL_TARGET = NO +endif GRUB2_BUILTIN_MODULES = $(call qstrip,$(BR2_TARGET_GRUB2_BUILTIN_MODULES)) GRUB2_BUILTIN_CONFIG = $(call qstrip,$(BR2_TARGET_GRUB2_BUILTIN_CONFIG)) diff --git a/support/scripts/check-bin-arch b/support/scripts/check-bin-arch index 7f97696735..66b8d89932 100755 --- a/support/scripts/check-bin-arch +++ b/support/scripts/check-bin-arch @@ -20,6 +20,10 @@ declare -a IGNORES=( # pru-software-support) legitimately install ELF binaries that # are not for the target architecture "/usr/share" + + # Skip files in /lib/grub, since it is possible to have it + # for a different architecture (e.g. i386 grub on x86_64). + "/lib/grub" ) while getopts p:l:r:a:i: OPT ; do