1 .. SPDX-License-Identifier: GPL-2.0+
2 .. Copyright (c) 2013 The Chromium OS Authors.
7 U-Boot releases are named by year and patch level, for example 2020.10 means the
8 release that came out in October 2020. Release candidates are tagged every few
9 weeks as the project heads to the next release. So 2020.10-rc1 was the first
10 release candidate (RC), tagged soon after 2020.07 was released.
12 See :doc:`release_cycle` for full details.
14 Within the build system, various Makefile variables are created, making use of
15 VERSION, PATCHLEVEL and EXTRAVERSION defined at the top of 'Makefile'. There is
16 also SUBLEVEL available for downstream use. See also CONFIG_IDENT_STRING.
18 Some variables end up in a generated header file at
19 include/generated/version_autogenerated.h and can be accessed from C source by
22 The following are available:
24 UBOOTRELEASE (Makefile)
25 Full release version as a string. If this is not a tagged release, it also
26 includes the number of commits since the last tag as well as the the git
27 hash. If there are uncommitted changes a '-dirty' suffix is added too.
29 This is written by scripts/setlocalversion (maintained by Linux) to
30 include/config/uboot.release and ends up in the UBOOTRELEASE Makefile
36 2021.01-rc5-00248-g60dd854f3ba-dirty
38 PLAIN_VERSION (string #define)
39 This is UBOOTRELEASE but available in C source.
44 2021.01-rc5-00248-g60dd854f3ba-dirty
46 UBOOTVERSION (Makefile)
47 This holds just the first three components of UBOOTRELEASE (i.e. not the
55 U_BOOT_VERSION (string #define)
56 "U-Boot " followed by UBOOTRELEASE, for example::
61 This is used as part of the banner string when U-Boot starts.
63 U_BOOT_VERSION_NUM (integer #define)
64 Release year, e.g. 2021 for release 2021.01. Note
65 this is an integer, not a string.
67 U_BOOT_VERSION_NUM_PATCH (integer #define)
68 Patch number, e.g. 1 for release 2020.01. Note
69 this is an integer, not a string.
71 Human readable U-Boot version string is available in header file
72 include/version_string.h in following variable:
74 version_string (const char[])
75 U_BOOT_VERSION followed by build-time information
76 and CONFIG_IDENT_STRING.
80 U-Boot 2020.10 (Jan 06 2021 - 08:50:36 -0700)
81 U-Boot 2021.01-rc5-00248-g60dd854f3ba-dirty (Jan 06 2021 - 08:50:36 -0700) for spring
83 Build date/time is also included. See the generated file
84 include/generated/timestamp_autogenerated.h for the available
87 #define U_BOOT_DATE "Jan 06 2021" (US format only)
88 #define U_BOOT_TIME "08:50:36" (24-hour clock)
89 #define U_BOOT_TZ "-0700" (Time zone in hours)
90 #define U_BOOT_EPOCH 1609948236
92 The Epoch is the number of seconds since midnight on 1/1/70. You can convert
95 $ date -u -d @1609948236
96 Wed 06 Jan 2021 03:50:36 PM UTC
97 $ date -d 'Wed 06 Jan 2021 03:50:36 PM UTC' +%s
100 Every time you build U-Boot this will update based on the time
101 on your build machine. See 'Reproducible builds' if you want to