[PATCH 3/3] sandbox: work around missing of_add_memory_bank()

Holger Schurig holgerschurig at gmail.com
Tue Jul 22 00:57:22 PDT 2014


From: Holger Schurig <holgerschurig at gmail.com>

The goal of "make ARCH=sandbox allyesconfig && make all" is not to
generate a sensible barebox that you'd use. The goal is to create
as much code coverage as possible, so that you see compiler warnings
are can send barebox throught a static checker.

Therefore this simple band-aid to compile drivers/of/base.c wouldn't
create a working device tree implementation, but it will compile.

Signed-off-by: Holger Schurig <holgerschurig at gmail.com>
---
 drivers/of/base.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/of/base.c b/drivers/of/base.c
index c440a69..69d9b09 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -1713,8 +1713,10 @@ int of_add_memory(struct device_node *node, bool dump)
 			continue;
 		}
 
+#ifndef CONFIG_SANDBOX
 		of_add_memory_bank(node, dump, n,
 				res.start, resource_size(&res));
+#endif
 		n++;
 	}
 
-- 
1.8.5.2




More information about the barebox mailing list