* [PATCH] version_string: Add toolchain and build host info
@ 2019-10-01 0:57 Andrey Smirnov
2019-10-01 6:03 ` Antony Pavlov
2019-10-14 12:00 ` Sascha Hauer
0 siblings, 2 replies; 5+ messages in thread
From: Andrey Smirnov @ 2019-10-01 0:57 UTC (permalink / raw)
To: barebox; +Cc: Andrey Smirnov
Linux kernel reports the version of toolchain it was built with as a
part of its version string, which can be extremely useful when
debugging toolchain related issues. Make Barebox version string, mimic
that of Linux to get the same level of information in Barebox.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
common/version.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/common/version.c b/common/version.c
index 8b1fd4dbe7..5f57022dac 100644
--- a/common/version.c
+++ b/common/version.c
@@ -3,7 +3,8 @@
#include <generated/utsrelease.h>
const char version_string[] =
- "barebox " UTS_RELEASE " " UTS_VERSION "\n";
+ "barebox " UTS_RELEASE " (" BAREBOX_COMPILE_BY "@"
+ BAREBOX_COMPILE_HOST ") (" BAREBOX_COMPILER ") " UTS_VERSION "\n";
EXPORT_SYMBOL(version_string);
const char release_string[] =
--
2.21.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] version_string: Add toolchain and build host info
2019-10-01 0:57 [PATCH] version_string: Add toolchain and build host info Andrey Smirnov
@ 2019-10-01 6:03 ` Antony Pavlov
2019-10-08 5:14 ` Andrey Smirnov
2019-10-14 12:00 ` Sascha Hauer
1 sibling, 1 reply; 5+ messages in thread
From: Antony Pavlov @ 2019-10-01 6:03 UTC (permalink / raw)
To: Andrey Smirnov; +Cc: barebox
On Mon, 30 Sep 2019 17:57:18 -0700
Andrey Smirnov <andrew.smirnov@gmail.com> wrote:
Hi!
> Linux kernel reports the version of toolchain it was built with as a
> part of its version string, which can be extremely useful when
> debugging toolchain related issues. Make Barebox version string, mimic
> that of Linux to get the same level of information in Barebox.
>
> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> ---
> common/version.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/common/version.c b/common/version.c
> index 8b1fd4dbe7..5f57022dac 100644
> --- a/common/version.c
> +++ b/common/version.c
> @@ -3,7 +3,8 @@
> #include <generated/utsrelease.h>
>
> const char version_string[] =
> - "barebox " UTS_RELEASE " " UTS_VERSION "\n";
> + "barebox " UTS_RELEASE " (" BAREBOX_COMPILE_BY "@"
> + BAREBOX_COMPILE_HOST ") (" BAREBOX_COMPILER ") " UTS_VERSION "\n";
> EXPORT_SYMBOL(version_string);
Can we keep COMPILE_BY and COMPILE_HOST in one line (as linux does)?
E.g.
--- a/common/version.c
+++ b/common/version.c
@@ -3,7 +3,11 @@
#include <generated/utsrelease.h>
const char version_string[] =
- "barebox " UTS_RELEASE " " UTS_VERSION "\n";
+ "barebox " UTS_RELEASE
+ " (" BAREBOX_COMPILE_BY "@" BAREBOX_COMPILE_HOST ") "
+ "(" BAREBOX_COMPILER ") "
+ UTS_VERSION "\n";
+
EXPORT_SYMBOL(version_string);
const char release_string[] =
>
> const char release_string[] =
> --
> 2.21.0
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
--
Best regards,
Antony Pavlov
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] version_string: Add toolchain and build host info
2019-10-01 6:03 ` Antony Pavlov
@ 2019-10-08 5:14 ` Andrey Smirnov
2019-10-08 8:14 ` Antony Pavlov
0 siblings, 1 reply; 5+ messages in thread
From: Andrey Smirnov @ 2019-10-08 5:14 UTC (permalink / raw)
To: Antony Pavlov; +Cc: Barebox List
On Mon, Sep 30, 2019 at 11:03 PM Antony Pavlov <antonynpavlov@gmail.com> wrote:
>
> On Mon, 30 Sep 2019 17:57:18 -0700
> Andrey Smirnov <andrew.smirnov@gmail.com> wrote:
>
> Hi!
>
> > Linux kernel reports the version of toolchain it was built with as a
> > part of its version string, which can be extremely useful when
> > debugging toolchain related issues. Make Barebox version string, mimic
> > that of Linux to get the same level of information in Barebox.
> >
> > Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> > ---
> > common/version.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/common/version.c b/common/version.c
> > index 8b1fd4dbe7..5f57022dac 100644
> > --- a/common/version.c
> > +++ b/common/version.c
> > @@ -3,7 +3,8 @@
> > #include <generated/utsrelease.h>
> >
> > const char version_string[] =
> > - "barebox " UTS_RELEASE " " UTS_VERSION "\n";
> > + "barebox " UTS_RELEASE " (" BAREBOX_COMPILE_BY "@"
> > + BAREBOX_COMPILE_HOST ") (" BAREBOX_COMPILER ") " UTS_VERSION "\n";
> > EXPORT_SYMBOL(version_string);
>
>
> Can we keep COMPILE_BY and COMPILE_HOST in one line (as linux does)?
I don't understand. This line already follows formatting found in
Linux, e. g. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/init/version.c?h=v5.4-rc2#n46
I have no preference how this is going to be formatted, really. Can
you just take this patch reformat it the way you want to see it and
submit it?
Thanks,
Andrey Smirnov
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] version_string: Add toolchain and build host info
2019-10-08 5:14 ` Andrey Smirnov
@ 2019-10-08 8:14 ` Antony Pavlov
0 siblings, 0 replies; 5+ messages in thread
From: Antony Pavlov @ 2019-10-08 8:14 UTC (permalink / raw)
To: Andrey Smirnov, Sascha Hauer; +Cc: Barebox List
On Mon, 7 Oct 2019 22:14:41 -0700
Andrey Smirnov <andrew.smirnov@gmail.com> wrote:
> On Mon, Sep 30, 2019 at 11:03 PM Antony Pavlov <antonynpavlov@gmail.com> wrote:
> >
> > On Mon, 30 Sep 2019 17:57:18 -0700
> > Andrey Smirnov <andrew.smirnov@gmail.com> wrote:
> >
> > Hi!
> >
> > > Linux kernel reports the version of toolchain it was built with as a
> > > part of its version string, which can be extremely useful when
> > > debugging toolchain related issues. Make Barebox version string, mimic
> > > that of Linux to get the same level of information in Barebox.
> > >
> > > Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> > > ---
> > > common/version.c | 3 ++-
> > > 1 file changed, 2 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/common/version.c b/common/version.c
> > > index 8b1fd4dbe7..5f57022dac 100644
> > > --- a/common/version.c
> > > +++ b/common/version.c
> > > @@ -3,7 +3,8 @@
> > > #include <generated/utsrelease.h>
> > >
> > > const char version_string[] =
> > > - "barebox " UTS_RELEASE " " UTS_VERSION "\n";
> > > + "barebox " UTS_RELEASE " (" BAREBOX_COMPILE_BY "@"
> > > + BAREBOX_COMPILE_HOST ") (" BAREBOX_COMPILER ") " UTS_VERSION "\n";
> > > EXPORT_SYMBOL(version_string);
> >
> >
> > Can we keep COMPILE_BY and COMPILE_HOST in one line (as linux does)?
>
> I don't understand. This line already follows formatting found in
> Linux, e. g. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/init/version.c?h=v5.4-rc2#n46
>
> I have no preference how this is going to be formatted, really. Can
> you just take this patch reformat it the way you want to see it and
> submit it?
Sorry!
I have made local patch several months ago. I have used it for debug purposes
only because the resulting version string is very long and looks ugly
on start.
It looks like I have used linux **proc_banner** as a reference for my patch.
Please ignore my previous message.
@Sascha
I think that long version string with all these *_COMPILE_BY and *_COMPILER
can be very handy. On the other hand this information is not very interesting for
most users.
Can we put all these *_COMPILE_BY and *_COMPILER into some "global" variables?
--
Best regards,
Antony Pavlov
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] version_string: Add toolchain and build host info
2019-10-01 0:57 [PATCH] version_string: Add toolchain and build host info Andrey Smirnov
2019-10-01 6:03 ` Antony Pavlov
@ 2019-10-14 12:00 ` Sascha Hauer
1 sibling, 0 replies; 5+ messages in thread
From: Sascha Hauer @ 2019-10-14 12:00 UTC (permalink / raw)
To: Andrey Smirnov; +Cc: barebox
On Mon, Sep 30, 2019 at 05:57:18PM -0700, Andrey Smirnov wrote:
> Linux kernel reports the version of toolchain it was built with as a
> part of its version string, which can be extremely useful when
> debugging toolchain related issues. Make Barebox version string, mimic
> that of Linux to get the same level of information in Barebox.
>
> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> ---
> common/version.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/common/version.c b/common/version.c
> index 8b1fd4dbe7..5f57022dac 100644
> --- a/common/version.c
> +++ b/common/version.c
> @@ -3,7 +3,8 @@
> #include <generated/utsrelease.h>
>
> const char version_string[] =
> - "barebox " UTS_RELEASE " " UTS_VERSION "\n";
> + "barebox " UTS_RELEASE " (" BAREBOX_COMPILE_BY "@"
> + BAREBOX_COMPILE_HOST ") (" BAREBOX_COMPILER ") " UTS_VERSION "\n";
I think we shouldn't make version_string longer than it actually is. We
could print the information as additional lines (without adding it to
version_string), or as Antony suggested, as global variables.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-10-14 12:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-01 0:57 [PATCH] version_string: Add toolchain and build host info Andrey Smirnov
2019-10-01 6:03 ` Antony Pavlov
2019-10-08 5:14 ` Andrey Smirnov
2019-10-08 8:14 ` Antony Pavlov
2019-10-14 12:00 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox