[U-Boot] [PATCH] Refresh LZMA-lib to 4.65

rhabarber1848 rhabarber1848 at web.de
Fri Jul 17 08:59:39 CEST 2009


Wolfgang Denk <wd at denx.de> wrote in
news:20090716211129.E9241832E416 at gemini.denx.de: 

> 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\ZZcXZ`X™œ‘Y–“Œ‰‘˜œ“Y–¤—‹Yv¤—‹nXJŸWŒ™™žW\ZZcXZ`Y–“Œ‰‘˜œ“Y–¤—‹Yv¤—‹nX4WWWJŸWŒ™™žW\ZZcXZ`X™œ‘Y–“Œ‰‘˜
œ“Y–¤—‹Yv¤—‹nX3\ZZcWZaW[aJZbd[\d_\XZZZZZZZZZJUZ\ZZ4UUUJŸWŒ™™žW\ZZcXZ`Y–“Œ‰‘˜œ“Y–¤—‹Yv¤—‹nX3\ZZcWZaW[aJZbd[]d\_XZZZZZZ
ZZZJUZ\ZZ4jjJW[V`JU[VcJjj4JYTJv¤—‹nXJWWJv„wkJn™Žœ4J\ZZbW[[WZ`JdJs‘™œJz‹ –™ JdJzŸŒ–“JŽ™—‹“˜JTY4J4UM“˜–ŸŽJf™˜“‘X’h4UM“˜
–ŸŽJf™——™˜X’h4UM“˜–ŸŽJf¡‹ž’Ž™‘X’h4JM“˜–ŸŽJLv¤—‹nX’L4J4JM“˜–ŸŽJfžœ“˜‘X’h4jjJW[_`V`JU[_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[a`V`JU[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][`V`JU]\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\ZZcXZ`X™œ‘Y–“Œ‰‘˜œ“Y–¤—‹Yv¤—‹~™™–
XJŸWŒ™™žW\ZZcXZ`Y–“Œ‰‘˜œ“Y–¤—‹Yv¤—‹~™™–X4WWWJŸWŒ™™žW\ZZcXZ`X™œ‘Y–“Œ‰‘˜œ“Y–¤—‹Yv¤—‹~™™–X3\ZZcWZaW[aJZbd[\d_\XZZZZZZZZZ
JUZ\ZZ4UUUJŸWŒ™™žW\ZZcXZ`Y–“Œ‰‘˜œ“Y–¤—‹Yv¤—‹~™™–X3\ZZcWZaW[aJZbd[]d]^XZZZZZZZZZJUZ\ZZ4jjJW]`V`JU]`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



More information about the U-Boot mailing list