public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: rhabarber1848 <rhabarber1848@web.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] zlib: allow 0 as destination pointer
Date: Wed, 29 Jul 2009 12:32:38 +0200	[thread overview]
Message-ID: <h4p8g2$rn6$1@ger.gmane.org> (raw)
In-Reply-To: 20090729092050.GA24275@mail.gnudd.com

Hi,

Alessandro Rubini wrote:
> Giuseppe Condorelli wrote:
>> Hi rhabarber1848,
>> please could you test latest two zlib patches I have sent few minutes
>> ago?
> 
> Unfortunately you add outcb() only in inflatestart and inflateend. IT
> should also go in the main loop.

you are right. The two patches sent by Giuseppe do not solve the problem.

> I think rhabarber should test with this addition too and select which one
> is the good one.

Let's see:

> --- a/lib_generic/zlib.c
> +++ b/lib_generic/zlib.c
> @@ -1129,6 +1129,10 @@ unsigned out;
>  
>      state = (struct inflate_state FAR *)strm->state;
>  
> +    /* call watchdog_reset if needed (addition for U-Boot) */
> +    if (strm->outcb != Z_NULL)
> +        (*strm->outcb)(Z_NULL, 0);
> +
>      /* if it hasn't been done already, allocate space for the window */
>      if (state->window == Z_NULL) {
>          state->window = (unsigned char FAR *)

This patch does not fix the problem.

> @@ -1741,6 +1745,8 @@ int flush;
>              Tracev((stderr, "inflate:       codes ok\n"));
>              state->mode = LEN;
>          case LEN:
> +            if (strm->outcb != Z_NULL) /* for watchdog (U-Boot) */
> +                (*strm->outcb)(Z_NULL, 0);
>              if (have >= 6 && left >= 258) {
>                  RESTORE();
>                  inflate_fast(strm, out);

This patch alone seems to solve the problem, only with it U-Boot could
decompress a Linux image, proven with 10 successful boot attempts. All the
other patches regarding WATCHDOG_RESET() can be ignored.

Tested with U-Boot 2008.09-rc1, the original zlib123-patch from Giuseppe +
your "allow 0 as destination pointer"-patch and the last patch from the
mail quoted above.

Cheers, rhabarber1848

  reply	other threads:[~2009-07-29 10:32 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <002901ca1029@st.com>
2009-07-29  9:20 ` [U-Boot] [PATCH] zlib: allow 0 as destination pointer Alessandro Rubini
2009-07-29 10:32   ` rhabarber1848 [this message]
2009-07-29 10:50     ` Giuseppe CONDORELLI
     [not found] <05a201ca0ec5@st.com>
2009-07-27 15:09 ` [U-Boot] [PATCH v3] zlib: updated to v.1.2.3 Alessandro Rubini
2009-07-27 15:30   ` Stefan Roese
2009-07-27 16:40     ` [U-Boot] [PATCH] zlib: allow 0 as destination pointer Alessandro Rubini
2009-07-27 18:02       ` rhabarber1848
2009-07-27 18:15         ` Wolfgang Denk
2009-07-27 20:13           ` rhabarber1848
2009-07-27 20:45             ` Wolfgang Denk
2009-07-28  6:31       ` Stefan Roese
2009-07-29  6:07         ` Giuseppe CONDORELLI
2009-07-29  6:23           ` Wolfgang Denk
2009-07-29  6:29             ` Giuseppe CONDORELLI
2009-07-29  7:10               ` Wolfgang Denk
2009-07-29  6:53             ` rhabarber1848
2009-07-29  7:11               ` Wolfgang Denk
2009-07-29  8:50                 ` Giuseppe CONDORELLI

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='h4p8g2$rn6$1@ger.gmane.org' \
    --to=rhabarber1848@web.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox