mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [RFC] gen-dtb-s: make metadata binary fields always little-endian
@ 2014-08-02  5:45 Antony Pavlov
  2014-08-03 16:17 ` Jan Lübbe
  0 siblings, 1 reply; 7+ messages in thread
From: Antony Pavlov @ 2014-08-02  5:45 UTC (permalink / raw)
  To: barebox

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 scripts/gen-dtb-s | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/gen-dtb-s b/scripts/gen-dtb-s
index 3e4158f..0db70f1 100755
--- a/scripts/gen-dtb-s
+++ b/scripts/gen-dtb-s
@@ -17,8 +17,8 @@ if [ "$imd" = "y" ]; then
 	if [ "$compat" != "notfound" ]; then
 
 		compatlen=$($FDTGET -t s "$dtb" / compatible | wc -c)
-		echo ".int 0x640c8005"
-		echo ".int " $compatlen
+		echo ".byte 0x05, 0x80, 0x0c, 0x64"
+		python -c "print(\".byte 0x%02x, 0x%02x, 0x%02x, 0x%02x\\n\" % ($compatlen & 0xff, ($compatlen >> 8) & 0xff, ($compatlen >> 16) & 0xff, ($compatlen >> 24) & 0xff))"
 		echo ".byte " $compat
 		echo ".balign 4"
 	fi
@@ -27,8 +27,8 @@ if [ "$imd" = "y" ]; then
 
 	if [ "$model" != "notfound" ]; then
 		modellen=$($FDTGET -t s "$dtb" / model | wc -c)
-		echo ".int 0x640c8004"
-		echo ".int " $modellen
+		echo ".byte 0x04, 0x80, 0x0c, 0x64"
+		python -c "print(\".byte 0x%02x, 0x%02x, 0x%02x, 0x%02x\\n\" % ($modellen & 0xff, ($modellen >> 8) & 0xff, ($modellen >> 16) & 0xff, ($modellen >> 24) & 0xff))"
 		echo ".byte " $model
 		echo ".balign 4"
 	fi
-- 
2.0.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-08-06  3:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-02  5:45 [RFC] gen-dtb-s: make metadata binary fields always little-endian Antony Pavlov
2014-08-03 16:17 ` Jan Lübbe
2014-08-03 17:53   ` Antony Pavlov
2014-08-04  6:31     ` Uwe Kleine-König
2014-08-04 17:34     ` Sascha Hauer
2014-08-04 19:19       ` Antony Pavlov
2014-08-06  4:00     ` Jean-Christophe PLAGNIOL-VILLARD

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox