All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] build: allow a downstream suffix in the version shown during boot
@ 2022-03-13 10:42 Nicolas Boulenguez
  2022-04-11 15:31 ` Tom Rini
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Boulenguez @ 2022-03-13 10:42 UTC (permalink / raw)
  To: u-boot

Hello.

https://lists.denx.de/pipermail/u-boot/2022-February/474887.html got
no answer, probably because it is trivial and has been lost among more
important topics, so I am submitting it again.

It is convenient for redistributors to add a build number to the
U-boot source version, which is displayed at boot and useful to know
if a device has been successfully updated, to triage bugs and so on.

For example, Debian adds '+dfsg-N' where N changes with each release
of a .deb package.

Author: Vagrant Cascadian <vagrant@debian.org>
Author: Nicolas Boulenguez <nicolas@debian.org>
Signed-By: Nicolas Boulenguez <nicolas@debian.org>

--- a/Makefile
+++ b/Makefile
@@ -456,7 +456,7 @@ KBUILD_AFLAGS	+= $(call cc-option,-fno-PIE)
 
 # Read UBOOTRELEASE from include/config/uboot.release (if it exists)
 UBOOTRELEASE = $(shell cat include/config/uboot.release 2> /dev/null)
-UBOOTVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
+UBOOTVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)$(BUILD_VERSION)
 
 export VERSION PATCHLEVEL SUBLEVEL UBOOTRELEASE UBOOTVERSION
 export ARCH CPU BOARD VENDOR SOC CPUDIR BOARDDIR
--- a/doc/build/gcc.rst
+++ b/doc/build/gcc.rst
@@ -151,6 +151,11 @@
 Note that the :doc:`tools` are always built with the included version of libfdt
 so it is not possible to build U-Boot tools with a system libfdt, at present.
 
+If you are modifying the upstream sources, please make this visible
+at boot time by defining the BUILD_VERSION version suffix.
+
+* BUILD_VERSION=+<vendor><build number><...>
+
 Other build targets
 ~~~~~~~~~~~~~~~~~~~
 

^ permalink raw reply	[flat|nested] 4+ messages in thread
* [PATCH] build: allow a downstream suffix in the version shown during boot
@ 2022-02-10 10:54 Nicolas Boulenguez
  0 siblings, 0 replies; 4+ messages in thread
From: Nicolas Boulenguez @ 2022-02-10 10:54 UTC (permalink / raw)
  To: u-boot

[-- Attachment #1: Type: text/plain, Size: 225 bytes --]

Hello.

The attached patch has been applied for a while by Debian, but would
most probably be useful to other downstreams.
It is trivial and does not change the default settings.

Please consider merging it upstream.
Thanks.

[-- Attachment #2: 0001-build-allow-a-downstream-suffix-in-the-version-shown.patch --]
[-- Type: text/x-diff, Size: 2066 bytes --]

From 5a08cdc84ade21b947f1de8aa95e3bbd273c4bcd Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <nicolas@debian.org>
Date: Thu, 10 Feb 2022 11:15:38 +0100
Subject: [PATCH] build: allow a downstream suffix in the version shown during
 boot

It is convenient for redistributors to add a build number to the
U-boot source version, which is displayed at boot and useful to know
if a device has been successfully updated, to triage bugs and so on.

For example, Debian adds '+dfsg-N' where N changes with each release
of a .deb package.

Author: Vagrant Cascadian <vagrant@debian.org>
Author: Nicolas Boulenguez <nicolas@debian.org>
Signed-By: Nicolas Boulenguez <nicolas@debian.org>
---
 Makefile          | 2 +-
 doc/build/gcc.rst | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index a30098c66f..d6e9cdbf04 100644
--- a/Makefile
+++ b/Makefile
@@ -456,7 +456,7 @@ KBUILD_AFLAGS	+= $(call cc-option,-fno-PIE)
 
 # Read UBOOTRELEASE from include/config/uboot.release (if it exists)
 UBOOTRELEASE = $(shell cat include/config/uboot.release 2> /dev/null)
-UBOOTVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
+UBOOTVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)$(BUILD_VERSION)
 
 export VERSION PATCHLEVEL SUBLEVEL UBOOTRELEASE UBOOTVERSION
 export ARCH CPU BOARD VENDOR SOC CPUDIR BOARDDIR
diff --git a/doc/build/gcc.rst b/doc/build/gcc.rst
index cdd7970032..d8666acaae 100644
--- a/doc/build/gcc.rst
+++ b/doc/build/gcc.rst
@@ -141,6 +141,11 @@ of dtc is new enough. It also makes sure that pylibfdt is present, if needed
 Note that the :doc:`tools` are always built with the included version of libfdt
 so it is not possible to build U-Boot tools with a system libfdt, at present.
 
+If you are modifying the upstream sources, please make this visible
+at boot time by defining the BUILD_VERSION version suffix.
+
+* BUILD_VERSION=+<vendor><build number><...>
+
 Other build targets
 ~~~~~~~~~~~~~~~~~~~
 
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-04-13 12:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-13 10:42 [PATCH] build: allow a downstream suffix in the version shown during boot Nicolas Boulenguez
2022-04-11 15:31 ` Tom Rini
2022-04-13 11:59   ` Nicolas Boulenguez
  -- strict thread matches above, loose matches on Subject: below --
2022-02-10 10:54 Nicolas Boulenguez

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.