Currently at runtime it is hard to know the exact build config of
the current NuttX instance. Thus it is inconvenient when there are
multiple configs for the same board. This patch attempts to solve
the issue by adding build config to /proc/version.
Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
1.merge CONFIG_GIT_REVISION_STR into CONFIG_VERSION_BUILD
2.merge gen_getrev.sh into version.sh
3.generate version number if needed
Here is a sample output:
nsh> uname -a
NuttX 8.2 59fd8e12d3-dirty Dec 12 2019 15:48:00 sim sim
nsh> cat /proc/version
NuttX version 8.2 59fd8e12d3-dirty Dec 12 2019 15:48:01
report git info on /proc/gitrev
* report git info on /proc/gitrev
git info reported: branch, version, git hash, hostname, usr, build date
* use existing .version and procfs for git info
* reduce script's coupling
Approved-by: Gregory Nutt <gnutt@nuttx.org>