From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 5/5] of: Print model name in banner
Date: Mon, 8 Oct 2012 21:46:24 +0200 [thread overview]
Message-ID: <1349725584-20509-6-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1349725584-20509-1-git-send-email-s.hauer@pengutronix.de>
If we know the model name from the devicetree print this
in the banner instead of the hardcoded board name.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
common/version.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/common/version.c b/common/version.c
index a557904..22e111a 100644
--- a/common/version.c
+++ b/common/version.c
@@ -1,6 +1,7 @@
#include <common.h>
#include <generated/compile.h>
#include <generated/utsrelease.h>
+#include <of.h>
const char version_string[] =
"barebox " UTS_RELEASE " " UTS_VERSION "\n";
@@ -8,7 +9,13 @@ EXPORT_SYMBOL(version_string);
void barebox_banner (void)
{
+ const char *board;
+
+ board = of_get_model();
+
+ if (!board)
+ board = CONFIG_BOARDINFO;
+
printf("\n\n%s\n\n", version_string);
- printf("Board: " CONFIG_BOARDINFO "\n");
+ printf("Board: %s\n", board);
}
-
--
1.7.10.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2012-10-08 19:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-08 19:46 [PATCH] of patches Sascha Hauer
2012-10-08 19:46 ` [PATCH 1/5] memory: return error in barebox_add_memory_bank Sascha Hauer
2012-10-08 19:46 ` [PATCH 2/5] of: find and register memory during probe Sascha Hauer
2012-10-08 19:46 ` [PATCH 3/5] console/of: evaluate linux,stdout-path property Sascha Hauer
2012-10-08 19:46 ` [PATCH 4/5] of: Add function to get the model name Sascha Hauer
2012-10-08 19:46 ` Sascha Hauer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1349725584-20509-6-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox