u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/5] sandbox: Add instructions about building on 32-bit machines
@ 2016-07-22 15:22 Simon Glass
  2016-07-22 15:22 ` [U-Boot] [PATCH 2/5] lzmadec: Use the same type as the lzma call Simon Glass
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Simon Glass @ 2016-07-22 15:22 UTC (permalink / raw)
  To: u-boot

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

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

end of thread, other threads:[~2016-07-26  2:33 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-22 15:22 [U-Boot] [PATCH 1/5] sandbox: Add instructions about building on 32-bit machines Simon Glass
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).