From patchwork Tue Sep 13 04:15:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erico Nunes X-Patchwork-Id: 669101 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sY7bP2T5kz9sC4 for ; Tue, 13 Sep 2016 12:16:49 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=DOsovi20; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 64BA589177; Tue, 13 Sep 2016 02:16:45 +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 1LDV4Jut1ikG; Tue, 13 Sep 2016 02:16:42 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 3FFD389136; Tue, 13 Sep 2016 02:16:40 +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 6881E1C2A56 for ; Tue, 13 Sep 2016 02:16:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 67A4288955 for ; Tue, 13 Sep 2016 02:16:27 +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 VzgJnaru74b8 for ; Tue, 13 Sep 2016 02:16:27 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by whitealder.osuosl.org (Postfix) with ESMTPS id BF21087A47 for ; Tue, 13 Sep 2016 02:16:26 +0000 (UTC) Received: by mail-wm0-f65.google.com with SMTP id b184so190301wma.3 for ; Mon, 12 Sep 2016 19:16:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=8pbBKnZP4TKnZ+vcobksNf2K7f3CgTdWfFg5EL6MMfw=; b=DOsovi20vcWNweaJGHdPxDezPv0In8TRHdgNFmxLimi0rIVyHTj0VBdNxPXuPTXCex j9YiAl/veblDjJrIrO7jKwGmc2yXdQHWcbHSnvJ7qSabXrt7QB3m+3+yL1b9DpRLYVc8 XQXXWC876lzOqq1erNJFmoLTMM9WIFWwaM3QYvPNxxIepCaDKsWG/0zA4g4w9uxiSAkl YX676l28HFvMghE8WUizEWK+OBCNoDc60RHoNquLy4avEeY4peheyk+NtH5KMrBEHFk4 guO2Xrzns9TRHxZyp39GgsQTWuDElv6vr6m3X11pKJizikOLSQHyeKlsCqAcgvGwdPcm uLeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=8pbBKnZP4TKnZ+vcobksNf2K7f3CgTdWfFg5EL6MMfw=; b=dS/0d7cEhOjxI4V6z5Ah5xf1njkeNOISJ36iCqzufldbcVi8KQLd8u5+78e78AT9dn l9QumCWP38vrb+SoDcYK4A3wCHt9Lx3f4QJiwIMMTeXATKxXHC9PeuEfdaBJ2xkiw9m3 2qkaQ6HIADpibK9NXnKZg7VGRH2YWDC2J1blavZCYt2GazgP91hRQ573VDIqbpZsJ9ST xPBFCnnrkx+dwjZH0pXrDUA3QJklxeSJWawmjjUvCEwBlzMHbLPkUE/KQWp/+OoMVWZL on0Iwc2aorclZ2G6aPiqUVAgEqb2huQ/uPwA/ZHorXISYQ2zIdJirBe+lt72CqrKe0ih y2gQ== X-Gm-Message-State: AE9vXwNCP2e/ZaFRfjvoQ/Og5bB5vmz51P1keg4rL7ogTihmkktrct9Cc2FvP32MIwoDww== X-Received: by 10.28.48.71 with SMTP id w68mr14432999wmw.4.1473732985167; Mon, 12 Sep 2016 19:16:25 -0700 (PDT) Received: from localhost.localdomain (ip-78-102-173-25.net.upcbroadband.cz. [78.102.173.25]) by smtp.gmail.com with ESMTPSA id i131sm15124827wmg.10.2016.09.12.19.16.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Sep 2016 19:16:24 -0700 (PDT) From: Erico Nunes To: buildroot@buildroot.org Date: Tue, 13 Sep 2016 06:15:48 +0200 Message-Id: <20160913041548.10290-6-nunes.erico@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20160913041548.10290-1-nunes.erico@gmail.com> References: <20160913041548.10290-1-nunes.erico@gmail.com> Cc: Thomas Petazzoni Subject: [Buildroot] [PATCH 5/5] grub2: introduce BR2_TARGET_GRUB2_CFG X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This configuration can be used to provide a custom Grub 2 configuration file containing menu entries. In the previous implementation, this had to be always done by an external script, overwriting the defualt image. This should be backwards compatible as the default value is the previous hardcoded value. Signed-off-by: Erico Nunes --- boot/grub2/Config.in | 7 +++++++ boot/grub2/grub2.mk | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/boot/grub2/Config.in b/boot/grub2/Config.in index 527ff37..94862a6 100644 --- a/boot/grub2/Config.in +++ b/boot/grub2/Config.in @@ -196,4 +196,11 @@ 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_CFG + string "grub2 menu entries config" + default "boot/grub2/grub.cfg" + help + Path to a Grub 2 configuration file containing the grub2 menu + entries. + endif # BR2_TARGET_GRUB2 diff --git a/boot/grub2/grub2.mk b/boot/grub2/grub2.mk index 910967e..7a64b60 100644 --- a/boot/grub2/grub2.mk +++ b/boot/grub2/grub2.mk @@ -110,8 +110,9 @@ define GRUB2_INSTALL_IMAGES_CMDS -p "$(GRUB2_PREFIX)" \ $(if $(GRUB2_BUILTIN_CONFIG),-c $(GRUB2_BUILTIN_CONFIG)) \ $(GRUB2_BUILTIN_MODULES) - mkdir -p $(dir $(GRUB2_CFG)) - $(INSTALL) -D -m 0644 boot/grub2/grub.cfg $(GRUB2_CFG) + $(if $(BR2_TARGET_GRUB2_CFG), \ + mkdir -p $(dir $(GRUB2_CFG)) && \ + $(INSTALL) -D -m 0644 $(BR2_TARGET_GRUB2_CFG) $(GRUB2_CFG)) $(GRUB2_IMAGE_INSTALL_ELTORITO) endef