[PATCH 1/2] gen-dtb-s: support x86 and other platforms with 16-bit .word

Ahmad Fatoum a.fatoum at pengutronix.de
Mon Oct 5 04:28:34 EDT 2020


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 at 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




More information about the barebox mailing list