[OpenBIOS] [PATCH] libopenbios: fix build for platforms without fw_cfg interface
Mark Cave-Ayland
mark.cave-ayland at ilande.co.uk
Sun Jun 18 08:35:00 CEST 2017
Commit 7130437 "fw_cfg: implement fw-cfg-read-file Forth word" added a binding
for the Forth version of fw_cfg_read_file() into libopenbios/init.c but forgot
to only include the binding when CONFIG_DRIVER_FW_CFG was defined.
This broke the build for platforms which don't have the fw_cfg interface
enabled by default such as x86.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>
---
libopenbios/init.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libopenbios/init.c b/libopenbios/init.c
index aa99608..e08df19 100644
--- a/libopenbios/init.c
+++ b/libopenbios/init.c
@@ -28,8 +28,10 @@ openbios_init( void )
PUSH(pointer2cell((void *)&__context));
feval("['] __context cell+ !");
+#if defined(CONFIG_DRIVER_FW_CFG)
// Bind the Forth fw_cfg file interface
bind_func("fw-cfg-read-file", forth_fw_cfg_read_file);
+#endif
// Bind the C implementation of (init-program) into Forth
bind_func("(init-program)", init_program);
--
1.7.10.4
More information about the OpenBIOS
mailing list