From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D2E5EC4338F for ; Mon, 2 Aug 2021 13:21:46 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 4DC0260EE3 for ; Mon, 2 Aug 2021 13:21:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4DC0260EE3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3539283415; Mon, 2 Aug 2021 15:20:48 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org 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=kernel.org header.i=@kernel.org header.b="cH6MAVeR"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 704C5833B1; Mon, 2 Aug 2021 15:20:26 +0200 (CEST) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8E636807FE for ; Mon, 2 Aug 2021 15:19:57 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: by mail.kernel.org (Postfix) with ESMTPSA id 306CB61103; Mon, 2 Aug 2021 13:19:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1627910396; bh=XnbUINt8PCdOVSwLKKGeY37WPSdwC5abE1i6FSZfjb0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cH6MAVeRgbcsEGMaaGpiISFOI46/n2nMFBAPUi1zuwxW7RkkYAGOuKvrsFvY2L3If 1qVg1/7xtXlKuHGp1Yxe5aXtQ2cRuLNJGCMMjjVtGIoOXD5p4yUC8lAYEMvVonSUdp lVcW3WXcW5zEj6fBZO23xxLZpEt8LNoLB3PfW70gDiJASyPM+VDCpjsiBO5bOPC+3j MR/puXutii0f+cO96Ls8Y7vPjg2bVlMI1KeOHMDzXkywhSPsGdCaGjkVbQhWyuZEai WjgcI2jLIcVXzbkP0Y9XFAsarTnszzBcUkM19Z9Aq9x0vulFood4XSFHxXyOn5l/q/ S87jE5S42MZ4g== Received: by pali.im (Postfix) id E7604B98; Mon, 2 Aug 2021 15:19:55 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Simon Glass , Heinrich Schuchardt , Alexander Graf , Huan Wang , Angelo Dureghello , Wolfgang Denk , Priyanka Jain , Christophe Leroy , Bin Meng , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Tom Rini Cc: u-boot@lists.denx.de Subject: [PATCH 10/11] version: Remove global macro U_BOOT_VERSION_STRING from version.h Date: Mon, 2 Aug 2021 15:18:37 +0200 Message-Id: <20210802131838.21097-11-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210802131838.21097-1-pali@kernel.org> References: <20210802131838.21097-1-pali@kernel.org> 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.34 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.2 at phobos.denx.de X-Virus-Status: Clean Version string is available in global variable char version_string[]. Macro U_BOOT_VERSION_STRING is not used by any other file, so remove it completely from version.h. Other files were already converted to use variable version_string[]. Signed-off-by: Pali Rohár --- cmd/version.c | 3 +++ doc/develop/version.rst | 21 ++++++++++++--------- include/version.h | 3 --- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/cmd/version.c b/cmd/version.c index 38a26552a148..42eb85b75bb7 100644 --- a/cmd/version.c +++ b/cmd/version.c @@ -13,6 +13,9 @@ #include #endif +#define U_BOOT_VERSION_STRING U_BOOT_VERSION " (" U_BOOT_DATE " - " \ + U_BOOT_TIME " " U_BOOT_TZ ")" CONFIG_IDENT_STRING + const char version_string[] __section(".text_version_string") = U_BOOT_VERSION_STRING; static int do_version(struct cmd_tbl *cmdtp, int flag, int argc, diff --git a/doc/develop/version.rst b/doc/develop/version.rst index 3f2b07cd2261..5c9046aa17aa 100644 --- a/doc/develop/version.rst +++ b/doc/develop/version.rst @@ -60,15 +60,6 @@ The following are available: This is used as part of the banner string when U-Boot starts. - U_BOOT_VERSION_STRING (string #define) - U_BOOT_VERSION followed by build-time information - and CONFIG_IDENT_STRING. - - Examples:: - - U-Boot 2020.10 (Jan 06 2021 - 08:50:36 -0700) - U-Boot 2021.01-rc5-00248-g60dd854f3ba-dirty (Jan 06 2021 - 08:50:36 -0700) for spring - U_BOOT_VERSION_NUM (integer #define) Release year, e.g. 2021 for release 2021.01. Note this is an integer, not a string. @@ -77,6 +68,18 @@ The following are available: Patch number, e.g. 1 for release 2020.01. Note this is an integer, not a string. +Human readable U-Boot version string is available in header file +include/version_string.h in following variable: + + version_string (const char[]) + U_BOOT_VERSION followed by build-time information + and CONFIG_IDENT_STRING. + + Examples:: + + U-Boot 2020.10 (Jan 06 2021 - 08:50:36 -0700) + U-Boot 2021.01-rc5-00248-g60dd854f3ba-dirty (Jan 06 2021 - 08:50:36 -0700) for spring + Build date/time is also included. See the generated file include/generated/timestamp_autogenerated.h for the available fields. For example:: diff --git a/include/version.h b/include/version.h index 0a3b29adb89a..8ee07134fd2f 100644 --- a/include/version.h +++ b/include/version.h @@ -13,7 +13,4 @@ #include "generated/version_autogenerated.h" #endif -#define U_BOOT_VERSION_STRING U_BOOT_VERSION " (" U_BOOT_DATE " - " \ - U_BOOT_TIME " " U_BOOT_TZ ")" CONFIG_IDENT_STRING - #endif /* __VERSION_H__ */ -- 2.20.1