[U-Boot-Users] [PATCH] CFG_UNCOMPRESSED_LEN

Rodolfo Giometti giometti at linux.it
Wed Dec 14 19:44:10 CET 2005


Hello.

Here a simple patch who adds a new configuration parameter. I found it
useful, hope the same for you. :)

Rodolfo

-- 

GNU/Linux Solutions                  e-mail:    giometti at enneenne.com
Linux Device Driver                             giometti at gnudd.com
Embedded Systems                     		giometti at linux.it
UNIX programming                     phone:     +39 349 2432127
-------------- next part --------------
Index: README
===================================================================
RCS file: /home/develop/cvs_private/uboot-mips-exadron/README,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 README
--- a/README	16 Sep 2005 12:14:07 -0000	1.1.1.1
+++ b/README	14 Dec 2005 14:19:00 -0000
@@ -1675,6 +1675,9 @@
 - CFG_MALLOC_LEN:
 		Size of DRAM reserved for malloc() use.
 
+- CFG_UNCOMPRESSED_LEN:
+		Max size in bytes of uncompressed image (default is 4MB).
+
 - CFG_BOOTMAPSZ:
 		Maximum size of memory mapped by the startup code of
 		the Linux kernel; all data that must be processed by
Index: common/cmd_bootm.c
===================================================================
RCS file: /home/develop/cvs_private/uboot-mips-exadron/common/cmd_bootm.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 cmd_bootm.c
--- a/common/cmd_bootm.c	16 Sep 2005 12:14:18 -0000	1.1.1.1
+++ b/common/cmd_bootm.c	14 Dec 2005 14:19:00 -0000
@@ -140,13 +140,17 @@
 
 ulong load_addr = CFG_LOAD_ADDR;		/* Default Load Address */
 
+#ifndef CFG_UNCOMPRESSED_LEN
+#define CFG_UNCOMPRESSED_LEN	0x400000
+#endif
+
 int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 {
 	ulong	iflag;
 	ulong	addr;
 	ulong	data, len, checksum;
 	ulong  *len_ptr;
-	uint	unc_len = 0x400000;
+	uint	unc_len = CFG_UNCOMPRESSED_LEN;
 	int	i, verify;
 	char	*name, *s;
 	int	(*appl)(int, char *[]);


More information about the U-Boot mailing list