diff mbox

[U-Boot,1/5] sandbox: Add instructions about building on 32-bit machines

Message ID 1469200969-4643-1-git-send-email-sjg@chromium.org
State Accepted
Commit 5923c843ba0e06a90e0c0c5cc6894ac8641377e1
Delegated to: Tom Rini
Headers show

Commit Message

Simon Glass July 22, 2016, 3:22 p.m. UTC
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(-)

Comments

Tom Rini July 22, 2016, 10:04 p.m. UTC | #1
On Fri, Jul 22, 2016 at 09:22:45AM -0600, Simon Glass wrote:

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

Reviewed-by: Tom Rini <trini@konsulko.com>
Tom Rini July 26, 2016, 2:32 a.m. UTC | #2
On Fri, Jul 22, 2016 at 09:22:45AM -0600, Simon Glass wrote:

> 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>
> Reviewed-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

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