Merge with /home/mk/8-benq/u-boot
diff --git a/CHANGELOG b/CHANGELOG
index c479e5d..561558d 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,11 @@
 Changes since U-Boot 1.1.4:
 ======================================================================
 
+* Declare load_serial_ymodem() when using CFG_CMD_LOADB.
+  Patch by Jon Loeliger, 01. May 2006
+
+* Fixed handling of bad checksums with "mkimage -l"
+
 * Added support for BC3450 board
   Patch by Stefan Strobl, 21. Oct 2005
 
diff --git a/common/cmd_load.c b/common/cmd_load.c
index 2432ee2..f63b8e8 100644
--- a/common/cmd_load.c
+++ b/common/cmd_load.c
@@ -33,9 +33,12 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
+#if (CONFIG_COMMANDS & CFG_CMD_LOADB)
+static ulong load_serial_ymodem (ulong offset);
+#endif
+
 #if (CONFIG_COMMANDS & CFG_CMD_LOADS)
 static ulong load_serial (ulong offset);
-static ulong load_serial_ymodem (ulong offset);
 static int read_record (char *buf, ulong len);
 # if (CONFIG_COMMANDS & CFG_CMD_SAVES)
 static int save_serial (ulong offset, ulong size);
diff --git a/tools/mkimage.c b/tools/mkimage.c
index 5222bb2..fea3e5b 100644
--- a/tools/mkimage.c
+++ b/tools/mkimage.c
@@ -277,7 +277,8 @@
 	 */
 	if (xflag) {
 		if (ep != addr + sizeof(image_header_t)) {
-			fprintf (stderr, "%s: For XIP, the entry point must be the load addr + %lu\n",
+			fprintf (stderr,
+				"%s: For XIP, the entry point must be the load addr + %lu\n",
 				cmdname,
 				(unsigned long)sizeof(image_header_t));
 			exit (EXIT_FAILURE);
@@ -347,8 +348,9 @@
 
 		if (crc32 (0, data, len) != checksum) {
 			fprintf (stderr,
-				"*** Warning: \"%s\" has bad header checksum!\n",
-				imagefile);
+				"%s: ERROR: \"%s\" has bad header checksum!\n",
+				cmdname, imagefile);
+			exit (EXIT_FAILURE);
 		}
 
 		data = (char *)(ptr + sizeof(image_header_t));
@@ -356,8 +358,9 @@
 
 		if (crc32 (0, data, len) != ntohl(hdr->ih_dcrc)) {
 			fprintf (stderr,
-				"*** Warning: \"%s\" has corrupted data!\n",
-				imagefile);
+				"%s: ERROR: \"%s\" has corrupted data!\n",
+				cmdname, imagefile);
+			exit (EXIT_FAILURE);
 		}
 
 		/* for multi-file images we need the data part, too */