[U-Boot] [PATCH] Append board name to version identifier

so it is printed as part of the version command and visible when displaying the image in the various flash banks.
This allows "strings u-boot.bin | head -1" to identify target:
VU-Boot 2011.09-01427-g6ee5cf2 (Dec 07 2011 - 11:11:55) P4080DS
Signed-off-by: Ed Swarthout Ed.Swarthout@freescale.com --- include/version.h | 2 +- mkconfig | 1 + 2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/include/version.h b/include/version.h index c908bd3..58f42e1 100644 --- a/include/version.h +++ b/include/version.h @@ -35,7 +35,7 @@ #endif
#define U_BOOT_VERSION_STRING U_BOOT_VERSION " (" U_BOOT_DATE " - " \ - U_BOOT_TIME ")" CONFIG_IDENT_STRING + U_BOOT_TIME ") " BOARD_NAME CONFIG_IDENT_STRING
#ifndef __ASSEMBLY__ extern const char version_string[]; diff --git a/mkconfig b/mkconfig index 438530b..50bd731 100755 --- a/mkconfig +++ b/mkconfig @@ -155,6 +155,7 @@ else > config.h # Create new config file fi echo "/* Automatically generated - do not edit */" >>config.h +echo "#define BOARD_NAME "${BOARD_NAME}"" >>config.h
for i in ${TARGETS} ; do i="`echo ${i} | sed '/=/ {s/=/ /;q; } ; { s/$/ 1/; }'`"

Dear Ed Swarthout,
In message 1323278284-19643-1-git-send-email-Ed.Swarthout@freescale.com you wrote:
so it is printed as part of the version command and visible when displaying the image in the various flash banks.
This allows "strings u-boot.bin | head -1" to identify target:
VU-Boot 2011.09-01427-g6ee5cf2 (Dec 07 2011 - 11:11:55) P4080DS
Signed-off-by: Ed Swarthout Ed.Swarthout@freescale.com
include/version.h | 2 +- mkconfig | 1 + 2 files changed, 2 insertions(+), 1 deletions(-)
I don't think this is a good idea, especially as it afects the user interface for all boards.
Please feel free to define local settings for boards that are maintained by you (oops... there aren't any...), but I don't want to change this globally.
Best regards,
Wolfgang Denk

Hi Ed,
On 12/07/11 20:39, Wolfgang Denk wrote:
Dear Ed Swarthout,
In message 1323278284-19643-1-git-send-email-Ed.Swarthout@freescale.com you wrote:
so it is printed as part of the version command and visible when displaying the image in the various flash banks.
This allows "strings u-boot.bin | head -1" to identify target:
VU-Boot 2011.09-01427-g6ee5cf2 (Dec 07 2011 - 11:11:55) P4080DS
Signed-off-by: Ed Swarthout Ed.Swarthout@freescale.com
include/version.h | 2 +- mkconfig | 1 + 2 files changed, 2 insertions(+), 1 deletions(-)
I don't think this is a good idea, especially as it afects the user interface for all boards.
Please feel free to define local settings for boards that are maintained by you (oops... there aren't any...), but I don't want to change this globally.
Instead, you can create the localversion-<something> file and the build system will take care of the rest, for example:
------------cut---------- ~/git-repo/u-boot $ cat localversion-cm-t3730 -cm-t3730-1 ------------cut----------
and it gives me:
U-Boot 2011.09-cm-t3730-1 (Oct 11 2011 - 11:52:34)

On Wednesday 07 December 2011 13:39:06 Wolfgang Denk wrote:
Ed Swarthout wrote:
so it is printed as part of the version command and visible when displaying the image in the various flash banks.
This allows "strings u-boot.bin | head -1" to identify target:
VU-Boot 2011.09-01427-g6ee5cf2 (Dec 07 2011 - 11:11:55) P4080DS
this `strings|head` is arbitrary and just happens to work for your setup
I don't think this is a good idea, especially as it afects the user interface for all boards.
+1
Please feel free to define local settings for boards that are maintained by you (oops... there aren't any...), but I don't want to change this globally.
isn't there though ? for Blackfin boards, i just use checkboard() to include board info. but specifically for the version string, doesn't defining CONFIG_IDENT_STRING in the board's config work ? -mike
participants (4)
-
Ed Swarthout
-
Igor Grinberg
-
Mike Frysinger
-
Wolfgang Denk