Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9CEF8C433F5 for ; Wed, 23 Feb 2022 09:33:31 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 056A2836A9; Wed, 23 Feb 2022 10:33:28 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=dh-electronics.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=dh-electronics.com header.i=@dh-electronics.com header.b="seOQT4nD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B3571836A9; Wed, 23 Feb 2022 10:33:25 +0100 (CET) Received: from mx3.securetransport.de (mx3.securetransport.de [IPv6:2a01:4f8:c0c:92be::1]) by phobos.denx.de (Postfix) with ESMTP id 0B85B83A9D for ; Wed, 23 Feb 2022 10:33:23 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=dh-electronics.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=cniedermaier@dh-electronics.com Received: from mail.dh-electronics.com (business-24-134-97-169.pool2.vodafone-ip.de [24.134.97.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx3.securetransport.de (Postfix) with ESMTPSA id 1501C5DDF8; Wed, 23 Feb 2022 10:33:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dh-electronics.com; s=dhelectronicscom; t=1645608792; bh=Qcm/TsMmXoYGUx2sh0h4a+H8Pdxvu5yV9eHSW3pHHs8=; h=From:To:CC:Subject:Date:From; b=seOQT4nDwK/eZfjGjb8tBli35GKhUIey04CldRL6CIE7w2T4qsYZghufdorRKMwDR ZEsCkaH5tGkfkJHFng+62NAlHhurVth8VOcPMFbltWtNGhTypaQ3sxrZl5TOq7ucsQ Foh33pu5rHmtgeiw5uexBYxHS2j6uNYOOiFT8MYgLSJnsEfuYwfBPwGysBcTRH4jhx im/0y8W/AkmET5G9huJQVqZvN+3fIfMs3EbfHHOdaCFnDAMXWWBrBwugBD9Sl88u3q NAeLedtgNsSiZK2aeC4zh1/1bVC3iFge1zxuTaL4cIIyBQfkcH4EV6rImZPHOWvAUn 0e/1HHxEdmrxA== Received: from DHPWEX01.DH-ELECTRONICS.ORG (10.64.2.30) by DHPWEX01.DH-ELECTRONICS.ORG (10.64.2.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Wed, 23 Feb 2022 10:33:07 +0100 Received: from Stretch-CN.dh-electronics.org (10.64.6.116) by DHPWEX01.DH-ELECTRONICS.ORG (10.64.2.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15 via Frontend Transport; Wed, 23 Feb 2022 10:33:06 +0100 From: Christoph Niedermaier To: CC: Christoph Niedermaier , Stefano Babic , Simon Glass , =?UTF-8?q?Marek=20Beh=C3=BAn?= Subject: [PATCH] Makefile: Sort u-boot-initial-env output Date: Wed, 23 Feb 2022 10:33:05 +0100 Message-ID: <20220223093305.2831-1-cniedermaier@dh-electronics.com> X-Mailer: git-send-email 2.11.0 X-klartext: yes MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean For a better overview and better comparison sort the initial environment as the get_default_env.sh script does. We need to preserve the order of equal variable names. So only sort by the variable name, and disable the last-resort comparison. Also remove blank lines before sorting. Signed-off-by: Christoph Niedermaier Cc: Stefano Babic Cc: Simon Glass Cc: Marek BehĂșn To: u-boot@lists.denx.de --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4b152249ca..67ed4edc1a 100644 --- a/Makefile +++ b/Makefile @@ -2439,7 +2439,8 @@ endif quiet_cmd_genenv = GENENV $@ cmd_genenv = $(OBJCOPY) --dump-section .rodata.default_environment=$@ env/common.o; \ - sed --in-place -e 's/\x00/\x0A/g' $@ + sed --in-place -e 's/\x00/\x0A/g' $@; sed --in-place -e '/^\s*$$/d' $@; \ + sort --field-separator== -k1,1 --stable $@ -o $@ u-boot-initial-env: u-boot.bin $(call if_changed,genenv) -- 2.11.0