[U-Boot-Users] [PATCH 2/2 V2] qemu-mips: add full functionnalty and support of CONFIG_SMALLEST

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Mon Apr 21 19:48:14 CEST 2008


add support of :
#define CONFIG_CMD_ASKENV
#define CONFIG_CMD_LOADS
#define CONFIG_CMD_LOADB
#define CONFIG_CMD_PING
#define CONFIG_CMD_CDP
#define CONFIG_CMD_SAVES
#define CONFIG_CMD_SETEXPR

and keep only :
tftp and dhcp support when CONFIG_SMALLEST is active

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
 Makefile                    |    5 +++++
 include/configs/qemu-mips.h |   16 +++++++++++++++-
 2 files changed, 20 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index ab56831..202ddd9 100644
--- a/Makefile
+++ b/Makefile
@@ -2720,9 +2720,14 @@ gth2_config:	unconfig
 	@echo "#define CONFIG_GTH2 1" >$(obj)include/config.h
 	@$(MKCONFIG) -a gth2 mips mips gth2
 
+qemu_mips_smallest_config	\
 qemu_mips_config: unconfig
 	@mkdir -p $(obj)include
 	@echo "#define CONFIG_QEMU_MIPS 1" >$(obj)include/config.h
+	@[ -z "$(findstring _smallest_,$@)" ] || \
+		{ echo "#define CONFIG_SMALLEST 1" >>$(obj)include/config.h ; \
+		  $(XECHO) "... config with the minimal functionalities" ; \
+		}
 	@$(MKCONFIG) -a qemu-mips mips mips qemu-mips
 
 #########################################################################
diff --git a/include/configs/qemu-mips.h b/include/configs/qemu-mips.h
index b775714..6a15413 100644
--- a/include/configs/qemu-mips.h
+++ b/include/configs/qemu-mips.h
@@ -71,10 +71,20 @@
 #include <config_cmd_default.h>
 
 #define CONFIG_CMD_ELF
+#ifndef CONFIG_SMALLEST
+#define CONFIG_CMD_ASKENV
 #define CONFIG_CMD_FAT
 #define CONFIG_CMD_EXT2
-#undef	CONFIG_CMD_LOADB
+#define CONFIG_CMD_PING
+#define CONFIG_CMD_CDP
+#define CONFIG_CMD_SAVES
+#define CONFIG_CMD_SETEXPR
+#else
 #undef	CONFIG_CMD_LOADS
+#undef	CONFIG_CMD_LOADB
+#undef	CONFIG_CMD_NFS
+#endif
+#undef	CONFIG_CMD_FPGA
 #define CONFIG_CMD_DHCP
 
 #define CONFIG_DRIVER_NE2000
@@ -87,6 +97,7 @@
 #define CFG_NS16550_COM1	(0xb40003f8)
 #define CONFIG_CONS_INDEX	1
 
+#ifndef CONFIG_SMALLEST
 #define CONFIG_CMD_IDE
 #define CONFIG_DOS_PARTITION
 
@@ -103,13 +114,16 @@
  * Miscellaneous configurable options
  */
 #define	CFG_LONGHELP				/* undef to save memory */
+#endif
 
 #define	CFG_PROMPT		"qemu-mips # "	/* Monitor Command Prompt */
 
+#ifndef CONFIG_SMALLEST
 #define CONFIG_AUTO_COMPLETE
 #define CONFIG_CMDLINE_EDITING
 #define CFG_HUSH_PARSER
 #define CFG_PROMPT_HUSH_PS2	"> "
+#endif
 
 #define	CFG_CBSIZE		256		/* Console I/O Buffer Size */
 #define	CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16)	/* Print Buffer Size */
-- 
1.5.4.5





More information about the U-Boot mailing list