From patchwork Mon Dec 18 14:55:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evgeniy Didin X-Patchwork-Id: 850092 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@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=) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3z0kcy4KFgz9sCZ for ; Tue, 19 Dec 2017 01:56:18 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id A98142F413; Mon, 18 Dec 2017 14:56:13 +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 dVDpB4nrmC1o; Mon, 18 Dec 2017 14:56:11 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 4381326F94; Mon, 18 Dec 2017 14:56:11 +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 AA7201C436D for ; Mon, 18 Dec 2017 14:56:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id A5B0986CAB for ; Mon, 18 Dec 2017 14:56:09 +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 Q3--DCM7XHug for ; Mon, 18 Dec 2017 14:56:08 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from smtprelay.synopsys.com (smtprelay.synopsys.com [198.182.47.9]) by whitealder.osuosl.org (Postfix) with ESMTPS id C840A86C53 for ; Mon, 18 Dec 2017 14:56:08 +0000 (UTC) Received: from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by smtprelay.synopsys.com (Postfix) with ESMTP id 2725424E0346; Mon, 18 Dec 2017 06:56:08 -0800 (PST) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id 12664993; Mon, 18 Dec 2017 06:56:08 -0800 (PST) Received: from ru20arcgnu1.internal.synopsys.com (ru20arcgnu1.internal.synopsys.com [10.121.9.48]) by mailhost.synopsys.com (Postfix) with ESMTP id 8CC6C988; Mon, 18 Dec 2017 06:56:06 -0800 (PST) From: Evgeniy Didin To: buildroot@busybox.net Date: Mon, 18 Dec 2017 17:55:57 +0300 Message-Id: <20171218145557.19360-1-didin@synopsys.com> X-Mailer: git-send-email 2.11.0 Subject: [Buildroot] [PATCH] uboot: add option customizing the name of environment image 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: Evgeniy Didin , Thomas Petazzoni , Alexey Brodkin , arc-buildroot@synopsys.com MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Historically, in buildroot the name of binary environment image file is "uboot-env.bin". But in upstream u-boot default name for this file is "uboot.env": http://git.denx.de/?p=u-boot.git;a=blob;f=env/Kconfig#l394 For some boards U-Boot environment is stored in FAT partition, not as a raw blob on SD-card, so the name of environment file must be correct. For customizing name of envimage file option BR2_TARGET_UBOOT_ENVIMAGE_FILENAME has been added. For backward compatibility by default value of this option is set to "uboot-env.bin". Signed-off-by: Evgeniy Didin Cc: Alexey Brodkin Cc: arc-buildroot@synopsys.com Cc: Thomas Petazzoni Reviewed-by: Bryce Ferguson --- boot/uboot/Config.in | 8 ++++++++ boot/uboot/uboot.mk | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in index 2829d2ca5e..e05ae15238 100644 --- a/boot/uboot/Config.in +++ b/boot/uboot/Config.in @@ -430,6 +430,14 @@ config BR2_TARGET_UBOOT_ENVIMAGE_REDUNDANT Buildroot is compatible with the "redundant environment" mechanism of U-Boot. +config BR2_TARGET_UBOOT_ENVIMAGE_FILENAME + string "Custom filename for environment image" + default "uboot-env.bin" + help + Some platforms require setting custom name for U-Boot + environment image. For backward compatibility + default filename is "uboot-env.bin". + endif # BR2_TARGET_UBOOT_ENVIMAGE config BR2_TARGET_UBOOT_BOOT_SCRIPT diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk index d2f241cd8b..5ebd1df89d 100644 --- a/boot/uboot/uboot.mk +++ b/boot/uboot/uboot.mk @@ -250,7 +250,7 @@ define UBOOT_GENERATE_ENV_IMAGE $(HOST_DIR)/bin/mkenvimage -s $(BR2_TARGET_UBOOT_ENVIMAGE_SIZE) \ $(if $(BR2_TARGET_UBOOT_ENVIMAGE_REDUNDANT),-r) \ $(if $(filter BIG,$(BR2_ENDIAN)),-b) \ - -o $(BINARIES_DIR)/uboot-env.bin \ + -o $(BINARIES_DIR)/$(BR2_TARGET_UBOOT_ENVIMAGE_FILENAME) \ $(@D)/buildroot-env.txt endef endif