Skip to contentSkip to conversation

Refresh LZMA-lib to 4.65

PATCH New Luigi 'Comio' Mantellini 6 participants 13 messages Jul 7, 2009 – Jul 21, 2009 3 messages not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Refresh LZMA-lib to 4.65

From: Luigi 'Comio' Mantellini <[email protected]>

---
 common/cmd_bootm.c                 |    5 +-
 include/lzma/LzmaDec.h             |   31 +
 include/lzma/LzmaDecode.h          |   31 -
 include/lzma/LzmaTools.h           |    2 +-
 include/lzma/LzmaTypes.h           |   15 +-
 lib_generic/lzma/LGPL.txt          |  502 --------------
 lib_generic/lzma/LzmaDec.c         | 1007 +++++++++++++++++++++++++++++
 lib_generic/lzma/LzmaDec.h         |  223 +++++++
 lib_generic/lzma/LzmaDecode.c      |  584 -----------------
 lib_generic/lzma/LzmaDecode.h      |  113 ----
 lib_generic/lzma/LzmaTools.c       |  164 +++---
 lib_generic/lzma/LzmaTools.h       |    4 +-
 lib_generic/lzma/LzmaTypes.h       |   45 --
 lib_generic/lzma/Makefile          |    4 +-
 lib_generic/lzma/README.txt        |    8 +-
 lib_generic/lzma/Types.h           |  208 ++++++
 lib_generic/lzma/history.txt       |  434 +++++++------
 lib_generic/lzma/import_lzmasdk.sh |    8 +-
 lib_generic/lzma/lzma.txt          | 1257 +++++++++++++++++-------------------
 19 files changed, 2398 insertions(+), 2247 deletions(-)
 create mode 100644 include/lzma/LzmaDec.h
 delete mode 100644 include/lzma/LzmaDecode.h
 delete mode 100644 lib_generic/lzma/LGPL.txt
 create mode 100644 lib_generic/lzma/LzmaDec.c
 create mode 100644 lib_generic/lzma/LzmaDec.h
 delete mode 100644 lib_generic/lzma/LzmaDecode.c
 delete mode 100644 lib_generic/lzma/LzmaDecode.h
 delete mode 100644 lib_generic/lzma/LzmaTypes.h
 create mode 100644 lib_generic/lzma/Types.h
common/cmd_bootm.c +2 -3
index 367d5a7..5d5dd33 100644
@@ -52,9 +52,8 @@
 #endif
 
 #ifdef CONFIG_LZMA
-#define _7ZIP_BYTE_DEFINED /* Byte already defined by zlib */
 #include <lzma/LzmaTypes.h>
-#include <lzma/LzmaDecode.h>
+#include <lzma/LzmaDec.h>
 #include <lzma/LzmaTools.h>
 #endif /* CONFIG_LZMA */
 
@@ -390,7 +389,7 @@ static int bootm_load_os(image_info_t os, ulong *load_end, int boot_progress)
 		int ret = lzmaBuffToBuffDecompress(
 			(unsigned char *)load, &unc_len,
 			(unsigned char *)image_start, image_len);
-		if (ret != LZMA_RESULT_OK) {
+		if (ret != SZ_OK) {
 			printf ("LZMA: uncompress or overwrite error %d "
 				"- must RESET board to recover\n", ret);
 			show_boot_progress (-6);
include/lzma/LzmaDec.h new file +31 -0
new file mode 100644
index 0000000..967cdd1
@@ -0,0 +1,31 @@
+/*
+ * Fake include for LzmaDec.h
+ *
+ * Copyright (C) 2007-2009 Industrie Dial Face S.p.A.
+ * Luigi 'Comio' Mantellini (luigi.mantellini at idf-hit.com)
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef __LZMADEC_H__FAKE__
+#define __LZMADEC_H__FAKE__
+
+#include "../../lib_generic/lzma/LzmaDec.h"
+
+#endif
include/lzma/LzmaDecode.h deleted +0 -31
deleted file mode 100644
index 8fdb2c0..0000000
@@ -1,31 +0,0 @@
-/*
- * Fake include for LzmaDecode.h
- *
- * Copyright (C) 2007-2008 Industrie Dial Face S.p.A.
- * Luigi 'Comio' Mantellini (luigi.mantellini at idf-hit.com)
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#ifndef __LZMADECODE_H__FAKE__
-#define __LZMADECODE_H__FAKE__
-
-#include "../../lib_generic/lzma/LzmaDecode.h"
-
-#endif
include/lzma/LzmaTools.h +1 -1
index 7c5eea1..87943c0 100644
@@ -1,7 +1,7 @@
 /*
  * Fake include for LzmaTools.h
  *
- * Copyright (C) 2007-2008 Industrie Dial Face S.p.A.
+ * Copyright (C) 2007-2009 Industrie Dial Face S.p.A.
  * Luigi 'Comio' Mantellini (luigi.mantellini at idf-hit.com)
  *
  * See file CREDITS for list of people who contributed to this
include/lzma/LzmaTypes.h +10 -5
index 02daa59..86160a4 100644
@@ -1,7 +1,7 @@
 /*
- * Fake include for LzmaTypes.h
+ * Fake include for Types.h
  *
- * Copyright (C) 2007-2008 Industrie Dial Face S.p.A.
+ * Copyright (C) 2007-2009 Industrie Dial Face S.p.A.
  * Luigi 'Comio' Mantellini (luigi.mantellini at idf-hit.com)
  *
  * See file CREDITS for list of people who contributed to this
@@ -23,9 +23,14 @@
  * MA 02111-1307 USA
  */
 
-#ifndef __LZMATYPES_H__FAKE__
-#define __LZMATYPES_H__FAKE__
+#ifndef __TYPES_H__FAKE__
+#define __TYPES_H__FAKE__
 
-#include "../../lib_generic/lzma/LzmaTypes.h"
+/*
+ *This avoids the collition with zlib.h Byte definition
+ */
+#define Byte LZByte
+
+#include "../../lib_generic/lzma/Types.h"
 
 #endif
lib_generic/lzma/LGPL.txt deleted +0 -502

502 lines not on this page · raw message

lib_generic/lzma/LzmaDec.c new file +1007 -0

1,007 lines not on this page · raw message

lib_generic/lzma/LzmaDec.h new file +223 -0

223 lines not on this page · raw message

lib_generic/lzma/LzmaDecode.c deleted +0 -584

584 lines not on this page · raw message

lib_generic/lzma/LzmaDecode.h deleted +0 -113

113 lines not on this page · raw message

lib_generic/lzma/LzmaTools.c +74 -90

184 lines not on this page · raw message

lib_generic/lzma/LzmaTools.h +2 -2
index c91fb89..2db80fc 100644
@@ -1,5 +1,5 @@
 /*
- * Usefuls routines based on the LzmaTest.c file from LZMA SDK 4.57
+ * Usefuls routines based on the LzmaTest.c file from LZMA SDK 4.65
  *
  * Copyright (C) 2007-2008 Industrie Dial Face S.p.A.
  * Luigi 'Comio' Mantellini (luigi.mantellini at idf-hit.com)
@@ -28,7 +28,7 @@
 #ifndef __LZMA_TOOL_H__
 #define __LZMA_TOOL_H__
 
-#include "LzmaTypes.h"
+#include <lzma/LzmaTypes.h>
 
 extern int lzmaBuffToBuffDecompress (unsigned char *outStream, SizeT *uncompressedSize,
 			      unsigned char *inStream,  SizeT  length);
lib_generic/lzma/LzmaTypes.h deleted +0 -45

45 lines not on this page · raw message

lib_generic/lzma/Makefile +3 -1
index 3400cd9..2916f21 100644
@@ -30,7 +30,9 @@ LIB	= $(obj)liblzma.a
 
 SOBJS	=
 
-COBJS-$(CONFIG_LZMA) += LzmaDecode.o LzmaTools.o
+CFLAGS += -D_LZMA_PROB32 -I$(TOPDIR)/include/linux
+
+COBJS-$(CONFIG_LZMA) += LzmaDec.o LzmaTools.o
 
 COBJS	= $(COBJS-y)
 SRCS 	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
lib_generic/lzma/README.txt +4 -4
index fdb3086..23a9be2 100644
@@ -7,14 +7,14 @@ Author:         Igor Pavlov
 The import is made using the import_lzmasdk.sh script that:
 
 * untars the lzmaXYY.tar.bz2 file (from the download web page)
-* copies the files LzmaDecode.h, LzmaTypes.h, LzmaDecode.c, history.txt,
-  LGPL.txt, and lzma.txt from source archive into the lib_lzma directory (pwd).
+* copies the files LzmaDec.h, Types.h, LzmaDec.c, history.txt,
+  and lzma.txt from source archive into the lib_lzma directory (pwd).
 
 Example:
 
- ./import_lzmasdk.sh ~/lzma457.tar.bz2
+ . import_lzmasdk.sh ~/lzma465.tar.bz2
 
-Notice: The files from lzma sdk are not _modified_ by this script!
+Notice: The files from lzma sdk are _not modified_ by this script!
 
 The files LzmaTools.{c,h} are provided to export the lzmaBuffToBuffDecompress()
 function that wraps the complex LzmaDecode() function from the LZMA SDK. The
lib_generic/lzma/Types.h new file +208 -0

186 lines not on this page · raw message

lib_generic/lzma/history.txt +236 -198

434 lines not on this page · raw message

lib_generic/lzma/import_lzmasdk.sh +3 -5
index 5212e48..1e0f686 100644

Lines of this file are not shown. View the raw message.

lib_generic/lzma/lzma.txt +594 -663

1,257 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
1.6.0.4

Part of the diff is not shown here. View the raw message.

#1 lore raw

PATCH 1/1 Refresh LZMA-lib to 4.65

Quoted 24 lines · Luigi 'Comio' Mantellini

From: Luigi 'Comio' Mantellini <[email protected]>

---
 common/cmd_bootm.c                 |    5 +-
 include/lzma/LzmaDec.h             |   31 +
 include/lzma/LzmaDecode.h          |   31 -
 include/lzma/LzmaTools.h           |    2 +-
 include/lzma/LzmaTypes.h           |   15 +-
 lib_generic/lzma/LGPL.txt          |  502 --------------
 lib_generic/lzma/LzmaDec.c         | 1007 +++++++++++++++++++++++++++++
 lib_generic/lzma/LzmaDec.h         |  223 +++++++
 lib_generic/lzma/LzmaDecode.c      |  584 -----------------
 lib_generic/lzma/LzmaDecode.h      |  113 ----
 lib_generic/lzma/LzmaTools.c       |  164 +++---
 lib_generic/lzma/LzmaTools.h       |    4 +-
 lib_generic/lzma/LzmaTypes.h       |   45 --
 lib_generic/lzma/Makefile          |    4 +-
 lib_generic/lzma/README.txt        |    8 +-
 lib_generic/lzma/Types.h           |  208 ++++++
 lib_generic/lzma/history.txt       |  434 +++++++------
 lib_generic/lzma/import_lzmasdk.sh |    8 +-
 lib_generic/lzma/lzma.txt          | 1257 +++++++++++++++++-------------------
 19 files changed, 2398 insertions(+), 2247 deletions(-)
 create mode 100644 include/lzma/LzmaDec.h
Quoted 8 lines
 delete mode 100644 include/lzma/LzmaDecode.h
 delete mode 100644 lib_generic/lzma/LGPL.txt
 create mode 100644 lib_generic/lzma/LzmaDec.c
 create mode 100644 lib_generic/lzma/LzmaDec.h
 delete mode 100644 lib_generic/lzma/LzmaDecode.c
 delete mode 100644 lib_generic/lzma/LzmaDecode.h
 delete mode 100644 lib_generic/lzma/LzmaTypes.h
 create mode 100644 lib_generic/lzma/Types.h

can we use the kernel implementation which is smaller IIRC

Best Regards,
J.

#2 lore raw

PATCH 1/1 Refresh LZMA-lib to 4.65

In reply to Luigi 'Comio' Mantellini
Quoted 8 lines · Luigi 'Comio' Mantellini
---
 common/cmd_bootm.c                 |    5 +-
 include/lzma/LzmaDec.h             |   31 +
 include/lzma/LzmaDecode.h          |   31 -
 include/lzma/LzmaTools.h           |    2 +-
 include/lzma/LzmaTypes.h           |   15 +-
 lib_generic/lzma/LGPL.txt          |  502 --------------
 lib_generic/lzma/LzmaDec.c         | 1007 +++++++++++++++++++++++++++++

Hi,

I tried your code and it could decompress a LZMA-compressed kernel, very nice. I had to add some WATCHDOG_RESET() calls to LzmaDec.c because my device has a slow mpc823 CPU.
However booting does not continue and I do not know why.

Quoted 11 lines

Un-Protected 63 sectors
## Booting kernel from Legacy Image at 00500000 ...

   Image Name:   Linux LZMA
   Image Type:   PowerPC Linux Kernel Image (lzma compressed)
   Data Size:    589824 Bytes = 576 kB

Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
ERROR: Failed to allocate 0x200 bytes below 0x800000. ERROR with allocation of cmdline

After this the device reboots.

Attached you will find the config used to compile U-Boot.
I started with CONFIG_SYS_LOAD_ADDR 0x200000 and increased it to 0x500000, but it did not help. I suppose decompressing a LZMA-compressed kernel takes more RAM, my box has 64MB which I think should be enough. The decompression should work with 32MB RAM as well as this is the standard amount.

I am not an expert when it comes to handling a Linux kernel at boot time so pointing to lots of howto's is appreciated ;)

Cheers, rhabarber1848

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dbox2.h
Type: text/x-objchdr
Size: 19996 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090715/d8fb1599/attachment.bin

#3 lore raw

PATCH 1/1 Refresh LZMA-lib to 4.65

Hi,

the same boot screen with #define DEBUG

Quoted 9 lines

Un-Protecting sectors 8..70 in bank 1 ............................................................... done Un-Protected 63 sectors
## Current stack ends at 0x03fa87e8
* kernel: default image load address = 0x01000000
## Booting kernel from Legacy Image at 01000000 ...

   Image Name:   Linux LZMA
   Image Type:   PowerPC Linux Kernel Image (lzma compressed)
   Data Size:    589824 Bytes = 576 kB
Quoted 7 lines

Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
kernel data at 0x01000040, len = 0x00090000 (589824)
## No init Ramdisk
ramdisk start = 0x00000000, ramdisk end = 0x00000000 Uncompressing Kernel Image ... LZMA: Image address...............

0x1000040

Quoted 12 lines

LZMA: Properties address.......... 0x1000040
LZMA: Uncompressed size address... 0x1000045
LZMA: Compressed data address..... 0x100004d
LZMA: Destination address......... 0x0
LZMA: Uncompresed size............ 0x184e8c
LZMA: Compresed size.............. 0x8fffb
OK
kernel loaded at 0x00000000, end = 0x00800000
ERROR: Failed to allocate 0x200 bytes below 0x800000. ERROR with allocation of cmdline

## Control returned to monitor - resetting...

#4 lore raw

PATCH 1/1 Refresh LZMA-lib to 4.65

Hi,

it seems I solved the problem.

before:

Quoted 2 lines
Quoted 2 lines
   kernel loaded at 0x00000000, end = 0x00800000

ERROR: Failed to allocate 0x200 bytes below 0x800000.

now:

Quoted 3 lines
   kernel loaded at 0x00000000, end = 0x00090000

## cmdline at 0x007ffe00 ... 0x007ffe99
## kernel board info at 0x007ffdc0

[...]

Quoted 3 lines

## Transferring control to Linux (at address 00000000) ...
Booting using board info...
Linux version 2.4.37.2-dbox2 (root at dbox2) (gcc version 3.4.6) #1 Di 14.

Jul 13:10:34 CEST 2009

The end value for the kernel was too high, the attached patch[1] should fix it, a LZMA-compressed kernel booted well. I did not test the bz2 case but it seems it suffers from the same bug.

Cheers, rhabarber1848

[1] Sorry, I do not use git here so I can not post the patch in git format.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: lzma_bootm.diff
Type: text/x-diff
Size: 604 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090715/d127249a/attachment.diff

#5 lore raw

PATCH 1/1 Refresh LZMA-lib to 4.65

Dear rhabarber1848,

Quoted 2 lines · In message <[email protected]> you wrote:

it seems I solved the problem.

Hm...

Quoted 3 lines

The end value for the kernel was too high, the attached patch[1] should fix it, a LZMA-compressed kernel booted well. I did not test the bz2 case but it seems it suffers from the same bug.

Maybe lzmaBuffToBuffDecompress() stores an incorrect value in unc_len?

Quoted 13 lines

diff -uNr u-boot-2009.06.org/common/cmd_bootm.c u-boot-2009.06/common/cmd_bootm.c

common/cmd_bootm.c +1 -1
@@ -380,7 +380,7 @@
 			return BOOTM_ERR_RESET;
 		}
 
-		*load_end = load + unc_len;
+		*load_end = load + image_len;
 		break;
 #endif /* CONFIG_BZIP2 */
 #ifdef CONFIG_LZMA

common/cmd_bootm.c line 399

Quoted 5 lines
common/cmd_bootm.c +1 -1
@@ -396,7 +396,7 @@
 			show_boot_progress (-6);
 			return BOOTM_ERR_RESET;
 		}
-		*load_end = load + unc_len;
+		*load_end = load + image_len;

This seems definitely wrong to me. image_len is the length of the _compressed_ image, which is not what we need here.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Wish not to seem, but to be, the best."                  - Aeschylus
#6 lore raw

PATCH 1/1 Refresh LZMA-lib to 4.65

Wolfgang Denk <[email protected]> wrote in news:20090716211129.E9241832E416 at gemini.denx.de:

Quoted 1 line

Maybe lzmaBuffToBuffDecompress() stores an incorrect value in unc_len?

Hi,

this is correct, the unpatched version of lib_generic/lzma/LzmaTools.c has this code in line 137:

*uncompressedSize = outProcessed;

I added the same code to the lzma465 patch and it works for me:

--- u-boot-2009.06.org/lib_generic/lzma/LzmaTools.c 2009-07-17
08:12:52.000000000 +0200
+++ u-boot-2009.06/lib_generic/lzma/LzmaTools.c 2009-07-17 08:15:37.000000000 +0200
@@ -116,6 +117,7 @@
outStream, &outProcessed,
inStream + LZMA_DATA_OFFSET, &compressedSize, inStream, LZMA_PROPS_SIZE, LZMA_FINISH_ANY, &state, &g_Alloc);

+    *uncompressedSize = outProcessed;
     if (res != SZ_OK)  {
         return res;
     }

Attached you will find a patch which also includes the watchdog stuff I need along with the formentioned patch. I do not know if all WATCHDOG_RESET() calls are really necessary but I have a 66 MHz CPU here which takes 12s to decompress a 550kb LZMA-compressed kernel.

Cheers, rhabarber1848

=ybegin line=128 size=3334 name=u-boot-2009.06_lzma_watchdog.diff ????JW?x?J?W????W\ZZcXZX???Y???????????Y????Yv???n??X?J?W????W\ZZcXZY???????????Y????Yv???n??X?4WWWJ?W????W\ZZcXZX???Y??????? ????Y????Yv???n??X?3\ZZcWZaW[aJZbd[\d_\XZZZZZZZZZJUZ\ZZ4UUUJ?W????W\ZZcXZY???????????Y????Yv???n??X?3\ZZcWZaW[aJZbd[]d\_XZZZZZZ ZZZJUZ\ZZ4jjJW[VJU[VcJjj4JYTJv???n??X?JWWJv?wkJn??????4J\ZZbW[[WZJdJs???Jz?????JdJz?????J??????JTY4J4UM???????Jf??????X?h4UM?? ?????Jf??????X?h4UM???????Jf????????X?h4JM???????JLv???n??X?L4J4JM???????Jf??????X?h4jjJW[_VJU[_cVcJjj4JJJs??]\J?????JgJ?Wh?? ???e4JJJs??]\J????JgJ?Wh????e4J4UM??J???????Rmyxpsq?r???k~mrnyqSJ??J???????Rmyxpsq??k~mrnyqS4U3?k~mrnyq?|o}o~RSe4UM?????4JJJ??4 JJJ?4JJJJJmv???z???JT????e4jjJW[aVJU[b\VcJjj4JJJJJJJ??JR?????JfJ?x??v??}?????S4JJJJJJJ?4JJJJJJJJJ??????JgJ[e4UM??J???????Rmyxp sq?r???k~mrnyqSJ??J???????Rmyxpsq??k~mrnyqS4U3?k~mrnyq?|o}o~RSe4UM?????4JJJJJJJJJ??J?Jqo~?ls~R????JUJ??????VJ??????SJ?J?????JR?? ????JfJZ?[ZZSe4JJJJJJJ?4JJJJJJJ????4jjJW[b]V`JU[c\VcJjj4JJJJJJJJJ????????J?????l???JgJ?Wh????R???z??JWJ???ZSJUJRR???z??JfJ???ZSJ iJ???l??}???JdJZS?e4JJJJJJJJJ????????J????JgJZ?[ZZe4JJJJJJJJJ??????JgJ[e4UM??J???????Rmyxpsq?r???k~mrnyqSJ??J???????Rmyxpsq??k~m rnyqS4U3?k~mrnyq?|o}o~RSe4UM?????4JJJJJJJJJ??4JJJJJJJJJ?4JJJJJJJJJJJ????????J???e4jjJW][VJU]\bVcJjj4JJJJJJJJJJJJJ?4JJJJJJJJJJJ JJJJs??]\J????JgJ[e4JJJJJJJJJJJJJJJ????????J?JgJ[e4UM??J???????Rmyxpsq?r???k~mrnyqSJ??J???????Rmyxpsq??k~mrnyqS4U3?k~mrnyq?|o}o ~RSe4UM?????4JJJJJJJJJJJJJJJ??4JJJJJJJJJJJJJJJ?4JJJJJJJJJJJJJJJJJqo~?ls~\R????JUJ?VJ?VJeJVJ????????J?gJ????Se4jjJW]\aV`JU]^\VcJj j4JJJJJJJJJJJ????4JJJJJJJJJJJ?4JJJJJJJJJJJJJ???n?????l???JWgJ?x??k????l???e4UM??J???????Rmyxpsq?r???k~mrnyqSJ??J???????Rmyxpsq?? k~mrnyqS4U3?k~mrnyq?|o}o~RSe4UM?????4JJJJJJJJJJJJJ??4JJJJJJJJJJJJJ?4JJJJJJJJJJJJJJJxy|wkvs?o4jjJW]ccV[\JU^[aV[bJjj4JJJJJJJJJJJ?? ???????J???JgJR?????????S???JWJR?????????S???z??e4JJJJJJJJJJJ?????Jl???JT???JgJ????JUJ???v??e4JJJJJJJJJJJ???z??JUgJ???v??e4UM??J ???????Rmyxpsq?r???k~mrnyqSJ??J???????Rmyxpsq??k~mrnyqS4U3?k~mrnyq?|o}o~RSe4UM?????4JJJJJJJJJJJ??4JJJJJJJJJJJJJTR????SJgJRl???ST R????JUJ???Se4JJJJJJJJJJJ?????JRUU????JKgJ???Se4JJJJJJJJJ?4JJJJJJJJJ????4JJJJJJJJJ?4UM??J???????Rmyxpsq?r???k~mrnyqSJ??J???????R myxpsq??k~mrnyqS4U3?k~mrnyq?|o}o~RSe4UM?????4JJJJJJJJJJJ??4JJJJJJJJJJJ?4JJJJJJJJJJJJJ???????z??UU?JgJ????????e4jjJW^[aV`JU^^[VcJ jj4JJJJJ?4JJJ?4JJJ?????JR???z??JfJ?????JPPJ???JfJ???v????Se4UM??J???????Rmyxpsq?r???k~mrnyqSJ??J???????Rmyxpsq??k~mrnyqS4U3?k~mr nyq?|o}o~RSe4UM?????4JJJxy|wkvs?oe4JJJ?Wh???JgJ???e4JJJ?Wh?????JgJ?????e4????JW?x?J?W????W\ZZcXZX???Y???????????Y????Yv???~???? X?J?W????W\ZZcXZY???????????Y????Yv???~????X?4WWWJ?W????W\ZZcXZX???Y???????????Y????Yv???~????X?3\ZZcWZaW[aJZbd[\d_\XZZZZZZZZZ JUZ\ZZ4UUUJ?W????W\ZZcXZY???????????Y????Yv???~????X?3\ZZcWZaW[aJZbd[]d]^XZZZZZZZZZJUZ\ZZ4jjJW]VJU]`VaJjj4J4JM???????Jf?????? X?h4JM???????Jf??????X?h4UM???????Jf????????X?h4J4JM?????Jmyxpsq?v?wk4J4jjJW[[\V[ZJU[[]V[^Jjj4J4JJJJJYTJn?????????JTY4JJJJJ???z? ???????JgJ???}???p???e4UM??J???????Rmyxpsq?r???k~mrnyqSJ??J???????Rmyxpsq??k~mrnyqS4U3?k~mrnyq?|o}o~RSe4UM?????4JJJJJ???JgJv???n ?????R4JJJJJJJJJ???}?????VJP???z????????V4JJJJJJJJJ??}?????JUJv?wk?nk~k?ypp}o~VJP??????????}???V4JJJJJJJJJ??}?????VJv?wk?z|yz}?} s?oVJv?wk?psxs}r?kx?VJP?????VJP??k????Se4UJJJJT????????????}???JgJ???z????????e4JJJJJ??JR???JKgJ}??yuSJJ?4JJJJJJJJJ??????J???e4J JJJJ?4
=yend size=3369 crc32=ba1b8df2

#7 lore raw

PATCH 1/1 Refresh LZMA-lib to 4.65

Dear rhabarber1848,

Quoted 7 lines · In message <[email protected]> you wrote:

this is correct, the unpatched version of lib_generic/lzma/LzmaTools.c has this code in line 137:

*uncompressedSize = outProcessed;

I added the same code to the lzma465 patch and it works for me:

Aha!

Quoted 10 lines

Attached you will find a patch which also includes the watchdog stuff I need along with the formentioned patch. I do not know if all WATCHDOG_RESET() calls are really necessary but I have a 66 MHz CPU here which takes 12s to decompress a 550kb LZMA-compressed kernel.

Cheers, rhabarber1848

=ybegin line=128 size=3334 name=u-boot-2009.06_lzma_watchdog.diff ????JW?x?J?W????W\ZZcXZX???Y???????????Y????Yv???n??X?J?W????W\ZZcXZY???????????Y????Yv???n??X?4WWWJ?W????W\ZZcXZX???Y??????? ????Y????Yv???n??X?3\ZZcWZaW[aJZbd[\d_\XZZZZZZZZZJUZ\ZZ4UUUJ?W????W\ZZcXZY???????????Y????Yv???n??X?3\ZZcWZaW[aJZbd[]d\_XZZZZZZ

This patch is completely garbled. And please do not mix unrelated feature in one patch. Keep the update of the lzma code and the watchdog stuff separated in two patches - and use git-format-patch to create and git-send-email to post the patches, please.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The human race is faced with a cruel choice: work  or  daytime  tele-
vision.
#8 lore raw

PATCH 1/1 Refresh LZMA-lib to 4.65

Quoted 3 lines · Wolfgang Denk

Keep the update of the lzma code and the
watchdog stuff separated in two patches - and use git-format-patch to create and git-send-email to post the patches, please.

Hi,

please forgive me when I am posting the patches again as binary attachments (hopefully now readable) as I do not use git here.

Both patches are to be used for the LZMA 4.65 update proposed by Luigi 'Comio' Mantellini.

lzma.diff
fix return size of uncompressed image

watchdog.diff
reset watchdog timer to avoid reboot during decompression on slow machines.

Cheers, rhabarber1848
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lzma.diff
Type: text/x-diff
Size: 550 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090717/0c2cef67/attachment.diff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: watchdog.diff
Type: text/x-diff
Size: 3168 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090717/0c2cef67/attachment-0001.diff

#9 lore raw

PATCH 1/1 Refresh LZMA-lib to 4.65

Dear rhabarber1848,

Quoted 3 lines · In message <[email protected]> you wrote:

please forgive me when I am posting the patches again as binary attachments (hopefully now readable) as I do not use git here.

Pleas einclude the patch description (= commit message) with the patch. And make sure to add your Signed-off-by: lines. These are mandatory.

Quoted 5 lines

Both patches are to be used for the LZMA 4.65 update proposed by Luigi 'Comio' Mantellini.

lzma.diff
fix return size of uncompressed image

This patch should be integral part of the lzma update patch, and NOT come as separate fix. It makes no sense to add broken code.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
For every complex problem, there is a solution that is simple,  neat,
and wrong.                                           -- H. L. Mencken
#10 lore raw

PATCH 1/1 Refresh LZMA-lib to 4.65

In reply to Luigi 'Comio' Mantellini

Dear Luigi 'Comio' Mantellini,

Quoted 26 lines · In message <[email protected]>…

--===============1785671948==

From: Luigi 'Comio' Mantellini <[email protected]>

---
 common/cmd_bootm.c                 |    5 +-
 include/lzma/LzmaDec.h             |   31 +
 include/lzma/LzmaDecode.h          |   31 -
 include/lzma/LzmaTools.h           |    2 +-
 include/lzma/LzmaTypes.h           |   15 +-
 lib_generic/lzma/LGPL.txt          |  502 --------------
 lib_generic/lzma/LzmaDec.c         | 1007 +++++++++++++++++++++++++++++
 lib_generic/lzma/LzmaDec.h         |  223 +++++++
 lib_generic/lzma/LzmaDecode.c      |  584 -----------------
 lib_generic/lzma/LzmaDecode.h      |  113 ----
 lib_generic/lzma/LzmaTools.c       |  164 +++---
 lib_generic/lzma/LzmaTools.h       |    4 +-
 lib_generic/lzma/LzmaTypes.h       |   45 --
 lib_generic/lzma/Makefile          |    4 +-
 lib_generic/lzma/README.txt        |    8 +-
 lib_generic/lzma/Types.h           |  208 ++++++
 lib_generic/lzma/history.txt       |  434 +++++++------
 lib_generic/lzma/import_lzmasdk.sh |    8 +-
 lib_generic/lzma/lzma.txt          | 1257 +++++++++++++++++-------------------
 19 files changed, 2398 insertions(+), 2247 deletions(-)
 create mode 100644 include/lzma/LzmaDec.h
Quoted 8 lines
 delete mode 100644 include/lzma/LzmaDecode.h
 delete mode 100644 lib_generic/lzma/LGPL.txt
 create mode 100644 lib_generic/lzma/LzmaDec.c
 create mode 100644 lib_generic/lzma/LzmaDec.h
 delete mode 100644 lib_generic/lzma/LzmaDecode.c
 delete mode 100644 lib_generic/lzma/LzmaDecode.h
 delete mode 100644 lib_generic/lzma/LzmaTypes.h
 create mode 100644 lib_generic/lzma/Types.h

Are you going to resend an updated version of this patch any time soon so it can go into this upcoming release?

Thanks in advance.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Humanity has the  stars  in  its  future,  and  that  future  is  too
important  to be lost under the burden of juvenile folly and ignorant
superstition.                                          - Isaac Asimov
#11 lore raw

PATCH 1/1 Refresh LZMA-lib to 4.65

Dear Wolfgang,

Sorry for my silence, but in the last time I have too things in my agenda. I sent again the patch with the required fix but you need to approve my mail because it is very huge.

Thanks and best regards,

luigi

Il luned? 20 luglio 2009 23:46:32 Wolfgang Denk ha scritto:

Quoted 3 lines

Dear Luigi 'Comio' Mantellini,

In message <[email protected]>

Quoted 44 lines · you
Quoted 27 lines

--===============1785671948==

From: Luigi 'Comio' Mantellini <[email protected]>

---
 common/cmd_bootm.c                 |    5 +-
 include/lzma/LzmaDec.h             |   31 +
 include/lzma/LzmaDecode.h          |   31 -
 include/lzma/LzmaTools.h           |    2 +-
 include/lzma/LzmaTypes.h           |   15 +-
 lib_generic/lzma/LGPL.txt          |  502 --------------
 lib_generic/lzma/LzmaDec.c         | 1007 +++++++++++++++++++++++++++++
 lib_generic/lzma/LzmaDec.h         |  223 +++++++
 lib_generic/lzma/LzmaDecode.c      |  584 -----------------
 lib_generic/lzma/LzmaDecode.h      |  113 ----
 lib_generic/lzma/LzmaTools.c       |  164 +++---
 lib_generic/lzma/LzmaTools.h       |    4 +-
 lib_generic/lzma/LzmaTypes.h       |   45 --
 lib_generic/lzma/Makefile          |    4 +-
 lib_generic/lzma/README.txt        |    8 +-
 lib_generic/lzma/Types.h           |  208 ++++++
 lib_generic/lzma/history.txt       |  434 +++++++------
 lib_generic/lzma/import_lzmasdk.sh |    8 +-
 lib_generic/lzma/lzma.txt          | 1257
+++++++++++++++++------------------- 19 files changed, 2398
insertions(+), 2247 deletions(-)
 create mode 100644 include/lzma/LzmaDec.h
Quoted 8 lines
 delete mode 100644 include/lzma/LzmaDecode.h
 delete mode 100644 lib_generic/lzma/LGPL.txt
 create mode 100644 lib_generic/lzma/LzmaDec.c
 create mode 100644 lib_generic/lzma/LzmaDec.h
 delete mode 100644 lib_generic/lzma/LzmaDecode.c
 delete mode 100644 lib_generic/lzma/LzmaDecode.h
 delete mode 100644 lib_generic/lzma/LzmaTypes.h
 create mode 100644 lib_generic/lzma/Types.h

Are you going to resend an updated version of this patch any time soon so it can go into this upcoming release?

Thanks in advance.

Best regards,

Wolfgang Denk

Signature · 9 lines
Luigi Mantellini
R&D - Software

Industrie Dial Face S.p.A.
Via Canzo, 4 
20068 Peschiera Borromeo (MI) Italy
Tel.: +39 02 5167 2813
Fax: +39 02 5167 2459
E-mail: luigi.mantellini at idf-hit.com

A message that is not in the archive (sent off-list or not yet received): [email protected]

#13 lore raw

PATCH 1/1 Refresh LZMA-lib to 4.65

Quoted 2 lines

watchdog.diff
reset watchdog timer to avoid reboot during decompression on slow machines.

Actually, you don't need all these ifdef, that clutter the code.

watchdog.h already include this:

                /*
                 * No hardware or software watchdog.
                 */
                #if defined(__ASSEMBLY__)
                        #define WATCHDOG_RESET /*XXX DO_NOT_DEL_THIS_COMMENT*/
                #else
                        #define WATCHDOG_RESET() {}
                #endif /* __ASSEMBLY__ */

So please don't ifdef around WATCHDOG_RESET

/alessandro