From patchwork Fri Oct 11 07:57:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Dawson X-Patchwork-Id: 282547 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id D08022C00C3 for ; Fri, 11 Oct 2013 18:57:58 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id A876E8D121; Fri, 11 Oct 2013 07:57:57 +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 7shFknaKu2Vw; Fri, 11 Oct 2013 07:57:56 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 77F818D040; Fri, 11 Oct 2013 07:57:56 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 0006D1C4572 for ; Fri, 11 Oct 2013 07:57:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id F02ED8D040 for ; Fri, 11 Oct 2013 07:57:54 +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 0ycifSo2vuDQ for ; Fri, 11 Oct 2013 07:57:54 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f180.google.com (mail-wi0-f180.google.com [209.85.212.180]) by whitealder.osuosl.org (Postfix) with ESMTPS id 3D4338D03A for ; Fri, 11 Oct 2013 07:57:54 +0000 (UTC) Received: by mail-wi0-f180.google.com with SMTP id hj8so685311wib.7 for ; Fri, 11 Oct 2013 00:57:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id; bh=yMJe5geqrgWZHAW5qdGxmQFBzvAbFHfDnq0g1fwnbqQ=; b=cyRmtcnbIy/FqYgUYp7uuBekgtqK8LMMbwv9n9eKm3ac3MIZi7/Wo7BCu7cP8Sx75n svXfl88+1SyQiT0CWg9VUOmZQaCBAfGb73ShLhGlAkUUfzQ7NMvU5zoyl065gRBvfgQW EgD/rqumMYnqANDVLrEUUifKnMgWsjsZMXO8KdxgrR7gLjy/A+5NtsNqWEkVfDFHUWQD V523BINGQxq/vLOlDwt4t9Z+2N3IHpIPuOPSU2HWOPrgadx77x0lfapz+Fv35LDo6rMB NUjrpjB08VJ/vxNtA85h0yYNSKmt8kI6Ylt0zMI56ishc3/6BfSX5IQ+JsuU9n/X8dtu waOA== X-Received: by 10.180.160.212 with SMTP id xm20mr1997024wib.23.1381478272722; Fri, 11 Oct 2013 00:57:52 -0700 (PDT) Received: from localhost.localdomain (host109-150-80-232.range109-150.btcentralplus.com. [109.150.80.232]) by mx.google.com with ESMTPSA id om10sm3161145wic.5.2013.10.11.00.57.50 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 11 Oct 2013 00:57:50 -0700 (PDT) From: spdawson@gmail.com To: buildroot@busybox.net Date: Fri, 11 Oct 2013 08:57:49 +0100 Message-Id: <1381478269-29943-1-git-send-email-spdawson@gmail.com> X-Mailer: git-send-email 1.8.1.2 Subject: [Buildroot] [PATCH] uboot: support -r option for mkenvimage X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 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-bounces@busybox.net From: Simon Dawson Some boards are configured in u-boot to store multiple redundant copies of the environment image in flash. For these boards, it is required to pass the -r flag, when generating a boot environment image using mkenvimage. Signed-off-by: Simon Dawson --- boot/uboot/Config.in | 5 +++++ boot/uboot/uboot.mk | 1 + 2 files changed, 6 insertions(+) diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in index 998cda2..d33e8e1 100644 --- a/boot/uboot/Config.in +++ b/boot/uboot/Config.in @@ -242,6 +242,11 @@ config BR2_TARGET_UBOOT_ENVIMAGE_SIZE Size of envronment, can be prefixed with 0x for hexadecimal values. +config BR2_TARGET_UBOOT_ENVIMAGE_REDUNDANT + bool "Redundant environment" + help + The environment has multiple copies in flash. + endif # BR2_TARGET_UBOOT_ENVIMAGE endif # BR2_TARGET_UBOOT diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk index dc8e26f..330c177 100644 --- a/boot/uboot/uboot.mk +++ b/boot/uboot/uboot.mk @@ -117,6 +117,7 @@ define UBOOT_INSTALL_IMAGES_CMDS cp -dpf $(@D)/$(BR2_TARGET_UBOOT_SPL_NAME) $(BINARIES_DIR)/) $(if $(BR2_TARGET_UBOOT_ENVIMAGE), $(HOST_DIR)/usr/bin/mkenvimage -s $(BR2_TARGET_UBOOT_ENVIMAGE_SIZE) \ + $(if $(BR2_TARGET_UBOOT_ENVIMAGE_REDUNDANT),-r) \ -o $(BINARIES_DIR)/uboot-env.bin $(BR2_TARGET_UBOOT_ENVIMAGE_SOURCE)) endef