Remove shell from uloader

We no longer provide a shell in the uloader so let's remove it. This
required some refactoring because the core logic of our uloader was
enabled by CONFIG_CMD_BOOTB which depends on a shell and therefore can
no longer be enabled. CONFIG_CMD_BOOTB turned out to be a misnomer
anyway because it does not implement a bootb command. Going forward,
arch/arm/lib/bootb.c is compiled in if CONFIG_COMCERTO_ULOADER is set.

Change-Id: I62c0dea49fdf1f215340649fdac8f3ac95c514b2
diff --git a/arch/arm/configs/optimus_uloader_defconfig b/arch/arm/configs/optimus_uloader_defconfig
index 902ecbf..350aeac 100644
--- a/arch/arm/configs/optimus_uloader_defconfig
+++ b/arch/arm/configs/optimus_uloader_defconfig
@@ -2,7 +2,6 @@
 CONFIG_M86297=y
 # CONFIG_CMD_ARM_CPUINFO is not set
 # CONFIG_ARM_EXCEPTIONS is not set
-# CONFIG_CMD_MEMORY is not set
 CONFIG_TEXT_BASE=0x83000000
 CONFIG_MEMORY_LAYOUT_FIXED=y
 CONFIG_STACK_BASE=0x8300c000
@@ -11,40 +10,10 @@
 CONFIG_MALLOC_SIZE=0x2C00
 CONFIG_EXPERIMENTAL=y
 CONFIG_PROMPT="uLoader >"
-CONFIG_SHELL_SIMPLE=y
+CONFIG_SHELL_NONE=y
 CONFIG_MEM_SIZE=y
 # CONFIG_TIMESTAMP is not set
 # CONFIG_DEFAULT_ENVIRONMENT is not set
-# CONFIG_CMD_TRUE is not set
-# CONFIG_CMD_FALSE is not set
-# CONFIG_CMD_LS is not set
-# CONFIG_CMD_RM is not set
-# CONFIG_CMD_CAT is not set
-# CONFIG_CMD_MKDIR is not set
-# CONFIG_CMD_RMDIR is not set
-# CONFIG_CMD_CP is not set
-# CONFIG_CMD_PWD is not set
-# CONFIG_CMD_CD is not set
-# CONFIG_CMD_MOUNT is not set
-# CONFIG_CMD_UMOUNT is not set
-# CONFIG_CMD_NOR is not set
-# CONFIG_CMD_UPDATE_SPI is not set
-# CONFIG_CMD_UPDATE_FAST_SPI is not set
-# CONFIG_CMD_UPDATE_I2C is not set
-# CONFIG_CMD_COPY is not set
-# CONFIG_CMD_CLEAR is not set
-# CONFIG_CMD_ECHO is not set
-# CONFIG_CMD_BOOTM is not set
-# CONFIG_CMD_BOOTZ is not set
-# CONFIG_CMD_BOOTU is not set
-# CONFIG_CMD_VERSION is not set
-# CONFIG_CMD_HELP is not set
-# CONFIG_CMD_DEVINFO is not set
-# CONFIG_CMD_SOCINFO is not set
-# CONFIG_CMD_GEMAC_STATS is not set
-# CONFIG_CMD_PFE_STATS is not set
-# CONFIG_CMD_PFE_COMMANDS is not set
-# CONFIG_CMD_FRBUTTON is not set
 # CONFIG_SPI is not set
 # CONFIG_OTP is not set
 CONFIG_DRIVER_OTP=y
diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile
index edce51d..bf2be68 100644
--- a/arch/arm/lib/Makefile
+++ b/arch/arm/lib/Makefile
@@ -2,7 +2,7 @@
 obj-$(CONFIG_CMD_BOOTM)	+= bootm.o
 obj-$(CONFIG_CMD_BOOTZ)	+= bootz.o
 obj-$(CONFIG_CMD_BOOTU)	+= bootu.o
-obj-$(CONFIG_CMD_BOOTB)	+= bootb.o
+obj-$(CONFIG_COMCERTO_ULOADER)	+= bootb.o
 obj-y	+= div0.o
 obj-y	+= findbit.o
 obj-y	+= arm.o
diff --git a/arch/arm/lib/bootb.c b/arch/arm/lib/bootb.c
index 4eddf1d..3ff3c5e 100644
--- a/arch/arm/lib/bootb.c
+++ b/arch/arm/lib/bootb.c
@@ -85,7 +85,7 @@
 	while (1);
 }
 
-#ifdef CONFIG_CMD_BOOTB_UART_DOWNLOAD
+#ifdef CONFIG_COMCERTO_ULOADER_UART_DOWNLOAD
 static int getcxmodem(void)
 {
 	if (tstc())
@@ -119,13 +119,13 @@
 
 	return 0;
 }
-#else /* CONFIG_CMD_BOOTB_UART_DOWNLOAD */
+#else /* CONFIG_COMCERTO_ULOADER_UART_DOWNLOAD */
 static int load_serial_ymodem(void *dst)
 {
 	printf("YMODEM download not supported\n");
 	return -1;
 }
-#endif /* CONFIG_CMD_BOOTB_UART_DOWNLOAD */
+#endif /* CONFIG_COMCERTO_ULOADER_UART_DOWNLOAD */
 
 static int _verify_image(u8 *image_ptr, u32 max_image_len) {
 	sha1_context ctx;
diff --git a/arch/arm/mach-comcerto/Kconfig b/arch/arm/mach-comcerto/Kconfig
index e9cca32..524b993 100644
--- a/arch/arm/mach-comcerto/Kconfig
+++ b/arch/arm/mach-comcerto/Kconfig
@@ -91,6 +91,7 @@
 	select COMCERTO_NAND if !MACH_COMCERTO_C2K_RTSM
 #       select COMCERTO_DDR_ECC if !MACH_COMCERTO_C2K_RTSM
 #	select COMCERTO_DDR_TRAINING if !MACH_COMCERTO_C2K_RTSM
+	select HAVE_NOSHELL
 	help
 
 config COMCERTO_NAND_ULOADER
@@ -99,12 +100,22 @@
 	select COMCERTO_DDR if !MACH_COMCERTO_C2K_RTSM
 	select COMCERTO_NAND if !MACH_COMCERTO_C2K_RTSM
 #       select COMCERTO_DDR_ECC if !MACH_COMCERTO_C2K_RTSM
+	select HAVE_NOSHELL
 	help
 
 endchoice
 
 endmenu
 
+config COMCERTO_ULOADER_UART_DOWNLOAD
+	default n
+	tristate
+	select CRC16
+	depends on COMCERTO_ULOADER
+	prompt "Allow loading Barebox over UART"
+	help
+	  If uloader has been loaded over UART, load Barebox over UART.
+
 config COMCERTO_PLL
 	bool
 
diff --git a/commands/Kconfig b/commands/Kconfig
index 98f6b7b..1bef9f2 100644
--- a/commands/Kconfig
+++ b/commands/Kconfig
@@ -336,23 +336,6 @@
 	tristate
 	prompt "go"
 
-config CMD_BOOTB
-	default y
-	tristate
-	depends on (COMCERTO_ULOADER || COMCERTO_NAND_ULOADER)
-	prompt "Boot Barebox"
-	help
-	  compile in the 'bootb' command to start Barebox
-
-config CMD_BOOTB_UART_DOWNLOAD
-	default n
-	tristate
-	select CRC16
-	depends on CMD_BOOTB
-	prompt "Allow loading Barebox over UART"
-	help
-	  If uloader has been loaded over UART, load Barebox over UART.
-
 config CMD_OTP_KEY
 	tristate
 	depends on DRIVER_OTP
diff --git a/commands/Makefile b/commands/Makefile
index 15519d2..8adc77c 100644
--- a/commands/Makefile
+++ b/commands/Makefile
@@ -1,5 +1,5 @@
 obj-$(CONFIG_CMD_BOOTM)		+= bootm.o
-obj-$(CONFIG_CMD_BOOTB_UART_DOWNLOAD)	+= xyzModem.o
+obj-$(CONFIG_COMCERTO_ULOADER_UART_DOWNLOAD)	+= xyzModem.o
 obj-$(CONFIG_CMD_LINUX16)	+= linux16.o
 obj-$(CONFIG_CMD_LOADB)		+= loadb.o xyzModem.o
 obj-$(CONFIG_CMD_LOADY)		+= loadb.o xyzModem.o