Skip to contentSkip to conversation

Refresh LZMA-lib to v4.65 (v3 resend)

U-Boot New Luigi 'Comio' Mantellini 5 participants 20 messages Jul 21, 2009 – Jul 27, 2009

lore
Share & tools
lore
#1 lore raw

PATCH 1/1 Refresh LZMA-lib to v4.65

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

---
 common/cmd_bootm.c                 |    5 +-
 include/configs/qemu-mips.h        |    2 +
 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       |  165 +++---
 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/license.txt       |    3 +
 lib_generic/lzma/lzma.txt          | 1257 +++++++++++++++++-------------------
 21 files changed, 2404 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
 create mode 100644 lib_generic/lzma/license.txt
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/configs/qemu-mips.h +2 -0
index 8444462..cbacdf9 100644
@@ -163,6 +163,8 @@
 
 #undef CONFIG_MEMSIZE_IN_BYTES
 
+#define CONFIG_LZMA
+
 /*-----------------------------------------------------------------------
  * Cache Configuration
  */
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 +75 -90

185 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

177 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/license.txt new file +3 -0
new file mode 100644
index 0000000..48b9820

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.

#2 lore raw

PATCH 1/1 Refresh LZMA-lib to v4.65

Dear Luigi 'Comio' Mantellini,

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

--===============0963718385==

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

---
 common/cmd_bootm.c                 |    5 +-
 include/configs/qemu-mips.h        |    2 +
 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       |  165 +++---
 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/license.txt       |    3 +
 lib_generic/lzma/lzma.txt          | 1257 +++++++++++++++++-------------------
 21 files changed, 2404 insertions(+), 2247 deletions(-)
 create mode 100644 include/lzma/LzmaDec.h
 delete mode 100644 include/lzma/LzmaDecode.h
Quoted 8 lines
 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
 create mode 100644 lib_generic/lzma/license.txt

Applying: Refresh LZMA-lib to v4.65 /home/wd/git/u-boot/work/.git/rebase-apply/patch:854: trailing whitespace.

/home/wd/git/u-boot/work/.git/rebase-apply/patch:1038: trailing whitespace.

/home/wd/git/u-boot/work/.git/rebase-apply/patch:1437: trailing whitespace.

/home/wd/git/u-boot/work/.git/rebase-apply/patch:1483: trailing whitespace.

/home/wd/git/u-boot/work/.git/rebase-apply/patch:1614: trailing whitespace.

warning: squelched 100 whitespace errors
warning: 105 lines applied after fixing whitespace errors.

Applied.

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
miracle:  an  extremely  outstanding  or  unusual  event,  thing,  or
accomplishment.                                - Webster's Dictionary
#3 lore raw

PATCH 1/1 add WATCHDOG_RESET to allow LZMA kernel decompression on slow machines

---
 lib_generic/lzma/LzmaDec.c   |   26 ++++++++++++++++++++++++++
 lib_generic/lzma/LzmaTools.c |    4 ++++
 2 files changed, 30 insertions(+), 0 deletions(-)
lib_generic/lzma/LzmaDec.c +3 -0
index 89d934a..acffb14 100644
@@ -1,6 +1,9 @@
 /* LzmaDec.c -- LZMA Decoder
 2008-11-06 : Igor Pavlov : Public domain */
 
+#include <config.h>
+#include <common.h>
+#include <watchdog.h>
 #include "LzmaDec.h"
 
 #include <string.h>
@@ -156,6 +159,8 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p,

SizeT limit, const Byte
UInt32 range = p->range;
UInt32 code = p->code;

+ WATCHDOG_RESET();
+
do

   {
     CLzmaProb *prob;
@@ -176,6 +181,9 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p,
SizeT limit, const Byte
       if (state < kNumLitStates)
       {
         symbol = 1;
+
+        WATCHDOG_RESET();
+
         do { GET_BIT(prob + symbol, symbol) } while (symbol < 0x100);
       }
       else
@@ -183,6 +191,9 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p,
SizeT limit, const Byte
         unsigned matchByte = p->dic[(dicPos - rep0) + ((dicPos < rep0) ?
dicBufSize : 0)];
         unsigned offs = 0x100;
         symbol = 1;
+
+        WATCHDOG_RESET();
+
         do
         {
           unsigned bit;
@@ -316,6 +327,9 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p,
SizeT limit, const Byte
             {
               UInt32 mask = 1;
               unsigned i = 1;
+
+              WATCHDOG_RESET();
+
               do
               {
                 GET_BIT2(prob + i, i, ; , distance |= mask);
@@ -327,6 +341,9 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p,
SizeT limit, const Byte
           else
           {
             numDirectBits -= kNumAlignBits;
+
+            WATCHDOG_RESET();
+
             do
             {
               NORMALIZE
@@ -399,12 +416,18 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec
*p, SizeT limit, const Byte
           ptrdiff_t src = (ptrdiff_t)pos - (ptrdiff_t)dicPos;
           const Byte *lim = dest + curLen;
           dicPos += curLen;
+
+          WATCHDOG_RESET();
+
           do
             *(dest) = (Byte)*(dest + src);
           while (++dest != lim);
         }
         else
         {
+
+          WATCHDOG_RESET();
+
           do
           {
             dic[dicPos++] = dic[pos];
@@ -417,6 +440,9 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p,
SizeT limit, const Byte
     }

}
while (dicPos < limit && buf < bufLimit);
+
+ WATCHDOG_RESET();
+
NORMALIZE;
p->buf = buf;
p->range = range;

lib_generic/lzma/LzmaTools.c +1 -0
index c2a91e5..88ba399 100644
@@ -36,6 +36,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <watchdog.h>
 
 #ifdef CONFIG_LZMA
 
@@ -112,6 +113,9 @@ int lzmaBuffToBuffDecompress (unsigned char *outStream,

SizeT *uncompressedSize,

     /* Decompress */
     outProcessed = outSizeFull;

+
+ WATCHDOG_RESET();
+
res = LzmaDecode(
outStream, &outProcessed,
inStream + LZMA_DATA_OFFSET, &compressedSize,

Signature · 1 line
1.5.6.5
#4 lore raw

PATCH 1/1 add WATCHDOG_RESET to allow LZMA kernel decompression on slow machines

Dear rhabarber1848,

Quoted 23 lines · In message <[email protected]> you wrote:
---
 lib_generic/lzma/LzmaDec.c   |   26 ++++++++++++++++++++++++++
 lib_generic/lzma/LzmaTools.c |    4 ++++
 2 files changed, 30 insertions(+), 0 deletions(-)
lib_generic/lzma/LzmaDec.c +3 -0
index 89d934a..acffb14 100644
@@ -1,6 +1,9 @@
 /* LzmaDec.c -- LZMA Decoder
 2008-11-06 : Igor Pavlov : Public domain */
 
+#include <config.h>
+#include <common.h>
+#include <watchdog.h>
 #include "LzmaDec.h"
 
 #include <string.h>
@@ -156,6 +159,8 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p,
Quoted 1 line

SizeT limit, const Byte

^^^^^^^^^^^^^^^^^^^^^^^^^^

Line wrapped.

Applying: add WATCHDOG_RESET to allow LZMA kernel decompression on slow machines
fatal: corrupt patch at line 21
Patch failed at 0001.

Please make sure your mailer does not mess up your postings. Please use git-send-email to submit patches.

Please clean up and resubmit.

Best regards,

Wolfgang Denk

Signature · 8 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
Politician:  An  eel  in  the  fundamental   mud   upon   which   the
superstructure  of  organized  society is reared. When he wriggles he
mistakes the agitation of his tail for the trembling of the  edifice.
As  compared with the statesman, he suffers the disadvantage of being
alive.                                               - Ambrose Bierce
#5 lore raw

PATCH v2 1/1 add WATCHDOG_RESET to allow LZMA kernel decompression on slow machines

Signed-off-by rhabarber1848 at web.de
---
 lib_generic/lzma/LzmaDec.c   |   26 ++++++++++++++++++++++++++
 lib_generic/lzma/LzmaTools.c |    4 ++++
 2 files changed, 30 insertions(+), 0 deletions(-)
lib_generic/lzma/LzmaDec.c +26 -0
index 89d934a..acffb14 100644
@@ -1,6 +1,9 @@
 /* LzmaDec.c -- LZMA Decoder
 2008-11-06 : Igor Pavlov : Public domain */
 
+#include <config.h>
+#include <common.h>
+#include <watchdog.h>
 #include "LzmaDec.h"
 
 #include <string.h>
@@ -156,6 +159,8 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte
   UInt32 range = p->range;
   UInt32 code = p->code;
 
+  WATCHDOG_RESET();
+
   do
   {
     CLzmaProb *prob;
@@ -176,6 +181,9 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte
       if (state < kNumLitStates)
       {
         symbol = 1;
+
+        WATCHDOG_RESET();
+
         do { GET_BIT(prob + symbol, symbol) } while (symbol < 0x100);
       }
       else
@@ -183,6 +191,9 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte
         unsigned matchByte = p->dic[(dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0)];
         unsigned offs = 0x100;
         symbol = 1;
+
+        WATCHDOG_RESET();
+
         do
         {
           unsigned bit;
@@ -316,6 +327,9 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte
             {
               UInt32 mask = 1;
               unsigned i = 1;
+
+              WATCHDOG_RESET();
+
               do
               {
                 GET_BIT2(prob + i, i, ; , distance |= mask);
@@ -327,6 +341,9 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte
           else
           {
             numDirectBits -= kNumAlignBits;
+
+            WATCHDOG_RESET();
+
             do
             {
               NORMALIZE
@@ -399,12 +416,18 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte
           ptrdiff_t src = (ptrdiff_t)pos - (ptrdiff_t)dicPos;
           const Byte *lim = dest + curLen;
           dicPos += curLen;
+
+          WATCHDOG_RESET();
+
           do
             *(dest) = (Byte)*(dest + src);
           while (++dest != lim);
         }
         else
         {
+
+          WATCHDOG_RESET();
+
           do
           {
             dic[dicPos++] = dic[pos];
@@ -417,6 +440,9 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte
     }
   }
   while (dicPos < limit && buf < bufLimit);
+
+  WATCHDOG_RESET();
+
   NORMALIZE;
   p->buf = buf;
   p->range = range;
lib_generic/lzma/LzmaTools.c +4 -0
index c2a91e5..88ba399 100644
@@ -36,6 +36,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <watchdog.h>
 
 #ifdef CONFIG_LZMA
 
@@ -112,6 +113,9 @@ int lzmaBuffToBuffDecompress (unsigned char *outStream, SizeT *uncompressedSize,
 
     /* Decompress */
     outProcessed = outSizeFull;
+
+    WATCHDOG_RESET();
+
     res = LzmaDecode(
         outStream, &outProcessed,
         inStream + LZMA_DATA_OFFSET, &compressedSize,
Signature · 1 line
1.5.6.5
#6 lore raw

PATCH v2 1/1 add WATCHDOG_RESET to allow LZMA kernel decompression on slow machines

Dear rhabarber1848 at web.de,

Quoted 6 lines · In message <[email protected]> you wrote:
Signed-off-by rhabarber1848 at web.de
---
 lib_generic/lzma/LzmaDec.c   |   26 ++++++++++++++++++++++++++
 lib_generic/lzma/LzmaTools.c |    4 ++++
 2 files changed, 30 insertions(+), 0 deletions(-)

Applied, thanks.

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
A morsel of genuine history is a  thing  so  rare  as  to  be  always
valuable.                                          - Thomas Jefferson
#7 lore raw

PATCH v2 1/1 add WATCHDOG_RESET to allow LZMA kernel decompression on slow machines

In reply to rhabarber1848 at web.de
Quoted 1 line · On Friday 24 July 2009 02:16:30 rhabarber1848 at web.de wrote:
Signed-off-by rhabarber1848 at web.de

this isnt a valid s-o-b tag. you need to use your real name, not just an e- mail address. looks like Wolfgang merged it already though :/.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090726/42c683cc/attachment.pgp

#8 lore raw

PATCH 1/1 Refresh LZMA-lib to v4.65

In reply to Wolfgang Denk

thanks

Quoted 86 lines

Dear Luigi 'Comio' Mantellini,

In message <[email protected]>

Quoted 34 lines · you

--===============0963718385==

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

Signed-off-by: Luigi 'Comio' Mantellini
<[email protected]>

---
 common/cmd_bootm.c                 |    5 +-
 include/configs/qemu-mips.h        |    2 +
 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       |  165 +++---
 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/license.txt       |    3 +
 lib_generic/lzma/lzma.txt          | 1257
+++++++++++++++++-------------------
 21 files changed, 2404 insertions(+), 2247 deletions(-)
 create mode 100644 include/lzma/LzmaDec.h
 delete mode 100644 include/lzma/LzmaDecode.h
Quoted 8 lines
 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
 create mode 100644 lib_generic/lzma/license.txt

Applying: Refresh LZMA-lib to v4.65 /home/wd/git/u-boot/work/.git/rebase-apply/patch:854: trailing whitespace.

/home/wd/git/u-boot/work/.git/rebase-apply/patch:1038: trailing whitespace.

/home/wd/git/u-boot/work/.git/rebase-apply/patch:1437: trailing whitespace.

/home/wd/git/u-boot/work/.git/rebase-apply/patch:1483: trailing whitespace.

/home/wd/git/u-boot/work/.git/rebase-apply/patch:1614: trailing whitespace.

warning: squelched 100 whitespace errors
warning: 105 lines applied after fixing whitespace errors.

Applied.

Best regards,

Wolfgang Denk

--
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
miracle: an extremely outstanding or unusual event, thing, or
accomplishment. - Webster's
Dictionary

#9 lore raw

PATCH 1/1 Refresh LZMA-lib to v4.65

In reply to Luigi 'Comio' Mantellini

lib_generic/lzma/LzmaDec.c line 6

Quoted 9 lines · On Tuesday 21 July 2009 04:45:49 Luigi 'Comio' Mantellini wrote:
lib_generic/lzma/LzmaDec.c new file +6 -0
@@ -0,0 +1,1007 @@
+/* LzmaDec.c -- LZMA Decoder
+2008-11-06 : Igor Pavlov : Public domain */
+
+#include "LzmaDec.h"
+
+#include <string.h>

there is no string.h in the source tree. because of this, the .depend step fails:
make[1]: Entering directory `/usr/local/src/u-boot/blackfin/lib_generic/lzma' LzmaDec.c:9:20: error: string.h: No such file or directory

i know there's a hack in the Makefile:
CFLAGS += -D_LZMA_PROB32 -I$(TOPDIR)/include/linux

looks like this should be CPPFLAGS, not CFLAGS. or fix the source and drop the -I hack.

lib_generic/lzma/LzmaTools.c line 63

Quoted 3 lines
lib_generic/lzma/LzmaTools.c +1 -0
+    SizeT inProcessed;

this variable isnt used in this function:
LzmaTools.c: In function ?lzmaBuffToBuffDecompress?:
LzmaTools.c:64: warning: unused variable ?inProcessed?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090727/269981ff/attachment.pgp

#10 lore raw

PATCH 1/1 Refresh LZMA-lib to v4.65

Hi Mike,

Quoted 16 lines · Mike Frysinger

lib_generic/lzma/LzmaDec.c line 6

Quoted 9 lines · On Tuesday 21 July 2009 04:45:49 Luigi 'Comio' Mantellini wrote:
lib_generic/lzma/LzmaDec.c new file +6 -0
@@ -0,0 +1,1007 @@
+/* LzmaDec.c -- LZMA Decoder
+2008-11-06 : Igor Pavlov : Public domain */
+
+#include "LzmaDec.h"
+
+#include <string.h>

there is no string.h in the source tree. ?because of this, the .depend step fails:
make[1]: Entering directory `/usr/local/src/u-boot/blackfin/lib_generic/lzma' LzmaDec.c:9:20: error: string.h: No such file or directory

Quoted 5 lines

i know there's a hack in the Makefile:
CFLAGS += -D_LZMA_PROB32 -I$(TOPDIR)/include/linux

looks like this should be CPPFLAGS, not CFLAGS. ?or fix the source and drop the -I hack.

I preferred to not touch the lzma sourcers. Anyway, on my system the hack works fine... can you try to do a "make mrproper && make your_board_config" before to compile?

Quoted 8 lines

lib_generic/lzma/LzmaTools.c

Quoted 4 lines
lib_generic/lzma/LzmaTools.c +1 -0
+ ? ?SizeT inProcessed;

this variable isnt used in this function:
LzmaTools.c: In function ?lzmaBuffToBuffDecompress?:
LzmaTools.c:64: warning: unused variable ?inProcessed?

You are right :)

Thanks for your feedback!

ciao

luigi

Quoted 2 lines

-mike

Signature · 10 lines
Luigi 'Comio' 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
web: www.idf-hit.com
mail: luigi.mantellini at idf-hit.com
#11 lore raw

PATCH 1/1 Refresh LZMA-lib to v4.65

Quoted 21 lines · On Monday 27 July 2009 14:17:44 Luigi Mantellini wrote:
Quoted 20 lines · Mike Frysinger

lib_generic/lzma/LzmaDec.c line 6

Quoted 9 lines · On Tuesday 21 July 2009 04:45:49 Luigi 'Comio' Mantellini wrote:
lib_generic/lzma/LzmaDec.c new file +6 -0
@@ -0,0 +1,1007 @@
+/* LzmaDec.c -- LZMA Decoder
+2008-11-06 : Igor Pavlov : Public domain */
+
+#include "LzmaDec.h"
+
+#include <string.h>

there is no string.h in the source tree. because of this, the .depend step fails:
make[1]: Entering directory `/usr/local/src/u-boot/blackfin/lib_generic/lzma' LzmaDec.c:9:20: error:
string.h: No such file or directory

i know there's a hack in the Makefile:
CFLAGS += -D_LZMA_PROB32 -I$(TOPDIR)/include/linux

Quoted 6 lines
Quoted 2 lines

looks like this should be CPPFLAGS, not CFLAGS. or fix the source and drop the -I hack.

I preferred to not touch the lzma sourcers. Anyway, on my system the hack works fine... can you try to do a "make mrproper && make your_board_config" before to compile?

this is using MAKEALL, so that should be sufficient. at any rate, if you simply read the .depend target you'll see CFLAGS is not used (whether that's a bug in .depend is a different discussion).
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090727/b5b58671/attachment.pgp

#12 lore raw

PATCH 1/1 Refresh LZMA-lib to v4.65

(sent again)

CFLAGS bugs?
I tried to comment the -I...blablalb... and the build (crrectly) fails. Can you remove the .depend from your source dir?

ciao

Quoted 34 lines · Mike Frysinger
Quoted 21 lines · On Monday 27 July 2009 14:17:44 Luigi Mantellini wrote:
Quoted 20 lines · Mike Frysinger

lib_generic/lzma/LzmaDec.c line 6

Quoted 9 lines · On Tuesday 21 July 2009 04:45:49 Luigi 'Comio' Mantellini wrote:
lib_generic/lzma/LzmaDec.c new file +6 -0
@@ -0,0 +1,1007 @@
+/* LzmaDec.c -- LZMA Decoder
+2008-11-06 : Igor Pavlov : Public domain */
+
+#include "LzmaDec.h"
+
+#include <string.h>

there is no string.h in the source tree. ?because of this, the .depend step fails:
make[1]: Entering directory `/usr/local/src/u-boot/blackfin/lib_generic/lzma' LzmaDec.c:9:20: error:
string.h: No such file or directory

i know there's a hack in the Makefile:
CFLAGS += -D_LZMA_PROB32 -I$(TOPDIR)/include/linux

Quoted 6 lines
Quoted 2 lines

looks like this should be CPPFLAGS, not CFLAGS. ?or fix the source and drop the -I hack.

I preferred to not touch the lzma sourcers. Anyway, on my system the hack works fine... can you try to do a "make mrproper && make your_board_config" before to compile?

this is using MAKEALL, so that should be sufficient. ?at any rate, if you simply read the .depend target you'll see CFLAGS is not used (whether that's a bug in .depend is a different discussion).
-mike

Signature · 10 lines
Luigi 'Comio' 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
web: www.idf-hit.com
mail: luigi.mantellini at idf-hit.com
#13 lore raw

PATCH 1/1 Refresh LZMA-lib to v4.65

Quoted 30 lines · On Monday 27 July 2009 14:48:54 Luigi Mantellini wrote:
Quoted 29 lines · Mike Frysinger
Quoted 27 lines · On Monday 27 July 2009 14:17:44 Luigi Mantellini wrote:
Quoted 17 lines · Mike Frysinger

lib_generic/lzma/LzmaDec.c line 6

Quoted 9 lines · On Tuesday 21 July 2009 04:45:49 Luigi 'Comio' Mantellini wrote:
lib_generic/lzma/LzmaDec.c new file +6 -0
@@ -0,0 +1,1007 @@
+/* LzmaDec.c -- LZMA Decoder
+2008-11-06 : Igor Pavlov : Public domain */
+
+#include "LzmaDec.h"
+
+#include <string.h>

there is no string.h in the source tree. because of this, the .depend step fails:
make[1]: Entering directory `/usr/local/src/u-boot/blackfin/lib_generic/lzma' LzmaDec.c:9:20:
error: string.h: No such file or directory

Quoted 5 lines

i know there's a hack in the Makefile:
CFLAGS += -D_LZMA_PROB32 -I$(TOPDIR)/include/linux

looks like this should be CPPFLAGS, not CFLAGS. or fix the source and drop the -I hack.

I preferred to not touch the lzma sourcers. Anyway, on my system the hack works fine... can you try to do a "make mrproper && make your_board_config" before to compile?

Quoted 5 lines
Quoted 3 lines

this is using MAKEALL, so that should be sufficient. at any rate, if you simply read the .depend target you'll see CFLAGS is not used (whether that's a bug in .depend is a different discussion).

(sent again)

please dont top post ;)

Quoted 3 lines

CFLAGS bugs?
I tried to comment the -I...blablalb... and the build (crrectly) fails. Can you remove the .depend from your source dir?

i said it doesnt matter. but if you're going to continue down this line of reasoning anyways, i just did git clean -x -d and got the same result.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090727/7d040891/attachment-0001.pgp

#14 lore raw

PATCH 1/1 Refresh LZMA-lib to v4.65

Quoted 9 lines · Mike Frysinger
Quoted 4 lines

CFLAGS bugs?
I tried to comment the -I...blablalb... and the build (crrectly) fails. Can you remove the .depend from your source dir?

i said it doesnt matter. ?but if you're going to continue down this line of reasoning anyways, i just did git clean -x -d and got the same result. -mike

Very strange...which compiler are you using?
I'm using a gcc4.3.3 (buitl using openwrt trunk)

this is my .depend (after a git clean -x -d -f and after a make mrproper):

LzmaTools.o: LzmaTools.c /mnt/devel/onu/u-boot-onu/include/config.h \
/mnt/devel/onu/u-boot-onu/include/configs/idf-ont.h \
/mnt/devel/onu/u-boot-onu/include/configs/idf-pre.h \
/mnt/devel/onu/u-boot-onu/include/vendor_version.h \
/mnt/devel/onu/u-boot-onu/include/configs/idf-post.h \
/mnt/devel/onu/u-boot-onu/include/config_cmd_default.h \
/mnt/devel/onu/u-boot-onu/include/asm/config.h \
/mnt/devel/onu/u-boot-onu/include/common.h \
/mnt/devel/onu/u-boot-onu/include/linux/bitops.h \
/mnt/devel/onu/u-boot-onu/include/asm/bitops.h \
/mnt/devel/onu/u-boot-onu/include/linux/types.h \
/mnt/devel/onu/u-boot-onu/include/linux/config.h \
/mnt/devel/onu/u-boot-onu/include/linux/posix_types.h \
/mnt/devel/onu/u-boot-onu/include/linux/stddef.h \
/mnt/devel/onu/u-boot-onu/include/asm/posix_types.h \
/mnt/devel/onu/u-boot-onu/include/asm/types.h \
/mnt/devel/onu/u-boot-onu/include/asm/byteorder.h \
/mnt/devel/onu/u-boot-onu/include/linux/byteorder/big_endian.h \
/mnt/devel/onu/u-boot-onu/include/linux/byteorder/swab.h \
/mnt/devel/onu/u-boot-onu/include/linux/byteorder/generic.h \
/mnt/devel/onu/u-boot-onu/include/asm/sgidefs.h \
/mnt/devel/onu/u-boot-onu/include/asm/system.h \
/mnt/devel/onu/u-boot-onu/include/asm/ptrace.h \
/mnt/devel/onu/u-boot-onu/include/asm/isadep.h \
/mnt/devel/onu/u-boot-onu/include/linux/string.h \
/mnt/devel/onu/u-boot-onu/include/asm/string.h \
/mnt/devel/onu/OpenWRT-idf/staging_dir/toolchain-mips_gcc-4.3.3_uClibc-0.9.30.1/usr/lib/gcc/mips-openwrt-linux-uclibc/4.3.3/include/stdarg.h
\
/mnt/devel/onu/u-boot-onu/include/part.h \
/mnt/devel/onu/u-boot-onu/include/ide.h \
/mnt/devel/onu/u-boot-onu/include/flash.h \
/mnt/devel/onu/u-boot-onu/include/image.h \
/mnt/devel/onu/u-boot-onu/include/compiler.h \
/mnt/devel/onu/OpenWRT-idf/staging_dir/toolchain-mips_gcc-4.3.3_uClibc-0.9.30.1/usr/lib/gcc/mips-openwrt-linux-uclibc/4.3.3/include/stddef.h
\
/mnt/devel/onu/u-boot-onu/include/lmb.h \
/mnt/devel/onu/u-boot-onu/include/asm/u-boot.h \
/mnt/devel/onu/u-boot-onu/include/command.h \
/mnt/devel/onu/u-boot-onu/include/asm/global_data.h \
/mnt/devel/onu/u-boot-onu/include/asm/regdef.h \
/mnt/devel/onu/u-boot-onu/include/watchdog.h LzmaTools.h \
/mnt/devel/onu/u-boot-onu/include/lzma/LzmaTypes.h \
/mnt/devel/onu/u-boot-onu/include/lzma/../../lib_generic/lzma/Types.h \
LzmaDec.h Types.h /mnt/devel/onu/u-boot-onu/include/malloc.h

Signature · 10 lines
Luigi 'Comio' 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
web: www.idf-hit.com
mail: luigi.mantellini at idf-hit.com
#15 lore raw

PATCH 1/1 Refresh LZMA-lib to v4.65

Quoted 11 lines · On Monday 27 July 2009 15:12:11 Luigi Mantellini wrote:
Quoted 7 lines · Mike Frysinger
Quoted 3 lines

CFLAGS bugs?
I tried to comment the -I...blablalb... and the build (crrectly) fails. Can you remove the .depend from your source dir?

i said it doesnt matter. but if you're going to continue down this line of reasoning anyways, i just did git clean -x -d and got the same result.

Very strange...which compiler are you using?
I'm using a gcc4.3.3 (buitl using openwrt trunk)

the gcc doesnt matter (but i am using 4.3.3 too). i already pointed out the issue -- the common .depend code does not use $(CFLAGS), and the lzma code isnt using proper paths.

just change the *1* include and drop the -I path hack and be done with it.

lib_generic/lzma/LzmaDec.c +1 -1
@@ -9 +9 @@
-#include <string.h>
+#include <linux/string.h>
lib_generic/lzma/Makefile +1 -1
@@ -33 +33 @@ SOBJS =
-CFLAGS += -D_LZMA_PROB32 -I$(TOPDIR)/include/linux
+CFLAGS += -D_LZMA_PROB32
Quoted 3 lines

this is my .depend (after a git clean -x -d -f and after a make mrproper):

LzmaTools.o: LzmaTools.c /mnt/devel/onu/u-boot-onu/include/config.h \

i said LzmaDec.c, not LzmaTools.c

just run:

$ touch lib_generic/lzma/LzmaDec.c
$ make depend SUBDIRS=lib_generic/lzma
for dir in lib_generic/lzma ; do make -C $dir _depend ; done
make[1]: Entering directory `/usr/local/src/u-boot/blackfin/lib_generic/lzma'
LzmaDec.c:9:20: error: string.h: No such file or directory
make[1]: Leaving directory `/usr/local/src/u-boot/blackfin/lib_generic/lzma'
make[1]: Entering directory `/usr/local/src/u-boot/blackfin/lib_generic/lzma'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/usr/local/src/u-boot/blackfin/lib_generic/lzma'
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090727/6421c4ac/attachment.pgp 
#16 lore raw

PATCH 1/1 Refresh LZMA-lib to v4.65

Ok... Now I understand.

We have two choices: CPPFLAGS or patch the LzmaDec.c. I think that you prefer the second choice. right?

best regards,

luigi

Quoted 48 lines · Mike Frysinger
Quoted 11 lines · On Monday 27 July 2009 15:12:11 Luigi Mantellini wrote:
Quoted 7 lines · Mike Frysinger
Quoted 3 lines

CFLAGS bugs?
I tried to comment the -I...blablalb... and the build (crrectly) fails. Can you remove the .depend from your source dir?

i said it doesnt matter. ?but if you're going to continue down this line of reasoning anyways, i just did git clean -x -d and got the same result.

Very strange...which compiler are you using?
I'm using a gcc4.3.3 (buitl using openwrt trunk)

the gcc doesnt matter (but i am using 4.3.3 too). ?i already pointed out the issue -- the common .depend code does not use $(CFLAGS), and the lzma code isnt using proper paths.

just change the *1* include and drop the -I path hack and be done with it.

lib_generic/lzma/LzmaDec.c +1 -1
@@ -9 +9 @@
-#include <string.h>
+#include <linux/string.h>
lib_generic/lzma/Makefile +1 -1
@@ -33 +33 @@ SOBJS =
-CFLAGS += -D_LZMA_PROB32 -I$(TOPDIR)/include/linux
+CFLAGS += -D_LZMA_PROB32
Quoted 4 lines

this is my .depend (after a git clean -x -d -f and after a make mrproper):

LzmaTools.o: LzmaTools.c /mnt/devel/onu/u-boot-onu/include/config.h \

i said LzmaDec.c, not LzmaTools.c

just run:

$ touch lib_generic/lzma/LzmaDec.c
$ make depend SUBDIRS=lib_generic/lzma
for dir in lib_generic/lzma ; do make -C $dir _depend ; done
make[1]: Entering directory `/usr/local/src/u-boot/blackfin/lib_generic/lzma'
LzmaDec.c:9:20: error: string.h: No such file or directory
make[1]: Leaving directory `/usr/local/src/u-boot/blackfin/lib_generic/lzma'
make[1]: Entering directory `/usr/local/src/u-boot/blackfin/lib_generic/lzma'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/usr/local/src/u-boot/blackfin/lib_generic/lzma'
-mike
Signature · 10 lines
Luigi 'Comio' 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
web: www.idf-hit.com
mail: luigi.mantellini at idf-hit.com
#17 lore raw

PATCH 1/1 Refresh LZMA-lib to v4.65

In reply to Mike Frysinger

I have a stupid question: why the depend uses CPPFLAGS instead instead CFLAGS?

can this patch be acceptable? Or there is something that I don't understand?

rules.mk +0 -0
index 6f999dd..998dd4e 100644
@@ -29,7 +29,7 @@ $(obj).depend:        $(src)Makefile

$(TOPDIR)/config.mk $(SRCS)

                @rm -f $@
                @for f in $(SRCS); do \
                        g=`basename $$f | sed -e 's/\(.*\)\.\w/\1.o/'`; \

- $(CC) -M $(HOSTCFLAGS) $(CPPFLAGS) -MQ
$(obj)$$g $$f >> $@ ; \
+ $(CC) -M $(HOSTCFLAGS) $(CPPFLAGS) $(CFLAGS)
-MQ $(obj)$$g $$f >> $@ ; \
done

thank again and best regards,

luigi

Quoted 48 lines · Mike Frysinger
Quoted 11 lines · On Monday 27 July 2009 15:12:11 Luigi Mantellini wrote:
Quoted 7 lines · Mike Frysinger
Quoted 3 lines

CFLAGS bugs?
I tried to comment the -I...blablalb... and the build (crrectly) fails. Can you remove the .depend from your source dir?

i said it doesnt matter. ?but if you're going to continue down this line of reasoning anyways, i just did git clean -x -d and got the same result.

Very strange...which compiler are you using?
I'm using a gcc4.3.3 (buitl using openwrt trunk)

the gcc doesnt matter (but i am using 4.3.3 too). ?i already pointed out the issue -- the common .depend code does not use $(CFLAGS), and the lzma code isnt using proper paths.

just change the *1* include and drop the -I path hack and be done with it.

lib_generic/lzma/LzmaDec.c +1 -1
@@ -9 +9 @@
-#include <string.h>
+#include <linux/string.h>
lib_generic/lzma/Makefile +1 -1
@@ -33 +33 @@ SOBJS =
-CFLAGS += -D_LZMA_PROB32 -I$(TOPDIR)/include/linux
+CFLAGS += -D_LZMA_PROB32
Quoted 4 lines

this is my .depend (after a git clean -x -d -f and after a make mrproper):

LzmaTools.o: LzmaTools.c /mnt/devel/onu/u-boot-onu/include/config.h \

i said LzmaDec.c, not LzmaTools.c

just run:

$ touch lib_generic/lzma/LzmaDec.c
$ make depend SUBDIRS=lib_generic/lzma
for dir in lib_generic/lzma ; do make -C $dir _depend ; done
make[1]: Entering directory `/usr/local/src/u-boot/blackfin/lib_generic/lzma'
LzmaDec.c:9:20: error: string.h: No such file or directory
make[1]: Leaving directory `/usr/local/src/u-boot/blackfin/lib_generic/lzma'
make[1]: Entering directory `/usr/local/src/u-boot/blackfin/lib_generic/lzma'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/usr/local/src/u-boot/blackfin/lib_generic/lzma'
-mike
Signature · 10 lines
Luigi 'Comio' 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
web: www.idf-hit.com
mail: luigi.mantellini at idf-hit.com
#18 lore raw

PATCH 1/1 Refresh LZMA-lib to v4.65

Dear Luigi Mantellini,

Quoted 1 line · In message <[email protected]> you…

I have a stupid question: why the depend uses CPPFLAGS instead instead CFLAGS?

Because depend runs "$(CC) -M", i. e. just the preprocessor, so any additional flags needed for later compiler passes don't matter anyway.

Quoted 7 lines

can this patch be acceptable? Or there is something that I don't understand?

rules.mk +0 -0
index 6f999dd..998dd4e 100644

rules.mk $(obj).depend: $(src)Makefile

Quoted 9 lines
rules.mk +1 -2
@@ -29,7 +29,7 @@ $(obj).depend:        $(src)Makefile
 $(TOPDIR)/config.mk $(SRCS)
                @rm -f $@
                @for f in $(SRCS); do \
                        g=`basename $$f | sed -e 's/\(.*\)\.\w/\1.o/'`; \
-                       $(CC) -M $(HOSTCFLAGS) $(CPPFLAGS) -MQ
 $(obj)$$g $$f >> $@ ; \
+                       $(CC) -M $(HOSTCFLAGS) $(CPPFLAGS) $(CFLAGS)
-MQ $(obj)$$g $$f >> $@ ; \
                done

Looks wrong to me.

Quoted 3 lines · Mike Frysinger
Quoted 2 lines · On Monday 27 July 2009 15:12:11 Luigi Mantellini wrote:
Quoted 1 line · Mike Frysinger

...

Arghhh. Mike already told you before: please do not top post / full quote. Please read http://www.netmeister.org/news/learn2quote.html to understand what this means.

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
A princess should not be afraid -- not with a brave knight to protect
her.
	-- McCoy, "Shore Leave", stardate 3025.3
#19 lore raw

PATCH 1/1 Refresh LZMA-lib to v4.65

Quoted 6 lines · Wolfgang Denk

Dear Luigi Mantellini,

Arghhh. Mike already told you before: please do not top post / full quote. Please read http://www.netmeister.org/news/learn2quote.html to understand what this means.

I'm sorry!

Signature · 10 lines
Luigi 'Comio' 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
web: www.idf-hit.com
mail: luigi.mantellini at idf-hit.com