mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 1/2] gen-dtb-s: support x86 and other platforms with 16-bit .word
Date: Mon,  5 Oct 2020 10:28:34 +0200	[thread overview]
Message-ID: <20201005082835.11413-1-a.fatoum@pengutronix.de> (raw)

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

             reply	other threads:[~2020-10-05  8:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-05  8:28 Ahmad Fatoum [this message]
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

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=20201005082835.11413-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@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