U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/5] sandbox: Add instructions about building on 32-bit machines
Date: Fri, 22 Jul 2016 09:22:45 -0600	[thread overview]
Message-ID: <1469200969-4643-1-git-send-email-sjg@chromium.org> (raw)

Sandbox is built with 64-bit ints by default. This doesn't work properly on
32-bit machines.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 board/sandbox/README.sandbox | 3 +++
 include/configs/sandbox.h    | 5 ++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/board/sandbox/README.sandbox b/board/sandbox/README.sandbox
index 9fe3bf1..ed820d3 100644
--- a/board/sandbox/README.sandbox
+++ b/board/sandbox/README.sandbox
@@ -44,6 +44,9 @@ Note:
       make sandbox_defconfig all NO_SDL=1
       ./u-boot
 
+   If you are building on a 32-bit machine you may get errors from __ffs.h
+   about shifting more than the machine word size. Edit the config file
+   include/configs/sandbox.h and change CONFIG_SANDBOX_BITS_PER_LONG to 32.
 
 U-Boot will start on your computer, showing a sandbox emulation of the serial
 console:
diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h
index 4de89f8..197d8bb 100644
--- a/include/configs/sandbox.h
+++ b/include/configs/sandbox.h
@@ -27,7 +27,10 @@
 
 #define CONFIG_SYS_STDIO_DEREGISTER
 
-/* Number of bits in a C 'long' on this architecture */
+/*
+ * Number of bits in a C 'long' on this architecture. Set this to 32 when
+ * building on a 32-bit machine.
+ */
 #define CONFIG_SANDBOX_BITS_PER_LONG	64
 
 #define CONFIG_LMB
-- 
2.8.0.rc3.226.g39d4020

             reply	other threads:[~2016-07-22 15:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-22 15:22 Simon Glass [this message]
2016-07-22 15:22 ` [U-Boot] [PATCH 2/5] lzmadec: Use the same type as the lzma call Simon Glass
2016-07-22 22:04   ` Tom Rini
2016-07-26  2:32   ` [U-Boot] [U-Boot, " Tom Rini
2016-07-22 15:22 ` [U-Boot] [PATCH 3/5] part_efi: Fix compiler warning on 32-bit sandbox Simon Glass
2016-07-22 22:05   ` Tom Rini
2016-07-26  2:32   ` [U-Boot] [U-Boot, " Tom Rini
2016-07-22 15:22 ` [U-Boot] [PATCH 4/5] hashtable: " Simon Glass
2016-07-22 22:05   ` Tom Rini
2016-07-26  2:32   ` [U-Boot] [U-Boot, " Tom Rini
2016-07-22 15:22 ` [U-Boot] [PATCH 5/5] dtoc: Correct the type widening code in fdt_fallback Simon Glass
2016-07-22 22:05   ` Tom Rini
2016-07-26  2:33   ` [U-Boot] [U-Boot, " Tom Rini
2016-07-22 22:04 ` [U-Boot] [PATCH 1/5] sandbox: Add instructions about building on 32-bit machines Tom Rini
2016-07-26  2:32 ` [U-Boot] [U-Boot, " Tom Rini

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=1469200969-4643-1-git-send-email-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /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