Commit Graph

6 Commits

Author SHA1 Message Date
Kyle Moffett
a7b3918533 tools/setlocalversion: Update from the Linux Kernel
Several bugfixes have occurred upstream since this script was imported
into U-Boot.  In particular, the script currently in U-Boot does not
describe commit f8bbb4dad0 correctly,
resulting in a version of "2011.09" instead of "2011.09-01460-gf8bbb4d".

With that commit checked out, the command "git name-rev --tags HEAD"
gives this result:
  HEAD tags/v2011.12-rc1~30^2

Then the "changes" regex does not match because of the trailing '^2':
  grep -E '^HEAD[[:space:]]+(.*~[0-9]*|undefined)$'

The new version of tools/setlocalversion in the kernel correctly handles
those situations by using different plumbing commands.

The version from the kernel is not directly usable as it does not append
the full GIT version that U-Boot expects unless the right config options
are set (CONFIG_LOCALVERSION_AUTO=y).  Other than a few minor changes
for Kconfig, the imported version is very similar to Linux v3.2-rc4.

Signed-off-by: Kyle Moffett <Kyle.D.Moffett@boeing.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Mike Frysinger <vapier@gentoo.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-12-17 20:58:48 +01:00
Mike Frysinger
16e66cf194 setlocalversion: add some more fallbacks for git describe
If working out of a custom git tree that lacks annotated tags, the
'git describe' operation spews "fatal: cannot describe" errors all
over the place.  So add some fallback code in case the best naming
was unable to locate something useful.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-09-21 21:33:16 +02:00
Peter Korsgaard
6b6bb02f27 tools/setlocalversion: use git svn instead of git-svn
Use the new "git <subcmd>" syntax instead of the deprecated
"git-<subcmd>".

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2009-04-04 23:11:16 +02:00
Mike Frysinger
92bad20ad7 Add support for u-boot in svn and localversion-* files
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2008-04-18 10:08:31 -07:00
Wolfgang Denk
b8aa57b5d4 tools/setlocalversion: use a git-describe-ish format
Change the automatic local version to have the form -nnnnn-gSHA1SUMID,
where 'nnnnn' is the number of commits since the last tag (i.e.,
1.3.2-rc3).  This makes it much easier to recognize "newer" versions
and to see how much has been changed since the referenced tag.

Stolen from Linux kernel's scripts/setlocalversio, see commit d882421f.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-03-14 16:04:54 +01:00
Wolfgang Denk
881a87ecba Add GIT version information (commid ID) to untagged U-Boot versions
As done in the linux kernel, the U-Boot version (U_BOOT_VERSION)
of all unreleased (untagged) U-Boot images will be automatically
extended upon compiletime with a part of the GIT commit ID and
possibly with "dirty" if uncommited changes are detected.

Here an example for the resulting version:
"U-Boot 1.1.4-g3457ac18-dirty"

The version is now maintained in the toplevel Makefile and the
version headers are autogenerated.

Patch by Stefan Roese, 9 Feb 2006
2006-02-21 17:33:04 +01:00