[U-Boot-Users] [ARM] TI DaVinci fix (stupid me...)
ksi at koi8.net
ksi at koi8.net
Tue Aug 14 19:02:16 CEST 2007
Please apply this until it's not too late... Stupid me, put %hhx format
specifier in sprintfs and it sure doesn't work in U-Boot... Everything else
is OK so far.
BTW, I do hope that attached, not inline, patch should work. This is against
the current GIT tree.
Signed-off-by: Sergey Kubushyn <ksi at koi8.net>
---
******************************************************************
* KSI at home KOI8 Net < > The impossible we do immediately. *
* Las Vegas NV, USA < > Miracles require 24-hour notice. *
******************************************************************
-------------- next part --------------
diff -purN u-boot.git.orig/board/davinci/dv-evm/dv_board.c u-boot.git/board/davinci/dv-evm/dv_board.c
--- u-boot.git.orig/board/davinci/dv-evm/dv_board.c 2007-08-10 13:03:23.000000000 -0700
+++ u-boot.git/board/davinci/dv-evm/dv_board.c 2007-08-14 09:53:57.000000000 -0700
@@ -181,7 +181,7 @@ int misc_init_r (void)
tmp[0] &= buf[i];
if ((tmp[0] != 0xff) && (getenv("ethaddr") == NULL)) {
- sprintf((char *)&tmp[0], "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx",
+ sprintf((char *)&tmp[0], "%02x:%02x:%02x:%02x:%02x:%02x",
buf[0], buf[1], buf[2], buf[3], buf[4], buf[5]);
setenv("ethaddr", (char *)&tmp[0]);
}
diff -purN u-boot.git.orig/board/davinci/schmoogie/dv_board.c u-boot.git/board/davinci/schmoogie/dv_board.c
--- u-boot.git.orig/board/davinci/schmoogie/dv_board.c 2007-08-10 13:03:23.000000000 -0700
+++ u-boot.git/board/davinci/schmoogie/dv_board.c 2007-08-14 09:54:26.000000000 -0700
@@ -228,7 +228,7 @@ int misc_init_r (void)
forceenv("serial#", "FAILED");
} else {
/* CRC OK, set "serial" env variable */
- sprintf((char *)&tmp[0], "%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx",
+ sprintf((char *)&tmp[0], "%02x%02x%02x%02x%02x%02x",
buf[6], buf[5], buf[4], buf[3], buf[2], buf[1]);
forceenv("serial#", (char *)&tmp[0]);
}
diff -purN u-boot.git.orig/board/davinci/sonata/dv_board.c u-boot.git/board/davinci/sonata/dv_board.c
--- u-boot.git.orig/board/davinci/sonata/dv_board.c 2007-08-10 13:03:23.000000000 -0700
+++ u-boot.git/board/davinci/sonata/dv_board.c 2007-08-14 09:54:53.000000000 -0700
@@ -182,7 +182,7 @@ int misc_init_r (void)
tmp[0] &= buf[i];
if ((tmp[0] != 0xff) && (getenv("ethaddr") == NULL)) {
- sprintf((char *)&tmp[0], "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx",
+ sprintf((char *)&tmp[0], "%02x:%02x:%02x:%02x:%02x:%02x",
buf[0], buf[1], buf[2], buf[3], buf[4], buf[5]);
setenv("ethaddr", (char *)&tmp[0]);
}
More information about the U-Boot
mailing list