mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] gen-dtb-s: support x86 and other platforms with 16-bit .word
@ 2020-10-05  8:28 Ahmad Fatoum
  2020-10-05  8:28 ` [PATCH 2/2] sandbox: compile in a fallback device tree Ahmad Fatoum
  0 siblings, 1 reply; 5+ messages in thread
From: Ahmad Fatoum @ 2020-10-05  8:28 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

On ARM, .word is 32-bit as expected in the script, but on x86 it's
16-bit, which leads to truncation.

.int on the other hand is 32-bit both on ARM and x86 and very likely
all other platforms we support, so change the .word to .int.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 scripts/gen-dtb-s | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/gen-dtb-s b/scripts/gen-dtb-s
index 0649247f934d..4f8c62a0b84c 100755
--- a/scripts/gen-dtb-s
+++ b/scripts/gen-dtb-s
@@ -62,9 +62,9 @@ echo ".section .dtbz.rodata.${name},\"a\""
 echo ".balign STRUCT_ALIGNMENT"
 echo ".global __dtb_z_${name}_start"
 echo "__dtb_z_${name}_start:"
-printf ".word 0x%08x\n"  0x7b66bcbd
-printf ".word 0x%08x\n"  $compressed
-printf ".word 0x%08x\n"  $uncompressed
+printf ".int 0x%08x\n"  0x7b66bcbd
+printf ".int 0x%08x\n"  $compressed
+printf ".int 0x%08x\n"  $uncompressed
 echo ".incbin \"$dtb.lzo\""
 echo "__dtb_z_${name}_end:"
 echo ".global __dtb_z_${name}_end"
-- 
2.28.0


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

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

end of thread, other threads:[~2020-10-08  6:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-05  8:28 [PATCH 1/2] gen-dtb-s: support x86 and other platforms with 16-bit .word Ahmad Fatoum
2020-10-05  8:28 ` [PATCH 2/2] sandbox: compile in a fallback device tree Ahmad Fatoum
2020-10-07  8:14   ` Sascha Hauer
2020-10-07 17:22     ` Ahmad Fatoum
2020-10-08  6:33       ` Sascha Hauer

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